Jpp  17.2.1-pre0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
time_converter Class Reference

Auxiliary class to convert DAQ hit time to/from Monte Carlo hit time. More...

#include <time_converter.hh>

Public Member Functions

 time_converter ()
 Default constructor. More...
 
 time_converter (const Evt &event)
 Constructor. More...
 
 time_converter (const Evt &event, const JDAQChronometer &chronometer)
 Constructor. More...
 
double getTime () const
 Get DAQ/trigger time minus Monte Carlo time. More...
 
double putTime () const
 Get Monte Carlo time minus DAQ/trigger time. More...
 
double getTime (const double t0) const
 Get Monte Carlo hit time. More...
 
double putTime (const double t0) const
 Get DAQ hit time. More...
 

Protected Attributes

double __t0
 
double __t1
 

Detailed Description

Auxiliary class to convert DAQ hit time to/from Monte Carlo hit time.

Definition at line 19 of file time_converter.hh.

Constructor & Destructor Documentation

time_converter::time_converter ( )
inline

Default constructor.

Definition at line 25 of file time_converter.hh.

25  :
26  __t0(0.0),
27  __t1(0.0)
28  {}
time_converter::time_converter ( const Evt event)
inline

Constructor.

Note that this constructor should only be used after incorporation of KM3NETDAQ::JDAQEvent.

Parameters
eventevent

Definition at line 37 of file time_converter.hh.

37  :
38  __t0(event.mc_t),
40  {}
double getTimeOfRTS(const JDAQChronometer &chronometer)
Get time of last RTS in ns since start of run for a given chronometer.
int frame_index
from the raw data
Definition: Evt.hh:29
double mc_t
MC: time where the mc-event was put in the timeslice, since start of run (offset+frameidx*timeslice_d...
Definition: Evt.hh:47
time_converter::time_converter ( const Evt event,
const JDAQChronometer chronometer 
)
inline

Constructor.

Parameters
eventMonte Carlo event
chronometerDAQ chronometer

Definition at line 49 of file time_converter.hh.

50  :
51  __t0(event.mc_t),
52  __t1(getTimeOfRTS(chronometer))
53  {}
double getTimeOfRTS(const JDAQChronometer &chronometer)
Get time of last RTS in ns since start of run for a given chronometer.
double mc_t
MC: time where the mc-event was put in the timeslice, since start of run (offset+frameidx*timeslice_d...
Definition: Evt.hh:47

Member Function Documentation

double time_converter::getTime ( ) const
inline

Get DAQ/trigger time minus Monte Carlo time.

Returns
time difference [ns]

Definition at line 61 of file time_converter.hh.

62  {
63  return __t1 - __t0;
64  }
double time_converter::putTime ( ) const
inline

Get Monte Carlo time minus DAQ/trigger time.

Returns
time difference [ns]

Definition at line 72 of file time_converter.hh.

73  {
74  return __t0 - __t1;
75  }
double time_converter::getTime ( const double  t0) const
inline

Get Monte Carlo hit time.

Parameters
t0DAQ/trigger hit time [ns]
Returns
Monte Carlo hit time [ns]

Definition at line 84 of file time_converter.hh.

85  {
86  return t0 + __t1 - __t0;
87  }
double time_converter::putTime ( const double  t0) const
inline

Get DAQ hit time.

Parameters
t0Monte Carlo hit time [ns]
Returns
DAQ/trigger hit time [ns]

Definition at line 96 of file time_converter.hh.

97  {
98  return t0 - __t1 + __t0;
99  }

Member Data Documentation

double time_converter::__t0
protected

Definition at line 102 of file time_converter.hh.

double time_converter::__t1
protected

Definition at line 103 of file time_converter.hh.


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