Public Member Functions | Private Attributes | List of all members
beamspill::ProtoDUNEBeamSpill Class Reference

#include <ProtoDUNEBeamSpill.h>

Public Member Functions

 ProtoDUNEBeamSpill ()
 
 ~ProtoDUNEBeamSpill ()
 
void InitFBMs (size_t)
 
long long GetT0 ()
 
void AddFBMTrigger (size_t, FBM)
 
short GetFiberStatus (size_t, size_t, size_t)
 
long long GetFiberTime (size_t, size_t)
 
int GetNFBMTriggers (size_t)
 
void AddCKov0Trigger (CKov theCKov)
 
void AddCKov1Trigger (CKov theCKov)
 
int GetNCKov0Triggers ()
 
int GetNCKov1Triggers ()
 
short GetCKov0Status (size_t)
 
short GetCKov1Status (size_t)
 
long long GetCKov0Time (size_t)
 
long long GetCKov1Time (size_t)
 
void AddTOF0Trigger (long long theT)
 
void AddTOF1Trigger (long long theT)
 
long long GetTOF0 (size_t)
 
long long GetTOF1 (size_t)
 
int GetNTOF0Triggers ()
 
int GetNTOF1Triggers ()
 

Private Attributes

long long int t0
 
std::vector< std::vector< FBM > > fiberMonitors
 
size_t nFBMs
 
std::vector< long long int > TOF0
 
std::vector< long long int > TOF1
 
std::vector< CKovCKov0
 
std::vector< CKovCKov1
 

Detailed Description

Definition at line 39 of file ProtoDUNEBeamSpill.h.

Constructor & Destructor Documentation

beamspill::ProtoDUNEBeamSpill::ProtoDUNEBeamSpill ( )

Definition at line 15 of file ProtoDUNEBeamSpill.cxx.

15 {}
beamspill::ProtoDUNEBeamSpill::~ProtoDUNEBeamSpill ( )

Definition at line 26 of file ProtoDUNEBeamSpill.cxx.

26 {}

Member Function Documentation

void beamspill::ProtoDUNEBeamSpill::AddCKov0Trigger ( CKov  theCKov)
inline

Definition at line 52 of file ProtoDUNEBeamSpill.h.

52 { CKov0.push_back(theCKov); };
void beamspill::ProtoDUNEBeamSpill::AddCKov1Trigger ( CKov  theCKov)
inline

Definition at line 53 of file ProtoDUNEBeamSpill.h.

53 { CKov1.push_back(theCKov); };
void beamspill::ProtoDUNEBeamSpill::AddFBMTrigger ( size_t  iMonitor,
FBM  theFBM 
)
inline

Definition at line 95 of file ProtoDUNEBeamSpill.h.

95  {
96  if( (iMonitor > (nFBMs - 1) ) ){
97  std::cout << "Error FBM index out of range" << std::endl;
98  return;
99  }
100 
101  //Check if it's the first time in the monitor. Replace dummy
102  if(fiberMonitors[iMonitor][0].ID == -1){
103  std::cout << "Replacing dummy FBM" << std::endl;
104  std::vector<FBM>::iterator theIt = fiberMonitors[iMonitor].begin();
105  fiberMonitors[iMonitor].insert(theIt,theFBM);
106  fiberMonitors[iMonitor].pop_back();
107  }
108  else{
109  fiberMonitors[iMonitor].push_back(theFBM);
110  }
111  }
intermediate_table::iterator iterator
std::vector< std::vector< FBM > > fiberMonitors
unsigned int ID
QTextStream & endl(QTextStream &s)
void beamspill::ProtoDUNEBeamSpill::AddTOF0Trigger ( long long  theT)
inline

Definition at line 61 of file ProtoDUNEBeamSpill.h.

61 { TOF0.push_back(theT); };
std::vector< long long int > TOF0
void beamspill::ProtoDUNEBeamSpill::AddTOF1Trigger ( long long  theT)
inline

Definition at line 62 of file ProtoDUNEBeamSpill.h.

62 { TOF1.push_back(theT); };
std::vector< long long int > TOF1
short beamspill::ProtoDUNEBeamSpill::GetCKov0Status ( size_t  nTrigger)
inline

