FACT++  1.0
Event::Event ( const EventImp evt,
const char *  ptr,
size_t  siz 
)

Copies the all contents from an EventImp. fData is initialized from the given memory. If the name contains a slash ('/') everything before the slash is removed.

Parameters
evtReference to an object of type EventImp.
ptrPointer to the memory region to be copied.
sizSize of the memory region to be copied.

Definition at line 83 of file Event.cc.

References fName.

83  : EventImp(evt),
84 fName(evt.GetName()), fFormat(evt.GetFormat()),
85 fData(ptr, ptr+siz), fTime(evt.GetTime()), fQoS(evt.GetQoS()), fEmpty(ptr==0)
86 {
87  const size_t pos = fName.find_first_of('/');
88  if (pos!=string::npos)
89  fName = fName.substr(pos+1);
90 }
bool fEmpty
Quality of service.
Definition: Event.h:17
EventImp()
Constructor. Stores the target state given.
Definition: EventImp.h:20
std::vector< char > fData
A human readable description of the event.
Definition: Event.h:13
virtual Time GetTime() const
Definition: EventImp.h:57
virtual std::string GetFormat() const
Definition: EventImp.h:52
virtual int GetQoS() const
Definition: EventImp.h:58
virtual std::string GetName() const
Definition: EventImp.h:51
int fQoS
Time stamp.
Definition: Event.h:16
std::string fFormat
A name associated with the event.
Definition: Event.h:10
Time fTime
Data associated with this event.
Definition: Event.h:15
std::string fName
Definition: Event.h:9