#include <EventId.h>
Inheritance diagram for PSEvt::EventId:
Public Member Functions | |
virtual | ~EventId () |
virtual PSTime::Time | time () const =0 |
Return the time for event. | |
virtual int | run () const =0 |
Return the run number for event. | |
virtual unsigned | fiducials () const =0 |
Returns fiducials counter for the event. | |
virtual unsigned | ticks () const =0 |
Returns 119MHz counter within the fiducial. | |
virtual unsigned | vector () const =0 |
Returns event counter since Configure. | |
virtual unsigned | control () const =0 |
internal bits for alternate intepratation of XTC header fields | |
virtual bool | operator== (const EventId &other) const =0 |
check if two event IDs refer to the same event | |
virtual bool | operator< (const EventId &other) const =0 |
Compare two event IDs for ordering purpose. | |
virtual void | print (std::ostream &os) const =0 |
Dump object in human-readable format. | |
Protected Member Functions | |
EventId () |
Event ID should include enough information to uniquely identify an event (and possibly a location of the event in data file). Currently we include event timestamp (PSTime::Time object) and run number into Event ID.
Implementation of this interface will probably be tied to a particular input data format so the interface will be implemented in the packages responsible for reading data (e.g. PSXtcInput).
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Definition at line 62 of file EventId.h.
virtual unsigned PSEvt::EventId::control | ( | ) | const [pure virtual] |
internal bits for alternate intepratation of XTC header fields
Implemented in PSXtcInput::XtcEventId.
virtual unsigned PSEvt::EventId::fiducials | ( | ) | const [pure 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.
Implemented in PSXtcInput::XtcEventId.
virtual bool PSEvt::EventId::operator< | ( | const EventId & | other | ) | const [pure virtual] |
Compare two event IDs for ordering purpose.
virtual bool PSEvt::EventId::operator== | ( | const EventId & | other | ) | const [pure virtual] |
check if two event IDs refer to the same event
virtual void PSEvt::EventId::print | ( | std::ostream & | os | ) | const [pure virtual] |
Dump object in human-readable format.
Implemented in PSXtcInput::XtcEventId.
Referenced by PSEvt::operator<<().
virtual int PSEvt::EventId::run | ( | ) | const [pure virtual] |
Return the run number for event.
If run number is not known -1 will be returned.
Implemented in PSXtcInput::XtcEventId.
virtual unsigned PSEvt::EventId::ticks | ( | ) | const [pure 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.
Implemented in PSXtcInput::XtcEventId.
virtual PSTime::Time PSEvt::EventId::time | ( | ) | const [pure virtual] |
virtual unsigned PSEvt::EventId::vector | ( | ) | const [pure 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.
Implemented in PSXtcInput::XtcEventId.