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 Attributes | Protected Member Functions | Private Member Functions | List of all members
lsst.ctrl.events::CommandEvent Class Reference

Representation of an LSST Event. More...

#include <CommandEvent.h>

Inheritance diagram for lsst.ctrl.events::CommandEvent:
lsst.ctrl.events::Event

Public Member Functions

 CommandEvent ()
 Creates CommandEvent which contains a PropertySet. More...
 
 CommandEvent (const std::string &runid, const int64_t originatorId, const int64_t destinationId, const PropertySet &ps)
 
 CommandEvent (const std::string &runid, const int64_t originatorId, const int64_t destinationId, const PropertySet::Ptr psp)
 
 CommandEvent (cms::TextMessage *msg)
 
virtual void populateHeader (cms::TextMessage *msg) const
 
virtual ~CommandEvent ()
 destructor More...
 
int64_t getOriginatorId ()
 
short getOriginatorLocalId ()
 
int getOriginatorProcessId ()
 
int getOriginatorIPId ()
 
int64_t getDestinationId ()
 
short getDestinationLocalId ()
 
int getDestinationProcessId ()
 
int getDestinationIPId ()
 
- Public Member Functions inherited from lsst.ctrl.events::Event
 Event ()
 
 Event (const std::string &runid, const PropertySet::Ptr ps)
 
 Event (const std::string &runid, const PropertySet &ps)
 
 Event (cms::TextMessage *msg)
 
virtual ~Event ()
 destructor More...
 
PropertySet::Ptr getPropertySet () const
 
std::string getPubDate ()
 Get the publication date of this event. More...
 
long long getPubTime ()
 
void setPubTime (long long t)
 
long long getEventTime ()
 
void setEventTime (long long nsecs)
 
void updateEventTime ()
 
std::string getEventDate ()
 Get the creation date of this event. More...
 
std::string getHostId ()
 
std::string getRunId ()
 
std::string getType ()
 
std::string getStatus ()
 
void setStatus (std::string status)
 
void setTopic (std::string topic)
 
std::string getTopic ()
 
vector< std::string > getFilterablePropertyNames ()
 
vector< std::string > getCustomPropertyNames ()
 
PropertySet::Ptr getCustomPropertySet () const
 
void marshall (cms::TextMessage *msg)
 
 ExceptionEvent ()
 
 ExceptionEvent (const std::string &runid, const LSSTException ex)
 
 ExceptionEvent (cms::TextMessage *msg)
 
 ~LogEvent ()
 
void populateHeader (cms::TextMessage *msg)
 
std::string getExceptionType ()
 
std::string getStackTrace ()
 

Static Public Attributes

static const std::string ORIGINATORID = "ORIGINATORID"
 
static const std::string ORIG_LOCALID = "ORIG_LOCALID"
 
static const std::string ORIG_PROCESSID = "ORIG_PROCESSID"
 
static const std::string ORIG_IPID = "ORIG_IPID"
 
static const std::string DESTINATIONID = "DESTINATIONID"
 
static const std::string DEST_LOCALID = "DEST_LOCALID"
 
static const std::string DEST_PROCESSID = "DEST_PROCESSID"
 
static const std::string DEST_IPID = "DEST_IPID"
 
- Static Public Attributes inherited from lsst.ctrl.events::Event
static const std::string TYPE = "TYPE"
 Creates Event which contains a PropertySet. More...
 
static const std::string EVENTTIME = "EVENTTIME"
 
static const std::string HOSTID = "HOSTID"
 
static const std::string RUNID = "RUNID"
 
static const std::string STATUS = "STATUS"
 
static const std::string TOPIC = "TOPIC"
 
static const std::string PUBTIME = "PUBTIME"
 
static const std::string UNINITIALIZED = "uninitialized"
 
static const std::string EXCEPTIONTYPE
 
static const std::string STACKTRACE
 

Protected Member Functions

void _constructor (const std::string &runId, const int64_t originatorId, const int64_t destinationId, const PropertySet &ps)
 
- Protected Member Functions inherited from lsst.ctrl.events::Event
void _init ()
 
void _constructor (const std::string &runid, const PropertySet &ps)
 
void splitString (std::string str, std::string delim, std::vector< std::string > &results)
 
