16 #include "StRTSBaseMaker.h"
17 #include "StDAQMaker/StDAQReader.h"
18 #include "StRtsTable.h"
22 #include "StFttRawHitMaker.h"
25 #include "StEvent/StFttRawHit.h"
26 #include "StEvent/StEvent.h"
27 #include "StEvent/StFttCollection.h"
29 #include "StMuDSTMaker/COMMON/StMuTypes.hh"
30 #include "StMuDSTMaker/COMMON/StMuFttUtil.h"
34 StFttRawHitMaker::StFttRawHitMaker(
const char* name )
46 StFttRawHitMaker::Init()
53 StFttRawHitMaker::InitRun( Int_t runnumber )
55 mRunYear = ( runnumber + 727000 ) / 1000000 + 1999;
61 StFttRawHitMaker::FinishRun( Int_t runnumber )
78 LOG_DEBUG <<
"StFttRawHitMaker::Make()" << endm;
80 mEvent = (
StEvent*)GetInputDS(
"StEvent");
82 LOG_DEBUG<<
"Found StEvent"<<endm;
86 LOG_DEBUG <<
"Added StEvent"<<endm;
92 mFttCollection=mEvent->fttCollection();
95 mEvent->setFttCollection(mFttCollection);
96 LOG_DEBUG <<
"Added StFttCollection"<<endm;
98 mFttCollection = mEvent->fttCollection();
99 LOG_DEBUG <<
"Found StFttCollection"<<endm;
105 while ( (daqdta =
GetNext(
"vmm" )) ) {
107 if ( daqdta ==
nullptr ) {
108 LOG_WARN <<
"StFttRawHitMaker::Make() - NO STGC DATA found in event" << endm;
113 int inputSizeBytes = daqdta->GetSize();
115 int rdo = daqdta->Rdo();
116 int sec = daqdta->Sector();
119 LOG_INFO <<
"InputSize (bytes): " << inputSizeBytes << endm;
120 LOG_INFO <<
"Sector: " << daqdta->Sector() << endm;
121 LOG_INFO <<
"Pad: " << daqdta->Pad() << endm;
122 LOG_INFO <<
"Row: " << daqdta->Row() << endm;
123 LOG_INFO <<
"Rdo: " << daqdta->Rdo() << endm;
124 LOG_INFO <<
"InputSize (bytes): " << inputSizeBytes << endm;
125 LOG_INFO <<
"ROWS: " << daqdta->
GetNRows() << endm;
128 for (
auto it = daqdta->begin(); it != daqdta->end(); ++it) {
131 u_char feb = vmm[0].feb_vmm >> 2 ;
132 u_char vm = vmm[0].feb_vmm & 3 ;
135 StFttRawHit *
hit =
new StFttRawHit( sec, rdo, feb, vm, vmm[0].ch, vmm[0].adc, vmm[0].bcid, vmm[0].tb, vmm[0].bcid_delta );
137 mFttCollection->addRawHit( hit );
147 int StFttRawHitMaker::readMuDst() {
149 if(!mudst){LOG_ERROR<<
"StFttRawHitMaker::readMuDst() found no MuDst"<<endm;
return kStErr;}
151 if(!mufttColl){LOG_ERROR<<
"StFttRawHitMaker::readMuDst found no MuFttCollection"<<endm;
return kStErr;}
153 mFttCollection = util.getFtt(mufttColl);
154 mEvent->setFttCollection(mFttCollection);
static StMuFttCollection * muFttCollection()
returns pointer to current StMuFttCollection
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 Long_t GetNRows() const
Returns the number of the used rows for the wrapped table.
StRtsTable * GetNext(const char *bank)
This is an overloaded member function, provided for convenience.