Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
bool operator() (const JHit_t first, const JHit_t second) const
 Compare time of two hits.
 

Static Public Member Functions

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

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 369 of file JHitToolkit.hh.

Member Function Documentation

◆ getToolkit()

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 376 of file JHitToolkit.hh.

377 {
378 return *this;
379 }

◆ getT()

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 388 of file JHitToolkit.hh.

389 {
390 return hit;
391 }

◆ getToT()

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 400 of file JHitToolkit.hh.

401 {
402 return 0.0;
403 }

◆ getJHit()

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 412 of file JHitToolkit.hh.

413 {
414 return JHit(getT(hit), getToT(hit));
415 }
Acoustics hit.
static double getToT(const JHit_t &hit)
Get time-over-threshold of hit.
static double getT(const JHit_t hit)
Get time of hit.

◆ getHit()

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 425 of file JHitToolkit.hh.

426 {
427 return getTime(hit, cal);
428 }
const char * getTime()
Get current local time conform ISO-8601 standard.

◆ getEndMarker()

template<class JHit_t >
static JHit_t JTRIGGER::JHitToolkit< JHit_t, true >::getEndMarker ( )
inlinestatic

Get end marker.

Returns
latest possible hit

Definition at line 436 of file JHitToolkit.hh.

437 {
438 return std::numeric_limits<JHit_t>::max();
439 }

◆ getTimeDifference()

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 449 of file JHitToolkit.hh.

450 {
451 return second - first;
452 }

◆ operator()()

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 462 of file JHitToolkit.hh.

463 {
464 return first < second;
465 }

◆ join()

template<class JHit_t >
static JHit_t JTRIGGER::JHitToolkit< JHit_t, true >::join ( const JHit_t & first,
const JHit_t & second )
inlinestatic

Join two hits.

Note that this method returns the first hit as-is.

Parameters
firstfirst hit
secondsecond hit
Returns
joined hit

Definition at line 477 of file JHitToolkit.hh.

478 {
479 return first;
480 }

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