void splitTuple (std::string str, std::string delim, std::vector< std::string > &results)
 

Private Member Functions

void _init ()
 

Additional Inherited Members

- Protected Attributes inherited from lsst.ctrl.events::Event
PropertySet::Ptr _psp
 
set< std::string > _keywords
 

Detailed Description

Representation of an LSST Event.

Definition at line 63 of file CommandEvent.h.

Constructor & Destructor Documentation

lsst.ctrl.events::CommandEvent::CommandEvent ( )

Creates CommandEvent which contains a PropertySet.

Definition at line 75 of file CommandEvent.cc.

75  : Event() {
76  _init();
77 }
lsst.ctrl.events::CommandEvent::CommandEvent ( const std::string &  runid,
const int64_t  originatorId,
const int64_t  destinationId,
const PropertySet ps 
)

Definition at line 112 of file CommandEvent.cc.

112  : Event(runId, ps) {
113  _constructor(runId, originatorId, destinationId, ps);
114 }
void _constructor(const std::string &runId, const int64_t originatorId, const int64_t destinationId, const PropertySet &ps)
lsst.ctrl.events::CommandEvent::CommandEvent ( const std::string &  runid,
const int64_t  originatorId,
const int64_t  destinationId,
const PropertySet::Ptr  psp 
)

Definition at line 108 of file CommandEvent.cc.

108  : Event(runId, *psp) {
109  _constructor(runId, originatorId, destinationId, *psp);
110 }
void _constructor(const std::string &runId, const int64_t originatorId, const int64_t destinationId, const PropertySet &ps)
lsst.ctrl.events::CommandEvent::CommandEvent ( cms::TextMessage *  msg)

Definition at line 92 of file CommandEvent.cc.

92  : Event(msg) {
93  _init();
94 
95 
96  _psp->set(ORIGINATORID, (int64_t)msg->getLongProperty(ORIGINATORID));
97  _psp->set(ORIG_LOCALID, (short)msg->getShortProperty(ORIG_LOCALID));
98  _psp->set(ORIG_PROCESSID, (int)msg->getIntProperty(ORIG_PROCESSID));
99  _psp->set(ORIG_IPID, (int)msg->getIntProperty(ORIG_IPID));
100 
101  _psp->set(DESTINATIONID, (int64_t)msg->getLongProperty(DESTINATIONID));
102  _psp->set(DEST_LOCALID, (short)msg->getShortProperty(DEST_LOCALID));
103  _psp->set(DEST_PROCESSID, (int)msg->getIntProperty(DEST_PROCESSID));
104  _psp->set(DEST_IPID, (int)msg->getIntProperty(DEST_IPID));
105 
106 }
PropertySet::Ptr _psp
Definition: Event.h:117
static const std::string ORIG_PROCESSID
Definition: CommandEvent.h:68
static const std::string DESTINATIONID
Definition: CommandEvent.h:71
static const std::string DEST_LOCALID
Definition: CommandEvent.h:72
static const std::string ORIG_IPID
Definition: CommandEvent.h:69
static const std::string DEST_IPID
Definition: CommandEvent.h:74
static const std::string ORIGINATORID
Definition: CommandEvent.h:66
static const std::string DEST_PROCESSID
Definition: CommandEvent.h:73
static const std::string ORIG_LOCALID
Definition: CommandEvent.h:67
lsst.ctrl.events::CommandEvent::~CommandEvent ( )
virtual

destructor

Definition at line 184 of file CommandEvent.cc.

184  {
185 }

Member Function Documentation

void lsst.ctrl.events::CommandEvent::_constructor ( const std::string &  runId,
const int64_t  originatorId,
const int64_t  destinationId,
const PropertySet ps 
)
protected

Definition at line 116 of file CommandEvent.cc.

