48 unsigned int timeSincePrevTrigger = 0,
49 unsigned int bunchNumber = 0) :
154 template<EventT0Source source>
206 EventT0Source::c_fromCDC +
207 EventT0Source::c_fromECL);
void setInvalid()
set that stored information is valid
void setTimeSinceLastInjection(unsigned int timeSinceLastInjection)
set time since the last injection (i.e. the injection-pre-kick signal) in clock ticks (FTSW clock)
bool m_isHER
Injection is in HER/LER.
EventLevelTriggerTimeInfo(bool isValid=false, bool isHER=false, bool revo2=false, unsigned int timeSinceLastInjection=c_flagNoInjection, unsigned int timeSincePrevTrigger=0, unsigned int bunchNumber=0)
Constructor.
int getTriggeredBunchNumberGlobal() const
get the actual (=global) number of the triggered bunch
int getTimeSinceInjectedBunch() const
get time since the injected bunch passed the detector in clock ticks (FTSW clock)
unsigned int getBunchNumber() const
get number of triggered bunch as provided by TTD
void addEventT0SourceFromSVD()
Add the flag c_fromSVD to the EventT0 source mask.
void addEventT0SourceFromECL()
Add the flag c_fromECL to the EventT0 source mask.
static const unsigned int c_flagNoInjection
This number is defined by the FTSW to indicate no injection happened recently.
unsigned int m_timeSincePrevTrigger
Time since the previous trigger in clock ticks (127MHz=RF/4 clock)
unsigned int getTimeSincePrevTrigger() const
get time since the previous trigger in clock ticks (FTSW clock)
bool hasInjection() const
get if an injection happened recently (and the corresponding stored data is actually valid)
void unsetEventT0SourceFromSVD()
Remove the flag c_fromSVD from the EventT0 source mask.
void setIsHER(bool isHER)
set if injection in HER/LER
void addEventT0Sources(EventT0Source sources)
Add a specific flag (or combination of flags) to the EventT0 source mask.
bool isValid() const
get if stored information is valid
~EventLevelTriggerTimeInfo()
Destructor.
bool hasAnyEventT0Sources() const
Return if at least one flag is set in the EventT0 source mask.
void unsetEventT0SourceFromCDC()
Remove the flag c_fromCDC from the EventT0 source mask.
unsigned int m_bunchNumber
Number of triggered bunch, ranging from 0-1279 (in 127MHz clock ticks) Note: There are a maximum of 5...
unsigned int getTimeSinceLastInjection() const
get time since the last injection (i.e. the injection-pre-kick signal) in clock ticks (FTSW clock)
unsigned int m_timeSinceLastInjection
Time since the last injection in clock ticks (127MHz=RF/4 clock) Note: A value of 0x7FFFFFFF (see c_f...
void resetEventT0Sources()
Reset all the flags from the EventT0 source mask (aka: set the "total" mask to 0)
double getTimeSincePrevTriggerInMicroSeconds() const
get time since the previous trigger in microseconds
bool m_revo2
Lowest bit of revolution counter (PXD needs ~2 revolutions to readout one frame)
void setRevo2(bool revo2)
set lowest bit of revolution counter
bool hasEventT0SourceFromECL() const
Return if the c_fromECL flag is set in the EventT0 source mask.
void addEventT0SourceFromCDC()
Add the flag c_fromCDC to the EventT0 source mask.
void setSources(bool setTo)
Generic setter for the EventT0Source flags.
bool hasEventT0SourceFromCDC() const
Return if the c_fromCDC flag is set in the EventT0 source mask.
bool isRevo2() const
get lowest bit of revolution counter
EventT0Source
Flags for the EventT0 source.
void setBunchNumber(unsigned int bunchNumber)
set number of triggered bunch
static constexpr EventT0Source c_fromAllSubdetectors
tells ROOT not to write it to file (transient)
void unsetEventT0Sources(EventT0Source sources)
Unset a specific flag (or combination of flags) from the EventT0 source mask.
void setValid()
set that stored information is valid
void setTimeSincePrevTrigger(unsigned int timeSincePrevTrigger)
set time since the previous trigger in clock ticks (FTSW clock)
const EventT0Source & getEventT0Sources() const
Return the EventT0 source mask.
bool isHER() const
get if last injection was in HER/LER
bool hasEventT0Sources(EventT0Source sources) const
Return if the specific flag is set in the EventT0 source mask.
void setNoInjection()
set that no injection happened recently (and the corresponding stored data is actually invalid)
void unsetEventT0SourceFromECL()
Remove the flag c_fromECL from the EventT0 source mask.
bool m_isValid
Data stored in this TTD info object is actually valid.
double getTimeSinceInjectedBunchInMicroSeconds() const
get time since the injected bunch passed the detector in microseconds
bool hasEventT0SourceFromSVD() const
Return if the c_fromSVD flag is set in the EventT0 source mask.
EventT0Source m_eventT0Source
Mask for storing which subdetectors contributed to the EventT0.
double getTimeSinceLastInjectionInMicroSeconds() const
get time since the last injection (i.e. the injection-pre-kick signal) in microseconds
Abstract base class for different kinds of events.