Definition at line 153 of file ProtoDUNEBeamSpill.h.

153  {
154  if( (nTrigger >= CKov0.size()) ){
155  std::cout << "Please input index in range [0," << CKov0.size() - 1 << "]" << std::endl;
156  return -1;
157  }
158 
159  return CKov0[nTrigger].trigger;
160  }
QTextStream & endl(QTextStream &s)
long long beamspill::ProtoDUNEBeamSpill::GetCKov0Time ( size_t  nTrigger)
inline

Definition at line 171 of file ProtoDUNEBeamSpill.h.

171  {
172  if( (nTrigger >= CKov0.size()) ){
173  std::cout << "Please input index in range [0," << CKov0.size() - 1 << "]" << std::endl;
174  return -1;
175  }
176 
177  return CKov0[nTrigger].timeStamp;
178  }
QTextStream & endl(QTextStream &s)
short beamspill::ProtoDUNEBeamSpill::GetCKov1Status ( size_t  nTrigger)
inline

Definition at line 162 of file ProtoDUNEBeamSpill.h.

162  {
163  if( (nTrigger >= CKov1.size()) ){
164  std::cout << "Please input index in range [0," << CKov1.size() - 1 << "]" << std::endl;
165  return -1;
166  }
167 
168  return CKov1[nTrigger].trigger;
169  }
QTextStream & endl(QTextStream &s)
long long beamspill::ProtoDUNEBeamSpill::GetCKov1Time ( size_t  nTrigger)
inline

Definition at line 180 of file ProtoDUNEBeamSpill.h.

180  {
181  if( (nTrigger >= CKov1.size()) ){
182  std::cout << "Please input index in range [0," << CKov1.size() - 1 << "]" << std::endl;
183  return -1;
184  }
185 
186  return CKov1[nTrigger].timeStamp;
187  }
QTextStream & endl(QTextStream &s)
short beamspill::ProtoDUNEBeamSpill::GetFiberStatus ( size_t  iMonitor,
size_t  nTrigger,
size_t  iFiber 
)
inline

Definition at line 113 of file ProtoDUNEBeamSpill.h.

113  {
114  if( (iMonitor > (fiberMonitors.size() - 1)) ){
115  std::cout << "Please input monitor in range [0," << fiberMonitors.size() - 1 << "]" << std::endl;
116  return -1;
117  }
118  if( (iFiber > 191)){
119  std::cout << "Please input fiber in range [0,191]" << std::endl;
120  return -1;
121  }
122  if( (nTrigger > fiberMonitors[iMonitor].size()) ){
123  std::cout << "Please input trigger in range [0," << fiberMonitors[iMonitor].size() - 1 << "]" << std::endl;
124  return -1;
125  }
126  return fiberMonitors[iMonitor][nTrigger].fibers[iFiber];
127  }
std::vector< std::vector< FBM > > fiberMonitors
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
QTextStream & endl(QTextStream &s)
long long beamspill::ProtoDUNEBeamSpill::GetFiberTime ( size_t  iMonitor,
size_t  nTrigger 
)
inline

Definition at line 129 of file ProtoDUNEBeamSpill.h.

129  {
130  if(iMonitor > fiberMonitors.size() - 1){
131  std::cout << "Please input monitor in range [0," << fiberMonitors.size() - 1 << "]" << std::endl;
132  return -1;
133  }
134  if( (nTrigger > fiberMonitors[iMonitor].size()) ){
135  std::cout << "Please input trigger in range [0," << fiberMonitors[iMonitor].size() - 1 << "]" << std::endl;
136  return -1;
137  }
138  return fiberMonitors[iMonitor][nTrigger].timeStamp;
139  }
std::vector< std::vector< FBM > > fiberMonitors
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
QTextStream & endl(QTextStream &s)
int beamspill::ProtoDUNEBeamSpill::GetNCKov0Triggers ( )
inline

Definition at line 54 of file ProtoDUNEBeamSpill.h.

54 { return CKov0.size(); };
int beamspill::ProtoDUNEBeamSpill::GetNCKov1Triggers ( )
inline

