Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JDETECTOR::JCLBDefaultSimulator::JStateMachine Class Reference

Auxiliary class to mimic hit ordering effects due to state machine inside CLB. More...

#include <JCLBDefaultSimulator.hh>

Inheritance diagram for JDETECTOR::JCLBDefaultSimulator::JStateMachine:
JDETECTOR::JCLBDefaultSimulatorInterface::JStateMachine

Public Member Functions

 JStateMachine (const JDAQHit::JTDC_t Tmax)
 Constructor.
 
virtual bool maybeSwapped (const JDAQHit &first, const JDAQHit &second) const override
 Test whether two consecutive hits may be swapped.
 

Public Attributes

JDAQHit::JTDC_t Tmax
 

Detailed Description

Auxiliary class to mimic hit ordering effects due to state machine inside CLB.

Definition at line 186 of file JCLBDefaultSimulator.hh.

Constructor & Destructor Documentation

◆ JStateMachine()

JDETECTOR::JCLBDefaultSimulator::JStateMachine::JStateMachine ( const JDAQHit::JTDC_t Tmax)
inline

Constructor.

Parameters
Tmaxmaximal time difference for swap [ns]

Definition at line 195 of file JCLBDefaultSimulator.hh.

196 {
197 this->Tmax = Tmax;
198 }

Member Function Documentation

◆ maybeSwapped()

virtual bool JDETECTOR::JCLBDefaultSimulator::JStateMachine::maybeSwapped ( const JDAQHit & first,
const JDAQHit & second ) const
inlineoverridevirtual

Test whether two consecutive hits may be swapped.

Parameters
firstfirst DAQ hit
secondsecond DAQ hit
Returns
true if PMTs differ and time difference less than preset value; else false

Reimplemented from JDETECTOR::JCLBDefaultSimulatorInterface::JStateMachine.

Definition at line 208 of file JCLBDefaultSimulator.hh.

209 {
210 return (first.getPMT() != second.getPMT() && second.getT() - first.getT() < Tmax);
211 }
JPMT_t getPMT() const
Get PMT.
Definition JDAQHit.hh:75
JTDC_t getT() const
Get time.
Definition JDAQHit.hh:86

Member Data Documentation

◆ Tmax

JDAQHit::JTDC_t JDETECTOR::JCLBDefaultSimulator::JStateMachine::Tmax

Definition at line 214 of file JCLBDefaultSimulator.hh.


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