|
Jpp 20.0.0-72-g597b30bc9
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 | setHighRateVeto () const |
| Set high-rate veto based on number of hits. | |
| virtual bool | getHighRateVeto (const JPMTIdentifier &id) const |
| Get high-rate veto of given PMT. | |
| virtual bool | getFIFOStatus (const JPMTIdentifier &id) const |
| Get FIFO (almost) full of given PMT. | |
| virtual bool | hasCLB (const JModuleIdentifier &id) const |
| Check if CLB exist. | |
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 | |
| std::unique_ptr< JTDC > | TDC |
| std::unique_ptr< JStateMachine > | state_machine |
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 57 of file JCLBDefaultSimulatorInterface.hh.
Definition at line 62 of file JCLBDefaultSimulatorInterface.hh.
Definition at line 63 of file JCLBDefaultSimulatorInterface.hh.
Definition at line 64 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 130 of file JCLBDefaultSimulatorInterface.hh.
|
inline |
Get DAQ frame status of given module.
| id | module identifier |
Definition at line 144 of file JCLBDefaultSimulatorInterface.hh.
|
inlineoverridevirtual |
Process data.
| id | module identifier |
| input | PMT data |
| output | CLB data |
Implements JDETECTOR::JCLBSimulator.
Definition at line 169 of file JCLBDefaultSimulatorInterface.hh.
|
inlinevirtual |
Get number of received UDP packets.
| id | module identifier |
Reimplemented in JTRIGGER::JCLBRunByRunSimulator.
Definition at line 281 of file JCLBDefaultSimulatorInterface.hh.
|
inlinevirtual |
Get maximal sequence number of UDP packet.
| id | module identifier |
Reimplemented in JTRIGGER::JCLBRunByRunSimulator.
Definition at line 293 of file JCLBDefaultSimulatorInterface.hh.
|
inlinevirtual |
Get UDP trailer status.
| id | module identifier |
Reimplemented in JTRIGGER::JCLBRunByRunSimulator.
Definition at line 305 of file JCLBDefaultSimulatorInterface.hh.
|
inlinevirtual |
Set high-rate veto based on number of hits.
Reimplemented in JTRIGGER::JCLBRunByRunSimulator.
Definition at line 316 of file JCLBDefaultSimulatorInterface.hh.
|
inlinevirtual |
Get high-rate veto of given PMT.
| id | PMT identifier |
Reimplemented in JTRIGGER::JCLBRunByRunSimulator.
Definition at line 328 of file JCLBDefaultSimulatorInterface.hh.
|
inlinevirtual |
Get FIFO (almost) full of given PMT.
| id | PMT identifier |
Reimplemented in JTRIGGER::JCLBRunByRunSimulator.
Definition at line 340 of file JCLBDefaultSimulatorInterface.hh.
|
inlinestatic |
Get minimal pulse length of time-over-threshold measurement.
Definition at line 351 of file JCLBDefaultSimulatorInterface.hh.
|
inlinevirtualinherited |
Check if CLB exist.
| id | module identifier |
Reimplemented in JTRIGGER::JCLBRunByRunSimulator.
Definition at line 67 of file JCLBSimulator.hh.
|
static |
|
private |
Definition at line 389 of file JCLBDefaultSimulatorInterface.hh.
|
private |
Definition at line 390 of file JCLBDefaultSimulatorInterface.hh.