Jpp  18.6.0-rc.1
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 time of DAQ objects. More...

#include <JDAQEvaluator.hh>

Public Member Functions

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

Static Public Member Functions

static double getWeight ()
 Get relative weight for JDAQEventHeader evaluation. More...
 

Detailed Description

Auxiliary class to determine time of DAQ objects.

The time is relative to the fixed time defined in JDAQUTCExtended.
For DAQ events, the time is offset by the product of the event counter and a constant weight.
To correlate DAQ events with summary data, the weight should be set to a value such that this product is strictly less than half of the frame duration.

Definition at line 23 of file JDAQEvaluator.hh.

Constructor & Destructor Documentation

KM3NETDAQ::JDAQEvaluator::JDAQEvaluator ( )
inline

Default constructor.

Definition at line 27 of file JDAQEvaluator.hh.

28  {}

Member Function Documentation

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

Get time of object.

Parameters
objectUTC time
Returns
time [s]

Definition at line 37 of file JDAQEvaluator.hh.

38  {
40  }
double getTimeDifference(const JDAQChronometer &first, const JDAQChronometer &second)
Get time difference between two chronometers.
static const JDAQUTCExtended & getInstance()
Get arbitrary offset (e.g.
double KM3NETDAQ::JDAQEvaluator::operator() ( const JDAQHeader object) const
inline

Get time of object.

Parameters
objectDAQ header
Returns
time [s]

Definition at line 49 of file JDAQEvaluator.hh.

50  {
51  return(*this)(object.getTimesliceStart());
52  }
double KM3NETDAQ::JDAQEvaluator::operator() ( const JDAQEventHeader object) const
inline

Get time of event.

Parameters
objectevent header
Returns
time [s]

Definition at line 61 of file JDAQEvaluator.hh.

62  {
63  return getTimeDifference(JDAQUTCExtended::getInstance(), object.getTimesliceStart()) + object.getCounter() * getWeight();
64  }
double getTimeDifference(const JDAQChronometer &first, const JDAQChronometer &second)
Get time difference between two chronometers.
static double getWeight()
Get relative weight for JDAQEventHeader evaluation.
static const JDAQUTCExtended & getInstance()
Get arbitrary offset (e.g.
static double KM3NETDAQ::JDAQEvaluator::getWeight ( )
inlinestatic

Get relative weight for JDAQEventHeader evaluation.

This value should be less than half of the frame duration in units of seconds divided by the expected maximum number of events in a single data taking run.

Returns
weigth [s]

Definition at line 75 of file JDAQEvaluator.hh.

76  {
77  return 1.0e-7; // [s]
78  }

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