116  {
117  _init();
118 
119  EventSystem eventSystem = EventSystem().getDefaultEventSystem();
120 
121  //_originatorId = eventSystem.createOriginatorId();
122  _psp->set(ORIGINATORID, originatorId);
123  _psp->set(ORIG_LOCALID, eventSystem.extractLocalId(originatorId));
124  _psp->set(ORIG_PROCESSID, eventSystem.extractProcessId(originatorId));
125  _psp->set(ORIG_IPID, eventSystem.extractIPId(originatorId));
126 
127  _psp->set(DESTINATIONID, destinationId);
128  _psp->set(DEST_LOCALID, eventSystem.extractLocalId(destinationId));
129  _psp->set(DEST_PROCESSID, eventSystem.extractProcessId(destinationId));
130  _psp->set(DEST_IPID, eventSystem.extractIPId(destinationId));
131 
133 
134 }
PropertySet::Ptr _psp
Definition: Event.h:117
static const std::string ORIG_PROCESSID
Definition: CommandEvent.h:68
static const std::string DESTINATIONID
Definition: CommandEvent.h:71
static const std::string TYPE
Creates Event which contains a PropertySet.
Definition: Event.h:71
static const std::string DEST_LOCALID
Definition: CommandEvent.h:72
static const std::string ORIG_IPID
Definition: CommandEvent.h:69
static const std::string DEST_IPID
Definition: CommandEvent.h:74
static const std::string COMMAND
Definition: EventTypes.h:49
static const std::string ORIGINATORID
Definition: CommandEvent.h:66
static const std::string DEST_PROCESSID
Definition: CommandEvent.h:73
static const std::string ORIG_LOCALID
Definition: CommandEvent.h:67
void lsst.ctrl.events::CommandEvent::_init ( )
private

Definition at line 80 of file CommandEvent.cc.

80  {
81  _keywords.insert(ORIGINATORID);
82  _keywords.insert(ORIG_LOCALID);
83  _keywords.insert(ORIG_PROCESSID);
84  _keywords.insert(ORIG_IPID);
85 
86  _keywords.insert(DESTINATIONID);
87  _keywords.insert(DEST_LOCALID);
88  _keywords.insert(DEST_PROCESSID);
89  _keywords.insert(DEST_IPID);
90 }
static const std::string ORIG_PROCESSID
Definition: CommandEvent.h:68
static const std::string DESTINATIONID
Definition: CommandEvent.h:71
static const std::string DEST_LOCALID
Definition: CommandEvent.h:72
static const std::string ORIG_IPID
Definition: CommandEvent.h:69
static const std::string DEST_IPID
Definition: CommandEvent.h:74
static const std::string ORIGINATORID
Definition: CommandEvent.h:66
static const std::string DEST_PROCESSID
Definition: CommandEvent.h:73
set< std::string > _keywords
Definition: Event.h:118
static const std::string ORIG_LOCALID
Definition: CommandEvent.h:67
int64_t lsst.ctrl.events::CommandEvent::getDestinationId ( )

Definition at line 166 of file CommandEvent.cc.

166  {
167  return _psp->get<int64_t>(DESTINATIONID);
168 }
PropertySet::Ptr _psp
Definition: Event.h:117
static const std::string DESTINATIONID
Definition: CommandEvent.h:71
int lsst.ctrl.events::CommandEvent::getDestinationIPId ( )

Definition at line 178 of file CommandEvent.cc.

178  {
179  return _psp->get<int>(DEST_IPID);
180 }
PropertySet::Ptr _psp
Definition: Event.h:117
static const std::string DEST_IPID
Definition: CommandEvent.h:74
short lsst.ctrl.events::CommandEvent::getDestinationLocalId ( )

Definition at line 170 of file CommandEvent.cc.

170  {
171  return _psp->get<short>(DEST_LOCALID);
172 }
PropertySet::Ptr _psp
Definition: Event.h:117
static const std::string DEST_LOCALID
Definition: CommandEvent.h:72
int lsst.ctrl.events::CommandEvent::getDestinationProcessId ( )

Definition at line 174 of file CommandEvent.cc.

174  {
175  return _psp->get<int>(DEST_PROCESSID);
176 }
PropertySet::Ptr _psp
Definition: Event.h:117
static const std::string DEST_PROCESSID
Definition: CommandEvent.h:73
int64_t lsst.ctrl.events::CommandEvent::getOriginatorId ( )

Definition at line 150 of file CommandEvent.cc.

150  {
151  return _psp->get<int64_t>(ORIGINATORID);
152 }
PropertySet::Ptr _psp
Definition: Event.h:117
static const std::string ORIGINATORID
Definition: CommandEvent.h:66
int lsst.ctrl.events::CommandEvent::getOriginatorIPId ( )

