26 #include "StETofHeader.h"
27 #include "StETofUtil/StETofConstants.h"
33 StETofHeader::StETofHeader()
34 : mTrgGdpbFullTime( 0 ),
35 mTrgStarFullTime( 0 ),
39 mEventStatusFlag( 0 ),
40 mMissMatchFlagVec( eTofConst::nGet4sInSystem, false ),
41 mGoodEventFlagVec( eTofConst::nGet4sInSystem, false ),
42 mHasPulsersVec( eTofConst::nCountersInSystem, false )
49 StETofHeader::StETofHeader(
const double& trgGdpbTime,
const double& trgStarTime,
50 const map< unsigned int, uint64_t >& gdpbTs,
const map< unsigned int, uint64_t >& starTs,
51 const unsigned int& starToken,
const unsigned int& starDaqCmdIn,
const unsigned int& starTrgCmdIn,
52 const uint64_t& eventStatusFlag )
53 : mTrgGdpbFullTime( trgGdpbTime ),
54 mTrgStarFullTime( trgStarTime ),
55 mStarToken( starToken ),
56 mStarDaqCmdIn( starDaqCmdIn ),
57 mStarTrgCmdIn( starTrgCmdIn ),
58 mEventStatusFlag( eventStatusFlag ),
59 mMissMatchFlagVec( eTofConst::nGet4sInSystem, false ),
60 mGoodEventFlagVec( eTofConst::nGet4sInSystem, false ),
61 mHasPulsersVec( eTofConst::nCountersInSystem, false )
63 setRocGdpbTs( gdpbTs );
64 setRocStarTs( starTs );
67 StETofHeader::StETofHeader(
const double& trgGdpbTime,
const double& trgStarTime,
68 const map< unsigned int, uint64_t >& gdpbTs,
const map< unsigned int, uint64_t >& starTs,
69 const unsigned int& starToken,
const unsigned int& starDaqCmdIn,
const unsigned int& starTrgCmdIn,
70 const uint64_t& eventStatusFlag,
const std::vector<bool>& MissMatchFlagVec )
71 : mTrgGdpbFullTime( trgGdpbTime ),
72 mTrgStarFullTime( trgStarTime ),
73 mStarToken( starToken ),
74 mStarDaqCmdIn( starDaqCmdIn ),
75 mStarTrgCmdIn( starTrgCmdIn ),
76 mEventStatusFlag( eventStatusFlag ),
77 mMissMatchFlagVec( MissMatchFlagVec ),
78 mGoodEventFlagVec( eTofConst::nGet4sInSystem, false ),
79 mHasPulsersVec( eTofConst::nCountersInSystem, false )
81 setRocGdpbTs( gdpbTs );
82 setRocStarTs( starTs );
85 StETofHeader::StETofHeader(
const double& trgGdpbTime,
const double& trgStarTime,
86 const map< unsigned int, uint64_t >& gdpbTs,
const map< unsigned int, uint64_t >& starTs,
87 const unsigned int& starToken,
const unsigned int& starDaqCmdIn,
const unsigned int& starTrgCmdIn,
88 const uint64_t& eventStatusFlag,
const std::vector<bool>& MissMatchFlagVec,
const std::vector<bool>& GoodEventFlagVec,
const std::vector<bool>& HasPulsersVec )
89 : mTrgGdpbFullTime( trgGdpbTime ),
90 mTrgStarFullTime( trgStarTime ),
91 mStarToken( starToken ),
92 mStarDaqCmdIn( starDaqCmdIn ),
93 mStarTrgCmdIn( starTrgCmdIn ),
94 mEventStatusFlag( eventStatusFlag ),
95 mMissMatchFlagVec( MissMatchFlagVec ),
96 mGoodEventFlagVec( GoodEventFlagVec ),
97 mHasPulsersVec( HasPulsersVec )
99 setRocGdpbTs( gdpbTs );
100 setRocStarTs( starTs );
104 StETofHeader::~StETofHeader()
108 StETofHeader::trgGdpbFullTime()
const
110 return mTrgGdpbFullTime;
114 StETofHeader::trgStarFullTime()
const
116 return mTrgStarFullTime;
120 map< unsigned int, uint64_t >
121 StETofHeader::rocGdpbTs()
const
123 map< unsigned int, uint64_t > map_root_type( mRocGdpbTs.begin(), mRocGdpbTs.end() );
125 return map_root_type;
129 map< unsigned int, uint64_t >
130 StETofHeader::rocStarTs()
const
132 map< unsigned int, uint64_t > map_root_type( mRocStarTs.begin(), mRocStarTs.end() );
134 return map_root_type;
139 StETofHeader::starToken()
const
146 StETofHeader::starDaqCmdIn()
const
148 return mStarDaqCmdIn;
153 StETofHeader::starTrgCmdIn()
const
155 return mStarTrgCmdIn;
160 StETofHeader::eventStatusFlag()
const
162 return mEventStatusFlag;
168 return mMissMatchFlagVec;
174 return mGoodEventFlagVec;
177 StETofHeader::hasPulsersVec()
const
179 return mHasPulsersVec;
183 StETofHeader::setTrgGdpbFullTime(
const double& gdpbFullTime )
185 mTrgGdpbFullTime = gdpbFullTime;
190 StETofHeader::setTrgStarFullTime(
const double& starFullTime )
192 mTrgStarFullTime = starFullTime;
197 StETofHeader::setRocGdpbTs(
const map< unsigned int, uint64_t >& gdpbTs )
199 mRocGdpbTs.insert( gdpbTs.begin(), gdpbTs.end() );
204 StETofHeader::setRocStarTs(
const map< unsigned int, uint64_t >& starTs )
206 mRocStarTs.insert( starTs.begin(), starTs.end() );
211 StETofHeader::setStarToken(
const unsigned int& token )
218 StETofHeader::setStarDaqCmdIn(
const unsigned int& daqCmdIn )
220 mStarDaqCmdIn = daqCmdIn;
225 StETofHeader::setStarTrgCmdIn(
const unsigned int& trgCmdIn )
227 mStarTrgCmdIn = trgCmdIn;
232 StETofHeader::setEventStatusFlag(
const uint64_t& statusFlag )
234 mEventStatusFlag = statusFlag;
238 StETofHeader::setGoodEventFlagVec(
const std::vector<bool>& FlagVec )
240 mGoodEventFlagVec = FlagVec;
244 StETofHeader::setHasPulsersVec(
const std::vector<bool>& PulserVec )
246 mHasPulsersVec = PulserVec;