LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
Public Member Functions | Static Public Member Functions | List of all members
lsst.ctrl.events::EventFactory Class Reference

create LSST Events from JMS Messages More...

#include <EventFactory.h>

Public Member Functions

 EventFactory ()
 EventFactory object. This object creates Event objects from TextMessages. More...
 
 ~EventFactory ()
 destructor More...
 

Static Public Member Functions

static EventcreateEvent (cms::TextMessage *msg)
 return an Event object, based on the type received in the TextMessage. More...
 

Detailed Description

create LSST Events from JMS Messages

Definition at line 62 of file EventFactory.h.

Constructor & Destructor Documentation

lsst.ctrl.events::EventFactory::EventFactory ( )

EventFactory object. This object creates Event objects from TextMessages.

Definition at line 65 of file EventFactory.cc.

65  {
66 }
lsst.ctrl.events::EventFactory::~EventFactory ( )

destructor

Definition at line 70 of file EventFactory.cc.

70  {
71 }

Member Function Documentation

Event * lsst.ctrl.events::EventFactory::createEvent ( cms::TextMessage *  msg)
static

return an Event object, based on the type received in the TextMessage.

Returns
An Event object

Definition at line 76 of file EventFactory.cc.

76  {
77  vector<std::string> names = msg->getPropertyNames();
78 
79 /*
80  for (unsigned int i = 0; i < names.size(); i++)
81  std::cout << names[i] << std::endl;
82 */
83 
84  std::string _type = msg->getStringProperty("TYPE");
85 
86  if (_type == EventTypes::LOG) {
87  return new LogEvent(msg);
88  } else if (_type == EventTypes::STATUS) {
89  return new StatusEvent(msg);
90  } else if (_type == EventTypes::COMMAND) {
91  return new CommandEvent(msg);
92  } else if (_type == EventTypes::PIPELINELOG) {
93  return new PipelineLogEvent(msg);
94  }
95  return new Event(msg);
96 }
static const std::string PIPELINELOG
Definition: EventTypes.h:50
static const std::string LOG
Definition: EventTypes.h:47
static const std::string STATUS
Definition: EventTypes.h:48
static const std::string COMMAND
Definition: EventTypes.h:49

The documentation for this class was generated from the following files: