#include <XtcEventId.h>
Inheritance diagram for PSXtcInput::XtcEventId:
Public Member Functions | |
XtcEventId (int run, const PSTime::Time &time, unsigned fiducials, unsigned ticks, unsigned vector, unsigned control) | |
~XtcEventId () | |
virtual PSTime::Time | time () const |
Return the time for event. | |
virtual int | run () const |
Return the run number for event. | |
virtual unsigned | fiducials () const |
Returns fiducials counter for the event. | |
virtual unsigned | ticks () const |
Returns 119MHz counter within the fiducial. | |
virtual unsigned | vector () const |
Returns event counter since Configure. | |
virtual unsigned | control () const |
Returns control - alternate representation of Xtc header. | |
virtual bool | operator== (const EventId &other) const |
check if two event IDs refer to the same event | |
virtual bool | operator< (const EventId &other) const |
Compare two event IDs for ordering purpose. | |
virtual void | print (std::ostream &os) const |
Dump object in human-readable format. |
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Definition at line 50 of file XtcEventId.h.
PSXtcInput::XtcEventId::XtcEventId | ( | int | run, | |
const PSTime::Time & | time, | |||
unsigned | fiducials, | |||
unsigned | ticks, | |||
unsigned | vector, | |||
unsigned | control | |||
) |
Definition at line 39 of file XtcEventId.cpp.
PSXtcInput::XtcEventId::~XtcEventId | ( | ) |
Definition at line 53 of file XtcEventId.cpp.
unsigned PSXtcInput::XtcEventId::control | ( | ) | const [virtual] |
Returns control - alternate representation of Xtc header.
Implements PSEvt::EventId.
Definition at line 108 of file XtcEventId.cpp.
unsigned PSXtcInput::XtcEventId::fiducials | ( | ) | const [virtual] |
Returns fiducials counter for the event.
Note that MCC sends fiducials as 17-bit number which overflows frequently (fiducials clock runs at 360Hz) so this number is not unique. In some cases (e.g. when reading from old HDF5 files) fiducials is not know, 0 will be returned in this case.
Implements PSEvt::EventId.
Definition at line 81 of file XtcEventId.cpp.
bool PSXtcInput::XtcEventId::operator< | ( | const EventId & | other | ) | const [virtual] |
bool PSXtcInput::XtcEventId::operator== | ( | const EventId & | other | ) | const [virtual] |
void PSXtcInput::XtcEventId::print | ( | std::ostream & | os | ) | const [virtual] |
Dump object in human-readable format.
Implements PSEvt::EventId.
Definition at line 129 of file XtcEventId.cpp.
int PSXtcInput::XtcEventId::run | ( | ) | const [virtual] |
Return the run number for event.
If run number is not known -1 will be returned.
Implements PSEvt::EventId.
Definition at line 72 of file XtcEventId.cpp.
unsigned PSXtcInput::XtcEventId::ticks | ( | ) | const [virtual] |
Returns 119MHz counter within the fiducial.
Returns the value of 119MHz counter within the fiducial for the event code which initiated the readout. In some cases (e.g. when reading from old HDF5 files) ticks are not know, 0 will be returned in this case.
Implements PSEvt::EventId.
Definition at line 90 of file XtcEventId.cpp.
PSTime::Time PSXtcInput::XtcEventId::time | ( | ) | const [virtual] |
unsigned PSXtcInput::XtcEventId::vector | ( | ) | const [virtual] |
Returns event counter since Configure.
Note that counter is saved as 15-bits integer and will overflow frequently. In some cases (e.g. when reading from old HDF5 files) counter is not know, 0 will be returned in this case.
Implements PSEvt::EventId.
Definition at line 99 of file XtcEventId.cpp.