23 #include "StMuETofHeader.h"
24 #include "StETofHeader.h"
25 #include "StETofUtil/StETofConstants.h"
28 StMuETofHeader::StMuETofHeader()
29 : mTrgGdpbFullTime( 0 ),
30 mTrgStarFullTime( 0 ),
34 mEventStatusFlag( 0 ),
35 mMissMatchFlagVec( eTofConst::nGet4sInSystem, false ),
36 mGoodEventFlagVec( eTofConst::nCountersInSystem, false )
43 StMuETofHeader::StMuETofHeader(
const double& trgGdpbTime,
const double& trgStarTime,
44 const std::map< unsigned int, uint64_t >& gdpbTs,
const std::map< unsigned int, uint64_t >& starTs,
45 const unsigned int& starToken,
const unsigned int& starDaqCmdIn,
const unsigned int& starTrgCmdIn,
46 const uint64_t& eventStatusFlag )
47 : mTrgGdpbFullTime( trgGdpbTime ),
48 mTrgStarFullTime( trgStarTime ),
49 mStarToken( starToken ),
50 mStarDaqCmdIn( starDaqCmdIn ),
51 mStarTrgCmdIn( starTrgCmdIn ),
52 mEventStatusFlag( eventStatusFlag ),
53 mMissMatchFlagVec( eTofConst::nGet4sInSystem, false ),
54 mGoodEventFlagVec( eTofConst::nCountersInSystem, false )
56 setRocGdpbTs( gdpbTs );
57 setRocStarTs( starTs );
60 StMuETofHeader::StMuETofHeader(
const double& trgGdpbTime,
const double& trgStarTime,
61 const map< unsigned int, uint64_t >& gdpbTs,
const map< unsigned int, uint64_t >& starTs,
62 const unsigned int& starToken,
const unsigned int& starDaqCmdIn,
const unsigned int& starTrgCmdIn,
63 const uint64_t& eventStatusFlag,
const std::vector< Bool_t >& MissMatchFlagVec )
64 : mTrgGdpbFullTime( trgGdpbTime ),
65 mTrgStarFullTime( trgStarTime ),
66 mStarToken( starToken ),
67 mStarDaqCmdIn( starDaqCmdIn ),
68 mStarTrgCmdIn( starTrgCmdIn ),
69 mEventStatusFlag( eventStatusFlag ),
70 mMissMatchFlagVec( MissMatchFlagVec ),
71 mGoodEventFlagVec( eTofConst::nCountersInSystem, false )
73 setRocGdpbTs( gdpbTs );
74 setRocStarTs( starTs );
77 StMuETofHeader::StMuETofHeader(
const double& trgGdpbTime,
const double& trgStarTime,
78 const map< unsigned int, uint64_t >& gdpbTs,
const map< unsigned int, uint64_t >& starTs,
79 const unsigned int& starToken,
const unsigned int& starDaqCmdIn,
const unsigned int& starTrgCmdIn,
80 const uint64_t& eventStatusFlag,
const std::vector<bool>& MissMatchFlagVec,
const std::vector<bool>& GoodEventFlagVec )
81 : mTrgGdpbFullTime( trgGdpbTime ),
82 mTrgStarFullTime( trgStarTime ),
83 mStarToken( starToken ),
84 mStarDaqCmdIn( starDaqCmdIn ),
85 mStarTrgCmdIn( starTrgCmdIn ),
86 mEventStatusFlag( eventStatusFlag ),
87 mMissMatchFlagVec( MissMatchFlagVec ),
88 mGoodEventFlagVec( GoodEventFlagVec )
90 setRocGdpbTs( gdpbTs );
91 setRocStarTs( starTs );
95 : mTrgGdpbFullTime( header->trgGdpbFullTime() ),
96 mTrgStarFullTime( header->trgStarFullTime() ),
97 mStarToken( header->starToken() ),
98 mStarDaqCmdIn( header->starDaqCmdIn() ),
99 mStarTrgCmdIn( header->starTrgCmdIn() ),
100 mEventStatusFlag( header->eventStatusFlag() ),
101 mMissMatchFlagVec(header->missMatchFlagVec()),
102 mGoodEventFlagVec(header->goodEventFlagVec())
104 setRocGdpbTs( header->rocGdpbTs() );
105 setRocStarTs( header->rocStarTs() );
108 StMuETofHeader::~StMuETofHeader()
112 StMuETofHeader::trgGdpbFullTime()
const
114 return mTrgGdpbFullTime;
118 StMuETofHeader::trgStarFullTime()
const
120 return mTrgStarFullTime;
124 std::map< unsigned int, uint64_t >
125 StMuETofHeader::rocGdpbTs()
const
127 std::map< unsigned int, uint64_t > map_root_type( mRocGdpbTs.begin(), mRocGdpbTs.end() );
129 return map_root_type;
133 std::map< unsigned int, uint64_t >
134 StMuETofHeader::rocStarTs()
const
136 std::map< unsigned int, uint64_t > map_root_type( mRocStarTs.begin(), mRocStarTs.end() );
138 return map_root_type;
143 StMuETofHeader::starToken()
const
150 StMuETofHeader::starDaqCmdIn()
const
152 return mStarDaqCmdIn;
157 StMuETofHeader::starTrgCmdIn()
const
159 return mStarTrgCmdIn;
164 StMuETofHeader::eventStatusFlag()
const
166 return mEventStatusFlag;
170 std::vector < Bool_t >
173 return mMissMatchFlagVec;
179 return mGoodEventFlagVec;
182 StMuETofHeader::hasPulsersVec()
const
184 return mHasPulsersVec;
188 StMuETofHeader::setTrgGdpbFullTime(
const double& gdpbFullTime )
190 mTrgGdpbFullTime = gdpbFullTime;
195 StMuETofHeader::setTrgStarFullTime(
const double& starFullTime )
197 mTrgStarFullTime = starFullTime;
202 StMuETofHeader::setRocGdpbTs(
const std::map< unsigned int, uint64_t >& gdpbTs )
204 mRocGdpbTs.insert( gdpbTs.begin(), gdpbTs.end() );
209 StMuETofHeader::setRocStarTs(
const std::map< unsigned int, uint64_t >& starTs )
211 mRocStarTs.insert( starTs.begin(), starTs.end() );
216 StMuETofHeader::setStarToken(
const unsigned int& token )
223 StMuETofHeader::setStarDaqCmdIn(
const unsigned int& daqCmdIn )
225 mStarDaqCmdIn = daqCmdIn;
230 StMuETofHeader::setStarTrgCmdIn(
const unsigned int& trgCmdIn )
232 mStarTrgCmdIn = trgCmdIn;
237 StMuETofHeader::setEventStatusFlag(
const uint64_t& statusFlag )
239 mEventStatusFlag = statusFlag;
243 StMuETofHeader::setGoodEventFlagVec(
const std::vector<bool>& FlagVec )
245 mGoodEventFlagVec = FlagVec;
248 StMuETofHeader::setHasPulsersVec(
const std::vector<bool>& PulserVec )
250 mHasPulsersVec = PulserVec;