Belle II Software development
TRGRAWDATAModule Class Reference
Inheritance diagram for TRGRAWDATAModule:
HistoModule Module PathElement

Public Types

enum  EModuleNum {
  e_2d0 = 0 ,
  e_2d1 = 1 ,
  e_2d2 = 2 ,
  e_2d3 = 3 ,
  e_3d0 = 4 ,
  e_3d1 = 5 ,
  e_3d2 = 6 ,
  e_3d3 = 7 ,
  e_nn0 = 8 ,
  e_nn1 = 9 ,
  e_nn2 = 10 ,
  e_nn3 = 11 ,
  e_sl0 = 12 ,
  e_sl1 = 13 ,
  e_sl2 = 14 ,
  e_sl3 = 15 ,
  e_sl4 = 16 ,
  e_sl5 = 17 ,
  e_sl6 = 18 ,
  e_sl8 = 19 ,
  e_gdl = 20 ,
  e_etf = 21 ,
  e_grl = 22 ,
  e_top = 23
}
 
enum  EModulePropFlags {
  c_Input = 1 ,
  c_Output = 2 ,
  c_ParallelProcessingCertified = 4 ,
  c_HistogramManager = 8 ,
  c_InternalSerializer = 16 ,
  c_TerminateInAllProcesses = 32 ,
  c_DontCollectStatistics = 64
}
 Each module can be tagged with property flags, which indicate certain features of the module. More...
 
typedef ModuleCondition::EAfterConditionPath EAfterConditionPath
 Forward the EAfterConditionPath definition from the ModuleCondition.
 

Public Member Functions

 TRGRAWDATAModule ()
 Costructor.
 
virtual ~TRGRAWDATAModule ()
 Destrunctor.
 
virtual void initialize () override
 initialize
 
virtual void beginRun () override
 begin Run
 
virtual void event () override
 Event.
 
virtual void endRun () override
 End Run.
 
virtual void terminate () override
 terminate
 
virtual void defineHisto () override
 Define Histogram.
 
virtual std::vector< std::string > getFileNames (bool outputFiles)
 Return a list of output filenames for this modules.
 
const std::string & getName () const
 Returns the name of the module.
 