Definition at line 55 of file ProtoDUNEBeamSpill.h.

55 { return CKov1.size(); };
int beamspill::ProtoDUNEBeamSpill::GetNFBMTriggers ( size_t  iMonitor)
inline

Definition at line 141 of file ProtoDUNEBeamSpill.h.

141  {
142  if( (iMonitor > (fiberMonitors.size() - 1)) ){
143  std::cout << "Please input monitor in range [0," << fiberMonitors.size() - 1 << "]" << std::endl;
144  return -1;
145  }
146  return fiberMonitors[iMonitor].size();
147  }
std::vector< std::vector< FBM > > fiberMonitors
QTextStream & endl(QTextStream &s)
int beamspill::ProtoDUNEBeamSpill::GetNTOF0Triggers ( )
inline

Definition at line 65 of file ProtoDUNEBeamSpill.h.

65 { return TOF0.size(); };
std::vector< long long int > TOF0
int beamspill::ProtoDUNEBeamSpill::GetNTOF1Triggers ( )
inline

Definition at line 66 of file ProtoDUNEBeamSpill.h.

66 { return TOF1.size(); };
std::vector< long long int > TOF1
long long beamspill::ProtoDUNEBeamSpill::GetT0 ( )
inline

Definition at line 45 of file ProtoDUNEBeamSpill.h.

45 { return t0; };
long long beamspill::ProtoDUNEBeamSpill::GetTOF0 ( size_t  nTrigger)
inline

Definition at line 192 of file ProtoDUNEBeamSpill.h.

192  {
193  if( (nTrigger >= TOF0.size()) ){
194  std::cout << "Please input index in range [0," << TOF0.size() - 1 << "]" << std::endl;
195  return -1;
196  }
197 
198  return TOF0[nTrigger];
199  }
std::vector< long long int > TOF0
QTextStream & endl(QTextStream &s)
long long beamspill::ProtoDUNEBeamSpill::GetTOF1 ( size_t  nTrigger)
inline

Definition at line 201 of file ProtoDUNEBeamSpill.h.

201  {
202  if( (nTrigger >= TOF1.size()) ){
203  std::cout << "Please input index in range [0," << TOF1.size() - 1 << "]" << std::endl;
204  return -1;
205  }
206 
207  return TOF1[nTrigger];
208  }
std::vector< long long int > TOF1
QTextStream & endl(QTextStream &s)
void beamspill::ProtoDUNEBeamSpill::InitFBMs ( size_t  nMonitors)

Definition at line 16 of file ProtoDUNEBeamSpill.cxx.

16  {
17  nFBMs = nMonitors;
18  FBM dummyFBM;
19  dummyFBM.ID = -1;
20  std::vector<FBM> dummyVec;
21  dummyVec.push_back(dummyFBM);
22  for(size_t i = 0; i < nFBMs; ++i){
23  fiberMonitors.push_back(dummyVec);
24  }
25  }
std::vector< std::vector< FBM > > fiberMonitors

Member Data Documentation

std::vector< CKov > beamspill::ProtoDUNEBeamSpill::CKov0
private

Definition at line 87 of file ProtoDUNEBeamSpill.h.

std::vector< CKov > beamspill::ProtoDUNEBeamSpill::CKov1
private

Definition at line 88 of file ProtoDUNEBeamSpill.h.

std::vector< std::vector < FBM > > beamspill::ProtoDUNEBeamSpill::fiberMonitors
private

Definition at line 77 of file ProtoDUNEBeamSpill.h.

size_t beamspill::ProtoDUNEBeamSpill::nFBMs
private

Definition at line 78 of file ProtoDUNEBeamSpill.h.

long long int beamspill::ProtoDUNEBeamSpill::t0
private

Definition at line 66 of file ProtoDUNEBeamSpill.h.

std::vector< long long int > beamspill::ProtoDUNEBeamSpill::TOF0
private

Definition at line 82 of file ProtoDUNEBeamSpill.h.

std::vector< long long int > beamspill::ProtoDUNEBeamSpill::TOF1
private

Definition at line 83 of file ProtoDUNEBeamSpill.h.


The documentation for this class was generated from the following files: