Jpp test-rotations-new
the software that should make you happy
|
Default CLB simulation. More...
#include <JCLBDefaultSimulatorInterface.hh>
Classes | |
struct | compare |
Auxiliary data structure for sorting of hits. More... | |
class | JStateMachine |
Interface to mimic hit ordering effects due to state machine inside CLB. More... | |
class | JTDC |
Interface for TDC. More... | |
Public Types | |
typedef JDAQHit::JPMT_t | JPMT_t |
typedef JDAQHit::JTDC_t | JTDC_t |
typedef JDAQHit::JTOT_t | JTOT_t |
Public Member Functions | |
JCLBDefaultSimulatorInterface (JTDC *TDC, JStateMachine *state_machine) | |
Constructor. | |
JDAQFrameStatus | getDAQFrameStatus (const JModuleIdentifier &id) const |
Get DAQ frame status of given module. | |
virtual void | processData (const JModuleIdentifier &id, const JCLBInput &input, JDAQSuperFrame &output) const override |
Process data. | |
virtual int | getUDPNumberOfReceivedPackets (const JModuleIdentifier &id) const |
Get number of received UDP packets. | |
virtual int | getUDPMaximalSequenceNumber (const JModuleIdentifier &id) const |
Get maximal sequence number of UDP packet. | |
virtual bool | hasUDPTrailer (const JModuleIdentifier &id) const |
Get UDP trailer status. | |
virtual bool | getHighRateVeto (const JPMTIdentifier &id) const |
Get high-rate veto of given PMT. | |
Static Public Member Functions | |
static double | getMinimalToT () |
Get minimal pulse length of time-over-threshold measurement. | |
Static Public Attributes | |
static const struct JDETECTOR::JCLBDefaultSimulatorInterface::compare | compare |
Private Attributes | |
JLANG::JSinglePointer< JTDC > | TDC |
JLANG::JSinglePointer< JStateMachine > | state_machine |
std::vector< JDAQHit > | buffer |
Default CLB simulation.
This class provides for a default implementation of the JCLBSimulator interface which is based on a simulation of the TDC and the state machine inside the CLB. The actual number of hits may change due to the high-rate veto and UDP packet loss (loss of hits) and the dynamic range of the time-over-threshold (gain of hits).
The nested class JStateMachine constitutes a user interface for the simulation of the state machine through method JStateMachine::maybeSwapped(). With the default implementation, the overall time ordering if hits is maintained. For a realistic simulation of the CLB, a pointer to a designated implementation of this interface should be provided.
The implementation of the virtual method JCLBDefaultSimulatorInterface::processData provides for the settings of the status of the data frame.
In this, the high-rate veto is set when:
Definition at line 55 of file JCLBDefaultSimulatorInterface.hh.
Definition at line 60 of file JCLBDefaultSimulatorInterface.hh.
Definition at line 61 of file JCLBDefaultSimulatorInterface.hh.
Definition at line 62 of file JCLBDefaultSimulatorInterface.hh.
|
inline |
Constructor.
This class owns the objects pointed to.
TDC | pointer to TDC simulator |
state_machine | pointer to state machine |
Definition at line 128 of file JCLBDefaultSimulatorInterface.hh.
|
inline |
Get DAQ frame status of given module.
id | module identifier |
Definition at line 142 of file JCLBDefaultSimulatorInterface.hh.
|
inlineoverridevirtual |
Process data.
id | module identifier |
input | PMT data |
output | CLB data |
Implements JDETECTOR::JCLBSimulator.
Definition at line 166 of file JCLBDefaultSimulatorInterface.hh.
|
inlinevirtual |
Get number of received UDP packets.
id | module identifier |
Reimplemented in JTRIGGER::JCLBRunByRunSimulator.
Definition at line 271 of file JCLBDefaultSimulatorInterface.hh.
|
inlinevirtual |
Get maximal sequence number of UDP packet.
id | module identifier |
Reimplemented in JTRIGGER::JCLBRunByRunSimulator.
Definition at line 283 of file JCLBDefaultSimulatorInterface.hh.
|
inlinevirtual |
Get UDP trailer status.
id | module identifier |
Reimplemented in JTRIGGER::JCLBRunByRunSimulator.
Definition at line 295 of file JCLBDefaultSimulatorInterface.hh.
|
inlinevirtual |
Get high-rate veto of given PMT.
id | PMT identifier |
Reimplemented in JTRIGGER::JCLBRunByRunSimulator.
Definition at line 307 of file JCLBDefaultSimulatorInterface.hh.
|
inlinestatic |
Get minimal pulse length of time-over-threshold measurement.
Definition at line 318 of file JCLBDefaultSimulatorInterface.hh.
|
static |
|
private |
Definition at line 356 of file JCLBDefaultSimulatorInterface.hh.
|
private |
Definition at line 357 of file JCLBDefaultSimulatorInterface.hh.
|
mutableprivate |
Definition at line 358 of file JCLBDefaultSimulatorInterface.hh.