const std::string & getType () const
 Returns the type of the module (i.e.
 
const std::string & getPackage () const
 Returns the package this module is in.
 
const std::string & getDescription () const
 Returns the description of the module.
 
void setName (const std::string &name)
 Set the name of the module.
 
void setPropertyFlags (unsigned int propertyFlags)
 Sets the flags for the module properties.
 
LogConfiggetLogConfig ()
 Returns the log system configuration.
 
void setLogConfig (const LogConfig &logConfig)
 Set the log system configuration.
 
void setLogLevel (int logLevel)
 Configure the log level.
 
void setDebugLevel (int debugLevel)
 Configure the debug messaging level.
 
void setAbortLevel (int abortLevel)
 Configure the abort log level.
 
void setLogInfo (int logLevel, unsigned int logInfo)
 Configure the printed log information for the given level.
 
void if_value (const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 Add a condition to the module.
 
void if_false (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to add a condition to the module.
 
void if_true (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to set the condition of the module.
 
bool hasCondition () const
 Returns true if at least one condition was set for the module.
 
const ModuleConditiongetCondition () const
 Return a pointer to the first condition (or nullptr, if none was set)
 
const std::vector< ModuleCondition > & getAllConditions () const
 Return all set conditions for this module.
 
bool evalCondition () const
 If at least one condition was set, it is evaluated and true returned if at least one condition returns true.
 
std::shared_ptr< PathgetConditionPath () const
 Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).
 
Module::EAfterConditionPath getAfterConditionPath () const
 What to do after the conditional path is finished.
 
std::vector< std::shared_ptr< Path > > getAllConditionPaths () const
 Return all condition paths currently set (no matter if the condition is true or not).
 
bool hasProperties (unsigned int propertyFlags) const
 Returns true if all specified property flags are available in this module.
 
bool hasUnsetForcedParams () const
 Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.
 
const ModuleParamListgetParamList () const
 Return module param list.
 
template<typename T >
ModuleParam< T > & getParam (const std::string &name) const
 Returns a reference to a parameter.
 
bool hasReturnValue () const
 Return true if this module has a valid return value set.
 
int getReturnValue () const
 Return the return value set by this module.
 
std::shared_ptr< PathElementclone () const override
 Create an independent copy of this module.
 
std::shared_ptr< boost::python::list > getParamInfoListPython () const
 Returns a python list of all parameters.
 

Static Public Member Functions

static void exposePythonAPI ()
 Exposes methods of the Module class to Python.
 

Public Attributes

const char * moduleNames [c_nModules]
 

Static Public Attributes

static const unsigned int c_nModules = 24
 number of modules
 

Protected Member Functions

virtual void def_initialize ()
 Wrappers to make the methods without "def_" prefix callable from Python.
 
virtual void def_beginRun ()
 Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.
 
virtual void def_event ()
 Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.
 
virtual void def_endRun ()
 This method can receive that the current run ends as a call from the Python side.
 
virtual void def_terminate ()
 Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.
 
void setDescription (const std::string &description)
 Sets the description of the module.
 
void setType (const std::string &type)
 Set the module type.
 
template<typename T >
void addParam (const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
 Adds a new parameter to the module.
 
template<typename T >
void addParam (const std::string &name, T &paramVariable, const std::string &description)
 Adds a new enforced parameter to the module.
 
void setReturnValue (int value)
 Sets the return value for this module as integer.
 
void setReturnValue (bool value)
 Sets the return value for this module as bool.
 
void setParamList (const ModuleParamList &params)
 Replace existing parameter list.
 

Protected Attributes

StoreObjPtr< EventMetaDatam_eventMetaDataPtr
 Event Meta Data.
 
DBObjPtr< TRGGDLDBUnpackerm_unpacker
 
std::vector< std::vector< int > > BitMap
 
int LeafBitMap [320] = {}
 
char LeafNames [320][100] = {}
 

Private Member Functions

std::list< ModulePtrgetModules () const override
 no submodules, return empty list
 
std::string getPathString () const override
 return the module name.
 
void setParamPython (const std::string &name, const boost::python::object &pyObj)
 Implements a method for setting boost::python objects.
 
void setParamPythonDict (const boost::python::dict &dictionary)
 Implements a method for reading the parameter values from a boost::python dictionary.
 

Private Attributes

int m_mydebug
 
bool m_cc_check
 
bool m_print_cc
 
bool m_print_dbmap
 
bool m_print_clkcyc_err
 
bool m_histRecord
 
int m_hdr_nwd_sl0 = intNaN
 
int m_hdr_nwd_sl1 = intNaN
 
int m_hdr_nwd_sl2 = intNaN
 
int m_hdr_nwd_sl3 = intNaN
 
int m_hdr_nwd_sl4 = intNaN
 
int m_hdr_nwd_sl5 = intNaN
 
int m_hdr_nwd_sl6 = intNaN
 
int m_hdr_nwd_sl8 = intNaN
 
int m_hdr_nwd_2d0 = intNaN
 
int m_hdr_nwd_2d1 = intNaN
 
int m_hdr_nwd_2d2 = intNaN
 
int m_hdr_nwd_2d3 = intNaN
 
int m_hdr_nwd_3d0 = intNaN
 
int m_hdr_nwd_3d1 = intNaN
 
int m_hdr_nwd_3d2 = intNaN
 
int m_hdr_nwd_3d3 = intNaN
 
int m_hdr_nwd_nn0 = intNaN
 
int m_hdr_nwd_nn1 = intNaN
 
int m_hdr_nwd_nn2 = intNaN
 
int m_hdr_nwd_nn3 = intNaN
 
int m_hdr_nwd_gdl = intNaN
 
int m_hdr_nwd_etf = intNaN
 
int m_hdr_nwd_grl = intNaN
 
int m_hdr_nwd_top = intNaN
 
unsigned m_cpr_sl0 = intNaN
 
unsigned m_cpr_sl1 = intNaN
 
unsigned m_cpr_sl2 = intNaN
 
unsigned m_cpr_sl3 = intNaN
 
unsigned m_cpr_sl4 = intNaN
 
unsigned m_cpr_sl5 = intNaN
 
unsigned m_cpr_sl6 = intNaN
 
int m_cpr_sl7 = intNaN
 
unsigned m_cpr_sl8 = intNaN
 
unsigned m_cpr_2d0 = intNaN
 
unsigned m_cpr_2d1 = intNaN
 
unsigned m_cpr_2d2 = intNaN
 
unsigned m_cpr_2d3 = intNaN
 
unsigned m_cpr_3d0 = intNaN
 
unsigned m_cpr_3d1 = intNaN
 
unsigned m_cpr_3d2 = intNaN
 
unsigned m_cpr_3d3 = intNaN
 
unsigned m_cpr_nn0 = intNaN
 
unsigned m_cpr_nn1 = intNaN
 
unsigned m_cpr_nn2 = intNaN
 
unsigned m_cpr_nn3 = intNaN
 
unsigned m_cpr_gdl = intNaN
 
unsigned m_cpr_etf = intNaN
 
int m_cpr_grl = intNaN
 
unsigned m_cpr_top = intNaN
 
int m_fmid_sl0 = intNaN
 
int m_fmid_sl1 = intNaN
 
int m_fmid_sl2 = intNaN
 
int m_fmid_sl3 = intNaN
 
int m_fmid_sl4 = intNaN
 
int m_fmid_sl5 = intNaN
 
int m_fmid_sl6 = intNaN
 
int m_fmid_sl7 = intNaN
 
int m_fmid_sl8 = intNaN
 
int m_fmid_2d0 = intNaN
 
int m_fmid_2d1 = intNaN
 
int m_fmid_2d2 = intNaN
 
int m_fmid_2d3 = intNaN
 
int m_fmid_3d0 = intNaN
 
int m_fmid_3d1 = intNaN
 
int m_fmid_3d2 = intNaN
 
int m_fmid_3d3 = intNaN
 
int m_fmid_nn0 = intNaN
 
int m_fmid_nn1 = intNaN
 
int m_fmid_nn2 = intNaN
 
int m_fmid_nn3 = intNaN
 
unsigned m_fmid_gdl = intNaN
 
int m_fmid_etf = intNaN
 
int m_fmid_grl = intNaN
 
int m_fmid_top = intNaN
 
int m_scale_sl0 = intNaN
 
int m_scale_sl1 = intNaN
 
int m_scale_sl2 = intNaN
 
int m_scale_sl3 = intNaN
 
int m_scale_sl4 = intNaN
 
int m_scale_sl5 = intNaN
 
int m_scale_sl6 = intNaN
 
int m_scale_sl7 = intNaN
 
int m_scale_sl8 = intNaN
 
int m_scale_2ds = intNaN
 
int m_scale_3ds = intNaN
 
int m_scale_nns = intNaN
 
int m_scale_gdl = intNaN
 
int m_scale_etf = intNaN
 
int m_scale_grl = intNaN
 
int m_scale_top = intNaN
 
bool m_on_sl0 = false
 
bool m_on_sl1 = false
 
bool m_on_sl2 = false
 
bool m_on_sl3 = false
 
bool m_on_sl4 = false
 
bool m_on_sl5 = false
 
bool m_on_sl6 = false
 
bool m_on_sl7 = false
 
bool m_on_sl8 = false
 
bool m_on_2d0 = false
 
bool m_on_2d1 = false
 
bool m_on_2d2 = false
 
bool m_on_2d3 = false
 
bool m_on_3d0 = false
 
bool m_on_3d1 = false
 
bool m_on_3d2 = false
 
bool m_on_3d3 = false
 
bool m_on_nn0 = false
 
bool m_on_nn1 = false
 
bool m_on_nn2 = false
 
bool m_on_nn3 = false
 
bool m_on_gdl = false
 
bool m_on_etf = false
 
bool m_on_grl = false
 
bool m_on_top = false
 
int m_nwd_sl0 = intNaN
 
int m_nwd_sl1 = intNaN
 
int m_nwd_sl2 = intNaN
 
int m_nwd_sl3 = intNaN
 
int m_nwd_sl4 = intNaN
 
int m_nwd_sl5 = intNaN
 
int m_nwd_sl6 = intNaN
 
int m_nwd_sl7 = intNaN
 
int m_nwd_sl8 = intNaN
 
int m_nwd_2ds = intNaN
 
int m_nwd_3ds = intNaN
 
int m_nwd_nns = intNaN
 
int m_nwd_gdl = intNaN
 
int m_nwd_etf = intNaN
 
int m_nwd_grl = intNaN
 
int m_nwd_top = intNaN
 
int m_nclk_cdctrg = intNaN
 
int m_nclk_sl0 = intNaN
 
int m_nclk_sl1 = intNaN
 
int m_nclk_sl2 = intNaN
 
int m_nclk_sl3 = intNaN
 
int m_nclk_sl4 = intNaN
 
int m_nclk_sl5 = intNaN
 
int m_nclk_sl6 = intNaN
 
int m_nclk_sl7 = intNaN
 
int m_nclk_sl8 = intNaN
 
int m_nclk_2ds = intNaN
 
int m_nclk_3ds = intNaN
 
int m_nclk_nns = intNaN
 
int m_nclk_gdl = intNaN
 
int m_nclk_etf = intNaN
 
int m_nclk_grl = intNaN
 
int m_nclk_top = intNaN
 
int cntr_good_odr [50] = {}
 
int cntr_bad_odr [50] = {}
 
int cntr_bad_ddd [50] = {}
 
int cntr_bad_nwd [50] = {}
 
int cntr_nw3 [50] = {}
 
int cntr_nw3_badvet [50] = {}
 
int cntr_nw3_badtrg [50] = {}
 
int cntr_nw3_badrvc [50] = {}
 
int cntr_nwn [50] = {}
 
int cntr_nwn_badvet [50] = {}
 
int cntr_nwn_badtrg [50] = {}
 
int cntr_nwn_badrvc [50] = {}
 
int cntr_nwn_badbbb [50] = {}
 
int cntr_nwn_badddd [50] = {}
 
int cntr_nwe_badnwd [50] = {}
 
std::string m_name
 The name of the module, saved as a string (user-modifiable)
 
std::string m_type
 The type of the module, saved as a string.
 
std::string m_package
 Package this module is found in (may be empty).
 
std::string m_description
 The description of the module.
 
unsigned int m_propertyFlags
 The properties of the module as bitwise or (with |) of EModulePropFlags.
 
LogConfig m_logConfig
 The log system configuration of the module.
 
ModuleParamList m_moduleParamList
 List storing and managing all parameter of the module.
 
bool m_hasReturnValue
 True, if the return value is set.
 
int m_returnValue
 The return value.
 
std::vector< ModuleConditionm_conditions
 Module condition, only non-null if set.
 

Detailed Description

Definition at line 56 of file trgrawdataModule.h.

Member Typedef Documentation

◆ EAfterConditionPath

Forward the EAfterConditionPath definition from the ModuleCondition.

Definition at line 88 of file Module.h.

Member Enumeration Documentation

◆ EModuleNum

enum EModuleNum

Definition at line 183 of file trgrawdataModule.h.

183 {
184 e_2d0 = 0,
185 e_2d1 = 1,
186 e_2d2 = 2,
187 e_2d3 = 3,
188 e_3d0 = 4,
189 e_3d1 = 5,
190 e_3d2 = 6,
191 e_3d3 = 7,
192 e_nn0 = 8,
193 e_nn1 = 9,
194 e_nn2 = 10,
195 e_nn3 = 11,
196 e_sl0 = 12,
197 e_sl1 = 13,
198 e_sl2 = 14,
199 e_sl3 = 15,
200 e_sl4 = 16,
201 e_sl5 = 17,
202 e_sl6 = 18,
203 e_sl8 = 19,
204 e_gdl = 20,
205 e_etf = 21,
206 e_grl = 22,
207 e_top = 23
208 };

◆ EModulePropFlags

enum EModulePropFlags
inherited

Each module can be tagged with property flags, which indicate certain features of the module.

Enumerator
c_Input 

This module is an input module (reads data).

c_Output 

This module is an output module (writes data).

c_ParallelProcessingCertified 

This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)

c_HistogramManager 

This module is used to manage histograms accumulated by other modules.

c_InternalSerializer 

This module is an internal serializer/deserializer for parallel processing.

c_TerminateInAllProcesses 

When using parallel processing, call this module's terminate() function in all processes().

This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.

c_DontCollectStatistics 

No statistics is collected for this module.

Definition at line 77 of file Module.h.

77 {
78 c_Input = 1,
79 c_Output = 2,
85 };
@ c_HistogramManager
This module is used to manage histograms accumulated by other modules.
Definition: Module.h:81
@ c_Input
This module is an input module (reads data).
Definition: Module.h:78
@ c_DontCollectStatistics
No statistics is collected for this module.
Definition: Module.h:84
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
@ c_InternalSerializer
This module is an internal serializer/deserializer for parallel processing.
Definition: Module.h:82
@ c_Output
This module is an output module (writes data).
Definition: Module.h:79
@ c_TerminateInAllProcesses
When using parallel processing, call this module's terminate() function in all processes().
Definition: Module.h:83

Constructor & Destructor Documentation

◆ TRGRAWDATAModule()

Costructor.

Definition at line 33 of file trgrawdataModule.cc.

33 : HistoModule()
34{
35
36 setDescription("TRG rawdata analyer");
38
39 addParam("histRecord", m_histRecord,
40 "Recording event by event timing distribution histogram or not",
41 false);
42 addParam("mydebug", m_mydebug, "debug flag", 0);
43 addParam("cc_check", m_cc_check, "cc mode", true);
44 addParam("print_cc", m_print_cc, "Print Disordered clocks", true);
45 addParam("print_clkcyc_err", m_print_clkcyc_err, "Print Errs of Disordered clocks", false);
46 addParam("print_dbmap", m_print_dbmap, "Print Database Bit Map", false);
47
48 addParam("hdr_nwd_2d0", m_hdr_nwd_2d0, "Number of word for 2D0 Header", 3);
49 addParam("hdr_nwd_2d1", m_hdr_nwd_2d1, "Number of word for 2D1 Header", 3);
50 addParam("hdr_nwd_2d2", m_hdr_nwd_2d2, "Number of word for 2D2 Header", 3);
51 addParam("hdr_nwd_2d3", m_hdr_nwd_2d3, "Number of word for 2D3 Header", 3);
52 addParam("hdr_nwd_3d0", m_hdr_nwd_3d0, "Number of word for 3D0 Header", 3);
53 addParam("hdr_nwd_3d1", m_hdr_nwd_3d1, "Number of word for 3D1 Header", 3);
54 addParam("hdr_nwd_3d2", m_hdr_nwd_3d2, "Number of word for 3D2 Header", 3);
55 addParam("hdr_nwd_3d3", m_hdr_nwd_3d3, "Number of word for 3D3 Header", 3);
56 addParam("hdr_nwd_nn0", m_hdr_nwd_nn0, "Number of word for NN0 Header", 3);
57 addParam("hdr_nwd_nn1", m_hdr_nwd_nn1, "Number of word for NN1 Header", 3);
58 addParam("hdr_nwd_nn2", m_hdr_nwd_nn2, "Number of word for NN2 Header", 3);
59 addParam("hdr_nwd_nn3", m_hdr_nwd_nn3, "Number of word for NN3 Header", 3);
60 addParam("hdr_nwd_sl0", m_hdr_nwd_sl0, "Number of word for TSF0 Header", 3);
61 addParam("hdr_nwd_sl1", m_hdr_nwd_sl1, "Number of word for TSF1 Header", 3);
62 addParam("hdr_nwd_sl2", m_hdr_nwd_sl2, "Number of word for TSF2 Header", 3);
63 addParam("hdr_nwd_sl3", m_hdr_nwd_sl3, "Number of word for TSF3 Header", 3);
64 addParam("hdr_nwd_sl4", m_hdr_nwd_sl4, "Number of word for TSF4 Header", 3);
65 addParam("hdr_nwd_sl5", m_hdr_nwd_sl5, "Number of word for TSF5 Header", 3);
66 addParam("hdr_nwd_sl6", m_hdr_nwd_sl6, "Number of word for TSF6 Header", 3);
67 addParam("hdr_nwd_sl8", m_hdr_nwd_sl8, "Number of word for TSF8 Header", 3);
68 addParam("hdr_nwd_etf", m_hdr_nwd_etf, "Number of word for ETF Header", 3);
69 addParam("hdr_nwd_grl", m_hdr_nwd_grl, "Number of word for GRL Header", 3);
70 addParam("hdr_nwd_top", m_hdr_nwd_top, "Number of word for TOP Header", 3);
71 addParam("hdr_nwd_gdl", m_hdr_nwd_gdl, "Number of word for GDL Header", 6);
72
73 addParam("cpr_2d0", m_cpr_2d0, "Copper number of 2D0", 0x11000001U);
74 addParam("cpr_2d1", m_cpr_2d1, "Copper number of 2D1", 0x11000001U);
75 addParam("cpr_2d2", m_cpr_2d2, "Copper number of 2D2", 0x11000002U);
76 addParam("cpr_2d3", m_cpr_2d3, "Copper number of 2D3", 0x11000002U);
77 addParam("cpr_3d0", m_cpr_3d0, "Copper number of 3D0", 0x11000003U);
78 addParam("cpr_3d1", m_cpr_3d1, "Copper number of 3D1", 0x11000003U);
79 addParam("cpr_3d2", m_cpr_3d2, "Copper number of 3D2", 0x11000004U);
80 addParam("cpr_3d3", m_cpr_3d3, "Copper number of 3D3", 0x11000004U);
81 addParam("cpr_nn0", m_cpr_nn0, "Copper number of NN0", 0x11000005U);
82 addParam("cpr_nn1", m_cpr_nn1, "Copper number of NN1", 0x11000005U);
83 addParam("cpr_nn2", m_cpr_nn2, "Copper number of NN2", 0x11000006U);
84 addParam("cpr_nn3", m_cpr_nn3, "Copper number of NN3", 0x11000006U);
85 addParam("cpr_sl0", m_cpr_sl0, "Copper number of SL0", 0x11000007U);
86 addParam("cpr_sl1", m_cpr_sl1, "Copper number of SL1", 0x11000009U);//*
87 addParam("cpr_sl2", m_cpr_sl2, "Copper number of SL2", 0x11000008U);
88 addParam("cpr_sl3", m_cpr_sl3, "Copper number of SL3", 0x11000008U);
89 addParam("cpr_sl4", m_cpr_sl4, "Copper number of SL4", 0x11000007U);//*
90 addParam("cpr_sl5", m_cpr_sl5, "Copper number of SL5", 0x11000009U);
91 addParam("cpr_sl6", m_cpr_sl6, "Copper number of SL6", 0x1100000aU);
92 addParam("cpr_sl7", m_cpr_sl7, "Copper number of SL7", 0x1100000a);
93 addParam("cpr_sl8", m_cpr_sl8, "Copper number of SL8", 0x1100000aU);
94 addParam("cpr_gdl", m_cpr_gdl, "Copper number of GDL", 0x15000001U);
95 addParam("cpr_etf", m_cpr_etf, "Copper number of ETF", 0x15000001U);
96 addParam("cpr_grl", m_cpr_grl, "Copper number of GRL", 0x15000002);
97 addParam("cpr_top", m_cpr_top, "Copper number of TOP", 0x12000001U);
98
99 addParam("on_2d0", m_on_2d0, "ON/OFF of 2D0", true);
100 addParam("on_2d1", m_on_2d1, "ON/OFF of 2D1", true);
101 addParam("on_2d2", m_on_2d2, "ON/OFF of 2D2", true);
102 addParam("on_2d3", m_on_2d3, "ON/OFF of 2D3", true);
103 addParam("on_3d0", m_on_3d0, "ON/OFF of 3D0", true);
104 addParam("on_3d1", m_on_3d1, "ON/OFF of 3D1", true);
105 addParam("on_3d2", m_on_3d2, "ON/OFF of 3D2", true);
106 addParam("on_3d3", m_on_3d3, "ON/OFF of 3D3", true);
107 addParam("on_nn0", m_on_nn0, "ON/OFF of NN0", true);
108 addParam("on_nn1", m_on_nn1, "ON/OFF of NN1", true);
109 addParam("on_nn2", m_on_nn2, "ON/OFF of NN2", true);
110 addParam("on_nn3", m_on_nn3, "ON/OFF of NN3", true);
111 addParam("on_sl0", m_on_sl0, "ON/OFF of SL0", true);
112 addParam("on_sl1", m_on_sl1, "ON/OFF of SL1", true);
113 addParam("on_sl2", m_on_sl2, "ON/OFF of SL2", true);
114 addParam("on_sl3", m_on_sl3, "ON/OFF of SL3", true);
115 addParam("on_sl4", m_on_sl4, "ON/OFF of SL4", true);
116 addParam("on_sl5", m_on_sl5, "ON/OFF of SL5", true);
117 addParam("on_sl6", m_on_sl6, "ON/OFF of SL6", true);
118 addParam("on_sl7", m_on_sl7, "ON/OFF of SL7", true);
119 addParam("on_sl8", m_on_sl8, "ON/OFF of SL8", true);
120 addParam("on_gdl", m_on_gdl, "ON/OFF of GDL", true);
121 addParam("on_etf", m_on_etf, "ON/OFF of ETF", true);
122 addParam("on_grl", m_on_grl, "ON/OFF of GRL", true);
123 addParam("on_top", m_on_top, "ON/OFF of TOP", true);
124
125 addParam("nwd_2ds", m_nwd_2ds, "N word of 2Ds", 3939); // 2624x48
126 addParam("nwd_3ds", m_nwd_3ds, "N word of 3Ds", 3939); // 2624x48
127 addParam("nwd_nns", m_nwd_nns, "N word of NNs", 0xc03); // 2048x48
128 addParam("nwd_sl0", m_nwd_sl0, "N word of SL0", 0xc03); // 2048x48
129 addParam("nwd_sl1", m_nwd_sl1, "N word of SL1", 0x1803); // 4096x48
130 addParam("nwd_sl2", m_nwd_sl2, "N word of SL2", 0x1803); // 4096x48
131 addParam("nwd_sl3", m_nwd_sl3, "N word of SL3", 0x1803); // 4096x48
132 addParam("nwd_sl4", m_nwd_sl4, "N word of SL4", 0xc03); // 2048x48
133 addParam("nwd_sl5", m_nwd_sl5, "N word of SL5", 0x1803); // 4096x48
134 addParam("nwd_sl6", m_nwd_sl6, "N word of SL6", 0xc03); // 2048x48
135 addParam("nwd_sl7", m_nwd_sl7, "N word of SL7", 0x603); // 1024x48
136 addParam("nwd_sl8", m_nwd_sl8, "N word of SL8", 0x603); // 1024x48
137 addParam("nwd_gdl", m_nwd_gdl, "N word of GDL", 646); // 640x32
138 addParam("nwd_etf", m_nwd_etf, "N word of ETF", 1539); // 1024x48
139 addParam("nwd_grl", m_nwd_grl, "N word of GRL", 0xc03); // 1024x48
140 addParam("nwd_top", m_nwd_top, "N word of TOP", 0x303); // 1024*24
141
142 addParam("nclk_2ds", m_nclk_2ds, "N clk of 2Ds", 48);
143 addParam("nclk_3ds", m_nclk_3ds, "N clk of 3Ds", 48);
144 addParam("nclk_nns", m_nclk_nns, "N clk of NNs", 48);
145 addParam("nclk_sl0", m_nclk_sl0, "N clk of SL0", 48);
146 addParam("nclk_sl1", m_nclk_sl1, "N clk of SL1", 48);
147 addParam("nclk_sl2", m_nclk_sl2, "N clk of SL2", 48);
148 addParam("nclk_sl3", m_nclk_sl3, "N clk of SL3", 48);
149 addParam("nclk_sl4", m_nclk_sl4, "N clk of SL4", 48);
150 addParam("nclk_sl5", m_nclk_sl5, "N clk of SL5", 48);
151 addParam("nclk_sl6", m_nclk_sl6, "N clk of SL6", 48);
152 addParam("nclk_sl7", m_nclk_sl7, "N clk of SL7", 48);
153 addParam("nclk_sl8", m_nclk_sl8, "N clk of SL8", 48);
154 addParam("nclk_gdl", m_nclk_gdl, "N clk of GDL", 32);
155 addParam("nclk_etf", m_nclk_etf, "N clk of ETF", 48);
156 addParam("nclk_grl", m_nclk_grl, "N clk of GRL", 48);
157 addParam("nclk_top", m_nclk_top, "N clk of TOP", 24);
158
159 addParam("nclk_cdctrg", m_nclk_cdctrg, "N clock of CDCTRG", 48);
160
161 addParam("scale_2ds", m_scale_2ds, "Scale factor of 2Ds", 256);
162 addParam("scale_3ds", m_scale_3ds, "Scale factor of 3Ds", 256);
163 addParam("scale_nns", m_scale_nns, "Scale factor of NNs", 256);
164 addParam("scale_sl0", m_scale_sl0, "Scale factor of SL0", 256);
165 addParam("scale_sl1", m_scale_sl1, "Scale factor of SL1", 256);
166 addParam("scale_sl2", m_scale_sl2, "Scale factor of SL2", 256);
167 addParam("scale_sl3", m_scale_sl3, "Scale factor of SL3", 256);
168 addParam("scale_sl4", m_scale_sl4, "Scale factor of SL4", 256);
169 addParam("scale_sl5", m_scale_sl5, "Scale factor of SL5", 256);
170 addParam("scale_sl6", m_scale_sl6, "Scale factor of SL6", 256);
171 addParam("scale_sl7", m_scale_sl7, "Scale factor of SL7", 256);
172 addParam("scale_sl8", m_scale_sl8, "Scale factor of SL8", 256);
173 addParam("scale_gdl", m_scale_gdl, "Scale factor of GDL", 1);
174 addParam("scale_etf", m_scale_etf, "Scale factor of ETF", 512);
175 addParam("scale_grl", m_scale_grl, "Scale factor of GRL", 1);
176 addParam("scale_top", m_scale_top, "Scale factor of TOP", 32);
177
178 addParam("fmid_2d0", m_fmid_2d0, "Firmware ID of 2D0", 0x32442020);
179 addParam("fmid_2d1", m_fmid_2d1, "Firmware ID of 2D1", 0x32442020);
180 addParam("fmid_2d2", m_fmid_2d2, "Firmware ID of 2D2", 0x32442020);
181 addParam("fmid_2d3", m_fmid_2d3, "Firmware ID of 2D3", 0x32442020);
182 addParam("fmid_3d0", m_fmid_3d0, "Firmware ID of 3D0", 0x33440001);
183 addParam("fmid_3d1", m_fmid_3d1, "Firmware ID of 3D1", 0x33440001);
184 addParam("fmid_3d2", m_fmid_3d2, "Firmware ID of 3D2", 0x33440001);
185 addParam("fmid_3d3", m_fmid_3d3, "Firmware ID of 3D3", 0x33440001);
186 addParam("fmid_nn0", m_fmid_nn0, "Firmware ID of NN0", 0x4e4e5402);
187 addParam("fmid_nn1", m_fmid_nn1, "Firmware ID of NN1", 0x4e4e5402);
188 addParam("fmid_nn2", m_fmid_nn2, "Firmware ID of NN2", 0x4e4e5402);
189 addParam("fmid_nn3", m_fmid_nn3, "Firmware ID of NN3", 0x4e4e5402);
190 addParam("fmid_sl0", m_fmid_sl0, "Firmware ID of SL0", 0x54534630);
191 addParam("fmid_sl1", m_fmid_sl1, "Firmware ID of SL1", 0x54534631);
192 addParam("fmid_sl2", m_fmid_sl2, "Firmware ID of SL2", 0x54534632);
193 addParam("fmid_sl3", m_fmid_sl3, "Firmware ID of SL3", 0x54534633);
194 addParam("fmid_sl4", m_fmid_sl4, "Firmware ID of SL4", 0x54534634);
195 addParam("fmid_sl5", m_fmid_sl5, "Firmware ID of SL5", 0x54534635);
196 addParam("fmid_sl6", m_fmid_sl6, "Firmware ID of SL6", 0x54534636);
197 addParam("fmid_sl7", m_fmid_sl7, "Firmware ID of SL7", 0x54534637);
198 addParam("fmid_sl8", m_fmid_sl8, "Firmware ID of SL8", 0x54534d38);
199 addParam("fmid_gdl", m_fmid_gdl, "Firmware ID of GDL", 0x47444c20U);
200 addParam("fmid_etf", m_fmid_etf, "Firmware ID of ETF", 0x45544620);
201 addParam("fmid_grl", m_fmid_grl, "Firmware ID of GRL", 0x47824c20);
202 addParam("fmid_top", m_fmid_top, "Firmware ID of TOP", 0);
203
204}
HistoModule()
Constructor.
Definition: HistoModule.h:32
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560

◆ ~TRGRAWDATAModule()

virtual ~TRGRAWDATAModule ( )
inlinevirtual

Destrunctor.

Definition at line 62 of file trgrawdataModule.h.

62{}

Member Function Documentation

◆ beginRun()

virtual void beginRun ( void  )
inlineoverridevirtual

begin Run

Reimplemented from HistoModule.

Definition at line 68 of file trgrawdataModule.h.

68{}

◆ clone()

std::shared_ptr< PathElement > clone ( ) const
overridevirtualinherited

Create an independent copy of this module.

Note that parameters are shared, so changing them on a cloned module will also affect the original module.

Implements PathElement.

Definition at line 179 of file Module.cc.

180{
182 newModule->m_moduleParamList.setParameters(getParamList());
183 newModule->setName(getName());
184 newModule->m_package = m_package;
185 newModule->m_propertyFlags = m_propertyFlags;
186 newModule->m_logConfig = m_logConfig;
187 newModule->m_conditions = m_conditions;
188
189 return newModule;
190}
std::shared_ptr< Module > registerModule(const std::string &moduleName, std::string sharedLibPath="") noexcept(false)
Creates an instance of a module and registers it to the ModuleManager.
static ModuleManager & Instance()
Exception is thrown if the requested module could not be created by the ModuleManager.
const ModuleParamList & getParamList() const
Return module param list.
Definition: Module.h:363
const std::string & getName() const
Returns the name of the module.
Definition: Module.h:187
const std::string & getType() const
Returns the type of the module (i.e.
Definition: Module.cc:41
unsigned int m_propertyFlags
The properties of the module as bitwise or (with |) of EModulePropFlags.
Definition: Module.h:512
LogConfig m_logConfig
The log system configuration of the module.
Definition: Module.h:514
std::vector< ModuleCondition > m_conditions
Module condition, only non-null if set.
Definition: Module.h:521
std::string m_package
Package this module is found in (may be empty).
Definition: Module.h:510
std::shared_ptr< Module > ModulePtr
Defines a pointer to a module object as a boost shared pointer.
Definition: Module.h:43

◆ def_beginRun()

virtual void def_beginRun ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 426 of file Module.h.

426{ beginRun(); }
virtual void beginRun()
Called when entering a new run.
Definition: Module.h:147

◆ def_endRun()

virtual void def_endRun ( )
inlineprotectedvirtualinherited

This method can receive that the current run ends as a call from the Python side.

For regular C++-Modules that forwards the call to the regular endRun() method.

Reimplemented in PyModule.

Definition at line 439 of file Module.h.

439{ endRun(); }
virtual void endRun()
This method is called if the current run ends.
Definition: Module.h:166

◆ def_event()

virtual void def_event ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 432 of file Module.h.

432{ event(); }
virtual void event()
This method is the core of the module.
Definition: Module.h:157

◆ def_initialize()

virtual void def_initialize ( )
inlineprotectedvirtualinherited

Wrappers to make the methods without "def_" prefix callable from Python.

Overridden in PyModule. Wrapper method for the virtual function initialize() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 420 of file Module.h.

420{ initialize(); }
virtual void initialize()
Initialize the Module.
Definition: Module.h:109

◆ def_terminate()

virtual void def_terminate ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 445 of file Module.h.

445{ terminate(); }
virtual void terminate()
This method is called at the end of the event processing.
Definition: Module.h:176

◆ defineHisto()

void defineHisto ( )
overridevirtual

Define Histogram.

Reimplemented from HistoModule.

Definition at line 851 of file trgrawdataModule.cc.

852{
853}

◆ endRun()

virtual void endRun ( void  )
inlineoverridevirtual

End Run.

Reimplemented from HistoModule.

Definition at line 72 of file trgrawdataModule.h.

72{}

◆ evalCondition()

bool evalCondition ( ) const
inherited

If at least one condition was set, it is evaluated and true returned if at least one condition returns true.

If no condition or result value was defined, the method returns false. Otherwise, the condition is evaluated and true returned, if at least one condition returns true. To speed up the evaluation, the condition strings were already parsed in the method if_value().

Returns
True if at least one condition and return value exists and at least one condition expression was evaluated to true.

Definition at line 96 of file Module.cc.

97{
98 if (m_conditions.empty()) return false;
99
100 //okay, a condition was set for this Module...
101 if (!m_hasReturnValue) {
102 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
103 }
104
105 for (const auto& condition : m_conditions) {
106 if (condition.evaluate(m_returnValue)) {
107 return true;
108 }
109 }
110 return false;
111}
int m_returnValue
The return value.
Definition: Module.h:519
bool m_hasReturnValue
True, if the return value is set.
Definition: Module.h:518

◆ event()

void event ( void  )
overridevirtual

Event.

Reimplemented from HistoModule.

Definition at line 290 of file trgrawdataModule.cc.

291{
292
293 B2INFO("trgrawdata: event() started.");
294 StoreArray<RawTRG> raw_trgarray;
295
297 int _exp = bevt->getExperiment();
298 int _run = bevt->getRun();
299 unsigned _eve = bevt->getEvent();
300 if (0)
301 std::cout << "**************_eve(" << _eve
302 << "), c_nModules(" << c_nModules
303 << "), m_nclk_cdctrg(" << m_nclk_cdctrg
304 << "), _exp(" << _exp
305 << "), _run(" << _run
306 << "), _eve(" << _eve
307 << "), _Form(" << Form("he%010d", (int)_eve)
308 << ")" << std::endl;
309
310 TH2D* h_0 = new TH2D(Form("he%010d", (int)_eve),
311 Form("e%02dr%04d ev %08d", _exp, _run, (int)_eve),
312 c_nModules * 4, 0, c_nModules * 4,
313 m_nclk_cdctrg, 0, m_nclk_cdctrg);
314
315 for (unsigned i = 0; i < c_nModules; ++i) {
316 h_0->GetXaxis()->SetBinLabel(4 * i + 1, Form("%s hdevt", moduleNames[i]));
317 h_0->GetXaxis()->SetBinLabel(4 * i + 2, Form("%s dtevt", moduleNames[i]));
318 h_0->GetXaxis()->SetBinLabel(4 * i + 3, Form("%s L1rvc", moduleNames[i]));
319 h_0->GetXaxis()->SetBinLabel(4 * i + 4, Form("%s cc", moduleNames[i]));
320 }
321
322 /*
323 GDL only. To get gdlrvc12
324 */
325 unsigned gdlrvc12 = -1;
326 for (int i = 0; i < raw_trgarray.getEntries(); i++) {
327 for (int j = 0; j < raw_trgarray[i]->GetNumEntries(); j++) {
328 int cprid = (int)raw_trgarray[i]->GetNodeID(j);
329 unsigned eve20 = (_eve & 0xfffff);
330 for (int hslb = 0; hslb < 2; hslb++) {
331 int nword = raw_trgarray[i]->GetDetectorNwords(j, hslb);
332 int* buf = raw_trgarray[i]->GetDetectorBuffer(j, hslb);
333 if (0x15000001 == cprid && hslb == 0) {
334
335 if (m_mydebug) {
336 printf("aa:GDL start: 0x%x%c exp(%d), run(%d), eve(%u), eve(0x%x), nword(%d)\n",
337 cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword);
338 }
339
340 unsigned buf0 = 0;
341 if (nword > 0) buf0 = (unsigned)buf[0];
342 unsigned buf1 = 0;
343 if (nword > 1) buf1 = (unsigned)buf[1];
344 unsigned buf2 = 0;
345 if (nword > 2) buf2 = (unsigned)buf[2];
346 //unsigned buf2cnttrg20 = (buf2 >> 12) & 0xfffff;
347 //unsigned buf2rvc12 = (buf2 & 0xfff);
348
349 if (nword < 3) {
350 cntr_nwe_badnwd[e_gdl]++;
351 printf("ab:GDL(0x%x%c) exp(%d), run(%d), eve(%u), eve(0x%x), nword(%d), ",
352 cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword);
353 printf("buf0(0x%x), buf1(0x%x), buf2(0x%x)\n", buf0, buf1, buf2);
354 continue;
355 }
356
357 if (nword < 8) {
358 printf("ad:GDL(0x%x%c) exp(%d), run(%d), eve(%u), eve(0x%x), nword(%d)\n",
359 cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword);
360 cntr_nwe_badnwd[e_gdl]++;
361 } else {
362 unsigned buf5 = (unsigned)buf[m_hdr_nwd_gdl - 1];
363 // 626 = 646 -
364 unsigned buf6 = (unsigned)buf[626]; // 1st wd in the last clock cycle
365 unsigned buf7 = (unsigned)buf[627]; // 2nd wd in the last clock cycle
366 unsigned lastdd = (buf6 >> 24) & 0xff;
367 unsigned last_rvc = (buf6 >> 4) & 0xfff;
368 unsigned cnttrg_data_15to12 = buf6 & (0xf);
369 unsigned cnttrg_data_12 = (buf7 >> 20) & (0xfff);
370 gdlrvc12 = (buf5 & 0xfff);
371 unsigned gdlhdrcnttrg20 = (buf5 >> 12) & 0xfffff;
372
373 //unsigned wdperclk = (m_nwd_gdl - m_hdr_nwd_gdl) / m_nclk_gdl;
374 //unsigned ibuf_lastclk_msw = m_nwd_gdl - wdperclk;
375 //unsigned buf_lastclk_msw = (unsigned)buf[ibuf_lastclk_msw];
376 //unsigned buf_lastclk_msw2 = (unsigned)buf[ibuf_lastclk_msw + 1];
377 //unsigned buf_lastclk_msw3 = (unsigned)buf[ibuf_lastclk_msw + 2];
378 unsigned cnttrg_data_16 = (cnttrg_data_15to12 << 12) + cnttrg_data_12;
379 unsigned eve16 = (_eve & 0xffff);
380
381 h_0->SetBinContent(4 * (int)e_gdl + 1, m_nclk_gdl, gdlhdrcnttrg20);
382 h_0->SetBinContent(4 * (int)e_gdl + 2, m_nclk_gdl, cnttrg_data_16);
383 h_0->SetBinContent(4 * (int)e_gdl + 3, m_nclk_gdl, gdlrvc12);
384
385 if (nword != m_nwd_gdl || buf0 != m_fmid_gdl || lastdd != 0xdd ||
386 gdlhdrcnttrg20 != eve20 ||
387 !(eve16 == cnttrg_data_16 + 1 || (eve16 == 0 && cnttrg_data_16 == 0xffff))
388 ) {
389
390 unsigned diag = 0;
391 diag |= (nword != m_nwd_gdl) ? 1 : 0;
392 diag |= (buf0 != m_fmid_gdl) ? 2 : 0;
393 diag |= (lastdd != 0xdd) ? 4 : 0;
394 diag |= (gdlhdrcnttrg20 != eve20) ? 8 : 0;
395 diag |= !(eve16 == cnttrg_data_16 + 1 || (eve16 == 0 && cnttrg_data_16 == 0xffff)) ? 16 : 0;
396 printf("ae:GDL(0x%x%c) exp(%d), run(%d), evedaq(%u=0x%x), gdlhdrcnttrg20(%u,0x%x), "
397 "cnttrg_data16(%u=0x%x), l1rvc(%u)-lastrvc(%u)=%u, nword(%d), diag(%u)\n",
398 cprid, 'a' + hslb, _exp, _run, _eve, _eve, gdlhdrcnttrg20, gdlhdrcnttrg20,
399 cnttrg_data_16, cnttrg_data_16, gdlrvc12, last_rvc, gdlrvc12 - last_rvc, nword, diag); //TODO can the difference be negative?
400 printf("\n");
401 cntr_nwn_badtrg[e_gdl]++;
402 } else {
403 cntr_nwn[e_gdl]++;
404 }
405 }
406 }
407 }
408 }
409 }
410
411 /* Other than GDL */
412 for (int i = 0; i < raw_trgarray.getEntries(); i++) {
413 for (int j = 0; j < raw_trgarray[i]->GetNumEntries(); j++) {
414 unsigned cprid = raw_trgarray[i]->GetNodeID(j);
415 //unsigned eve16 = (_eve & 0xffff);
416 unsigned eve20 = (_eve & 0xfffff);
417 for (int hslb = 0; hslb < 2; hslb++) {
418 unsigned e_mdl = -1;
419 unsigned _nwd = -1;
420 unsigned _scale = -1;
421 unsigned _nclk = -1;
422 unsigned _hdr_nwd = 3;
423 if (m_cpr_2d0 == cprid && hslb == 0 && m_on_2d0) {
424 e_mdl = e_2d0; _nwd = m_nwd_2ds; _scale = m_scale_2ds; _nclk = m_nclk_2ds; _hdr_nwd = m_hdr_nwd_2d0;
425 } else if (m_cpr_2d1 == cprid && hslb == 1 && m_on_2d1) {
426 e_mdl = e_2d1; _nwd = m_nwd_2ds; _scale = m_scale_2ds; _nclk = m_nclk_2ds; _hdr_nwd = m_hdr_nwd_2d1;
427 } else if (m_cpr_2d2 == cprid && hslb == 0 && m_on_2d2) {
428 e_mdl = e_2d2; _nwd = m_nwd_2ds; _scale = m_scale_2ds; _nclk = m_nclk_2ds; _hdr_nwd = m_hdr_nwd_2d2;
429 } else if (m_cpr_2d3 == cprid && hslb == 1 && m_on_2d3) {
430 e_mdl = e_2d3; _nwd = m_nwd_2ds; _scale = m_scale_2ds; _nclk = m_nclk_2ds; _hdr_nwd = m_hdr_nwd_2d3;
431 } else if (m_cpr_3d0 == cprid && hslb == 0 && m_on_3d0) {
432 e_mdl = e_3d0; _nwd = m_nwd_3ds; _scale = m_scale_3ds; _nclk = m_nclk_3ds; _hdr_nwd = m_hdr_nwd_3d0;
433 } else if (m_cpr_3d1 == cprid && hslb == 1 && m_on_3d1) {
434 e_mdl = e_3d1; _nwd = m_nwd_3ds; _scale = m_scale_3ds; _nclk = m_nclk_3ds; _hdr_nwd = m_hdr_nwd_3d1;
435 } else if (m_cpr_3d2 == cprid && hslb == 0 && m_on_3d2) {
436 e_mdl = e_3d2; _nwd = m_nwd_3ds; _scale = m_scale_3ds; _nclk = m_nclk_3ds; _hdr_nwd = m_hdr_nwd_3d2;
437 } else if (m_cpr_3d3 == cprid && hslb == 1 && m_on_3d3) {
438 e_mdl = e_3d3; _nwd = m_nwd_3ds; _scale = m_scale_3ds; _nclk = m_nclk_3ds; _hdr_nwd = m_hdr_nwd_3d3;
439 } else if (m_cpr_nn0 == cprid && hslb == 0 && m_on_nn0) {
440 e_mdl = e_nn0; _nwd = m_nwd_nns; _scale = m_scale_nns; _nclk = m_nclk_nns; _hdr_nwd = m_hdr_nwd_nn0;
441 } else if (m_cpr_nn1 == cprid && hslb == 1 && m_on_nn1) {
442 e_mdl = e_nn1; _nwd = m_nwd_nns; _scale = m_scale_nns; _nclk = m_nclk_nns; _hdr_nwd = m_hdr_nwd_nn1;
443 } else if (m_cpr_nn2 == cprid && hslb == 0 && m_on_nn2) {
444 e_mdl = e_nn2; _nwd = m_nwd_nns; _scale = m_scale_nns; _nclk = m_nclk_nns; _hdr_nwd = m_hdr_nwd_nn2;
445 } else if (m_cpr_nn3 == cprid && hslb == 1 && m_on_nn3) {
446 e_mdl = e_nn3; _nwd = m_nwd_nns; _scale = m_scale_nns; _nclk = m_nclk_nns; _hdr_nwd = m_hdr_nwd_nn3;
447 } else if (m_cpr_sl0 == cprid && hslb == 0 && m_on_sl0) {
448 e_mdl = e_sl0; _nwd = m_nwd_sl0; _scale = m_scale_sl0; _nclk = m_nclk_sl0; _hdr_nwd = m_hdr_nwd_sl0;
449 } else if (m_cpr_sl1 == cprid && hslb == 0 && m_on_sl1) { //ex w/ 1
450 e_mdl = e_sl1; _nwd = m_nwd_sl1; _scale = m_scale_sl1; _nclk = m_nclk_sl1; _hdr_nwd = m_hdr_nwd_sl1;
451 } else if (m_cpr_sl2 == cprid && hslb == 0 && m_on_sl2) {
452 e_mdl = e_sl2; _nwd = m_nwd_sl2; _scale = m_scale_sl2; _nclk = m_nclk_sl2; _hdr_nwd = m_hdr_nwd_sl2;
453 } else if (m_cpr_sl3 == cprid && hslb == 1 && m_on_sl3) {
454 e_mdl = e_sl3; _nwd = m_nwd_sl3; _scale = m_scale_sl3; _nclk = m_nclk_sl3; _hdr_nwd = m_hdr_nwd_sl3;
455 } else if (m_cpr_sl4 == cprid && hslb == 1 && m_on_sl4) { //ex w/ 4
456 e_mdl = e_sl4; _nwd = m_nwd_sl4; _scale = m_scale_sl4; _nclk = m_nclk_sl4; _hdr_nwd = m_hdr_nwd_sl4;
457 } else if (m_cpr_sl5 == cprid && hslb == 1 && m_on_sl5) {
458 e_mdl = e_sl5; _nwd = m_nwd_sl5; _scale = m_scale_sl5; _nclk = m_nclk_sl5; _hdr_nwd = m_hdr_nwd_sl5;
459 } else if (m_cpr_sl6 == cprid && hslb == 0 && m_on_sl6) {
460 e_mdl = e_sl6; _nwd = m_nwd_sl6; _scale = m_scale_sl6; _nclk = m_nclk_sl6; _hdr_nwd = m_hdr_nwd_sl6;
461 } else if (m_cpr_sl8 == cprid && hslb == 0 && m_on_sl8) {
462 e_mdl = e_sl8; _nwd = m_nwd_sl8; _scale = m_scale_sl8; _nclk = m_nclk_sl8; _hdr_nwd = m_hdr_nwd_sl8;
463 } else if (m_cpr_etf == cprid && hslb == 1 && m_on_etf) {
464 e_mdl = e_etf; _nwd = m_nwd_etf; _scale = m_scale_etf; _nclk = m_nclk_etf; _hdr_nwd = m_hdr_nwd_etf;
465 } else if (m_cpr_top == cprid && hslb == 0 && m_on_top) {
466 e_mdl = e_top; _nwd = m_nwd_top; _scale = m_scale_top; _nclk = m_nclk_top; _hdr_nwd = m_hdr_nwd_top;
467 } else {
468 continue;
469 }
470
471 unsigned nword = raw_trgarray[i]->GetDetectorNwords(j, hslb);
472 int* buf = raw_trgarray[i]->GetDetectorBuffer(j, hslb);
473 unsigned buf0 = 0;
474 if (nword > 0) buf0 = (unsigned)buf[0];
475 unsigned buf1 = 0;
476 if (nword > 1) buf1 = (unsigned)buf[1];
477 unsigned buf2 = 0;
478 if (nword > 2) buf2 = (unsigned)buf[2];
479 unsigned buf2cnttrg20 = (buf2 >> 12) & 0xfffff;
480 unsigned buf2rvc12 = (buf2 & 0xfff);
481
482 if (nword < 3) {
483 // err
484 cntr_nwe_badnwd[e_mdl]++;
485 printf("ah:%s(0x%x%c) exp(%d), run(%d), eve(%u), eve(0x%x), nword(%u), ",
486 moduleNames[e_mdl], cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword);
487 printf("buf0(0x%x), buf1(0x%x), buf2(0x%x)\n", buf0, buf1, buf2);
488 continue;
489 } else if (nword == _hdr_nwd) {
490 // header-only event
491 if (gdlrvc12 != buf2rvc12) {
492 printf("ai:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), gdlrvc12(0x%x), buf2rvc12(0x%x)\n",
493 moduleNames[e_mdl], cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword, gdlrvc12, buf2rvc12);
494 cntr_nw3_badrvc[e_mdl]++;
495 } else if (eve20 != buf2cnttrg20) {
496 printf("aj:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), cnttrg20(0x%x)\n",
497 moduleNames[e_mdl], cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword, buf2cnttrg20);
498 cntr_nw3_badtrg[e_mdl]++;
499 } else if ((_eve % _scale) == 0) {
500 cntr_nw3_badvet[e_mdl]++;
501 } else {
502 cntr_nw3[e_mdl]++;
503 }
504 continue;
505 } else if (nword != _nwd) {
506 // err
507 printf("bo:wrong nword: %s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), buf0(0x%x), buf2(0x%x)\n",
508 moduleNames[e_mdl], cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword, buf0, buf2);
509 cntr_nwe_badnwd[e_mdl]++;
510 continue;
511 }
512
513 unsigned buf3 = (unsigned)buf[_hdr_nwd];
514 unsigned buf3dddd = ((buf3 >> 16) & 0xffff);
515 unsigned buf4 = (unsigned)buf[_hdr_nwd + 1];
516 unsigned buf5 = (unsigned)buf[_hdr_nwd + 2];
517 unsigned wdperclk = (_nwd - _hdr_nwd) / _nclk;
518 //unsigned ibuf_lsw = _nwd - 1;
519 unsigned ibuf_lastclk_msw = _nwd - wdperclk;
520 //unsigned buf_lastclk_msw = (unsigned)buf[ibuf_lastclk_msw];
521 unsigned buf_lastclk_msw2 = (unsigned)buf[ibuf_lastclk_msw + 1];
522 unsigned buf_lastclk_msw3 = (unsigned)buf[ibuf_lastclk_msw + 2];
523 //unsigned dddd_lastclk = ((buf_lastclk_msw >> 16) & 0xffff);
524 unsigned datacnttrg32 = 0;
525 unsigned buf4_msb16 = (buf4 & 0xffff);
526 unsigned buf5_lsb16 = ((buf5 >> 16) & 0xffff);
527
528 if (m_mydebug) {
529 printf("af:Debug0: %s(0x%x%c) exp(%d), run(%d), eve(%u), eve(0x%x), nword(%u)\n",
530 moduleNames[e_mdl], cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword);
531 }
532
533 /*
534 *
535 * Module Start
536 *
537 *
538 */
539
540 if ((0x11000009 == cprid && hslb == 0) || // SL1
541 (0x11000008 == cprid && hslb == 1) || // SL1
542 (0x11000009 == cprid && hslb == 1) // SL5
543 ) {
544 /* SL1 SL3 SL5 4096x48
545 data_b2l_r(4095 downto 4048) <= x"dddd" & "00000" & revoclk & cntr125M(15 downto 0);--i=0..5
546 data_b2l_r(4031 downto 4000) <= cnttrg;--i=6..9
547 buf[3] = dddd * revoclk
548 buf[4] = cntr125M & x"0000"
549 buf[5] = cnttrg
550 */
551 datacnttrg32 = buf5;
552
553 } else if ((0x11000007 == cprid && hslb == 0) || // SL0
554 (0x11000007 == cprid && hslb == 1) || // SL4
555 (0x1100000a == cprid && hslb == 0) // SL6
556 ) {
557 /* SL0 SL4 SL6 2048*48
558 data_b2l_r(2047 downto 2000) <= x"dddd" &"00000"& revoclk & cntr125M(15 downto 0);
559 data_b2l_r(1999 downto 1968) <= cnttrg;
560
561 data_b2l(2047, 2016) <= buf[3]
562 data_b2l(2015, 1984) <= buf[4]
563 data_b2l(1983, 1952) <= buf[5]
564 data_b2l(1999, 1968) <= cnttrg;
565 */
566 datacnttrg32 = (buf4_msb16 << 16) + buf5_lsb16;
567
568 } else if ((m_cpr_2d0 == cprid && hslb == 0 && m_on_2d0) ||
569 (m_cpr_2d1 == cprid && hslb == 1 && m_on_2d1) ||
570 (m_cpr_2d2 == cprid && hslb == 0 && m_on_2d2) ||
571 (m_cpr_2d3 == cprid && hslb == 1 && m_on_2d3)) {
572 /*
573 2D2D2D: 2048 bit x 48 clock = 64 word x 48 clock
574 */
575
576 unsigned buf_lastclk_lsb = (unsigned)buf[_nwd - 1];
577 unsigned buf_lastclk_lsb2 = (unsigned)buf[_nwd - 2];
578 //unsigned nworking = (buf_lastclk_lsb2 >> 24) & 0xff;
579 //unsigned idbuf = (buf_lastclk_lsb2 >> 16) & 0xff;
580 //unsigned ihdr = (buf_lastclk_lsb2 >> 8) & 0xff;
581 datacnttrg32 = ((buf_lastclk_lsb2 & 0xff) << 24) + (buf_lastclk_lsb >> 8);
582
583 } else if ((m_cpr_3d0 == cprid && hslb == 0 && m_on_3d0) ||
584 (m_cpr_3d1 == cprid && hslb == 1 && m_on_3d1) ||
585 (m_cpr_3d2 == cprid && hslb == 0 && m_on_3d2) ||
586 (m_cpr_3d3 == cprid && hslb == 1 && m_on_3d3)) {
587 /*
588 3D3D3D: 2048 bit x 48 clock = 64 word x 48 clock
589 */
590
591 // data_b2l_r(2623 downto 2576) <= x"dddd" &"00000"& revoclk & cntr125M(15 downto 0);
592 // data_b2l_r(2575 downto 2544) <= cnttrg;
593 // [3] (2623, 2592)
594 // [4] (2591, 2560)
595 // [5] (2559, 2528)
596 unsigned datacnttrg_msb16 = (buf_lastclk_msw2 & 0xffff);
597 unsigned datacnttrg_lsb16 = ((buf_lastclk_msw3 >> 16) & 0xffff);
598 datacnttrg32 = (datacnttrg_msb16 << 16) + datacnttrg_lsb16;
599
600 } else if ((m_cpr_nn0 == cprid && hslb == 0 && m_on_nn0) ||
601 (m_cpr_nn1 == cprid && hslb == 1 && m_on_nn1) ||
602 (m_cpr_nn2 == cprid && hslb == 0 && m_on_nn2) ||
603 (m_cpr_nn3 == cprid && hslb == 1 && m_on_nn3)) {
604 /*
605 int e_mdl = -1;
606 if (m_cpr_nn0 == cprid && hslb == 0 && m_on_nn0) e_mdl = e_nn0;
607 if (m_cpr_nn1 == cprid && hslb == 1 && m_on_nn1) e_mdl = e_nn1;
608 if (m_cpr_nn2 == cprid && hslb == 0 && m_on_nn2) e_mdl = e_nn2;
609 if (m_cpr_nn3 == cprid && hslb == 1 && m_on_nn3) e_mdl = e_nn3;
610 */
611 /*
612 NNNNNN: 2048 bit x 48 clock = 64 word x 48 clock
613 data_b2l_r(1999 downto 1968) <= cnttrg;
614 */
615
616 // [3] 2047 2016
617 // [4] 2015 1984
618 // [5] 1983 1952
619 // [3 + 64] = [m_hdr_nwd + wdperclk]
620 // [3 + 65] = [m_hdr_nwd + wdperclk + 1]
621 // [3 + 66] = [m_hdr_nwd + wdperclk + 2]
622 // [3 + 64 * 47] = [m_hdr_nwd + wdperclk * (_nclk - 1)]
623 // [3 + 65 * 47] = [m_hdr_nwd + wdperclk * (_nclk - 1) + 1]
624 // [3 + 66 * 47] = [m_hdr_nwd + wdperclk * (_nclk - 1) + 2]
625 unsigned datacnttrg_msb16 = (buf_lastclk_msw2 & 0xffff);
626 unsigned datacnttrg_lsb16 = ((buf_lastclk_msw3 >> 16) & 0xffff);
627 datacnttrg32 = (datacnttrg_msb16 << 16) + datacnttrg_lsb16;
628 } else if (m_cpr_top == cprid && hslb == 0 && m_on_top) {
629 // TOPTRG
630 } // Modules
631
632 bool something_bad = false;
633 h_0->SetBinContent(4 * e_mdl + 1, _nclk, buf2cnttrg20);
634 h_0->SetBinContent(4 * e_mdl + 2, _nclk, datacnttrg32);
635 h_0->SetBinContent(4 * e_mdl + 3, _nclk, buf2rvc12);
636 if (gdlrvc12 != buf2rvc12) {
637 printf("ba:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), gdlrvc12(0x%x), buf2rvc12(0x%x)\n",
638 moduleNames[e_mdl], cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword, gdlrvc12, buf2rvc12);
639 cntr_nwn_badrvc[e_mdl]++;
640 something_bad = true;
641 }
642 if (buf3dddd == 0xbbbb) {
643 cntr_nwn_badbbb[e_mdl]++;
644 printf("bv:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), cnttrg20(0x%x), dddd(0x%x), datacnttrg32(0x%x)\n",
645 moduleNames[e_mdl], cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword, buf2cnttrg20, buf3dddd, datacnttrg32);
646 something_bad = true;
647 }
648 if (buf3dddd != 0xdddd) {
649 cntr_nwn_badddd[e_mdl]++;
650 printf("bb:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), cnttrg20(0x%x), dddd(0x%x), datacnttrg32(0x%x)\n",
651 moduleNames[e_mdl], cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword, buf2cnttrg20, buf3dddd, datacnttrg32);
652 something_bad = true;
653 }
654 if (datacnttrg32 + 1 != _eve) {
655 if (!(
656 (m_cpr_top == cprid) ||
657 (m_cpr_3d0 <= cprid && cprid <= m_cpr_3d3)
658 )
659 ) {
660 printf("bc:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), cnttrg20(0x%x), dddd(0x%x), datacnttrg32(0x%x)\n",
661 moduleNames[e_mdl], cprid, 'a' + hslb, _exp, _run, _eve, _eve, nword, buf2cnttrg20, buf3dddd, datacnttrg32);
662 cntr_nwn_badtrg[e_mdl]++;
663 something_bad = true;
664 }
665 }
666 if (! something_bad) cntr_nwn[e_mdl]++;
667
668 } // for hslb
669 }
670 }
671
672 if (m_cc_check) {
673 for (int i = 0; i < raw_trgarray.getEntries(); i++) {
674 for (int j = 0; j < raw_trgarray[i]->GetNumEntries(); j++) {
675 unsigned cprid = raw_trgarray[i]->GetNodeID(j);
676// int _exp = raw_trgarray[i]->GetExpNo(j);
677// int _run = raw_trgarray[i]->GetRunNo(j);
678 unsigned _eveRaw = raw_trgarray[i]->GetEveNo(j);
679 if ((0x11000001 <= cprid && cprid <= 0x1100000a) ||
680 (0x15000001 <= cprid && cprid <= 0x15000002) ||
681 (0x12000001 == cprid) // TOPTRG
682 ) {
683 } else {
684 continue;
685 }
686 for (int hslb = 0; hslb < 2; hslb++) {
687 int nclks = m_nclk_cdctrg;
688 unsigned _hdr_nwd = 3;
689 unsigned e_mdl = -1;
690 unsigned _nwd = -1;
691 if (m_cpr_top == cprid && hslb == 0 && m_on_top) {
692 e_mdl = e_top; _nwd = m_nwd_top;
693 nclks = m_nclk_top; _hdr_nwd = m_hdr_nwd_top;
694 } else if (m_cpr_2d0 == cprid && hslb == 0 && m_on_2d0) {
695 e_mdl = e_2d0; _nwd = m_nwd_2ds; _hdr_nwd = m_hdr_nwd_2d0;
696 } else if (m_cpr_2d1 == cprid && hslb == 1 && m_on_2d1) {
697 e_mdl = e_2d1; _nwd = m_nwd_2ds; _hdr_nwd = m_hdr_nwd_2d1;
698 } else if (m_cpr_2d2 == cprid && hslb == 0 && m_on_2d2) {
699 e_mdl = e_2d2; _nwd = m_nwd_2ds; _hdr_nwd = m_hdr_nwd_2d2;
700 } else if (m_cpr_2d3 == cprid && hslb == 1 && m_on_2d3) {
701 e_mdl = e_2d3; _nwd = m_nwd_2ds; _hdr_nwd = m_hdr_nwd_2d3;
702 } else if (m_cpr_3d0 == cprid && hslb == 0 && m_on_3d0) {
703 e_mdl = e_3d0; _nwd = m_nwd_3ds; _hdr_nwd = m_hdr_nwd_3d0;
704 } else if (m_cpr_3d1 == cprid && hslb == 1 && m_on_3d1) {
705 e_mdl = e_3d1; _nwd = m_nwd_3ds; _hdr_nwd = m_hdr_nwd_3d1;
706 } else if (m_cpr_3d2 == cprid && hslb == 0 && m_on_3d2) {
707 e_mdl = e_3d2; _nwd = m_nwd_3ds; _hdr_nwd = m_hdr_nwd_3d2;
708 } else if (m_cpr_3d3 == cprid && hslb == 1 && m_on_3d3) {
709 e_mdl = e_3d3; _nwd = m_nwd_3ds; _hdr_nwd = m_hdr_nwd_3d3;
710 } else if (m_cpr_nn0 == cprid && hslb == 0 && m_on_nn0) {
711 e_mdl = e_nn0; _nwd = m_nwd_nns; _hdr_nwd = m_hdr_nwd_nn0;
712 } else if (m_cpr_nn1 == cprid && hslb == 1 && m_on_nn1) {
713 e_mdl = e_nn1; _nwd = m_nwd_nns; _hdr_nwd = m_hdr_nwd_nn1;
714 } else if (m_cpr_nn2 == cprid && hslb == 0 && m_on_nn2) {
715 e_mdl = e_nn2; _nwd = m_nwd_nns; _hdr_nwd = m_hdr_nwd_nn2;
716 } else if (m_cpr_nn3 == cprid && hslb == 1 && m_on_nn3) {
717 e_mdl = e_nn3; _nwd = m_nwd_nns; _hdr_nwd = m_hdr_nwd_nn3;
718 } else if (m_cpr_sl0 == cprid && hslb == 0 && m_on_sl0) {
719 e_mdl = e_sl0; _nwd = m_nwd_sl0; _hdr_nwd = m_hdr_nwd_sl0;
720 } else if (m_cpr_sl1 == cprid && hslb == 0 && m_on_sl1) {//ex w/ 4
721 e_mdl = e_sl1; _nwd = m_nwd_sl1; _hdr_nwd = m_hdr_nwd_sl1;
722 } else if (m_cpr_sl2 == cprid && hslb == 0 && m_on_sl2) {
723 e_mdl = e_sl2; _nwd = m_nwd_sl2; _hdr_nwd = m_hdr_nwd_sl2;
724 } else if (m_cpr_sl3 == cprid && hslb == 1 && m_on_sl3) {
725 e_mdl = e_sl3; _nwd = m_nwd_sl3; _hdr_nwd = m_hdr_nwd_sl3;
726 } else if (m_cpr_sl4 == cprid && hslb == 1 && m_on_sl4) {//ex w/ 1
727 e_mdl = e_sl4; _nwd = m_nwd_sl4; _hdr_nwd = m_hdr_nwd_sl4;
728 } else if (m_cpr_sl5 == cprid && hslb == 1 && m_on_sl5) {
729 e_mdl = e_sl5; _nwd = m_nwd_sl5; _hdr_nwd = m_hdr_nwd_sl5;
730 } else if (m_cpr_sl6 == cprid && hslb == 0 && m_on_sl6) {
731 e_mdl = e_sl6; _nwd = m_nwd_sl6; _hdr_nwd = m_hdr_nwd_sl6;
732 } else if (m_cpr_sl8 == cprid && hslb == 0 && m_on_sl8) {
733 e_mdl = e_sl8; _nwd = m_nwd_sl8; _hdr_nwd = m_hdr_nwd_sl8;
734 } else if (m_cpr_etf == cprid && hslb == 1 && m_on_etf) {
735 e_mdl = e_etf; _nwd = m_nwd_etf; _hdr_nwd = m_hdr_nwd_etf;
736 } else if (m_cpr_gdl == cprid && hslb == 0 && m_on_gdl) {
737 e_mdl = e_gdl; _nwd = m_nwd_gdl;
738 nclks = m_nclk_gdl; _hdr_nwd = 6;
739 } else {
740 continue;
741 }
742 unsigned nword = raw_trgarray[i]->GetDetectorNwords(j, hslb);
743 if (nword == _hdr_nwd) continue;
744 if (nword != _nwd) {
745 printf("bu:Nword mismatch:nword(%u),expected(%u). eve(%u), %s(0x%x%c), nword(%u)\n",
746 nword, _nwd, _eveRaw, moduleNames[e_mdl], cprid, 'a' + hslb, nword);
747 }
748 int* buf = raw_trgarray[i]->GetDetectorBuffer(j, hslb);
749 int i47 = _hdr_nwd + (nclks - 1) * (_nwd - _hdr_nwd) / nclks;
750 if (i47 > int(nword) - 1) {
751 if (m_print_clkcyc_err)
752 printf("bp:data truncation. eve(%u), %s(0x%x%c), nword(%u)\n",
753 _eveRaw, moduleNames[e_mdl], cprid, 'a' + hslb, nword);
754 break;
755 }
756 unsigned buf47 = buf[i47];
757 bool break_this_module = false;
758 bool cc_disorder = false;
759
760 unsigned prev_cc = buf47 & 0xffff;
761 if (e_mdl == e_gdl) {
762 prev_cc = (buf47 >> 4) & 0xfff;
763 }
764 char ccc[400];
765 sprintf(ccc, "i47(%d),buf47(0x%x),%x", i47, buf47, prev_cc);
766 std::string ccs(ccc);
767 for (int clk = 0; clk < nclks; clk++) {
768 unsigned ibuf = _hdr_nwd + clk * (nword - _hdr_nwd) / nclks;
769 if (ibuf > nword - 1) {
770 if (m_print_clkcyc_err)
771 printf("bq:data truncation. eve(%u), %s(0x%x%c), nword(%u)\n",
772 _eveRaw, moduleNames[e_mdl], cprid, 'a' + hslb, nword);
773 break_this_module = true;
774 cntr_bad_nwd[e_mdl]++;
775 break;
776 }
777 unsigned ddddcc = buf[ibuf];
778 unsigned dddd = (ddddcc >> 16) & 0xffff;
779 unsigned cc = ddddcc & 0xffff;
780 if (e_mdl == e_gdl) {
781 cc = (ddddcc >> 4) & 0xfff;
782 }
783 h_0->SetBinContent(4 * e_mdl + 4, clk + 1, cc);
784 sprintf(ccc, ",%x", cc);
785 if ((int)e_2d0 <= (int)e_mdl && (int)e_mdl <= (int)e_2d3 &&
786 m_nwd_2ds == 3939/* =2624bit */) {
787 // (downto) = wd i
788 // ( ) = 75 300
789 // ( ) = 76 304
790 // ( ) = 79 316
791 // (79, 72) = 79 318 addr_o
792 // (71, 64) = 79 319 addr_i
793 // (63, 56) = 80 320 nworking
794 // (55, 48) = 80 321 rennum
795 // (47, 40) = 80 322 itarget
796 // (39, 8) = 80 323-326 = cnttrg
797 // ( 7, 0) = 81
798 int i_addr = ibuf + 79; // addr_i and addr_o
799 int val_addr = buf[i_addr];
800 int addr_o = (val_addr >> 8) & 0xff;
801 int addr_i = val_addr & 0xff;
802 sprintf(ccc, ",%x(%d,%d)", cc, addr_i, addr_o);
803 }
804 ccs += ccc;
805 if (e_mdl == e_gdl) {
806 dddd = (ddddcc >> 24);
807 if (dddd != 0xdd) {
808 if (m_print_clkcyc_err)
809 printf("br:dddd not found. eve(%u), %s(0x%x%c), nword(%u)\n",
810 _eveRaw, moduleNames[e_mdl], cprid, 'a' + hslb, nword);
811 break_this_module = true;
812 cntr_bad_ddd[e_mdl]++;
813 break;
814 }
815 } else if (dddd != 0xdddd) {
816 if (m_print_clkcyc_err)
817 printf("bs:dddd not found. eve(%u), %s(0x%x%c), nword(%u)\n",
818 _eveRaw, moduleNames[e_mdl], cprid, 'a' + hslb, nword);
819 break_this_module = true;
820 cntr_bad_ddd[e_mdl]++;
821 break;
822 }
823 // 0x500 == 1280
824 if (!(cc == prev_cc + 4 || prev_cc == cc + 4 * (nclks - 1) || prev_cc + 0x500 == cc + 4 * (nclks - 1)
825 || cc + 0x500 == prev_cc + 4)) {
826 cc_disorder = true;
827 ccs += "*";
828 }
829 prev_cc = cc;
830 } // clk
831 if (break_this_module) continue; // bad dddd
832 if (cc_disorder) {
833 cntr_bad_odr[e_mdl]++;
834 if (m_print_cc) {
835 printf("bt:ccdisorder: eve(%u), %s(0x%x%c), nword(%u), %s\n",
836 _eveRaw, moduleNames[e_mdl], cprid, 'a' + hslb, nword, ccs.c_str());
837 }
838 } else {
839 cntr_good_odr[e_mdl]++;
840 }
841 } // hslb
842 } // j < raw_trgarray[i]->GetNumEntries()
843 } // i < raw_trgarray.getEntries()
844 }
845
846 if (! m_histRecord) {
847 h_0->Delete();
848 }
849}
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
static const unsigned int c_nModules
number of modules

◆ exposePythonAPI()

void exposePythonAPI ( )
staticinherited

Exposes methods of the Module class to Python.

Definition at line 325 of file Module.cc.

326{
327 // to avoid confusion between std::arg and boost::python::arg we want a shorthand namespace as well
328 namespace bp = boost::python;
329
330 docstring_options options(true, true, false); //userdef, py sigs, c++ sigs
331
332 void (Module::*setReturnValueInt)(int) = &Module::setReturnValue;
333
334 enum_<Module::EAfterConditionPath>("AfterConditionPath",
335 R"(Determines execution behaviour after a conditional path has been executed:
336
337.. attribute:: END
338
339 End processing of this path after the conditional path. (this is the default for if_value() etc.)
340
341.. attribute:: CONTINUE
342
343 After the conditional path, resume execution after this module.)")
344 .value("END", Module::EAfterConditionPath::c_End)
345 .value("CONTINUE", Module::EAfterConditionPath::c_Continue)
346 ;
347
348 /* Do not change the names of >, <, ... we use them to serialize conditional pathes */
349 enum_<Belle2::ModuleCondition::EConditionOperators>("ConditionOperator")
356 ;
357
358 enum_<Module::EModulePropFlags>("ModulePropFlags",
359 R"(Flags to indicate certain low-level features of modules, see :func:`Module.set_property_flags()`, :func:`Module.has_properties()`. Most useful flags are:
360
361.. attribute:: PARALLELPROCESSINGCERTIFIED
362
363 This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)
364
365.. attribute:: HISTOGRAMMANAGER
366
367 This module is used to manage histograms accumulated by other modules
368
369.. attribute:: TERMINATEINALLPROCESSES
370
371 When using parallel processing, call this module's terminate() function in all processes. This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.
372)")
373 .value("INPUT", Module::EModulePropFlags::c_Input)
374 .value("OUTPUT", Module::EModulePropFlags::c_Output)
375 .value("PARALLELPROCESSINGCERTIFIED", Module::EModulePropFlags::c_ParallelProcessingCertified)
376 .value("HISTOGRAMMANAGER", Module::EModulePropFlags::c_HistogramManager)
377 .value("INTERNALSERIALIZER", Module::EModulePropFlags::c_InternalSerializer)
378 .value("TERMINATEINALLPROCESSES", Module::EModulePropFlags::c_TerminateInAllProcesses)
379 ;
380
381 //Python class definition
382 class_<Module, PyModule> module("Module", R"(
383Base class for Modules.
384
385A module is the smallest building block of the framework.
386A typical event processing chain consists of a Path containing
387modules. By inheriting from this base class, various types of
388modules can be created. To use a module, please refer to
389:func:`Path.add_module()`. A list of modules is available by running
390``basf2 -m`` or ``basf2 -m package``, detailed information on parameters is
391given by e.g. ``basf2 -m RootInput``.
392
393The 'Module Development' section in the manual provides detailed information
394on how to create modules, setting parameters, or using return values/conditions:
395https://xwiki.desy.de/xwiki/rest/p/f4fa4/#HModuleDevelopment
396
397)");
398 module
399 .def("__str__", &Module::getPathString)
400 .def("name", &Module::getName, return_value_policy<copy_const_reference>(),
401 "Returns the name of the module. Can be changed via :func:`set_name() <Module.set_name()>`, use :func:`type() <Module.type()>` for identifying a particular module class.")
402 .def("type", &Module::getType, return_value_policy<copy_const_reference>(),
403 "Returns the type of the module (i.e. class name minus 'Module')")
404 .def("set_name", &Module::setName, args("name"), R"(
405Set custom name, e.g. to distinguish multiple modules of the same type.
406
407>>> path.add_module('EventInfoSetter')
408>>> ro = path.add_module('RootOutput', branchNames=['EventMetaData'])
409>>> ro.set_name('RootOutput_metadata_only')
410>>> print(path)
411[EventInfoSetter -> RootOutput_metadata_only]
412
413)")
414 .def("description", &Module::getDescription, return_value_policy<copy_const_reference>(),
415 "Returns the description of this module.")
416 .def("package", &Module::getPackage, return_value_policy<copy_const_reference>(),
417 "Returns the package this module belongs to.")
418 .def("available_params", &_getParamInfoListPython,
419 "Return list of all module parameters as `ModuleParamInfo` instances")
420 .def("has_properties", &Module::hasProperties, (bp::arg("properties")),
421 R"DOCSTRING(Allows to check if the module has the given properties out of `ModulePropFlags` set.
422
423>>> if module.has_properties(ModulePropFlags.PARALLELPROCESSINGCERTIFIED):
424>>> ...
425
426Parameters:
427 properties (int): bitmask of `ModulePropFlags` to check for.
428)DOCSTRING")
429 .def("set_property_flags", &Module::setPropertyFlags, args("property_mask"),
430 "Set module properties in the form of an OR combination of `ModulePropFlags`.");
431 {
432 // python signature is too crowded, make ourselves
433 docstring_options subOptions(true, false, false); //userdef, py sigs, c++ sigs
434 module
435 .def("if_value", &Module::if_value,
436 (bp::arg("expression"), bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
437 R"DOCSTRING(if_value(expression, condition_path, after_condition_path=AfterConditionPath.END)
438
439Sets a conditional sub path which will be executed after this
440module if the return value set in the module passes the given ``expression``.
441
442Modules can define a return value (int or bool) using ``setReturnValue()``,
443which can be used in the steering file to split the Path based on this value, for example
444
445>>> module_with_condition.if_value("<1", another_path)
446
447In case the return value of the ``module_with_condition`` for a given event is
448less than 1, the execution will be diverted into ``another_path`` for this event.
449
450You could for example set a special return value if an error occurs, and divert
451the execution into a path containing :b2:mod:`RootOutput` if it is found;
452saving only the data producing/produced by the error.
453
454After a conditional path has executed, basf2 will by default stop processing
455the path for this event. This behaviour can be changed by setting the
456``after_condition_path`` argument.
457
458Parameters:
459 expression (str): Expression to determine if the conditional path should be executed.
460 This should be one of the comparison operators ``<``, ``>``, ``<=``,
461 ``>=``, ``==``, or ``!=`` followed by a numerical value for the return value
462 condition_path (Path): path to execute in case the expression is fulfilled
463 after_condition_path (AfterConditionPath): What to do once the ``condition_path`` has been executed.
464)DOCSTRING")
465 .def("if_false", &Module::if_false,
466 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
467 R"DOC(if_false(condition_path, after_condition_path=AfterConditionPath.END)
468
469Sets a conditional sub path which will be executed after this module if
470the return value of the module evaluates to False. This is equivalent to
471calling `if_value` with ``expression=\"<1\"``)DOC")
472 .def("if_true", &Module::if_true,
473 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
474 R"DOC(if_true(condition_path, after_condition_path=AfterConditionPath.END)
475
476Sets a conditional sub path which will be executed after this module if
477the return value of the module evaluates to True. It is equivalent to
478calling `if_value` with ``expression=\">=1\"``)DOC");
479 }
480 module
481 .def("has_condition", &Module::hasCondition,
482 "Return true if a conditional path has been set for this module "
483 "using `if_value`, `if_true` or `if_false`")
484 .def("get_all_condition_paths", &_getAllConditionPathsPython,
485 "Return a list of all conditional paths set for this module using "
486 "`if_value`, `if_true` or `if_false`")
487 .def("get_all_conditions", &_getAllConditionsPython,
488 "Return a list of all conditional path expressions set for this module using "
489 "`if_value`, `if_true` or `if_false`")
490 .add_property("logging", make_function(&Module::getLogConfig, return_value_policy<reference_existing_object>()),
@ c_GE
Greater or equal than: ">=".
@ c_SE
Smaller or equal than: "<=".
@ c_GT
Greater than: ">"
@ c_NE
Not equal: "!=".
@ c_EQ
Equal: "=" or "=="
@ c_ST
Smaller than: "<"
Base class for Modules.
Definition: Module.h:72
LogConfig & getLogConfig()
Returns the log system configuration.
Definition: Module.h:225
void if_value(const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
Add a condition to the module.
Definition: Module.cc:79
void if_true(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to set the condition of the module.
Definition: Module.cc:90
void setReturnValue(int value)
Sets the return value for this module as integer.
Definition: Module.cc:220
void setLogConfig(const LogConfig &logConfig)
Set the log system configuration.
Definition: Module.h:230
const std::string & getDescription() const
Returns the description of the module.
Definition: Module.h:202
void if_false(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to add a condition to the module.
Definition: Module.cc:85
bool hasCondition() const
Returns true if at least one condition was set for the module.
Definition: Module.h:311
const std::string & getPackage() const
Returns the package this module is in.
Definition: Module.h:197
void setName(const std::string &name)
Set the name of the module.
Definition: Module.h:214
bool hasProperties(unsigned int propertyFlags) const
Returns true if all specified property flags are available in this module.
Definition: Module.cc:160
std::string getPathString() const override
return the module name.
Definition: Module.cc:192

◆ getAfterConditionPath()

Module::EAfterConditionPath getAfterConditionPath ( ) const
inherited

What to do after the conditional path is finished.

(defaults to c_End if no condition is set)

Definition at line 133 of file Module.cc.

134{
135 if (m_conditions.empty()) return EAfterConditionPath::c_End;
136
137 //okay, a condition was set for this Module...
138 if (!m_hasReturnValue) {
139 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
140 }
141
142 for (const auto& condition : m_conditions) {
143 if (condition.evaluate(m_returnValue)) {
144 return condition.getAfterConditionPath();
145 }
146 }
147
148 return EAfterConditionPath::c_End;
149}

◆ getAllConditionPaths()

std::vector< std::shared_ptr< Path > > getAllConditionPaths ( ) const
inherited

Return all condition paths currently set (no matter if the condition is true or not).

Definition at line 150 of file Module.cc.

151{
152 std::vector<std::shared_ptr<Path>> allConditionPaths;
153 for (const auto& condition : m_conditions) {
154 allConditionPaths.push_back(condition.getPath());
155 }
156
157 return allConditionPaths;
158}

◆ getAllConditions()

const std::vector< ModuleCondition > & getAllConditions ( ) const
inlineinherited

Return all set conditions for this module.

Definition at line 324 of file Module.h.

325 {
326 return m_conditions;
327 }

◆ getCondition()

const ModuleCondition * getCondition ( ) const
inlineinherited

Return a pointer to the first condition (or nullptr, if none was set)

Definition at line 314 of file Module.h.

315 {
316 if (m_conditions.empty()) {
317 return nullptr;
318 } else {
319 return &m_conditions.front();
320 }
321 }

◆ getConditionPath()

std::shared_ptr< Path > getConditionPath ( ) const
inherited

Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).


Definition at line 113 of file Module.cc.

114{
115 PathPtr p;
116 if (m_conditions.empty()) return p;
117
118 //okay, a condition was set for this Module...
119 if (!m_hasReturnValue) {
120 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
121 }
122
123 for (const auto& condition : m_conditions) {
124 if (condition.evaluate(m_returnValue)) {
125 return condition.getPath();
126 }
127 }
128
129 // if none of the conditions were true, return a null pointer.
130 return p;
131}
std::shared_ptr< Path > PathPtr
Defines a pointer to a path object as a boost shared pointer.
Definition: Path.h:35

◆ getDescription()

const std::string & getDescription ( ) const
inlineinherited

Returns the description of the module.

Definition at line 202 of file Module.h.

202{return m_description;}
std::string m_description
The description of the module.
Definition: Module.h:511

◆ getFileNames()

virtual std::vector< std::string > getFileNames ( bool  outputFiles)
inlinevirtualinherited

Return a list of output filenames for this modules.

This will be called when basf2 is run with "--dry-run" if the module has set either the c_Input or c_Output properties.

If the parameter outputFiles is false (for modules with c_Input) the list of input filenames should be returned (if any). If outputFiles is true (for modules with c_Output) the list of output files should be returned (if any).

If a module has sat both properties this member is called twice, once for each property.

The module should return the actual list of requested input or produced output filenames (including handling of input/output overrides) so that the grid system can handle input/output files correctly.

This function should return the same value when called multiple times. This is especially important when taking the input/output overrides from Environment as they get consumed when obtained so the finalized list of output files should be stored for subsequent calls.

Reimplemented in RootInputModule, StorageRootOutputModule, and RootOutputModule.

Definition at line 134 of file Module.h.

135 {
136 return std::vector<std::string>();
137 }

◆ getLogConfig()

LogConfig & getLogConfig ( )
inlineinherited

Returns the log system configuration.

Definition at line 225 of file Module.h.

225{return m_logConfig;}

◆ getModules()

std::list< ModulePtr > getModules ( ) const
inlineoverrideprivatevirtualinherited

no submodules, return empty list

Implements PathElement.

Definition at line 506 of file Module.h.

506{ return std::list<ModulePtr>(); }

◆ getName()

const std::string & getName ( ) const
inlineinherited

Returns the name of the module.

This can be changed via e.g. set_name() in the steering file to give more useful names if there is more than one module of the same type.

For identifying the type of a module, using getType() (or type() in Python) is recommended.

Definition at line 187 of file Module.h.

187{return m_name;}
std::string m_name
The name of the module, saved as a string (user-modifiable)
Definition: Module.h:508

◆ getPackage()

const std::string & getPackage ( ) const
inlineinherited

Returns the package this module is in.

Definition at line 197 of file Module.h.

197{return m_package;}

◆ getParamInfoListPython()

std::shared_ptr< boost::python::list > getParamInfoListPython ( ) const
inherited

Returns a python list of all parameters.

Each item in the list consists of the name of the parameter, a string describing its type, a python list of all default values and the description of the parameter.

Returns
A python list containing the parameters of this parameter list.

Definition at line 279 of file Module.cc.

280{
282}
std::shared_ptr< boost::python::list > getParamInfoListPython() const
Returns a python list of all parameters.
ModuleParamList m_moduleParamList
List storing and managing all parameter of the module.
Definition: Module.h:516

◆ getParamList()

const ModuleParamList & getParamList ( ) const
inlineinherited

Return module param list.

Definition at line 363 of file Module.h.

363{ return m_moduleParamList; }

◆ getPathString()

std::string getPathString ( ) const
overrideprivatevirtualinherited

return the module name.

Implements PathElement.

Definition at line 192 of file Module.cc.

193{
194
195 std::string output = getName();
196
197 for (const auto& condition : m_conditions) {
198 output += condition.getString();
199 }
200
201 return output;
202}

◆ getReturnValue()

int getReturnValue ( ) const
inlineinherited

Return the return value set by this module.

This value is only meaningful if hasReturnValue() is true

Definition at line 381 of file Module.h.

381{ return m_returnValue; }

◆ getType()

const std::string & getType ( ) const
inherited

Returns the type of the module (i.e.

class name minus 'Module')

Definition at line 41 of file Module.cc.

42{
43 if (m_type.empty())
44 B2FATAL("Module type not set for " << getName());
45 return m_type;
46}
std::string m_type
The type of the module, saved as a string.
Definition: Module.h:509

◆ hasCondition()

bool hasCondition ( ) const
inlineinherited

Returns true if at least one condition was set for the module.

Definition at line 311 of file Module.h.

311{ return not m_conditions.empty(); };

◆ hasProperties()

bool hasProperties ( unsigned int  propertyFlags) const
inherited

Returns true if all specified property flags are available in this module.

Parameters
propertyFlagsOred EModulePropFlags which should be compared with the module flags.

Definition at line 160 of file Module.cc.

161{
162 return (propertyFlags & m_propertyFlags) == propertyFlags;
163}

◆ hasReturnValue()

bool hasReturnValue ( ) const
inlineinherited

Return true if this module has a valid return value set.

Definition at line 378 of file Module.h.

378{ return m_hasReturnValue; }

◆ hasUnsetForcedParams()

bool hasUnsetForcedParams ( ) const
inherited

Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.

Definition at line 166 of file Module.cc.

167{
169 std::string allMissing = "";
170 for (const auto& s : missing)
171 allMissing += s + " ";
172 if (!missing.empty())
173 B2ERROR("The following required parameters of Module '" << getName() << "' were not specified: " << allMissing <<
174 "\nPlease add them to your steering file.");
175 return !missing.empty();
176}
std::vector< std::string > getUnsetForcedParams() const
Returns list of unset parameters (if they are required to have a value.

◆ if_false()

void if_false ( const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

A simplified version to add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression "<1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is false.
afterConditionPathWhat to do after executing 'path'.

Definition at line 85 of file Module.cc.

86{
87 if_value("<1", path, afterConditionPath);
88}

◆ if_true()

void if_true ( const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

A simplified version to set the condition of the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression ">=1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 90 of file Module.cc.

91{
92 if_value(">=1", path, afterConditionPath);
93}

◆ if_value()

void if_value ( const std::string &  expression,
const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

Add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

See https://xwiki.desy.de/xwiki/rest/p/a94f2 or ModuleCondition for a description of the syntax.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

Parameters
expressionThe expression of the condition.
pathShared pointer to the Path which will be executed if the condition is evaluated to true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 79 of file Module.cc.

80{
81 m_conditions.emplace_back(expression, path, afterConditionPath);
82}

◆ initialize()

void initialize ( void  )
overridevirtual

initialize

Reimplemented from HistoModule.

Definition at line 206 of file trgrawdataModule.cc.

207{
208 B2INFO("trgrawdata: initialize() started.");
209 if (! m_unpacker) {
210 B2INFO("no database of gdl unpacker");
211 }
212 if (m_print_dbmap) {
213
214 //const int nword_header = m_unpacker->get_nword_header(); //not used for now
215 //const int n_clocks = m_unpacker->getnClks(); //not used for now
216 //const int nBits = m_unpacker->getnBits(); //not used for now
217 const int n_leafs = m_unpacker->getnLeafs();
218 const int n_leafsExtra = m_unpacker->getnLeafsExtra();
219 //const int conf = m_unpacker->getconf(); //not used for now
220
221 int aBitMap[320][2] = {{0}};
222 int aBitMap_extra[100][3] = {{ -1}};
223 for (int i = 0; i < n_leafsExtra; i++) {
224 aBitMap_extra[i][0] = m_unpacker->getBitMap_extra(i, 0);
225 aBitMap_extra[i][1] = m_unpacker->getBitMap_extra(i, 1);
226 aBitMap_extra[i][2] = m_unpacker->getBitMap_extra(i, 2);
227 }
228
229 for (int i = 0; i < 200; i++) {
230 LeafBitMap[i] = m_unpacker->getLeafMap(i);
231 std::cout << "LeafBitMap[" << i << "] = " << m_unpacker->getLeafMap(i) << std::endl;
232 strcpy(LeafNames[i], m_unpacker->getLeafnames(i));
233 std::cout << "LeafNames[" << i << "] = " << m_unpacker->getLeafnames(i) << std::endl;
234 }
235 for (int i = 0; i < n_leafs; i++) {
236 aBitMap[i][0] = m_unpacker->getBitMap(i, 0);
237 aBitMap[i][1] = m_unpacker->getBitMap(i, 1);
238 }
239 for (int i = 0; i < 200; i++) {
240 int bin = m_unpacker->getLeafMap(i) + 1;
241 if (0 < bin && bin <= n_leafs) {
242 std::cout << "leaf(" << i
243 << "), bin(" << bin
244 << "), LeafNames[leaf](" << LeafNames[i]
245 << "), BitMap[bin-1][0](" << aBitMap[bin - 1][0]
246 << "), BitMap[bin-1][1](" << aBitMap[bin - 1][1]
247 << ")" << std::endl;
248 }
249 }
250 // for leafsExtra
251 for (int i = 0; i < 200; i++) {
252 int bin = m_unpacker->getLeafMap(i) + 1;
253 int j = bin - n_leafs - 1;
254 if (n_leafs < bin && bin <= n_leafs + n_leafsExtra) {
255 std::cout << "i(" << i
256 << "), bin(" << bin
257 << "), LeafNames[leaf](" << LeafNames[i]
258 << "), BitMap_extra[j][0](buf[" << aBitMap_extra[j][0]
259 << "]), BitMap_extra[j][1](downto " << aBitMap_extra[j][1]
260 << "), BitMap_extra[j][2](" << aBitMap_extra[j][2]
261 << " bit length)" << std::endl;
262 }
263 }
264
265 }
266 for (int i = 0; i < 50; i++) {
267 cntr_bad_odr[i] = 0;
268 cntr_bad_ddd[i] = 0;
269 cntr_bad_nwd[i] = 0;
270
271 cntr_nw3[i] = 0;
272 cntr_nw3_badvet[i] = 0;
273 cntr_nw3_badtrg[i] = 0;
274 cntr_nw3_badrvc[i] = 0;
275
276 cntr_nwn[i] = 0;
277 cntr_nwn_badvet[i] = 0;
278 cntr_nwn_badtrg[i] = 0;
279 cntr_nwn_badrvc[i] = 0;
280
281 cntr_nwn_badbbb[i] = 0;
282 cntr_nwn_badddd[i] = 0;
283
284 cntr_nwe_badnwd[i] = 0;
285
286 }
287
288}

◆ setAbortLevel()

void setAbortLevel ( int  abortLevel)
inherited

Configure the abort log level.

Definition at line 67 of file Module.cc.

68{
69 m_logConfig.setAbortLevel(static_cast<LogConfig::ELogLevel>(abortLevel));
70}
ELogLevel
Definition of the supported log levels.
Definition: LogConfig.h:26
void setAbortLevel(ELogLevel abortLevel)
Configure the abort level.
Definition: LogConfig.h:112

◆ setDebugLevel()

void setDebugLevel ( int  debugLevel)
inherited

Configure the debug messaging level.

Definition at line 61 of file Module.cc.

62{
63 m_logConfig.setDebugLevel(debugLevel);
64}
void setDebugLevel(int debugLevel)
Configure the debug messaging level.
Definition: LogConfig.h:98

◆ setDescription()

void setDescription ( const std::string &  description)
protectedinherited

Sets the description of the module.

Parameters
descriptionA description of the module.

Definition at line 214 of file Module.cc.

215{
216 m_description = description;
217}

◆ setLogConfig()

void setLogConfig ( const LogConfig logConfig)
inlineinherited

Set the log system configuration.

Definition at line 230 of file Module.h.

230{m_logConfig = logConfig;}

◆ setLogInfo()

void setLogInfo ( int  logLevel,
unsigned int  logInfo 
)
inherited

Configure the printed log information for the given level.

Parameters
logLevelThe log level (one of LogConfig::ELogLevel)
logInfoWhat kind of info should be printed? ORed combination of LogConfig::ELogInfo flags.

Definition at line 73 of file Module.cc.

74{
75 m_logConfig.setLogInfo(static_cast<LogConfig::ELogLevel>(logLevel), logInfo);
76}
void setLogInfo(ELogLevel logLevel, unsigned int logInfo)
Configure the printed log information for the given level.
Definition: LogConfig.h:127

◆ setLogLevel()

void setLogLevel ( int  logLevel)
inherited

Configure the log level.

Definition at line 55 of file Module.cc.

56{
57 m_logConfig.setLogLevel(static_cast<LogConfig::ELogLevel>(logLevel));
58}
void setLogLevel(ELogLevel logLevel)
Configure the log level.
Definition: LogConfig.cc:25

◆ setName()

void setName ( const std::string &  name)
inlineinherited

Set the name of the module.

Note
The module name is set when using the REG_MODULE macro, but the module can be renamed before calling process() using the set_name() function in your steering file.
Parameters
nameThe name of the module

Definition at line 214 of file Module.h.

214{ m_name = name; };

◆ setParamList()

void setParamList ( const ModuleParamList params)
inlineprotectedinherited

Replace existing parameter list.

Definition at line 501 of file Module.h.

501{ m_moduleParamList = params; }

◆ setParamPython()

void setParamPython ( const std::string &  name,
const boost::python::object &  pyObj 
)
privateinherited

Implements a method for setting boost::python objects.

The method supports the following types: list, dict, int, double, string, bool The conversion of the python object to the C++ type and the final storage of the parameter value is done in the ModuleParam class.

Parameters
nameThe unique name of the parameter.
pyObjThe object which should be converted and stored as the parameter value.

Definition at line 234 of file Module.cc.

235{
236 LogSystem& logSystem = LogSystem::Instance();
237 logSystem.updateModule(&(getLogConfig()), getName());
238 try {
240 } catch (std::runtime_error& e) {
241 throw std::runtime_error("Cannot set parameter '" + name + "' for module '"
242 + m_name + "': " + e.what());
243 }
244
245 logSystem.updateModule(nullptr);
246}
Class for logging debug, info and error messages.
Definition: LogSystem.h:46
void updateModule(const LogConfig *moduleLogConfig=nullptr, const std::string &moduleName="")
Sets the log configuration to the given module log configuration and sets the module name This method...
Definition: LogSystem.h:191
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Definition: LogSystem.cc:31
void setParamPython(const std::string &name, const PythonObject &pyObj)
Implements a method for setting boost::python objects.

◆ setParamPythonDict()

void setParamPythonDict ( const boost::python::dict &  dictionary)
privateinherited

Implements a method for reading the parameter values from a boost::python dictionary.

The key of the dictionary has to be the name of the parameter and the value has to be of one of the supported parameter types.

Parameters
dictionaryThe python dictionary from which the parameter values are read.

Definition at line 249 of file Module.cc.

250{
251
252 LogSystem& logSystem = LogSystem::Instance();
253 logSystem.updateModule(&(getLogConfig()), getName());
254
255 boost::python::list dictKeys = dictionary.keys();
256 int nKey = boost::python::len(dictKeys);
257
258 //Loop over all keys in the dictionary
259 for (int iKey = 0; iKey < nKey; ++iKey) {
260 boost::python::object currKey = dictKeys[iKey];
261 boost::python::extract<std::string> keyProxy(currKey);
262
263 if (keyProxy.check()) {
264 const boost::python::object& currValue = dictionary[currKey];
265 setParamPython(keyProxy, currValue);
266 } else {
267 B2ERROR("Setting the module parameters from a python dictionary: invalid key in dictionary!");
268 }
269 }
270
271 logSystem.updateModule(nullptr);
272}
void setParamPython(const std::string &name, const boost::python::object &pyObj)
Implements a method for setting boost::python objects.
Definition: Module.cc:234

◆ setPropertyFlags()

void setPropertyFlags ( unsigned int  propertyFlags)
inherited

Sets the flags for the module properties.

Parameters
propertyFlagsbitwise OR of EModulePropFlags

Definition at line 208 of file Module.cc.

209{
210 m_propertyFlags = propertyFlags;
211}

◆ setReturnValue() [1/2]

void setReturnValue ( bool  value)
protectedinherited

Sets the return value for this module as bool.

The bool value is saved as an integer with the convention 1 meaning true and 0 meaning false. The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 227 of file Module.cc.

228{
229 m_hasReturnValue = true;
230 m_returnValue = value;
231}

◆ setReturnValue() [2/2]

void setReturnValue ( int  value)
protectedinherited

Sets the return value for this module as integer.

The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 220 of file Module.cc.

221{
222 m_hasReturnValue = true;
223 m_returnValue = value;
224}

◆ setType()

void setType ( const std::string &  type)
protectedinherited

Set the module type.

Only for use by internal modules (which don't use the normal REG_MODULE mechanism).

Definition at line 48 of file Module.cc.

49{
50 if (!m_type.empty())
51 B2FATAL("Trying to change module type from " << m_type << " is not allowed, the value is assumed to be fixed.");
52 m_type = type;
53}

◆ terminate()

virtual void terminate ( void  )
inlineoverridevirtual

terminate

Reimplemented from HistoModule.

Definition at line 74 of file trgrawdataModule.h.

75 {
76
77 bool m_ons[c_nModules] = {
78 m_on_2d0, m_on_2d1, m_on_2d2, m_on_2d3,
79 m_on_3d0, m_on_3d1, m_on_3d2, m_on_3d3,
80 m_on_nn0, m_on_nn1, m_on_nn2, m_on_nn3,
81 m_on_sl0, m_on_sl1, m_on_sl2, m_on_sl3,
82 m_on_sl4, m_on_sl5, m_on_sl6, m_on_sl8,
83 m_on_gdl, m_on_etf, m_on_grl, m_on_top
84 };
85 /*
86 const char* moduleNames[c_nModules] = {
87 "2D0", "2D1", "2D2", "2D3",
88 "3D0", "3D1", "3D2", "3D3",
89 "NN0", "NN1", "NN2", "NN3",
90 "SL0", "SL1", "SL2", "SL3",
91 "SL4", "SL5", "SL6", "SL8",
92 "GDL", "ETF", "GRL"
93 };
94 */
95
96 printf("-%3s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s--\n",
97 "---", "--------", "--------", "--------", "--------", "--------", "--------", "--------",
98 "--------", "--------", "--------", "--------", "--------");
99 printf(" %3s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s |\n",
100// printf(" %3s | %8s | %8s | %8s | %8s | %8s | %8s | %8s | %8s | %8s | %8s | %8s | %8s |\n",
101 "",
102 "a)dataOk", // cntr_nwn[i], Data event that has no problem
103 "b)hdrOk", // cntr_nw3[i], Header event that has no problem (except cc check)
104 "c)ccOk", // cntr_good_odr[i]); Data event that has good cc
105 "d)hdrTag", // cntr_nw3_badtrg[i] Header event that has bad number
106 "e)hdrL1", // cntr_nw3_badrvc[i] Header event that has L1 timing
107 "f)hdrScl", // cntr_nw3_badvet[i] Header event that should not be header event
108 "g)dataTag", // cntr_nwn_badtrg[i] Data event that has bad bad event number in data
109 "h)dataL1", // cntr_nwn_badrvc[i] Data event that has bad L1 timing
110 "i)bbbb", // cntr_nwn_badbbb[i] Data event from dummy buffer
111 "j)#wd", // cntr_bad_nwd[i], Data event that does not have expected #word
112 "k)ddsft", // cntr_bad_ddd[i], Data event that does not have expected dddd in clock cycle
113 "l)ccodr" // cntr_bad_odr[i], Data event that has bad cc cycle
114 );
115 printf("-%3s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s--\n",
116 "---", "--------", "--------", "--------", "--------", "--------", "--------", "--------",
117 "--------", "--------", "--------", "--------", "--------");
118 for (unsigned i = 0; i < c_nModules; ++i) {
119 if (m_ons[i]) {
120 printf(" %3s | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d |\n",
121 moduleNames[i],
122 cntr_nwn[i],
123 cntr_nw3[i],
124 cntr_good_odr[i],
125 cntr_nw3_badtrg[i],
126 cntr_nw3_badrvc[i],
127 cntr_nw3_badvet[i],
128 cntr_nwn_badtrg[i],
129 cntr_nwn_badrvc[i],
130 cntr_nwn_badbbb[i],
131 cntr_bad_nwd[i],
132 cntr_bad_ddd[i],
133 cntr_bad_odr[i]
134 );
135 }
136 }
137 printf("-%3s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s--\n",
138 "---", "--------", "--------", "--------", "--------", "--------", "--------", "--------",
139 "--------", "--------", "--------", "--------", "--------");
140 printf("%-10s: %-s\n"
141 "%-10s: %-s\n"
142 "%-10s: %-s\n"
143 "%-10s: %-s\n"
144 "%-10s: %-s\n"
145 "%-10s: %-s\n"
146 "%-10s: %-s\n"
147 "%-10s: %-s\n"
148 "%-10s: %-s\n"
149 "%-10s: %-s\n"
150 "%-10s: %-s\n"
151 "%-10s: %-s\n",
152 "a)dataOk", "Data event that has no problem (except cc check)",
153 "b)hdrOk", "Header event that has no problem",
154 "c)ccOk", "Data event that has good cc cycle",
155 "d)hdrTag", "Header event that has bad event number in header",
156 "e)hdrL1", "Header event that has bad L1 timing in header",
157 "f)hdrScl", "Header event that should not be header event",
158 "g)dataTag", "Data event that has bad event number in data (can be dummy buffer)",
159 "h)dataL1", "Data event that has bad L1 timing in header",
160 "i)bbbb", "Data event from dummy buffer",
161 "j)#wd", "Data event that does not have expected #word",
162 "k)ddsft", "Data event that does not have expected dddd in clock cycle (can be dummy buffer)",
163 "l)ccodr", "Data event that has bad cc cycle");
164
165 }

Member Data Documentation

◆ BitMap

std::vector<std::vector<int> > BitMap
protected

Definition at line 429 of file trgrawdataModule.h.

◆ c_nModules

const unsigned int c_nModules = 24
static

number of modules

Definition at line 171 of file trgrawdataModule.h.

◆ cntr_bad_ddd

int cntr_bad_ddd[50] = {}
private

Definition at line 407 of file trgrawdataModule.h.

◆ cntr_bad_nwd

int cntr_bad_nwd[50] = {}
private

Definition at line 408 of file trgrawdataModule.h.

◆ cntr_bad_odr

int cntr_bad_odr[50] = {}
private

Definition at line 406 of file trgrawdataModule.h.

◆ cntr_good_odr

int cntr_good_odr[50] = {}
private

Definition at line 405 of file trgrawdataModule.h.

◆ cntr_nw3

int cntr_nw3[50] = {}
private

Definition at line 410 of file trgrawdataModule.h.

◆ cntr_nw3_badrvc

int cntr_nw3_badrvc[50] = {}
private

Definition at line 413 of file trgrawdataModule.h.

◆ cntr_nw3_badtrg

int cntr_nw3_badtrg[50] = {}
private

Definition at line 412 of file trgrawdataModule.h.

◆ cntr_nw3_badvet

int cntr_nw3_badvet[50] = {}
private

Definition at line 411 of file trgrawdataModule.h.

◆ cntr_nwe_badnwd

int cntr_nwe_badnwd[50] = {}
private

Definition at line 423 of file trgrawdataModule.h.

◆ cntr_nwn

int cntr_nwn[50] = {}
private

Definition at line 415 of file trgrawdataModule.h.

◆ cntr_nwn_badbbb

int cntr_nwn_badbbb[50] = {}
private

Definition at line 420 of file trgrawdataModule.h.

◆ cntr_nwn_badddd

int cntr_nwn_badddd[50] = {}
private

Definition at line 421 of file trgrawdataModule.h.

◆ cntr_nwn_badrvc

int cntr_nwn_badrvc[50] = {}
private

Definition at line 418 of file trgrawdataModule.h.

◆ cntr_nwn_badtrg

int cntr_nwn_badtrg[50] = {}
private

Definition at line 417 of file trgrawdataModule.h.

◆ cntr_nwn_badvet

int cntr_nwn_badvet[50] = {}
private

Definition at line 416 of file trgrawdataModule.h.

◆ LeafBitMap

int LeafBitMap[320] = {}
protected

Definition at line 430 of file trgrawdataModule.h.

◆ LeafNames

char LeafNames[320][100] = {}
protected

Definition at line 431 of file trgrawdataModule.h.

◆ m_cc_check

bool m_cc_check
private

Definition at line 213 of file trgrawdataModule.h.

◆ m_conditions

std::vector<ModuleCondition> m_conditions
privateinherited

Module condition, only non-null if set.

Definition at line 521 of file Module.h.

◆ m_cpr_2d0

unsigned m_cpr_2d0 = intNaN
private

Definition at line 254 of file trgrawdataModule.h.

◆ m_cpr_2d1

unsigned m_cpr_2d1 = intNaN
private

Definition at line 255 of file trgrawdataModule.h.

◆ m_cpr_2d2

unsigned m_cpr_2d2 = intNaN
private

Definition at line 256 of file trgrawdataModule.h.

◆ m_cpr_2d3

unsigned m_cpr_2d3 = intNaN
private

Definition at line 257 of file trgrawdataModule.h.

◆ m_cpr_3d0

unsigned m_cpr_3d0 = intNaN
private

Definition at line 258 of file trgrawdataModule.h.

◆ m_cpr_3d1

unsigned m_cpr_3d1 = intNaN
private

Definition at line 259 of file trgrawdataModule.h.

◆ m_cpr_3d2

unsigned m_cpr_3d2 = intNaN
private

Definition at line 260 of file trgrawdataModule.h.

◆ m_cpr_3d3

unsigned m_cpr_3d3 = intNaN
private

Definition at line 261 of file trgrawdataModule.h.

◆ m_cpr_etf

unsigned m_cpr_etf = intNaN
private

Definition at line 267 of file trgrawdataModule.h.

◆ m_cpr_gdl

unsigned m_cpr_gdl = intNaN
private

Definition at line 266 of file trgrawdataModule.h.

◆ m_cpr_grl

int m_cpr_grl = intNaN
private

Definition at line 268 of file trgrawdataModule.h.

◆ m_cpr_nn0

unsigned m_cpr_nn0 = intNaN
private

Definition at line 262 of file trgrawdataModule.h.

◆ m_cpr_nn1

unsigned m_cpr_nn1 = intNaN
private

Definition at line 263 of file trgrawdataModule.h.

◆ m_cpr_nn2

unsigned m_cpr_nn2 = intNaN
private

Definition at line 264 of file trgrawdataModule.h.

◆ m_cpr_nn3

unsigned m_cpr_nn3 = intNaN
private

Definition at line 265 of file trgrawdataModule.h.

◆ m_cpr_sl0

unsigned m_cpr_sl0 = intNaN
private

Definition at line 245 of file trgrawdataModule.h.

◆ m_cpr_sl1

unsigned m_cpr_sl1 = intNaN
private

Definition at line 246 of file trgrawdataModule.h.

◆ m_cpr_sl2

unsigned m_cpr_sl2 = intNaN
private

Definition at line 247 of file trgrawdataModule.h.

◆ m_cpr_sl3

unsigned m_cpr_sl3 = intNaN
private

Definition at line 248 of file trgrawdataModule.h.

◆ m_cpr_sl4

unsigned m_cpr_sl4 = intNaN
private

Definition at line 249 of file trgrawdataModule.h.

◆ m_cpr_sl5

unsigned m_cpr_sl5 = intNaN
private

Definition at line 250 of file trgrawdataModule.h.

◆ m_cpr_sl6

unsigned m_cpr_sl6 = intNaN
private

Definition at line 251 of file trgrawdataModule.h.

◆ m_cpr_sl7

int m_cpr_sl7 = intNaN
private

Definition at line 252 of file trgrawdataModule.h.

◆ m_cpr_sl8

unsigned m_cpr_sl8 = intNaN
private

Definition at line 253 of file trgrawdataModule.h.

◆ m_cpr_top

unsigned m_cpr_top = intNaN
private

Definition at line 269 of file trgrawdataModule.h.

◆ m_description

std::string m_description
privateinherited

The description of the module.

Definition at line 511 of file Module.h.

◆ m_eventMetaDataPtr

StoreObjPtr<EventMetaData> m_eventMetaDataPtr
protected

Event Meta Data.

Definition at line 427 of file trgrawdataModule.h.

◆ m_fmid_2d0

int m_fmid_2d0 = intNaN
private

Definition at line 308 of file trgrawdataModule.h.

◆ m_fmid_2d1

int m_fmid_2d1 = intNaN
private

Definition at line 309 of file trgrawdataModule.h.

◆ m_fmid_2d2

int m_fmid_2d2 = intNaN
private

Definition at line 310 of file trgrawdataModule.h.

◆ m_fmid_2d3

int m_fmid_2d3 = intNaN
private

Definition at line 311 of file trgrawdataModule.h.

◆ m_fmid_3d0

int m_fmid_3d0 = intNaN
private

Definition at line 312 of file trgrawdataModule.h.

◆ m_fmid_3d1

int m_fmid_3d1 = intNaN
private

Definition at line 313 of file trgrawdataModule.h.

◆ m_fmid_3d2

int m_fmid_3d2 = intNaN
private

Definition at line 314 of file trgrawdataModule.h.

◆ m_fmid_3d3

int m_fmid_3d3 = intNaN
private

Definition at line 315 of file trgrawdataModule.h.

◆ m_fmid_etf

int m_fmid_etf = intNaN
private

Definition at line 321 of file trgrawdataModule.h.

◆ m_fmid_gdl

unsigned m_fmid_gdl = intNaN
private

Definition at line 320 of file trgrawdataModule.h.

◆ m_fmid_grl

int m_fmid_grl = intNaN
private

Definition at line 322 of file trgrawdataModule.h.

◆ m_fmid_nn0

int m_fmid_nn0 = intNaN
private

Definition at line 316 of file trgrawdataModule.h.

◆ m_fmid_nn1

int m_fmid_nn1 = intNaN
private

Definition at line 317 of file trgrawdataModule.h.

◆ m_fmid_nn2

int m_fmid_nn2 = intNaN
private

Definition at line 318 of file trgrawdataModule.h.

◆ m_fmid_nn3

int m_fmid_nn3 = intNaN
private

Definition at line 319 of file trgrawdataModule.h.

◆ m_fmid_sl0

int m_fmid_sl0 = intNaN
private

Definition at line 299 of file trgrawdataModule.h.

◆ m_fmid_sl1

int m_fmid_sl1 = intNaN
private

Definition at line 300 of file trgrawdataModule.h.

◆ m_fmid_sl2

int m_fmid_sl2 = intNaN
private

Definition at line 301 of file trgrawdataModule.h.

◆ m_fmid_sl3

int m_fmid_sl3 = intNaN
private

Definition at line 302 of file trgrawdataModule.h.

◆ m_fmid_sl4

int m_fmid_sl4 = intNaN
private

Definition at line 303 of file trgrawdataModule.h.

◆ m_fmid_sl5

int m_fmid_sl5 = intNaN
private

Definition at line 304 of file trgrawdataModule.h.

◆ m_fmid_sl6

int m_fmid_sl6 = intNaN
private

Definition at line 305 of file trgrawdataModule.h.

◆ m_fmid_sl7

int m_fmid_sl7 = intNaN
private

Definition at line 306 of file trgrawdataModule.h.

◆ m_fmid_sl8

int m_fmid_sl8 = intNaN
private

Definition at line 307 of file trgrawdataModule.h.

◆ m_fmid_top

int m_fmid_top = intNaN
private

Definition at line 323 of file trgrawdataModule.h.

◆ m_hasReturnValue

bool m_hasReturnValue
privateinherited

True, if the return value is set.

Definition at line 518 of file Module.h.

◆ m_hdr_nwd_2d0

int m_hdr_nwd_2d0 = intNaN
private

Definition at line 228 of file trgrawdataModule.h.

◆ m_hdr_nwd_2d1

int m_hdr_nwd_2d1 = intNaN
private

Definition at line 229 of file trgrawdataModule.h.

◆ m_hdr_nwd_2d2

int m_hdr_nwd_2d2 = intNaN
private

Definition at line 230 of file trgrawdataModule.h.

◆ m_hdr_nwd_2d3

int m_hdr_nwd_2d3 = intNaN
private

Definition at line 231 of file trgrawdataModule.h.

◆ m_hdr_nwd_3d0

int m_hdr_nwd_3d0 = intNaN
private

Definition at line 232 of file trgrawdataModule.h.

◆ m_hdr_nwd_3d1

int m_hdr_nwd_3d1 = intNaN
private

Definition at line 233 of file trgrawdataModule.h.

◆ m_hdr_nwd_3d2

int m_hdr_nwd_3d2 = intNaN
private

Definition at line 234 of file trgrawdataModule.h.

◆ m_hdr_nwd_3d3

int m_hdr_nwd_3d3 = intNaN
private

Definition at line 235 of file trgrawdataModule.h.

◆ m_hdr_nwd_etf

int m_hdr_nwd_etf = intNaN
private

Definition at line 241 of file trgrawdataModule.h.

◆ m_hdr_nwd_gdl

int m_hdr_nwd_gdl = intNaN
private

Definition at line 240 of file trgrawdataModule.h.

◆ m_hdr_nwd_grl

int m_hdr_nwd_grl = intNaN
private

Definition at line 242 of file trgrawdataModule.h.

◆ m_hdr_nwd_nn0

int m_hdr_nwd_nn0 = intNaN
private

Definition at line 236 of file trgrawdataModule.h.

◆ m_hdr_nwd_nn1

int m_hdr_nwd_nn1 = intNaN
private

Definition at line 237 of file trgrawdataModule.h.

◆ m_hdr_nwd_nn2

int m_hdr_nwd_nn2 = intNaN
private

Definition at line 238 of file trgrawdataModule.h.

◆ m_hdr_nwd_nn3

int m_hdr_nwd_nn3 = intNaN
private

Definition at line 239 of file trgrawdataModule.h.

◆ m_hdr_nwd_sl0

int m_hdr_nwd_sl0 = intNaN
private

Definition at line 219 of file trgrawdataModule.h.

◆ m_hdr_nwd_sl1

int m_hdr_nwd_sl1 = intNaN
private

Definition at line 220 of file trgrawdataModule.h.

◆ m_hdr_nwd_sl2

int m_hdr_nwd_sl2 = intNaN
private

Definition at line 221 of file trgrawdataModule.h.

◆ m_hdr_nwd_sl3

int m_hdr_nwd_sl3 = intNaN
private

Definition at line 222 of file trgrawdataModule.h.

◆ m_hdr_nwd_sl4

int m_hdr_nwd_sl4 = intNaN
private

Definition at line 223 of file trgrawdataModule.h.

◆ m_hdr_nwd_sl5

int m_hdr_nwd_sl5 = intNaN
private

Definition at line 224 of file trgrawdataModule.h.

◆ m_hdr_nwd_sl6

int m_hdr_nwd_sl6 = intNaN
private

Definition at line 225 of file trgrawdataModule.h.

◆ m_hdr_nwd_sl8

int m_hdr_nwd_sl8 = intNaN
private

Definition at line 227 of file trgrawdataModule.h.

◆ m_hdr_nwd_top

int m_hdr_nwd_top = intNaN
private

Definition at line 243 of file trgrawdataModule.h.

◆ m_histRecord

bool m_histRecord
private

Definition at line 217 of file trgrawdataModule.h.

◆ m_logConfig

LogConfig m_logConfig
privateinherited

The log system configuration of the module.

Definition at line 514 of file Module.h.

◆ m_moduleParamList

ModuleParamList m_moduleParamList
privateinherited

List storing and managing all parameter of the module.

Definition at line 516 of file Module.h.

◆ m_mydebug

int m_mydebug
private

Definition at line 212 of file trgrawdataModule.h.

◆ m_name

std::string m_name
privateinherited

The name of the module, saved as a string (user-modifiable)

Definition at line 508 of file Module.h.

◆ m_nclk_2ds

int m_nclk_2ds = intNaN
private

Definition at line 395 of file trgrawdataModule.h.

◆ m_nclk_3ds

int m_nclk_3ds = intNaN
private

Definition at line 396 of file trgrawdataModule.h.

◆ m_nclk_cdctrg

int m_nclk_cdctrg = intNaN
private

Definition at line 385 of file trgrawdataModule.h.

◆ m_nclk_etf

int m_nclk_etf = intNaN
private

Definition at line 399 of file trgrawdataModule.h.

◆ m_nclk_gdl

int m_nclk_gdl = intNaN
private

Definition at line 398 of file trgrawdataModule.h.

◆ m_nclk_grl

int m_nclk_grl = intNaN
private

Definition at line 400 of file trgrawdataModule.h.

◆ m_nclk_nns

int m_nclk_nns = intNaN
private

Definition at line 397 of file trgrawdataModule.h.

◆ m_nclk_sl0

int m_nclk_sl0 = intNaN
private

Definition at line 386 of file trgrawdataModule.h.

◆ m_nclk_sl1

int m_nclk_sl1 = intNaN
private

Definition at line 387 of file trgrawdataModule.h.

◆ m_nclk_sl2

int m_nclk_sl2 = intNaN
private

Definition at line 388 of file trgrawdataModule.h.

◆ m_nclk_sl3

int m_nclk_sl3 = intNaN
private

Definition at line 389 of file trgrawdataModule.h.

◆ m_nclk_sl4

int m_nclk_sl4 = intNaN
private

Definition at line 390 of file trgrawdataModule.h.

◆ m_nclk_sl5

int m_nclk_sl5 = intNaN
private

Definition at line 391 of file trgrawdataModule.h.

◆ m_nclk_sl6

int m_nclk_sl6 = intNaN
private

Definition at line 392 of file trgrawdataModule.h.

◆ m_nclk_sl7

int m_nclk_sl7 = intNaN
private

Definition at line 393 of file trgrawdataModule.h.

◆ m_nclk_sl8

int m_nclk_sl8 = intNaN
private

Definition at line 394 of file trgrawdataModule.h.

◆ m_nclk_top

int m_nclk_top = intNaN
private

Definition at line 401 of file trgrawdataModule.h.

◆ m_nwd_2ds

int m_nwd_2ds = intNaN
private

Definition at line 377 of file trgrawdataModule.h.

◆ m_nwd_3ds

int m_nwd_3ds = intNaN
private

Definition at line 378 of file trgrawdataModule.h.

◆ m_nwd_etf

int m_nwd_etf = intNaN
private

Definition at line 381 of file trgrawdataModule.h.

◆ m_nwd_gdl

int m_nwd_gdl = intNaN
private

Definition at line 380 of file trgrawdataModule.h.

◆ m_nwd_grl

int m_nwd_grl = intNaN
private

Definition at line 382 of file trgrawdataModule.h.

◆ m_nwd_nns

int m_nwd_nns = intNaN
private

Definition at line 379 of file trgrawdataModule.h.

◆ m_nwd_sl0

int m_nwd_sl0 = intNaN
private

Definition at line 368 of file trgrawdataModule.h.

◆ m_nwd_sl1

int m_nwd_sl1 = intNaN
private

Definition at line 369 of file trgrawdataModule.h.

◆ m_nwd_sl2

int m_nwd_sl2 = intNaN
private

Definition at line 370 of file trgrawdataModule.h.

◆ m_nwd_sl3

int m_nwd_sl3 = intNaN
private

Definition at line 371 of file trgrawdataModule.h.

◆ m_nwd_sl4

int m_nwd_sl4 = intNaN
private

Definition at line 372 of file trgrawdataModule.h.

◆ m_nwd_sl5

int m_nwd_sl5 = intNaN
private

Definition at line 373 of file trgrawdataModule.h.

◆ m_nwd_sl6

int m_nwd_sl6 = intNaN
private

Definition at line 374 of file trgrawdataModule.h.

◆ m_nwd_sl7

int m_nwd_sl7 = intNaN
private

Definition at line 375 of file trgrawdataModule.h.

◆ m_nwd_sl8

int m_nwd_sl8 = intNaN
private

Definition at line 376 of file trgrawdataModule.h.

◆ m_nwd_top

int m_nwd_top = intNaN
private

Definition at line 383 of file trgrawdataModule.h.

◆ m_on_2d0

bool m_on_2d0 = false
private

Definition at line 351 of file trgrawdataModule.h.

◆ m_on_2d1

bool m_on_2d1 = false
private

Definition at line 352 of file trgrawdataModule.h.

◆ m_on_2d2

bool m_on_2d2 = false
private

Definition at line 353 of file trgrawdataModule.h.

◆ m_on_2d3

bool m_on_2d3 = false
private

Definition at line 354 of file trgrawdataModule.h.

◆ m_on_3d0

bool m_on_3d0 = false
private

Definition at line 355 of file trgrawdataModule.h.

◆ m_on_3d1

bool m_on_3d1 = false
private

Definition at line 356 of file trgrawdataModule.h.

◆ m_on_3d2

bool m_on_3d2 = false
private

Definition at line 357 of file trgrawdataModule.h.

◆ m_on_3d3

bool m_on_3d3 = false
private

Definition at line 358 of file trgrawdataModule.h.

◆ m_on_etf

bool m_on_etf = false
private

Definition at line 364 of file trgrawdataModule.h.

◆ m_on_gdl

bool m_on_gdl = false
private

Definition at line 363 of file trgrawdataModule.h.

◆ m_on_grl

bool m_on_grl = false
private

Definition at line 365 of file trgrawdataModule.h.

◆ m_on_nn0

bool m_on_nn0 = false
private

Definition at line 359 of file trgrawdataModule.h.

◆ m_on_nn1

bool m_on_nn1 = false
private

Definition at line 360 of file trgrawdataModule.h.

◆ m_on_nn2

bool m_on_nn2 = false
private

Definition at line 361 of file trgrawdataModule.h.

◆ m_on_nn3

bool m_on_nn3 = false
private

Definition at line 362 of file trgrawdataModule.h.

◆ m_on_sl0

bool m_on_sl0 = false
private

Definition at line 342 of file trgrawdataModule.h.

◆ m_on_sl1

bool m_on_sl1 = false
private

Definition at line 343 of file trgrawdataModule.h.

◆ m_on_sl2

bool m_on_sl2 = false
private

Definition at line 344 of file trgrawdataModule.h.

◆ m_on_sl3

bool m_on_sl3 = false
private

Definition at line 345 of file trgrawdataModule.h.

◆ m_on_sl4

bool m_on_sl4 = false
private

Definition at line 346 of file trgrawdataModule.h.

◆ m_on_sl5

bool m_on_sl5 = false
private

Definition at line 347 of file trgrawdataModule.h.

◆ m_on_sl6

bool m_on_sl6 = false
private

Definition at line 348 of file trgrawdataModule.h.

◆ m_on_sl7

bool m_on_sl7 = false
private

Definition at line 349 of file trgrawdataModule.h.

◆ m_on_sl8

bool m_on_sl8 = false
private

Definition at line 350 of file trgrawdataModule.h.

◆ m_on_top

bool m_on_top = false
private

Definition at line 366 of file trgrawdataModule.h.

◆ m_package

std::string m_package
privateinherited

Package this module is found in (may be empty).

Definition at line 510 of file Module.h.

◆ m_print_cc

bool m_print_cc
private

Definition at line 214 of file trgrawdataModule.h.

◆ m_print_clkcyc_err

bool m_print_clkcyc_err
private

Definition at line 216 of file trgrawdataModule.h.

◆ m_print_dbmap

bool m_print_dbmap
private

Definition at line 215 of file trgrawdataModule.h.

◆ m_propertyFlags

unsigned int m_propertyFlags
privateinherited

The properties of the module as bitwise or (with |) of EModulePropFlags.

Definition at line 512 of file Module.h.

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 519 of file Module.h.

◆ m_scale_2ds

int m_scale_2ds = intNaN
private

Definition at line 334 of file trgrawdataModule.h.

◆ m_scale_3ds

int m_scale_3ds = intNaN
private

Definition at line 335 of file trgrawdataModule.h.

◆ m_scale_etf

int m_scale_etf = intNaN
private

Definition at line 338 of file trgrawdataModule.h.

◆ m_scale_gdl

int m_scale_gdl = intNaN
private

Definition at line 337 of file trgrawdataModule.h.

◆ m_scale_grl

int m_scale_grl = intNaN
private

Definition at line 339 of file trgrawdataModule.h.

◆ m_scale_nns

int m_scale_nns = intNaN
private

Definition at line 336 of file trgrawdataModule.h.

◆ m_scale_sl0

int m_scale_sl0 = intNaN
private

Definition at line 325 of file trgrawdataModule.h.

◆ m_scale_sl1

int m_scale_sl1 = intNaN
private

Definition at line 326 of file trgrawdataModule.h.

◆ m_scale_sl2

int m_scale_sl2 = intNaN
private

Definition at line 327 of file trgrawdataModule.h.

◆ m_scale_sl3

int m_scale_sl3 = intNaN
private

Definition at line 328 of file trgrawdataModule.h.

◆ m_scale_sl4

int m_scale_sl4 = intNaN
private

Definition at line 329 of file trgrawdataModule.h.

◆ m_scale_sl5

int m_scale_sl5 = intNaN
private

Definition at line 330 of file trgrawdataModule.h.

◆ m_scale_sl6

int m_scale_sl6 = intNaN
private

Definition at line 331 of file trgrawdataModule.h.

◆ m_scale_sl7

int m_scale_sl7 = intNaN
private

Definition at line 332 of file trgrawdataModule.h.

◆ m_scale_sl8

int m_scale_sl8 = intNaN
private

Definition at line 333 of file trgrawdataModule.h.

◆ m_scale_top

int m_scale_top = intNaN
private

Definition at line 340 of file trgrawdataModule.h.

◆ m_type

std::string m_type
privateinherited

The type of the module, saved as a string.

Definition at line 509 of file Module.h.

◆ m_unpacker

DBObjPtr<TRGGDLDBUnpacker> m_unpacker
protected

Definition at line 428 of file trgrawdataModule.h.

◆ moduleNames

const char* moduleNames[c_nModules]
Initial value:
= {
"2D0", "2D1", "2D2", "2D3",
"3D0", "3D1", "3D2", "3D3",
"NN0", "NN1", "NN2", "NN3",
"SL0", "SL1", "SL2", "SL3",
"SL4", "SL5", "SL6", "SL8",
"GDL", "ETF", "GRL", "TOP"
}

Definition at line 173 of file trgrawdataModule.h.


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