Definition at line 162 of file CommandEvent.cc.

162  {
163  return _psp->get<int>(ORIG_IPID);
164 }
PropertySet::Ptr _psp
Definition: Event.h:117
static const std::string ORIG_IPID
Definition: CommandEvent.h:69
short lsst.ctrl.events::CommandEvent::getOriginatorLocalId ( )

Definition at line 154 of file CommandEvent.cc.

154  {
155  return _psp->get<short>(ORIG_LOCALID);
156 }
PropertySet::Ptr _psp
Definition: Event.h:117
static const std::string ORIG_LOCALID
Definition: CommandEvent.h:67
int lsst.ctrl.events::CommandEvent::getOriginatorProcessId ( )

Definition at line 158 of file CommandEvent.cc.

158  {
159  return _psp->get<int>(ORIG_PROCESSID);
160 }
PropertySet::Ptr _psp
Definition: Event.h:117
static const std::string ORIG_PROCESSID
Definition: CommandEvent.h:68
void lsst.ctrl.events::CommandEvent::populateHeader ( cms::TextMessage *  msg) const
virtual

Reimplemented from lsst.ctrl.events::Event.

Definition at line 136 of file CommandEvent.cc.

136  {
138 
139  msg->setLongProperty(ORIGINATORID, _psp->get<int64_t>(ORIGINATORID));
140  msg->setShortProperty(ORIG_LOCALID, _psp->get<short>(ORIG_LOCALID));
141  msg->setIntProperty(ORIG_PROCESSID, _psp->get<int>(ORIG_PROCESSID));
142  msg->setIntProperty(ORIG_IPID, _psp->get<int>(ORIG_IPID));
143 
144  msg->setLongProperty(DESTINATIONID, _psp->get<int64_t>(DESTINATIONID));
145  msg->setShortProperty(DEST_LOCALID, _psp->get<short>(DEST_LOCALID));
146  msg->setIntProperty(DEST_PROCESSID, _psp->get<int>(DEST_PROCESSID));
147  msg->setIntProperty(DEST_IPID, _psp->get<int>(DEST_IPID));
148 }
virtual void populateHeader(cms::TextMessage *msg) const
Definition: Event.cc:201
PropertySet::Ptr _psp
Definition: Event.h:117
static const std::string ORIG_PROCESSID
Definition: CommandEvent.h:68
static const std::string DESTINATIONID
Definition: CommandEvent.h:71
static const std::string DEST_LOCALID
Definition: CommandEvent.h:72
static const std::string ORIG_IPID
Definition: CommandEvent.h:69
static const std::string DEST_IPID
Definition: CommandEvent.h:74
static const std::string ORIGINATORID
Definition: CommandEvent.h:66
static const std::string DEST_PROCESSID
Definition: CommandEvent.h:73
static const std::string ORIG_LOCALID
Definition: CommandEvent.h:67

Member Data Documentation

const std::string lsst.ctrl.events::CommandEvent::DEST_IPID = "DEST_IPID"
static

Definition at line 74 of file CommandEvent.h.

const std::string lsst.ctrl.events::CommandEvent::DEST_LOCALID = "DEST_LOCALID"
static

Definition at line 72 of file CommandEvent.h.

const std::string lsst.ctrl.events::CommandEvent::DEST_PROCESSID = "DEST_PROCESSID"
static

Definition at line 73 of file CommandEvent.h.

const std::string lsst.ctrl.events::CommandEvent::DESTINATIONID = "DESTINATIONID"
static

Definition at line 71 of file CommandEvent.h.

const std::string lsst.ctrl.events::CommandEvent::ORIG_IPID = "ORIG_IPID"
static

Definition at line 69 of file CommandEvent.h.

const std::string lsst.ctrl.events::CommandEvent::ORIG_LOCALID = "ORIG_LOCALID"
static

Definition at line 67 of file CommandEvent.h.

const std::string lsst.ctrl.events::CommandEvent::ORIG_PROCESSID = "ORIG_PROCESSID"
static

Definition at line 68 of file CommandEvent.h.

const std::string lsst.ctrl.events::CommandEvent::ORIGINATORID = "ORIGINATORID"
static

Definition at line 66 of file CommandEvent.h.


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