Jpp  18.4.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
KM3NETDAQ::JDAQEvaluator Struct Reference

Auxiliary class to determine value of DAQ objects. More...

#include <JDAQEvaluator.hh>

Public Member Functions

 JDAQEvaluator ()
 Default constructor. More...
 
double operator() (const JDAQUTCExtended &object) const
 Get value of object. More...
 
double operator() (const JDAQHeader &object) const
 Get value of object. More...
 
double operator() (const JDAQEvent &object) const
 Get value of event. More...
 

Static Public Member Functions

static double getWeight ()
 Get relative weight for JDAQEvent evaluation. More...
 
static const JDAQUTCExtended & getUTC ()
 Get arbitrary offset. More...
 

Detailed Description

Auxiliary class to determine value of DAQ objects.

Definition at line 18 of file JDAQEvaluator.hh.

Constructor & Destructor Documentation

KM3NETDAQ::JDAQEvaluator::JDAQEvaluator ( )
inline

Default constructor.

Definition at line 22 of file JDAQEvaluator.hh.

23  {}

Member Function Documentation

double KM3NETDAQ::JDAQEvaluator::operator() ( const JDAQUTCExtended &  object) const
inline

Get value of object.

Parameters
objectUTC time
Returns
value

Definition at line 32 of file JDAQEvaluator.hh.

33  {
34  return getTimeDifference(getUTC(), object) * 1.0e-9;
35  }
static const JDAQUTCExtended & getUTC()
Get arbitrary offset.
double getTimeDifference(const JDAQChronometer &first, const JDAQChronometer &second)
Get time difference between two chronometers.
double KM3NETDAQ::JDAQEvaluator::operator() ( const JDAQHeader &  object) const
inline

Get value of object.

Parameters
objectevent
Returns
value

Definition at line 44 of file JDAQEvaluator.hh.

45  {
46  return(*this)(object.getTimesliceStart());
47  }
double KM3NETDAQ::JDAQEvaluator::operator() ( const JDAQEvent &  object) const
inline

Get value of event.

Parameters
objectevent
Returns
value

Definition at line 56 of file JDAQEvaluator.hh.

57  {
58  return getTimeDifference(getUTC(), object.getTimesliceStart()) * 1.0e-9 + object.getCounter() * getWeight();
59  }
static const JDAQUTCExtended & getUTC()
Get arbitrary offset.
double getTimeDifference(const JDAQChronometer &first, const JDAQChronometer &second)
Get time difference between two chronometers.
static double getWeight()
Get relative weight for JDAQEvent evaluation.
static double KM3NETDAQ::JDAQEvaluator::getWeight ( )
inlinestatic

Get relative weight for JDAQEvent evaluation.

This value should be less than the ratio of the expected maximum number of events in a single data taking run and the frame duration in units of nano seconds.

Returns
weigth [ns]

Definition at line 71 of file JDAQEvaluator.hh.

72  {
73  return 1.0e-6; // [ns]
74  }
static const JDAQUTCExtended& KM3NETDAQ::JDAQEvaluator::getUTC ( )
inlinestatic

Get arbitrary offset.

Returns
UTC time

Definition at line 82 of file JDAQEvaluator.hh.

83  {
84  static JDAQUTCExtended utc(1600000000, 0);
85 
86  return utc;
87  }
Data structure for UTC time.

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