1 #include "StTriggerDataMaker.h"
4 #include "StDAQMaker/StDAQReader.h"
5 #include "StDAQMaker/StTRGReader.h"
6 #include "StDaqLib/TRG/trgStructures2003.h"
7 #include "StEvent/StTriggerData2003.h"
8 #include "StDaqLib/TRG/trgStructures2004.h"
9 #include "StEvent/StTriggerData2004.h"
10 #include "StDaqLib/TRG/trgStructures2005.h"
11 #include "StEvent/StTriggerData2005.h"
12 #include "StDaqLib/TRG/trgStructures2007.h"
13 #include "StEvent/StTriggerData2007.h"
14 #include "StDaqLib/TRG/trgStructures2008.h"
15 #include "StEvent/StTriggerData2008.h"
16 #include "StDaqLib/TRG/trgStructures2009.h"
17 #include "StEvent/StTriggerData2009.h"
18 #include "StDaqLib/TRG/trgStructures2012.h"
19 #include "StEvent/StTriggerData2012.h"
20 #include "StDaqLib/TRG/trgStructures2013.h"
21 #include "StEvent/StTriggerData2013.h"
22 #include "StDaqLib/TRG/trgStructures2016.h"
23 #include "StEvent/StTriggerData2016.h"
24 #include "StDaqLib/TRG/trgStructures2017.h"
25 #include "StEvent/StTriggerData2017.h"
26 #include "StDaqLib/TRG/trgStructures2018.h"
27 #include "StEvent/StTriggerData2018.h"
28 #include "StDaqLib/TRG/trgStructures2019.h"
29 #include "StEvent/StTriggerData2019.h"
30 #include "StDaqLib/TRG/trgStructures2022.h"
31 #include "StEvent/StTriggerData2022.h"
41 LOG_INFO <<
"Constructing StTriggerDataMaker with name=" << name << endm;
49 LOG_DEBUG <<
"StTriggerDataMaker Make() starting..........Run="
50 <<
GetRunNumber() <<
" : Event=" << GetEventNumber() << endm;
67 St_DataSet* daqReaderDS = GetDataSet(
"StDAQReader");
68 if (!daqReaderDS)
return kStWarn;
72 run = daqReader->getRunNumber();
75 if (trgReader && ( year = trgReader->getYear()) ){
77 LOG_INFO <<
"StTriggerDataMaker Make() found old data for year " << year << endm;
80 trgdata2003=trgReader->getDataType2003();
81 if (!trgdata2003)
return kStWarn;
85 trgdata2004=trgReader->getDataType2004();
86 if (!trgdata2004)
return kStWarn;
90 trgdata2005=trgReader->getDataType2005();
91 if (!trgdata2005)
return kStWarn;
95 trgdata2007=trgReader->getDataType2007();
96 if (!trgdata2007)
return kStWarn;
100 trgdata2008=trgReader->getDataType2008();
101 if (!trgdata2008)
return kStWarn;
106 if(mDebug>1) LOG_INFO <<
"StTriggerDataMaker Make() found no old format data, trying to get new data format" << endm;
110 char*
data = daqData->GetTable();
112 char version = data[3];
113 LOG_INFO << Form(
"StTriggerDataMaker Make() found new data formt with version = %02x%02x%02x%02x",
114 data[0],data[1],data[2],data[3]) << endm;
157 LOG_INFO <<
"StTriggerDataMaker Make() found new data but with unknown version = " << version << endm;
160 LOG_INFO <<
"StTriggerDataMaker Make() found no new data format neither" << endm;
163 LOG_WARN <<
"StTriggerDataMaker Make() - GetNextRaw() returned nothing" << endm;
168 LOG_INFO <<
"StTriggerDataMaker Make() finished. Found no trigger data" << endm;
176 unsigned int err = pTrg->errorFlag();
177 LOG_DEBUG <<
"StTriggerDataMaker Make() finished. Found trigger data for year "<< year <<
" mErrorFlag="<<err<<endm;
181 LOG_INFO <<
"StTriggerDataMaker Make() found fatal decording error "<< endm;
183 if(year>=2009) pTrg->readData();
184 pTrg->setDebug(mDebug);
189 LOG_INFO <<
"StTriggerDataMaker Make() finished. Failed to addData trigger data" << endm;
Class StRTSBaseMaker - is an abstract StMaker to define the interface to access the DAQ data from the...
virtual void AddData(TDataSet *data, const char *dir=".data")
User methods.
virtual StRtsTable * GetNextRaw()
This is an overloaded member function, provided for convenience.
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)
virtual Int_t GetRunNumber() const
Returns the current RunNumber.
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)