Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
JTRIGGER::JHitToolkit< JHit_t, true > Struct Template Reference

Template specialisation of hit toolkit for any primitive data type. More...

#include <JHitToolkit.hh>

Public Member Functions

const JHitToolkit< JHit_t, true > & getToolkit () const
 Get toolkit. More...
 
bool operator() (const JHit_t first, const JHit_t second) const
 Compare time of two hits. More...
 

Static Public Member Functions

static double getT (const JHit_t hit)
 Get time of hit. More...
 
static double getToT (const JHit_t &hit)
 Get time-over-threshold of hit. More...
 
static JHit getJHit (const JHit_t hit)
 Construct JHit. More...
 
static JHit_t getHit (const JDAQHit &hit, const JCalibration &cal)
 Construct hit. More...
 
static JHit_t getEndMarker ()
 Get end marker. More...
 
static JHit_t getTimeDifference (const JHit_t first, const JHit_t second)
 Get time difference between two hits. More...
 

Detailed Description

template<class JHit_t>
struct JTRIGGER::JHitToolkit< JHit_t, true >

Template specialisation of hit toolkit for any primitive data type.

Definition at line 214 of file JHitToolkit.hh.

Member Function Documentation

template<class JHit_t >
const JHitToolkit<JHit_t, true>& JTRIGGER::JHitToolkit< JHit_t, true >::getToolkit ( ) const
inline

Get toolkit.

Returns
this hit toolkit

Definition at line 221 of file JHitToolkit.hh.

222  {
223  return *this;
224  }
template<class JHit_t >
static double JTRIGGER::JHitToolkit< JHit_t, true >::getT ( const JHit_t  hit)
inlinestatic

Get time of hit.

Parameters
hithit
Returns
time of hit [ns]

Definition at line 233 of file JHitToolkit.hh.

234  {
235  return hit;
236  }
template<class JHit_t >
static double JTRIGGER::JHitToolkit< JHit_t, true >::getToT ( const JHit_t &  hit)
inlinestatic

Get time-over-threshold of hit.

Parameters
hithit
Returns
0

Definition at line 245 of file JHitToolkit.hh.

246  {
247  return 0.0;
248  }
template<class JHit_t >
static JHit JTRIGGER::JHitToolkit< JHit_t, true >::getJHit ( const JHit_t  hit)
inlinestatic

Construct JHit.

Parameters
hithit
Returns
hit

Definition at line 257 of file JHitToolkit.hh.

258  {
259  return JHit(getT(hit), getToT(hit));
260  }
Hit data structure.
Definition: JHit.hh:22
static double getT(const JHit_t hit)
Get time of hit.
Definition: JHitToolkit.hh:233
static double getToT(const JHit_t &hit)
Get time-over-threshold of hit.
Definition: JHitToolkit.hh:245
template<class JHit_t >
static JHit_t JTRIGGER::JHitToolkit< JHit_t, true >::getHit ( const JDAQHit hit,
const JCalibration cal 
)
inlinestatic

Construct hit.

Parameters
hitDAQ hit
calcalibration
Returns
hit

Definition at line 270 of file JHitToolkit.hh.

271  {
272  return getTime(hit, cal);
273  }
double getTime(const JDAQHit &hit, const JCalibration &cal)
Get calibrated time of DAQ hit.
Definition: JHitToolkit.hh:34
template<class JHit_t >
static JHit_t JTRIGGER::JHitToolkit< JHit_t, true >::getEndMarker ( )
inlinestatic

Get end marker.

Returns
latest possible hit

Definition at line 281 of file JHitToolkit.hh.

282  {
283  return std::numeric_limits<JHit_t>::max();
284  }
template<class JHit_t >
static JHit_t JTRIGGER::JHitToolkit< JHit_t, true >::getTimeDifference ( const JHit_t  first,
const JHit_t  second 
)
inlinestatic

Get time difference between two hits.

Parameters
firstfirst hit
secondsecond hit
Returns
time second hit - time first hit [ns]

Definition at line 294 of file JHitToolkit.hh.

295  {
296  return second - first;
297  }
template<class JHit_t >
bool JTRIGGER::JHitToolkit< JHit_t, true >::operator() ( const JHit_t  first,
const JHit_t  second 
) const
inline

Compare time of two hits.

Parameters
firstfirst value [ns]
secondsecond value [ns]
Returns
true if second hit later; else false

Definition at line 307 of file JHitToolkit.hh.

308  {
309  return first < second;
310  }

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