Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JTRIGGER::JHitToolkit< JDAQHit, false > Struct Reference

Template specialisation of hit toolkit for JDAQHit class. More...

#include <JHitToolkit.hh>

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

Template specialisation of hit toolkit for JDAQHit class.

Definition at line 188 of file JHitToolkit.hh.

Member Function Documentation

◆ getToolkit()

const JHitToolkit< JDAQHit, false > & JTRIGGER::JHitToolkit< JDAQHit, false >::getToolkit ( ) const
inline

Get toolkit.

Returns
this hit toolkit

Definition at line 195 of file JHitToolkit.hh.

196 {
197 return *this;
198 }

◆ getT()

static double JTRIGGER::JHitToolkit< JDAQHit, false >::getT ( const JDAQHit & hit)
inlinestatic

Get time of hit.

Parameters
hithit
Returns
time of hit [ns]

Definition at line 207 of file JHitToolkit.hh.

208 {
209 return hit.getT();
210 }
JTDC_t getT() const
Get time.
Definition JDAQHit.hh:86

◆ getToT()

static double JTRIGGER::JHitToolkit< JDAQHit, false >::getToT ( const JDAQHit & hit)
inlinestatic

Get time-over-threshold of hit.

Parameters
hithit
Returns
time-over-threshold of hit [ns]

Definition at line 219 of file JHitToolkit.hh.

220 {
221 return hit.getToT();
222 }
JTOT_t getToT() const
Get time-over-threshold.
Definition JDAQHit.hh:97

◆ getJHit()

static JHit JTRIGGER::JHitToolkit< JDAQHit, false >::getJHit ( const JDAQHit & hit)
inlinestatic

Construct JHit.

Parameters
hithit
Returns
hit

Definition at line 231 of file JHitToolkit.hh.

232 {
233 return JHit(hit.getT(), hit.getToT());
234 }
Acoustics hit.

◆ getHit()

static JDAQHit JTRIGGER::JHitToolkit< JDAQHit, false >::getHit ( const JDAQHit & hit,
const JCalibration & cal )
inlinestatic

Construct hit.

Parameters
hitDAQ hit
calcalibration
Returns
hit

Definition at line 244 of file JHitToolkit.hh.

245 {
246 return hit;
247 }

◆ getEndMarker()

static JDAQHit JTRIGGER::JHitToolkit< JDAQHit, false >::getEndMarker ( )
inlinestatic

Get end marker.

Returns
latest possible hit

Definition at line 255 of file JHitToolkit.hh.

256 {
257 return JDAQHit(0, std::numeric_limits<JDAQHit::JTDC_t>::max(), 0);
258 }
Hit data structure.
Definition JDAQHit.hh:35

◆ getTimeDifference()

static double JTRIGGER::JHitToolkit< JDAQHit, false >::getTimeDifference ( const JDAQHit & first,
const JDAQHit & second )
inlinestatic

Get time difference between two hits.

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

Definition at line 268 of file JHitToolkit.hh.

269 {
270 return getT(second) - getT(first);
271 }
static double getT(const JDAQHit &hit)
Get time of hit.

◆ operator()()

bool JTRIGGER::JHitToolkit< JDAQHit, false >::operator() ( const JDAQHit & first,
const JDAQHit & second ) const
inline

Compare time of two hits.

Parameters
firstfirst hit
secondsecond hit
Returns
true if second hit later; else false

Definition at line 281 of file JHitToolkit.hh.

282 {
283 return getT(first) < getT(second);
284 }

◆ join()

static JHit JTRIGGER::JHitToolkit< JDAQHit, false >::join ( const JHit & first,
const JHit & second )
inlinestatic

Join two hits.

Parameters
firstfirst hit
secondsecond hit
Returns
joined hit

Definition at line 294 of file JHitToolkit.hh.

295 {
296 JHit hit(first);
297
298 hit.join(second);
299
300 return hit;
301 }

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