Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
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. More...
 
virtual bool maybeSwapped (const JDAQHit &first, const JDAQHit &second) const override
 Test whether two consecutive hits may be swapped. More...
 

Public Attributes

JDAQHit::JTDC_t Tmax
 

Detailed Description

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

Definition at line 187 of file JCLBDefaultSimulator.hh.

Constructor & Destructor Documentation

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

Constructor.

Parameters
Tmaxmaximal time difference for swap [ns]

Definition at line 196 of file JCLBDefaultSimulator.hh.

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

Member Function Documentation

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 209 of file JCLBDefaultSimulator.hh.

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

Member Data Documentation

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

Definition at line 215 of file JCLBDefaultSimulator.hh.


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