Belle II Software development
TRGGDL Class Reference

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

#include <TRGGDL.h>

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.
 
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.
 

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.

Member Function Documentation

◆ getFtdBits()

std::vector< bool > getFtdBits ( void  )
inline

Definition at line 161 of file TRGGDL.h.

161{return _ftdBits;}

◆ getInpBits()

std::vector< bool > getInpBits ( void  )
inline

Definition at line 159 of file TRGGDL.h.

159{return _inpBits;}

◆ getNbitsInp()

int getNbitsInp ( void  )
inlineprivate

Definition at line 282 of file TRGGDL.h.

282{return _inpBitNames.size();}

◆ getNbitsOup()

int getNbitsOup ( void  )
inlineprivate

Definition at line 281 of file TRGGDL.h.

281{return _oupBitNames.size();}

◆ getPsnBits()

std::vector< bool > getPsnBits ( void  )
inline

Definition at line 163 of file TRGGDL.h.

163{return _psnBits;}

◆ isFiredFtdl()

bool isFiredFtdl ( int  n)
inlineprivate

Returns fired/not for ftdl bits.

Definition at line 201 of file TRGGDL.h.

201{return _ftdBits[n];}

◆ isFiredInput()

bool isFiredInput ( int  n)
inlineprivate

Returns fired/not for input bits.

Definition at line 198 of file TRGGDL.h.

198{return _inpBits[n];}

◆ isFiredPsnm()

bool isFiredPsnm ( int  n)
inlineprivate

Returns fired/not for psnm bits.

Definition at line 204 of file TRGGDL.h.

204{return _psnBits[n];}

Friends And Related Function Documentation

◆ TRGGDLModule

friend class TRGGDLModule
friend

Definition at line 292 of file TRGGDL.h.

Member Data Documentation

◆ _algFilePath

std::string _algFilePath
private

Definition at line 230 of file TRGGDL.h.

◆ _algFromDB

bool _algFromDB
private

Definition at line 284 of file TRGGDL.h.

◆ _algorithm

std::vector<std::string> _algorithm
private

Algorithm.

Definition at line 248 of file TRGGDL.h.

◆ _clock

const TRGClock& _clock
private

GDL trigger system clock.

Definition at line 233 of file TRGGDL.h.

◆ _configFilename

std::string _configFilename
private

GDL configuration filename.

Definition at line 215 of file TRGGDL.h.

◆ _debugLevel

int _debugLevel
mutableprivate

Debug level.

Definition at line 212 of file TRGGDL.h.

◆ _fastSimulationMode

unsigned _fastSimulationMode
private

Fast simulation mode.

Definition at line 221 of file TRGGDL.h.

◆ _firmwareSimulationMode

unsigned _firmwareSimulationMode
private

Firmware simulation mode.

Definition at line 224 of file TRGGDL.h.

◆ _ftdBits

std::vector<bool> _ftdBits
private

Definition at line 276 of file TRGGDL.h.

◆ _inpBitNames

std::vector<std::string> _inpBitNames
private

Definition at line 278 of file TRGGDL.h.

◆ _inpBits

std::vector<bool> _inpBits
private

Definition at line 275 of file TRGGDL.h.

◆ _input

std::vector<std::string> _input
private

Input names.

Definition at line 242 of file TRGGDL.h.

◆ _isb

TRGSignalBundle* _isb
private

Input signal bundle.

Definition at line 251 of file TRGGDL.h.

◆ _links

std::vector<TRGLink*> _links
private

All serial links.

Definition at line 239 of file TRGGDL.h.

◆ _offset

const double _offset
private

Timing offset of GDL.

Definition at line 236 of file TRGGDL.h.

◆ _osb

TRGSignalBundle* _osb
private

Output signal bundle.

Definition at line 254 of file TRGGDL.h.

◆ _oupBitNames

std::vector<std::string> _oupBitNames
private

Definition at line 279 of file TRGGDL.h.

◆ _output

std::vector<std::string> _output
private

Output names.

Definition at line 245 of file TRGGDL.h.

◆ _Phase

std::string _Phase
private

Definition at line 227 of file TRGGDL.h.

◆ _psnBits

std::vector<bool> _psnBits
private

Definition at line 277 of file TRGGDL.h.

◆ _simulationMode

unsigned _simulationMode
private

Simulation mode.

Definition at line 218 of file TRGGDL.h.

◆ _timquality_threshold_fine

double _timquality_threshold_fine
private

Threshold to determine timing quality flag with MC truth: fine.

Definition at line 272 of file TRGGDL.h.

◆ _timquality_threshold_sfin

double _timquality_threshold_sfin
private

Threshold to determine timing quality flag with MC truth: super fine.

Definition at line 269 of file TRGGDL.h.

◆ _tosb

TRGSignalBundle* _tosb
private

Timing output signal bundle.

Definition at line 260 of file TRGGDL.h.

◆ _tsb

TRGSignalBundle* _tsb
private

Timing input signal bundle.

Definition at line 257 of file TRGGDL.h.

◆ m_AlgsDB

DBObjPtr<TRGGDLDBAlgs> m_AlgsDB
private

Definition at line 266 of file TRGGDL.h.

◆ m_FTDLBitsDB

DBObjPtr<TRGGDLDBFTDLBits> m_FTDLBitsDB
private

Definition at line 264 of file TRGGDL.h.

◆ m_hwClock

DBObjPtr<HardwareClockSettings> m_hwClock
private

Hardware Clocks.

Definition at line 289 of file TRGGDL.h.

◆ m_InputBitsDB

DBObjPtr<TRGGDLDBInputBits> m_InputBitsDB
private

Data base of GDL input bits.

Definition at line 263 of file TRGGDL.h.

◆ m_PrescalesDB

DBObjPtr<TRGGDLDBPrescales> m_PrescalesDB
private

Definition at line 265 of file TRGGDL.h.

◆ m_simClockState

StoreObjPtr<SimClockState> m_simClockState
private

generated hardware clock state

Definition at line 287 of file TRGGDL.h.


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