13#include <svd/dataobjects/SVDModeByte.h>
14#include <svd/dataobjects/SVDTriggerType.h>
15#include <framework/database/DBObjPtr.h>
16#include <framework/dbobjects/HardwareClockSettings.h>
154 m_apvClockPeriod = 1. / hwClock->getClockFrequency(Const::EDetector::SVD,
"sampling");
196 std::ostringstream os;
198 os <<
" Full SVDModeByte: " << (
unsigned int)thisMode << std::endl;
199 os <<
" Triggerbin: " << (
unsigned int) thisMode.
getTriggerBin() << std::endl;
200 os <<
"RunType: " << (
unsigned int)thisMode.
getRunType() <<
", EventType: " << (
unsigned int) thisMode.
getEventType() <<
201 ", DAQMode: " << (
unsigned int) thisMode.
getDAQMode() << std::endl;
202 os <<
" ModeByte Match: " << thisModeMatch << std::endl;
203 os <<
" Trigger Type: " << (
unsigned int)thisType.
getType() << std::endl;
204 os <<
" TriggerType Match: " << thisTriggerMatch << std::endl;
205 os <<
" Cross Talk: " << (thisXtalk ?
"true" :
"false") << std::endl;
206 os <<
" Relative Shift 3/6: " << (
unsigned int)thisRelativeShift << std::endl;
207 os <<
" Number of APV samples: " << (
unsigned int)thisNsamples << std::endl;
bool isValid() const
Check whether a valid object was obtained from the database.
Class for accessing objects in the database.
Stores SVDModeByte object with Trigger time, DAQ mode, Run type & Event type! Also - the information ...
bool isCrossTalkEvent()
X-talk info getter Gets the X-talk info for the event.
double getTimeInFTSWReference(double time_in_SVD, int firstFrame) const
getTimeInFTSWReference it takes the cluster time in SVD reference (t = 0 at FF, in either 3- or 6-sam...
void setModeByte(SVDModeByte mode)
SVDModeByte setter Sets the SVDModeByte data in the EventInfo object.
~SVDEventInfo()
Destructor.
float getSVD2FTSWTimeShift(int firstFrame) const
returns the time shift between SVD reference (t = 0 at the FF) and the FTSW (Trigger) reference
void setRelativeShift(int relativeShift)
relative 3/6 shift Sets the relative shift in latency in data taken in 3/6 samples int between 0 and ...
std::string toString() const
Display main parameters in this object.
void setCrossTalk(bool xtalk)
x-Talk setter Sets the x-talk info in the EventInfo object
void setMatchModeByte(bool modematch)
Match ModeByte setter Sets the flag telling us if the SVDModeByte object is the same for each FADCs i...
bool setAPVClock(DBObjPtr< HardwareClockSettings > hwClock)
sets the APV clock period.
void setNSamples(int nAPVsamples)
nAPVsamples setter Sets the number of acquired samples (3 or 6) found in the raw data
void setMatchTriggerType(bool triggermatch)
Match TriggerType setter Sets the flag telling us if the SVDTriggerType object is the same for each F...
int getNSamples() const
returns the number of samples: 6, 3 or 1
SVDTriggerType::baseType m_triggerType
information on the Trigger type
float getSamplingDelayInNs() const
getSamplingDelayInNs() returns the delay of the sampling with respect to the sampling of the 6-sample...
ClassDef(SVDEventInfo, 3)
class def needed by root
void setTriggerType(SVDTriggerType type)
SVDTriggerType setter Sets the type of SVDTrigger in the EventInfo object.
bool m_ModeByteMatch
flag telling if the SVDModeByte object is the same for each FADCs in the event
SVDEventInfo(SVDModeByte mode=SVDModeByte(), SVDTriggerType type=SVDTriggerType())
Constructor.
SVDModeByte getModeByte() const
SVDModeByte getter Gets the SVDModeByte info for the event.
bool m_Xtalk
information on the x-talk
bool getMatchModeByte()
MatchModeByte getter Gets the flag telling us if the SVDModeByte object is the same for each FADCs in...
double getTimeInSVDReference(double time_in_FTSW, int firstFrame) const
getTimeInSVDReference it takes the cluster time in FTSW reference and provides the time in the SVD re...
SVDModeByte::baseType m_modeByte
SVDModeByte object (runType + eventType + DAQmode + TriggerBin)
bool m_TriggerTypeMatch
flag telling if the SVDTriggerType object is the same for each FADCs in the event
int m_relativeTimeShift
relative shift in units of APV-clock/4 between 3- and 6-sample acquired events
SVDTriggerType getTriggerType() const
SVDTriggerType getter Gets the type of SVDTrigger for the event.
int m_nAPVsamples
number of acquired samples
int getRelativeShift() const
getRelativeShift returns the relative shift in data taken in 3/6 samples A number between 0 and 15 as...
bool getMatchTriggerType()
Match TriggerType getter Gets the flag telling us if the SVDTriggerType object is the same for each F...
double m_apvClockPeriod
APV clock period.
Class to store SVD mode information.
baseType getRunType() const
Get the runMode id.
baseType getEventType() const
Get the eventMode id.
baseType getTriggerBin() const
Get the triggerBin id.
uint8_t baseType
The base integer type for SVDModeByte.
baseType getDAQMode() const
Get the daqMode id.
Class to store Trigger Type information.
uint8_t baseType
The base integer type for SVDTriggerType.
baseType getType() const
Get the unique type.
int getID(const std::vector< double > &breaks, double t)
get id of the time point t
static const baseType c_DefaultID
Default / non-informative id 10010111 = 151 Run type: zero-suppressed, 2 Event type: global run,...
Abstract base class for different kinds of events.