Belle II Software  release-08-01-10
TRGGDL Class Reference

The instance of TRGGDL is a singleton. More...

#include <TRGGDL.h>

Collaboration diagram for TRGGDL:

Public Member Functions

std::string name (void) const
 returns name.
 
std::string version (void) const
 returns version.
 
std::string configFile (void) const
 returns configuration file name.
 
unsigned mode (void) const
 returns simulation mode.
 
unsigned mode (unsigned)
 sets and returns simulation mode.
 
unsigned firmwareSimulationMode (void) const
 returns firmware simulation mode.
 
void dump (const std::string &message) const
 dumps debug information.
 
int debugLevel (void) const
 returns debug level.
 
int debugLevel (int) const
 sets and returns debug level.
 
void clear (void)
 clears all TRGGDL information.
 
void fastClear (void)
 clears TRGGDL information.
 
void update (bool mcAnalysis=true)
 updates TRGGDL information.
 
const TRGClocksystemClock (void) const
 returns the system clock.
 
double systemOffsetMC (void) const
 returns the system offset in MC.
 
bool doprescale (int f)
 
bool isFiredFTDL (std::vector< bool > input, std::string alg)
 
void checkDatabase () const
 Check the content of the DBObjects used by this class.
 
std::vector< bool > getInpBits (void)
 
std::vector< bool > getFtdBits (void)
 
std::vector< bool > getPsnBits (void)
 

Static Public Member Functions

static TRGGDLgetTRGGDL (const std::string &configFile, unsigned simulationMode=0, unsigned fastSimulationMode=0, unsigned firmwareSimulationMode=0, const std::string &Phase="Phase", bool algFromDB=true, const std::string &algFilePath="ftd.alg", int debugLevel=0, double timquality_threshold_sfin=0, double timquality_threshold_fine=0)
 returns TRGGDL object with specific configuration.
 
static TRGGDLgetTRGGDL (void)
 returns TRGGDL object. More...
 
static TRGState decision (const TRGState &input)
 Makes bit pattern(state) using input bit pattern(state).
 
static TRGState timingDecision (const TRGState &input, TRGState &registers, bool &logicStillActive)
 Makes timing decision.
 

Static Public Attributes

static void(* _ftd )(bool *out, const bool *in)
 Function to simulate final trigger decision.
 

Private Member Functions

 TRGGDL (const std::string &configFile, unsigned simulationMode, unsigned fastSimulationMode, unsigned firmwareSimulationMode, const std::string &Phase, bool algFromDB=true, const std::string &algFilePath="ftd.alg", int debugLevel=0, double timquality_threshold_sfin=0, double timquality_threshold_fine=0)
 Constructor.
 
virtual ~TRGGDL ()
 Destructor.
 
void initialize (void)
 initializes GDL.
 
void configure (void)
 configures trigger modules for firmware simulation.
 
void simulate (void)
 fast trigger simulation.
 
void terminate (void)
 terminates when run is finished
 
void updateMC (void)
 updates TRGGDL information for MC.
 
void fastSimulation (void)
 Fast simulation.
 
void firmwareSimulation (void)
 Firmware simulation.
 
void dataSimulation (void)
 Data simulation.
 
void getInput (std::ifstream &ifs)
 Read input data definition.
 
void getOutput (std::ifstream &ifs)
 Read output data definition.
 
void getAlgorithm (std::ifstream &ifs)
 Read algorithm data definition.
 
void accumulateInp (TH1I *)
 Accumulate bit info in histogram.
 
void accumulateFtd (TH1I *)
 Accumulate bit info in histogram.
 
void accumulatePsn (TH1I *)
 Accumulate bit info in histogram.
 
bool isFiredInput (int n)
 Returns fired/not for input bits.
 
bool isFiredFtdl (int n)
 Returns fired/not for ftdl bits.
 
bool isFiredPsnm (int n)
 Returns fired/not for psnm bits.
 
int getNbitsOup (void)
 
int getNbitsInp (void)
 

Private Attributes

int _debugLevel
 Debug level.
 
std::string _configFilename
 GDL configuration filename.
 
unsigned _simulationMode
 Simulation mode.
 
unsigned _fastSimulationMode
 Fast simulation mode.
 
unsigned _firmwareSimulationMode
 Firmware simulation mode.
 
std::string _Phase
 
std::string _algFilePath
 
const TRGClock_clock
 GDL trigger system clock.
 
const double _offset
 Timing offset of GDL.
 
std::vector< TRGLink * > _links
 All serial links.
 
std::vector< std::string > _input
 Input names.
 
std::vector< std::string > _output
 Output names.
 
std::vector< std::string > _algorithm
 Algorithm.
 
TRGSignalBundle_isb
 Input signal bundle.
 
TRGSignalBundle_osb
 Output signal bundle.
 
TRGSignalBundle_tsb
 Timing input signal bundle.
 
TRGSignalBundle_tosb
 Timing output signal bundle.
 
DBObjPtr< TRGGDLDBInputBitsm_InputBitsDB
 Data base of GDL input bits.
 
DBObjPtr< TRGGDLDBFTDLBitsm_FTDLBitsDB
 
DBObjPtr< TRGGDLDBPrescalesm_PrescalesDB
 
DBObjPtr< TRGGDLDBAlgsm_AlgsDB
 
double _timquality_threshold_sfin
 Threshold to determine timing quality flag with MC truth: super fine.
 
double _timquality_threshold_fine
 Threshold to determine timing quality flag with MC truth: fine.
 
std::vector< bool > _inpBits
 
std::vector< bool > _ftdBits
 
std::vector< bool > _psnBits
 
std::vector< std::string > _inpBitNames
 
std::vector< std::string > _oupBitNames
 
bool _algFromDB
 
StoreObjPtr< SimClockStatem_simClockState
 generated hardware clock state
 
DBObjPtr< HardwareClockSettingsm_hwClock
 Hardware Clocks.
 

Static Private Attributes

static TRGGDL_gdl = 0
 GDL singleton. More...
 

Friends

class TRGGDLModule
 

Detailed Description

The instance of TRGGDL is a singleton.

'TRGGDL::getTRGGDL()' gives you a pointer to access the TRGGDL. Geometrical information is initialized automatically. Before accessing hit information, user has to call 'update()' to initialize hit information event by event.

Definition at line 44 of file TRGGDL.h.


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