1 #ifndef BEAMDATA_PROTODUNEBEAMSPILL_H 2 #define BEAMDATA_PROTODUNEBEAMSPILL_H 44 void InitFBMs(
size_t);
47 void AddFBMTrigger(
size_t,
FBM);
48 short GetFiberStatus(
size_t,
size_t,
size_t);
49 long long GetFiberTime(
size_t,
size_t);
50 int GetNFBMTriggers(
size_t);
56 short GetCKov0Status(
size_t);
57 short GetCKov1Status(
size_t);
58 long long GetCKov0Time(
size_t);
59 long long GetCKov1Time(
size_t);
63 long long GetTOF0(
size_t);
64 long long GetTOF1(
size_t);
66 int GetNTOF1Triggers(){
return TOF1.size(); };
82 std::vector< long long int >
TOF0;
83 std::vector< long long int >
TOF1;
96 if( (iMonitor > (nFBMs - 1) ) ){
97 std::cout <<
"Error FBM index out of range" <<
std::endl;
102 if(fiberMonitors[iMonitor][0].
ID == -1){
103 std::cout <<
"Replacing dummy FBM" <<
std::endl;
105 fiberMonitors[iMonitor].insert(theIt,theFBM);
106 fiberMonitors[iMonitor].pop_back();
109 fiberMonitors[iMonitor].push_back(theFBM);
114 if( (iMonitor > (fiberMonitors.size() - 1)) ){
115 std::cout <<
"Please input monitor in range [0," << fiberMonitors.size() - 1 <<
"]" <<
std::endl;
119 std::cout <<
"Please input fiber in range [0,191]" <<
std::endl;
122 if( (nTrigger > fiberMonitors[iMonitor].
size()) ){
123 std::cout <<
"Please input trigger in range [0," << fiberMonitors[iMonitor].size() - 1 <<
"]" <<
std::endl;
126 return fiberMonitors[iMonitor][nTrigger].fibers[iFiber];
130 if(iMonitor > fiberMonitors.size() - 1){
131 std::cout <<
"Please input monitor in range [0," << fiberMonitors.size() - 1 <<
"]" <<
std::endl;
134 if( (nTrigger > fiberMonitors[iMonitor].
size()) ){
135 std::cout <<
"Please input trigger in range [0," << fiberMonitors[iMonitor].size() - 1 <<
"]" <<
std::endl;
138 return fiberMonitors[iMonitor][nTrigger].timeStamp;
142 if( (iMonitor > (fiberMonitors.size() - 1)) ){
143 std::cout <<
"Please input monitor in range [0," << fiberMonitors.size() - 1 <<
"]" <<
std::endl;
146 return fiberMonitors[iMonitor].size();
154 if( (nTrigger >= CKov0.size()) ){
155 std::cout <<
"Please input index in range [0," << CKov0.size() - 1 <<
"]" <<
std::endl;
159 return CKov0[nTrigger].trigger;
163 if( (nTrigger >=
CKov1.size()) ){
164 std::cout <<
"Please input index in range [0," <<
CKov1.size() - 1 <<
"]" <<
std::endl;
168 return CKov1[nTrigger].trigger;
172 if( (nTrigger >= CKov0.size()) ){
173 std::cout <<
"Please input index in range [0," << CKov0.size() - 1 <<
"]" <<
std::endl;
177 return CKov0[nTrigger].timeStamp;
181 if( (nTrigger >=
CKov1.size()) ){
182 std::cout <<
"Please input index in range [0," <<
CKov1.size() - 1 <<
"]" <<
std::endl;
186 return CKov1[nTrigger].timeStamp;
193 if( (nTrigger >= TOF0.size()) ){
194 std::cout <<
"Please input index in range [0," << TOF0.size() - 1 <<
"]" <<
std::endl;
198 return TOF0[nTrigger];
202 if( (nTrigger >=
TOF1.size()) ){
203 std::cout <<
"Please input index in range [0," <<
TOF1.size() - 1 <<
"]" <<
std::endl;
207 return TOF1[nTrigger];
211 std::vector< long long int >
TOF1;
212 std::vector< long long int >
TOF2;
std::bitset< 192 > fibers
void AddFBMTrigger(size_t, FBM)
std::vector< std::vector< FBM > > fiberMonitors
long long GetCKov0Time(size_t)
void AddCKov1Trigger(CKov theCKov)
long long GetTOF0(size_t)
long long GetCKov1Time(size_t)
int GetNFBMTriggers(size_t)
std::vector< CKov > CKov1
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
std::vector< CKov > CKov2
short GetCKov1Status(size_t)
long long GetTOF1(size_t)
std::vector< CKov > CKov1
void AddTOF0Trigger(long long theT)
short GetFiberStatus(size_t, size_t, size_t)
short GetCKov0Status(size_t)
std::vector< long long int > TOF2
std::vector< CKov > CKov0
std::vector< long long int > TOF0
void AddTOF1Trigger(long long theT)
std::vector< long long int > TOF1
std::vector< long long int > TOF1
void AddCKov0Trigger(CKov theCKov)
long long GetFiberTime(size_t, size_t)
QTextStream & endl(QTextStream &s)