Public Member Functions | Public Attributes | List of all members
dune::T0Counter::t0 Struct Reference

Public Member Functions

bool testCoincidence (double tim, double tol) const
 
double avgTime () const
 
void insert (double tim, unsigned int id, art::Ptr< raw::ExternalTrigger > trig)
 
 t0 (double tim, unsigned int id, art::Ptr< raw::ExternalTrigger > trig)
 

Public Attributes

std::vector< std::pair< unsigned int, double > > idtime
 
std::vector< art::Ptr< raw::ExternalTrigger > > trigs
 

Detailed Description

Definition at line 58 of file T0Counter_module.cc.

Constructor & Destructor Documentation

dune::T0Counter::t0::t0 ( double  tim,
unsigned int  id,
art::Ptr< raw::ExternalTrigger trig 
)
inline

Definition at line 88 of file T0Counter_module.cc.

88  {
89  insert(tim,id,trig);
90  }
void insert(double tim, unsigned int id, art::Ptr< raw::ExternalTrigger > trig)

Member Function Documentation

double dune::T0Counter::t0::avgTime ( ) const
inline

Definition at line 72 of file T0Counter_module.cc.

72  {
73  double t = 0;
74  int n = 0;
75  for(auto const &i : idtime) t += i.second, ++n;
76  if (n != 0) return t/n;
78  }
std::vector< std::pair< unsigned int, double > > idtime
std::void_t< T > n
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
void dune::T0Counter::t0::insert ( double  tim,
unsigned int  id,
art::Ptr< raw::ExternalTrigger trig 
)
inline

Definition at line 81 of file T0Counter_module.cc.

81  {
82  idtime.push_back(std::pair<unsigned int,double>(id,tim));
83  trigs.push_back(trig);
84  return;
85  }
std::vector< std::pair< unsigned int, double > > idtime
std::vector< art::Ptr< raw::ExternalTrigger > > trigs
bool dune::T0Counter::t0::testCoincidence ( double  tim,
double  tol 
) const
inline

Definition at line 64 of file T0Counter_module.cc.

64  {// tol is in units of ns
65  for(auto const &i : idtime) {
66  if (tim >= i.second-tol && tim <= i.second+tol) return true;
67  }
68  return false;
69  }
std::vector< std::pair< unsigned int, double > > idtime
auto const tol
Definition: SurfXYZTest.cc:16

Member Data Documentation

std::vector< std::pair< unsigned int, double> > dune::T0Counter::t0::idtime

Definition at line 60 of file T0Counter_module.cc.

std::vector< art::Ptr< raw::ExternalTrigger> > dune::T0Counter::t0::trigs

Definition at line 61 of file T0Counter_module.cc.


The documentation for this struct was generated from the following file: