Belle II Software development
DQMHistAnalysisSVDGeneralModule Class Referencefinal

Class definition for the output module of Sequential ROOT I/O. More...

#include <DQMHistAnalysisSVDGeneral.h>

Inheritance diagram for DQMHistAnalysisSVDGeneralModule:
DQMHistAnalysisModule Module PathElement

Public Types

enum  EStatus {
  c_StatusTooFew = 0 ,
  c_StatusDefault = 1 ,
  c_StatusGood = 2 ,
  c_StatusWarning = 3 ,
  c_StatusError = 4
}
 Status flag of histogram/canvas. More...
 
enum  EStatusColor {
  c_ColorTooFew = kGray ,
  c_ColorDefault = kWhite ,
  c_ColorGood = kGreen ,
  c_ColorWarning = kYellow ,
  c_ColorError = kRed
}
 Status colors of histogram/canvas (corresponding to status) More...
 
enum  ERefScaling {
  c_RefScaleNone = 0 ,
  c_RefScaleEntries = 1 ,
  c_RefScaleMax = 2
}
 Reference plot scaling type. More...
 
typedef std::map< std::string, HistObjectHistList
 The type of list of histograms.
 
typedef std::map< std::string, MonitoringObjectMonObjList
 The type of list of MonitoringObjects.
 
typedef std::map< std::string, HistDeltaDeltaList
 The type of list of delta settings and histograms.
 
typedef std::map< std::string, bool > CanvasUpdatedList
 The type of list of canvas updated status.
 
typedef std::map< std::string, RefHistObjectRefList
 The type of list of references.
 
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

 DQMHistAnalysisSVDGeneralModule ()
 Constructor.
 
 ~DQMHistAnalysisSVDGeneralModule ()
 Destructor.
 
void initialize () override final
 Initializer.
 
void beginRun () override final
 Called when entering a new run.
 
void event () override final
 This method is called for each event.
 
void endRun () override final
 This method is called if the current run ends.
 
void terminate () override final
 This method is called at the end of the event processing.
 
void clearlist (void)
 Clear all static global lists.
 
void setRunType (std::string &t)
 Set the Run Type.
 
void setEventProcessed (int e)
 Set the number of processed events.
 
TCanvas * findCanvas (TString cname)
 Find canvas by name.
 
TH1 * findHistInCanvas (const std::string &hname, TCanvas **canvas=nullptr)
 Find histogram in corresponding canvas.
 
double getSigma68 (TH1 *h) const
 Helper function to compute half of the central interval covering 68% of a distribution.
 
void clearCanvases (void)
 Clear content of all Canvases.
 
void resetDeltaList (void)
 Reset Delta.
 
TH1 * getDelta (const std::string &fullname, int n=0, bool onlyIfUpdated=true)
 Get Delta histogram.
 
TH1 * getDelta (const std::string &dirname, const std::string &histname, int n=0, bool onlyIfUpdated=true)
 Get Delta histogram.
 
void addDeltaPar (const std::string &dirname, const std::string &histname, HistDelta::EDeltaType t, int p, unsigned int a=1)
 Add Delta histogram parameters.
 
bool hasDeltaPar (const std::string &dirname, const std::string &histname)
 Check if Delta histogram parameters exist for histogram.
 
void UpdateCanvas (std::string name, bool updated=true)
 Mark canvas as updated (or not)
 
void UpdateCanvas (TCanvas *canvas, bool updated=true)
 Mark canvas as updated (or not)
 
void ExtractRunType (std::vector< TH1 * > &hs)
 Extract Run Type from histogram title, called from input module.
 
void ExtractEvent (std::vector< TH1 * > &hs)
 Extract event processed from daq histogram, called from input module.
 
int registerEpicsPV (std::string pvname, std::string keyname="")
 EPICS related Functions.
 
int registerExternalEpicsPV (std::string pvname, std::string keyname="")
 Register a PV with its name and a key name.
 
void setEpicsPV (std::string keyname, double value)
 Write value to a EPICS PV.
 
void setEpicsPV (std::string keyname, int value)
 Write value to a EPICS PV.
 
void setEpicsPV (int index, double value)
 Write value to a EPICS PV.
 
void setEpicsPV (int index, int value)
 Write value to a EPICS PV.
 
void setEpicsStringPV (std::string keyname, std::string value)
 Write string to a EPICS PV.
 
void setEpicsStringPV (int index, std::string value)
 Write string to a EPICS PV.
 
double getEpicsPV (std::string keyname)
 Read value from a EPICS PV.
 
double getEpicsPV (int index)
 Read value from a EPICS PV.
 
std::string getEpicsStringPV (std::string keyname, bool &status)
 Read value from a EPICS PV.
 
std::string getEpicsStringPV (int index, bool &status)
 Read value from a EPICS PV.
 
int updateEpicsPVs (float timeout)
 Update all EPICS PV (flush to network)
 
chid getEpicsPVChID (std::string keyname)
 Get EPICS PV Channel Id.
 
chid getEpicsPVChID (int index)
 Get EPICS PV Channel Id.
 
bool requestLimitsFromEpicsPVs (chid id, double &lowerAlarm, double &lowerWarn, double &upperWarn, double &upperAlarm)
 Get Alarm Limits from EPICS PV.
 
bool requestLimitsFromEpicsPVs (std::string keyname, double &lowerAlarm, double &lowerWarn, double &upperWarn, double &upperAlarm)
 Get Alarm Limits from EPICS PV.
 
bool requestLimitsFromEpicsPVs (int index, double &lowerAlarm, double &lowerWarn, double &upperWarn, double &upperAlarm)
 Get Alarm Limits from EPICS PV.
 
void setUseEpics (bool flag)
 Setter for EPICS usage.
 
void setUseEpicsReadOnly (bool flag)
 Setter EPICS flag in read only mode.
 
bool getUseEpics (void)
 Getter for EPICS usage.
 
bool getUseEpicsReadOnly (void)
 Getter EPICS flag in read only mode.
 
void cleanupEpicsPVs (void)
 Unsubscribe from EPICS PVs on terminate.
 
std::string & getPVPrefix (void)
 get global Prefix for EPICS PVs
 
void setPVPrefix (std::string &prefix)
 set global Prefix for EPICS PVs
 
EStatus makeStatus (bool enough, bool warn_flag, bool error_flag)
 Helper function to judge the status for coloring and EPICS.
 
void colorizeCanvas (TCanvas *canvas, EStatus status)
 Helper function for Canvas colorization.
 
EStatusColor getStatusColor (EStatus status)
 Return color for canvas state.
 
void checkPVStatus (void)
 Check the status of all PVs and report if disconnected or not found.
 
void printPVStatus (chid pv, bool onlyError=true)
 check the status of a PVs and report if disconnected or not found
 
void CheckEpicsError (int state, const std::string &message, const std::string &name)
 check the return status and check PV in case of error
 
void CheckEpicsError (int state, const std::string &message, chid id)
 check the return status and check PV in case of error
 
std::vector< std::string > StringSplit (const std::string &s, const char delim)
 Helper function for string token split.
 
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 HistListgetHistList ()
 Get the list of the histograms.
 
static MonObjListgetMonObjList ()
 Get the list of MonitoringObjects.
 
static const DeltaListgetDeltaList ()
 Get the list of the delta histograms.
 
static const CanvasUpdatedListgetCanvasUpdatedList ()
 Get the list of the canvas update status.
 
static RefListgetRefList ()
 Get the list of the reference histograms.
 
static const std::string & getRunType (void)
 Get the Run Type.
 
static int getEventProcessed (void)
 Get the number of processed events.
 
static TH1 * findHist (const std::string &histname, bool onlyIfUpdated=false)
 Get histogram from list (no other search).
 
static TH1 * findHist (const std::string &dirname, const std::string &histname, bool onlyIfUpdated=false)
 Find histogram.
 
static TH1 * findRefHist (const std::string &histname, ERefScaling scaling=ERefScaling::c_RefScaleNone, const TH1 *hist=nullptr)
 Get referencehistogram from list (no other search).
 
static TH1 * findRefHist (const std::string &dirname, const std::string &histname, ERefScaling scaling=ERefScaling::c_RefScaleNone, const TH1 *hist=nullptr)
 Find reference histogram.
 
static TH1 * scaleReference (ERefScaling scaling, const TH1 *hist, TH1 *ref)
 Using the original and reference, create scaled version.
 
static TH1 * findHistInFile (TFile *file, const std::string &histname)
 Find histogram in specific TFile (e.g.
 
static MonitoringObjectfindMonitoringObject (const std::string &objName)
 Find MonitoringObject.
 
static bool addHist (const std::string &dirname, const std::string &histname, TH1 *h)
 Add histogram.
 
static MonitoringObjectgetMonitoringObject (const std::string &name)
 Get MonitoringObject with given name (new object is created if non-existing)
 
static void initHistListBeforeEvent (void)
 Reset the list of histograms.
 
static void clearHistList (void)
 Clears the list of histograms.
 
static void clearRefList (void)
 Clears the list of ref histograms.
 
static void exposePythonAPI ()
 Exposes methods of the Module class to Python.
 

Static Public Attributes

static DeltaList s_deltaList
 The list of Delta Histograms and settings.
 

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.
 

Private Member Functions

Int_t findBinY (Int_t layer, Int_t sensor)
 find Y bin corresponding to sensor, occupancy plot
 
int registerEpicsPVwithPrefix (std::string prefix, std::string pvname, std::string keyname="")
 Register a PV with its name and a key name.
 
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

bool m_printCanvas
 if true print the pdf of the canvases
 
bool m_3Samples
 if true enable 3 samples histograms analysis
 
double m_occError
 error level of the occupancy
 
double m_occWarning
 warning level of the occupancy
 
double m_occEmpty
 empty level of the occupancy
 
double m_onlineOccError
 error level of the onlineOccupancy
 
double m_onlineOccWarning
 warning level of the onlineOccupancy
 
double m_onlineOccEmpty
 empty level of the occupancy
 
double m_statThreshold
 minimal number of events to compare histograms
 
double m_timeThreshold
 difference between mean of cluster time for present and reference run
 
float m_refMeanP
 mean of the signal time peak from Physics reference run
 
float m_refMeanC
 mean of the signal time peak from Cosmic reference run
 
std::string m_refFileName
 Parameters accessible from basf2 scripts.
 
TFile * m_refFile = nullptr
 The pointer to the reference file.
 
TCanvas * m_cUnpacker = nullptr
 unpacker plot canvas
 
SVDSummaryPlotsm_hOccupancy = nullptr
 occupancy histos
 
SVDSummaryPlotsm_hOnlineOccupancy = nullptr
 online occupancy histos
 
SVDSummaryPlotsm_hOccupancyGroupId0 = nullptr
 occupancy histos for cluster time group id=0
 
SVDSummaryPlotsm_hOccupancy3Samples = nullptr
 occupancy histos for 3 samples
 
SVDSummaryPlotsm_hOnlineOccupancy3Samples = nullptr
 online occupancy histos for 3 samples
 
TCanvas * m_cOccupancyU = nullptr
 occupancy U histo canvas
 
TCanvas * m_cOccupancyU3Samples = nullptr
 occupancy U histo canvas for 3 samples
 
TCanvas * m_cOccupancyUGroupId0 = nullptr
 occupancy U histo canvas for cluster time group Id = 0
 
TCanvas * m_cOccupancyV = nullptr
 occupancy V histo canvas
 
TCanvas * m_cOccupancyV3Samples = nullptr
 occupancy V histo canvas for 3 samples
 
TCanvas * m_cOccupancyVGroupId0 = nullptr
 occupancy V histo canvas for cluster time group Id = 0
 
bool m_additionalPlots = false
 additional plots flag
 
TH1F m_hOccupancyChartChip
 occupancy chart histo
 
TCanvas * m_cOccupancyChartChip = nullptr
 occupancy chart histo canvas
 
TCanvas * m_cOnlineOccupancyU = nullptr
 online occupancy U histo canvas
 
TCanvas * m_cOnlineOccupancyU3Samples = nullptr
 online occupancy U histo canvas for 3 samples
 
TCanvas * m_cOnlineOccupancyV = nullptr
 online Occupancy V histo canvas
 
TCanvas * m_cOnlineOccupancyV3Samples = nullptr
 online Occupancy V histo canvas for 3 samples
 
int m_sensors = 0
 number of sensors to considired
 
TH1F m_hStripOccupancyU [172]
 u-side strip chart occupancy histos
 
TCanvas ** m_cStripOccupancyU = nullptr
 u-side strip chart occupancy canvas
 
TH1F m_hStripOccupancyV [172]
 u-side strip chart occupancy histos
 
TCanvas ** m_cStripOccupancyV = nullptr
 u-side strip chart occupancy canvas
 
TH1F m_hClusterOnTrackTime_L456V
 time for clusters on Track for L456V histo
 
TCanvas * m_cClusterOnTrackTime_L456V = nullptr
 time for clusters on Track for L456V canvas
 
TH1F m_hClusterOnTrackTimeL456V3Samples
 time for clusters on Track for L456V histo for 3 samples
 
TCanvas * m_cClusterOnTrackTimeL456V3Samples = nullptr
 time for clusters on Track for L456V canvas for 3 sampples
 
TPaveText * m_legProblem = nullptr
 OfflineOccupancy plot legend, problem.
 
TPaveText * m_legWarning = nullptr
 OfflineOccupancy plot legend, warning.
 
TPaveText * m_legNormal = nullptr
 OfflineOccupancy plot legend, normal.
 
TPaveText * m_legEmpty = nullptr
 OfflineOccupancy plot legend, empty.
 
TPaveText * m_legError = nullptr
 OfflineOccupancy plot legend, error.
 
TPaveText * m_legOnProblem = nullptr
 onlineOccupancy plot legend, problem
 
TPaveText * m_legOnWarning = nullptr
 onlineOccupancy plot legend, warning
 
TPaveText * m_legOnNormal = nullptr
 onlineOccupancy plot legend, normal
 
TPaveText * m_legOnEmpty = nullptr
 onlineOccupancy plot legend, empty
 
TPaveText * m_legOnError = nullptr
 onlineOccupancy plot legend, error
 
TPaveText * m_legTiProblem = nullptr
 cluster time on tracks plot legend, problem
 
TPaveText * m_legTiNormal = nullptr
 cluster time on tracks plot legend, normal
 
TPaveText * m_legTiEmpty = nullptr
 cluster time on tracks plot legend, empty
 
TPaveText * m_legTi3Problem = nullptr
 cluster time on tracks for 3 samples plot legend, problem
 
TPaveText * m_legTi3Normal = nullptr
 cluster time on tracks for 3 samples plot legend, normal
 
TPaveText * m_legTi3Empty = nullptr
 cluster time on tracks for 3 samples plot legend, empty
 
Double_t m_unpackError = 0
 Maximum bin_content/ # events allowed before throwing ERROR.
 
Int_t m_occUstatus = 0
 0 = normal, 1 = empty, 2 = warning, 3 = error
 
Int_t m_occVstatus = 0
 0 = normal, 1 = empty, 2 = warning, 3 = error
 
Int_t m_occU3Samples = 0
 0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
 
Int_t m_occV3Samples = 0
 0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
 
Int_t m_occUGroupId0 = 0
 0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
 
Int_t m_occVGroupId0 = 0
 0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
 
Int_t m_onlineOccUstatus = 0
 0 = normal, 1 = empty, 2 = warning, 3 = error
 
Int_t m_onlineOccVstatus = 0
 0 = normal, 1 = empty, 2 = warning, 3 = error
 
Int_t m_onlineOccU3Samples = 0
 0 = normal, 1 = empty, 2 = warning, 3 = error for 3 sample
 
Int_t m_onlineOccV3Samples = 0
 0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
 
TString m_runtype = nullptr
 string with runtype: physics or cosmic
 
std::string m_pvPrefix
 string prefix for EPICS PVs
 
std::vector< VxdIDm_SVDModules
 IDs of all SVD Modules to iterate over.
 
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.
 

Static Private Attributes

static HistList s_histList
 The list of Histograms.
 
static MonObjList s_monObjList
 The list of MonitoringObjects.
 
static CanvasUpdatedList s_canvasUpdatedList
 The list of canvas updated status.
 
static RefList s_refList
 The list of references.
 
static int s_eventProcessed = 0
 Number of Events processed to fill histograms.
 
static std::string s_runType = ""
 The Run type.
 
static bool m_useEpics = false
 Flag if to use EPICS do not set by yourself, use EpicsEnable module to set.
 
static bool m_epicsReadOnly
 Flag if to use EPICS in ReadOnly mode (for reading limits) do not set by yourself, use EpicsEnable module to set.
 
static std::string m_PVPrefix = "TEST:"
 The Prefix for EPICS PVs.
 

Detailed Description

Class definition for the output module of Sequential ROOT I/O.

Definition at line 32 of file DQMHistAnalysisSVDGeneral.h.

Member Typedef Documentation

◆ CanvasUpdatedList

typedef std::map<std::string, bool> CanvasUpdatedList
inherited

The type of list of canvas updated status.

Definition at line 91 of file DQMHistAnalysis.h.

◆ DeltaList

typedef std::map<std::string, HistDelta> DeltaList
inherited

The type of list of delta settings and histograms.

Definition at line 86 of file DQMHistAnalysis.h.

◆ EAfterConditionPath

Forward the EAfterConditionPath definition from the ModuleCondition.

Definition at line 88 of file Module.h.

◆ HistList

typedef std::map<std::string, HistObject> HistList
inherited

The type of list of histograms.

Definition at line 77 of file DQMHistAnalysis.h.

◆ MonObjList

typedef std::map<std::string, MonitoringObject> MonObjList
inherited

The type of list of MonitoringObjects.

Definition at line 81 of file DQMHistAnalysis.h.

◆ RefList

typedef std::map<std::string, RefHistObject> RefList
inherited

The type of list of references.

Definition at line 96 of file DQMHistAnalysis.h.

Member Enumeration Documentation

◆ 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

◆ ERefScaling

enum ERefScaling
inherited

Reference plot scaling type.

Enumerator
c_RefScaleNone 

no scaling

c_RefScaleEntries 

to number of entries (integral)

c_RefScaleMax 

to maximum (bin entry)

Definition at line 68 of file DQMHistAnalysis.h.

68 {
69 c_RefScaleNone = 0,
71 c_RefScaleMax = 2
72 };
@ c_RefScaleEntries
to number of entries (integral)
@ c_RefScaleMax
to maximum (bin entry)

◆ EStatus

enum EStatus
inherited

Status flag of histogram/canvas.

Enumerator
c_StatusTooFew 

Not enough entries/event to judge.

c_StatusDefault 

default for non-coloring

c_StatusGood 

Analysis result: Good.

c_StatusWarning 

Analysis result: Warning, there may be minor issues.

c_StatusError 

Analysis result: Severe issue found.

Definition at line 46 of file DQMHistAnalysis.h.

46 {
47 c_StatusTooFew = 0,
48 c_StatusDefault = 1,
49 c_StatusGood = 2,
50 c_StatusWarning = 3,
51 c_StatusError = 4
52 };
@ c_StatusDefault
default for non-coloring
@ c_StatusTooFew
Not enough entries/event to judge.
@ c_StatusError
Analysis result: Severe issue found.
@ c_StatusWarning
Analysis result: Warning, there may be minor issues.
@ c_StatusGood
Analysis result: Good.

◆ EStatusColor

enum EStatusColor
inherited

Status colors of histogram/canvas (corresponding to status)

Enumerator
c_ColorTooFew 

Not enough entries/event to judge.

c_ColorDefault 

default for non-coloring

c_ColorGood 

Analysis result: Good.

c_ColorWarning 

Analysis result: Warning, there may be minor issues.

c_ColorError 

Analysis result: Severe issue found.

Definition at line 57 of file DQMHistAnalysis.h.

57 {
58 c_ColorTooFew = kGray,
59 c_ColorDefault = kWhite,
60 c_ColorGood = kGreen,
61 c_ColorWarning = kYellow,
62 c_ColorError = kRed
63 };
@ c_ColorWarning
Analysis result: Warning, there may be minor issues.
@ c_ColorError
Analysis result: Severe issue found.
@ c_ColorTooFew
Not enough entries/event to judge.
@ c_ColorGood
Analysis result: Good.
@ c_ColorDefault
default for non-coloring

Constructor & Destructor Documentation

◆ DQMHistAnalysisSVDGeneralModule()

Constructor.

Definition at line 37 of file DQMHistAnalysisSVDGeneral.cc.

39{
40 //Parameter definition
41 B2DEBUG(10, "DQMHistAnalysisSVDGeneral: Constructor done.");
42
43 setDescription("DQM Analysis Module that produces colored canvas for a straightforward interpretation of the SVD Data Quality.");
44
45 addParam("RefHistoFile", m_refFileName, "Reference histrogram file name", std::string("SVDrefHisto.root"));
46 addParam("unpackerErrorLevel", m_unpackError, "Maximum bin_content/ # events allowed before throwing ERROR", double(0.00001));
47 addParam("occLevel_Error", m_occError, "Maximum Occupancy (%) allowed for safe operations (red)", double(5));
48 addParam("occLevel_Warning", m_occWarning, "Occupancy (%) at WARNING level (orange)", double(3));
49 addParam("occLevel_Empty", m_occEmpty, "Maximum Occupancy (%) for which the sensor is considered empty", double(0));
50 addParam("onlineOccLevel_Error", m_onlineOccError, "Maximum OnlineOccupancy (%) allowed for safe operations (red)", double(10));
51 addParam("onlineOccLevel_Warning", m_onlineOccWarning, "OnlineOccupancy (%) at WARNING level (orange)", double(5));
52 addParam("onlineOccLevel_Empty", m_onlineOccEmpty, "Maximum OnlineOccupancy (%) for which the sensor is considered empty",
53 double(0));
54 addParam("printCanvas", m_printCanvas, "if True prints pdf of the analysis canvas", bool(false));
55 addParam("statThreshold", m_statThreshold, "Minimal number of events to compare histograms", double(10000.));
56 addParam("timeThreshold", m_timeThreshold, "Acceptable difference between mean of central peak for present and reference run",
57 double(6)); // 6 ns
58 addParam("refMCTP", m_refMeanP, "Mean of the signal time peak from Physics reference run", float(0.0)); // Approximate, from exp 20
59 addParam("refMCTC", m_refMeanC, "Mean of the signal time peak from Cosmic reference run", float(0.0)); //
60 addParam("additionalPlots", m_additionalPlots, "Flag to produce additional plots", bool(false));
61 addParam("samples3", m_3Samples, "if True 3 samples histograms analysis is performed", bool(false));
62 addParam("PVPrefix", m_pvPrefix, "PV Prefix", std::string("SVD:"));
63}
DQMHistAnalysisModule()
Constructor / Destructor.
std::string m_refFileName
Parameters accessible from basf2 scripts.
double m_statThreshold
minimal number of events to compare histograms
double m_timeThreshold
difference between mean of cluster time for present and reference run
double m_onlineOccError
error level of the onlineOccupancy
float m_refMeanC
mean of the signal time peak from Cosmic reference run
double m_onlineOccEmpty
empty level of the occupancy
std::string m_pvPrefix
string prefix for EPICS PVs
double m_occWarning
warning level of the occupancy
bool m_printCanvas
if true print the pdf of the canvases
bool m_3Samples
if true enable 3 samples histograms analysis
Double_t m_unpackError
Maximum bin_content/ # events allowed before throwing ERROR.
double m_occEmpty
empty level of the occupancy
double m_onlineOccWarning
warning level of the onlineOccupancy
double m_occError
error level of the occupancy
float m_refMeanP
mean of the signal time peak from Physics reference run
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
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

◆ ~DQMHistAnalysisSVDGeneralModule()

Destructor.

Definition at line 65 of file DQMHistAnalysisSVDGeneral.cc.

65{ }

Member Function Documentation

◆ addDeltaPar()

void addDeltaPar ( const std::string &  dirname,
const std::string &  histname,
HistDelta::EDeltaType  t,
int  p,
unsigned int  a = 1 
)
inherited

Add Delta histogram parameters.

Parameters
dirnamedirectory
histnamename of histogram
ttype of delta histogramming
pnumerical parameter depending on type, e.g. number of entries
aamount of histograms in the past

Definition at line 96 of file DQMHistAnalysis.cc.

98{
99 std::string fullname;
100 if (dirname.size() > 0) {
101 fullname = dirname + "/" + histname;
102 } else {
103 fullname = histname;
104 }
105 s_deltaList[fullname].set(t, p, a);
106}
static DeltaList s_deltaList
The list of Delta Histograms and settings.

◆ addHist()

bool addHist ( const std::string &  dirname,
const std::string &  histname,
TH1 *  h 
)
staticinherited

Add histogram.

Parameters
dirnameThe name of the directory.
histnameThe name of the histogram.
hThe TH1 pointer for the histogram.
Returns
histogram was updated flag

Definition at line 59 of file DQMHistAnalysis.cc.

60{
61 std::string fullname;
62 if (dirname.size() > 0) {
63 fullname = dirname + "/" + histname;
64 } else {
65 fullname = histname;
66 }
67
68 if (s_histList[fullname].update(h)) {
69 // only if histogram changed, check if delta histogram update needed
70 auto it = s_deltaList.find(fullname);
71 if (it != s_deltaList.end()) {
72 B2DEBUG(20, "Found Delta" << fullname);
73 it->second.update(h); // update
74 }
75 return true; // histogram changed
76 }
77
78 return false; // histogram didn't change
79}
static HistList s_histList
The list of Histograms.

◆ beginRun()

void beginRun ( void  )
finaloverridevirtual

Called when entering a new run.

Reimplemented from Module.

Definition at line 164 of file DQMHistAnalysisSVDGeneral.cc.

165{
166 B2DEBUG(10, "DQMHistAnalysisSVDGeneral: beginRun called.");
167 m_cUnpacker->Clear();
168 m_cOccupancyU->Clear();
169 m_cOccupancyV->Clear();
170
171 m_cOnlineOccupancyU->Clear();
172 m_cOnlineOccupancyV->Clear();
173 m_cOccupancyChartChip->Clear();
174 for (int i = 0; i < m_sensors; i++) {
175 m_cStripOccupancyU[i]->Clear();
176 m_cStripOccupancyV[i]->Clear();
177 }
178
180
181 if (m_3Samples) {
182 m_cOccupancyU3Samples->Clear();
183 m_cOccupancyV3Samples->Clear();
187 }
188 m_cOccupancyUGroupId0->Clear();
189 m_cOccupancyVGroupId0->Clear();
190
191 //Retrieve limits from EPICS
192 double oocErrorLoOff = 0.;
193 double oocErrorLoOn = 0.;
194 requestLimitsFromEpicsPVs("occLimits", oocErrorLoOff, m_occEmpty, m_occWarning, m_occError);
196
197 B2DEBUG(10, " SVD occupancy thresholds taken from EPICS configuration file:");
198 B2DEBUG(10, " ONLINE OCCUPANCY: empty < " << m_onlineOccEmpty << " normal < " << m_onlineOccWarning << " warning < " <<
200 " < error");
201 B2DEBUG(10, " OFFLINE OCCUPANCY: empty < " << m_occEmpty << " normal < " << m_occWarning << " warning < " << m_occError <<
202 " < error with minimum statistics of " << m_occEmpty);
203
204 double timeWarnUp = 0.;
205 double timeErrorLo = 0.;
206 double timeWarnLo = 0.;
207 requestLimitsFromEpicsPVs("clusTimeOnTrkLimits", timeErrorLo, timeWarnLo, timeWarnUp, m_timeThreshold);
208 B2DEBUG(10, " SVD cluster time on track threshold taken from EPICS configuration file:");
209 B2DEBUG(10, " CLUSTER TIME ON TRACK: error > " << m_timeThreshold << " ns with minimum statistics of " << m_statThreshold);
210
211 double unpackWarnLo = 0.;
212 double unpackWarnUp = 0.;
213 double unpackErrorLo = 0.;
214 requestLimitsFromEpicsPVs("UnpackError", unpackErrorLo, unpackWarnLo, unpackWarnUp, m_unpackError);
215 B2DEBUG(10, " SVD unpack error threshold taken from EPICS configuration file:");
216 B2DEBUG(10, " DATA UNPACK: error > " << m_unpackError);
217
218 // Create text panel
219 //OFFLINE occupancy plots legend
220 m_legProblem = new TPaveText(11, findBinY(4, 3) - 3, 16, findBinY(4, 3));
221 m_legProblem->AddText("ERROR!");
222 m_legProblem->AddText("at least one sensor with:");
223 m_legProblem->AddText(Form("occupancy > %1.1f%%", m_occError));
224 m_legProblem->SetFillColor(c_ColorDefault);
225 m_legProblem->SetLineColor(kBlack);
226
227 m_legWarning = new TPaveText(11, findBinY(4, 3) - 3, 16, findBinY(4, 3));
228 m_legWarning->AddText("WARNING!");
229 m_legWarning->AddText("at least one sensor with:");
230 m_legWarning->AddText(Form("%1.1f%% < occupancy < %1.1f%%", m_occWarning, m_occError));
231 m_legWarning->SetFillColor(c_ColorDefault);
232 m_legWarning->SetLineColor(kBlack);
233
234 m_legNormal = new TPaveText(11, findBinY(4, 3) - 3, 16, findBinY(4, 3));
235 m_legNormal->AddText("OCCUPANCY WITHIN LIMITS");
236 m_legNormal->AddText(Form("%1.1f%% < occupancy < %1.1f%%", m_occEmpty, m_occWarning));
237 m_legNormal->SetFillColor(c_ColorDefault);
238 m_legNormal->SetLineColor(kBlack);
239
240 m_legEmpty = new TPaveText(11, findBinY(4, 3) - 2, 16, findBinY(4, 3));
241 m_legEmpty->AddText("NO DATA RECEIVED");
242 m_legEmpty->AddText("from at least one sensor");
243 m_legEmpty->SetTextColor(c_ColorDefault);
244 m_legEmpty->SetLineColor(kBlack);
245
246 //ONLINE occupancy plots legend
247 m_legOnProblem = new TPaveText(11, findBinY(4, 3) - 3, 16, findBinY(4, 3));
248 m_legOnProblem->AddText("ERROR!");
249 m_legOnProblem->AddText("at least one sensor with:");
250 m_legOnProblem->AddText(Form("online occupancy > %1.1f%%", m_onlineOccError));
251 m_legOnProblem->SetFillColor(c_ColorDefault);
252 m_legOnProblem->SetLineColor(kBlack);
253
254 m_legOnWarning = new TPaveText(11, findBinY(4, 3) - 3, 16, findBinY(4, 3));
255 m_legOnWarning->AddText("WARNING!");
256 m_legOnWarning->AddText("at least one sensor with:");
257 m_legOnWarning->AddText(Form("%1.1f%% < online occupancy < %1.1f%%", m_onlineOccWarning, m_onlineOccError));
258 m_legOnWarning->SetFillColor(c_ColorDefault);
259 m_legOnWarning->SetLineColor(kBlack);
260
261 m_legOnNormal = new TPaveText(11, findBinY(4, 3) - 3, 16, findBinY(4, 3));
262 m_legOnNormal->AddText("OCCUPANCY WITHIN LIMITS");
263 m_legOnNormal->AddText(Form("%1.1f%% < online occupancy < %1.1f%%", m_onlineOccEmpty, m_onlineOccWarning));
264 m_legOnNormal->SetFillColor(c_ColorDefault);
265 m_legOnNormal->SetLineColor(kBlack);
266
267 m_legOnEmpty = new TPaveText(11, findBinY(4, 3) - 2, 16, findBinY(4, 3));
268 m_legOnEmpty->AddText("NO DATA RECEIVED");
269 m_legOnEmpty->AddText("from at least one sensor");
270 m_legOnEmpty->SetFillColor(c_ColorDefault);
271 m_legOnEmpty->SetLineColor(kBlack);
272
273
274 // cluster time on tracks legend
275 m_legTiProblem = new TPaveText(0.15, 0.65, 0.35, 0.80, "NDC");
276 m_legTiProblem->AddText("ERROR!");
277 m_legTiProblem->AddText(Form("abs(Mean) > %3.1f ns", m_timeThreshold));
278 m_legTiProblem->SetFillColor(c_ColorDefault);
279 m_legTiProblem->SetLineColor(kBlack);
280
281 m_legTiNormal = new TPaveText(0.15, 0.65, 0.35, 0.80, "NDC");
282 m_legTiNormal->AddText("TIME SHIFT UNDER LIMIT");
283 m_legTiNormal->AddText(Form("abs(Mean) < %3.1f ns", m_timeThreshold));
284 m_legTiNormal->SetFillColor(c_ColorDefault);
285 m_legTiNormal->SetLineColor(kBlack);
286
287 m_legTiEmpty = new TPaveText(0.15, 0.65, 0.35, 0.80, "NDC");
288 m_legTiEmpty->AddText("Not enough statistics");
289 m_legTiEmpty->SetFillColor(c_ColorDefault);
290 m_legTiEmpty->SetLineColor(kBlack);
291
292 m_legTi3Problem = new TPaveText(0.15, 0.65, 0.35, 0.80, "NDC");
293 m_legTi3Problem->AddText("ERROR!");
294 m_legTi3Problem->AddText(Form("abs(Mean) > %3.1f ns", m_timeThreshold));
295 m_legTi3Problem->SetFillColor(c_ColorDefault);
296 m_legTi3Problem->SetLineColor(kBlack);
297
298 m_legTi3Normal = new TPaveText(0.15, 0.65, 0.35, 0.80, "NDC");
299 m_legTi3Normal->AddText("TIME SHIFT UNDER LIMIT");
300 m_legTi3Normal->AddText(Form("abs(Mean) < %3.1f ns", m_timeThreshold));
301 m_legTi3Normal->SetFillColor(c_ColorDefault);
302 m_legTi3Normal->SetLineColor(kBlack);
303
304 m_legTi3Empty = new TPaveText(0.15, 0.65, 0.35, 0.80, "NDC");
305 m_legTi3Empty->AddText("Not enough statistics");
306 m_legTi3Empty->SetFillColor(kBlack);
307 m_legTi3Empty->SetLineColor(kBlack);
308}
bool requestLimitsFromEpicsPVs(chid id, double &lowerAlarm, double &lowerWarn, double &upperWarn, double &upperAlarm)
Get Alarm Limits from EPICS PV.
TPaveText * m_legTiEmpty
cluster time on tracks plot legend, empty
TCanvas * m_cClusterOnTrackTimeL456V3Samples
time for clusters on Track for L456V canvas for 3 sampples
TCanvas * m_cOnlineOccupancyU
online occupancy U histo canvas
TCanvas * m_cOccupancyV
occupancy V histo canvas
TPaveText * m_legOnProblem
onlineOccupancy plot legend, problem
TPaveText * m_legEmpty
OfflineOccupancy plot legend, empty.
Int_t findBinY(Int_t layer, Int_t sensor)
find Y bin corresponding to sensor, occupancy plot
TCanvas * m_cOccupancyU
occupancy U histo canvas
TPaveText * m_legTi3Normal
cluster time on tracks for 3 samples plot legend, normal
TPaveText * m_legTiProblem
cluster time on tracks plot legend, problem
int m_sensors
number of sensors to considired
TCanvas ** m_cStripOccupancyV
u-side strip chart occupancy canvas
TCanvas * m_cOccupancyVGroupId0
occupancy V histo canvas for cluster time group Id = 0
TPaveText * m_legOnEmpty
onlineOccupancy plot legend, empty
TCanvas * m_cOccupancyU3Samples
occupancy U histo canvas for 3 samples
TPaveText * m_legWarning
OfflineOccupancy plot legend, warning.
TCanvas * m_cOnlineOccupancyV3Samples
online Occupancy V histo canvas for 3 samples
TCanvas * m_cOccupancyChartChip
occupancy chart histo canvas
TCanvas ** m_cStripOccupancyU
u-side strip chart occupancy canvas
TPaveText * m_legOnNormal
onlineOccupancy plot legend, normal
TPaveText * m_legTi3Empty
cluster time on tracks for 3 samples plot legend, empty
TCanvas * m_cClusterOnTrackTime_L456V
time for clusters on Track for L456V canvas
TPaveText * m_legNormal
OfflineOccupancy plot legend, normal.
TPaveText * m_legOnWarning
onlineOccupancy plot legend, warning
TCanvas * m_cOnlineOccupancyV
online Occupancy V histo canvas
TCanvas * m_cOccupancyUGroupId0
occupancy U histo canvas for cluster time group Id = 0
TCanvas * m_cOccupancyV3Samples
occupancy V histo canvas for 3 samples
TPaveText * m_legProblem
OfflineOccupancy plot legend, problem.
TPaveText * m_legTiNormal
cluster time on tracks plot legend, normal
TPaveText * m_legTi3Problem
cluster time on tracks for 3 samples plot legend, problem
TCanvas * m_cOnlineOccupancyU3Samples
online occupancy U histo canvas for 3 samples

◆ CheckEpicsError() [1/2]

void CheckEpicsError ( int  state,
const std::string &  message,
chid  id = nullptr 
)
inherited

check the return status and check PV in case of error

Parameters
statereturn state of epics function
messagemessage to print out
idthe chid of the affected PV

Definition at line 807 of file DQMHistAnalysis.cc.

808{
809 if (state != ECA_NORMAL) {
810 std::string name;
811 if (id) name = ca_name(id);
812 B2WARNING(message << ": " << name);
813 printPVStatus(id, false);
814 }
815}
void printPVStatus(chid pv, bool onlyError=true)
check the status of a PVs and report if disconnected or not found

◆ CheckEpicsError() [2/2]

void CheckEpicsError ( int  state,
const std::string &  message,
const std::string &  name 
)
inherited

check the return status and check PV in case of error

Parameters
statereturn state of epics function
messagemessage to print out
namethe (key)name of the affected PV

Definition at line 799 of file DQMHistAnalysis.cc.

800{
801 if (state != ECA_NORMAL) {
802 B2WARNING(message << ": " << name);
803 printPVStatus(m_epicsNameToChID[name], false);
804 }
805}

◆ checkPVStatus()

void checkPVStatus ( void  )
inherited

Check the status of all PVs and report if disconnected or not found.

Definition at line 763 of file DQMHistAnalysis.cc.

764{
765 B2INFO("Check PV Connections");
766
767 for (auto& it : m_epicsChID) {
768 printPVStatus(it);
769 }
770 B2INFO("Check PVs done");
771}

◆ cleanupEpicsPVs()

void cleanupEpicsPVs ( void  )
inherited

Unsubscribe from EPICS PVs on terminate.

Definition at line 644 of file DQMHistAnalysis.cc.

645{
646 // this should be called in terminate function of analysis modules
647#ifdef _BELLE2_EPICS
648 if (getUseEpics()) {
649 for (auto& it : m_epicsChID) CheckEpicsError(ca_clear_channel(it), "ca_clear_channel failure", it);
650 updateEpicsPVs(5.0);
651 // Make sure we clean up both afterwards!
652 m_epicsChID.clear();
653 m_epicsNameToChID.clear();
654 }
655#endif
656}
bool getUseEpics(void)
Getter for EPICS usage.
void CheckEpicsError(int state, const std::string &message, const std::string &name)
check the return status and check PV in case of error
int updateEpicsPVs(float timeout)
Update all EPICS PV (flush to network)

◆ clearCanvases()

void clearCanvases ( void  )
inherited

Clear content of all Canvases.

Definition at line 310 of file DQMHistAnalysis.cc.

311{
312 TIter nextckey(gROOT->GetListOfCanvases());
313 TObject* cobj = nullptr;
314
315 while ((cobj = dynamic_cast<TObject*>(nextckey()))) {
316 if (cobj->IsA()->InheritsFrom("TCanvas")) {
317 TCanvas* cnv = dynamic_cast<TCanvas*>(cobj);
318 cnv->Clear();
320 }
321 }
322}
void colorizeCanvas(TCanvas *canvas, EStatus status)
Helper function for Canvas colorization.

◆ clearHistList()

void clearHistList ( void  )
staticinherited

Clears the list of histograms.

Definition at line 338 of file DQMHistAnalysis.cc.

339{
340 s_histList.clear();
341}

◆ clearlist()

void clearlist ( void  )
inherited

Clear all static global lists.

Definition at line 50 of file DQMHistAnalysis.cc.

51{
52 s_histList.clear();
53 s_refList.clear();
54// s_monObjList;
55 s_deltaList.clear();
56 s_canvasUpdatedList.clear();
57}
static RefList s_refList
The list of references.
static CanvasUpdatedList s_canvasUpdatedList
The list of canvas updated status.

◆ clearRefList()

void clearRefList ( void  )
staticinherited

Clears the list of ref histograms.

Definition at line 343 of file DQMHistAnalysis.cc.

344{
345 s_refList.clear();
346}

◆ 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

◆ colorizeCanvas()

void colorizeCanvas ( TCanvas *  canvas,
EStatus  status 
)
inherited

Helper function for Canvas colorization.

Parameters
canvasCanvas to change
statusstatus to color

Definition at line 750 of file DQMHistAnalysis.cc.

751{
752 if (!canvas) return;
753 auto color = getStatusColor(stat);
754
755 canvas->Pad()->SetFillColor(color);
756
757 canvas->Pad()->SetFrameFillColor(10); // White (kWhite is not used since it results in transparent!)
758 canvas->Pad()->SetFrameFillStyle(1001);// White
759 canvas->Pad()->Modified();
760 canvas->Pad()->Update();
761}
EStatusColor getStatusColor(EStatus status)
Return color for canvas state.

◆ 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

◆ endRun()

void endRun ( void  )
finaloverridevirtual

This method is called if the current run ends.

Reimplemented from Module.

Definition at line 1246 of file DQMHistAnalysisSVDGeneral.cc.

1247{
1248 B2DEBUG(10, "DQMHistAnalysisSVDGeneral: endRun called");
1249}

◆ 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  )
finaloverridevirtual

This method is called for each event.

Reimplemented from Module.

Definition at line 310 of file DQMHistAnalysisSVDGeneral.cc.

311{
312 B2DEBUG(10, "DQMHistAnalysisSVDGeneral: event called.");
313
314 //find nEvents
315 TH1* hnEvnts = findHist("SVDExpReco/SVDDQM_nEvents", true);
316 if (hnEvnts == NULL) {
317 B2INFO("no events, nothing to do here");
318 return;
319 } else {
320 B2DEBUG(10, "SVDExpReco/SVDDQM_nEvents found");
321 }
322
323 TH1* rtype = findHist("DQMInfo/rtype");
324 if (rtype)
325 B2DEBUG(10, "DQMInfo/rtype found");
326
327 m_runtype = rtype ? rtype->GetTitle() : "physics"; // per default
328
329 TString tmp = hnEvnts->GetTitle();
330 Int_t pos = tmp.Last('~');
331 if (pos == -1) pos = 0;
332
333 TString runID = tmp(pos, tmp.Length() - pos);
334 B2INFO("DQMHistAnalysisSVDGeneralModule::runID = " << runID);
335 Float_t nEvents = hnEvnts->GetEntries();
336
337 //check DATA FORMAT
338 TH1* h = findHist("SVDUnpacker/DQMUnpackerHisto");
339
340 //test ERROR:
341 // h->SetBinContent(100,0.01);
342
343 if (h != NULL) {
344 h->SetTitle(Form("SVD Data Format Monitor %s", runID.Data()));
345 //check if number of errors is above the allowed limit
346 bool hasError = false;
347 for (int un = 0; un < h->GetNcells(); un++)
348 if (h->GetBinContent(un) / nEvents > m_unpackError)
349 hasError = true;
350 if (! hasError) {
351 m_cUnpacker->cd();
352 h->Draw("colztext");
353 h->SetStats(0);
355 } else {
356 m_cUnpacker->cd();
357 h->Draw("colztext");
358 h->SetStats(0);
359 m_legError->Draw();
361 }
362 if (nEvents > 0)
363 setEpicsPV("UnpackError", h->GetEntries() / nEvents);
364 } else {
365 B2INFO("Histogram SVDUnpacker/DQMUnpackerHisto from SVDUnpackerDQM not found!");
366 m_cUnpacker->cd(1);
368 }
369
370 m_cUnpacker->Modified();
371 m_cUnpacker->Update();
372
373 if (m_printCanvas)
374 m_cUnpacker->Print("c_SVDDataFormat.pdf");
375
376 //occupancy chart
377 TH1F* hChart = (TH1F*)findHist("SVDExpReco/SVDDQM_StripCountsChip");
378
379 if (hChart != NULL) {
380 m_hOccupancyChartChip.Clear();
381 hChart->Copy(m_hOccupancyChartChip);
382 m_hOccupancyChartChip.SetName("SVDOccupancyChart");
383 m_hOccupancyChartChip.SetTitle(Form("SVD OFFLINE Occupancy per chip %s", runID.Data()));
384 m_hOccupancyChartChip.Scale(1 / nEvents / 128);
386 // m_hOccupancyChartChip->SetStats(0);
388 }
389 m_cOccupancyChartChip->Modified();
390 m_cOccupancyChartChip->Update();
391
392 if (m_printCanvas)
393 m_cOccupancyChartChip->Print("c_OccupancyChartChip.pdf");
394
395 // cluster time for clusters of track
396 double ratio3_6 = 0.;
397 TH1* m_h = findHist("SVDClsTrk/SVDTRK_ClusterTimeV456");
398 bool hasError = false;
399 bool lowStat = false;
400
401 if (m_h != NULL) {
404 m_hClusterOnTrackTime_L456V.GetXaxis()->SetRange(110, 190); // [-40 ns,40 ns]
405 Float_t mean_PeakInCenter = m_hClusterOnTrackTime_L456V.GetMean(); //
406 m_hClusterOnTrackTime_L456V.GetXaxis()->SetRange(); // back to [-150 ns,150 ns]
407 m_hClusterOnTrackTime_L456V.SetTitle(Form("ClusterOnTrack Time L456V %s", runID.Data()));
408
409 if (nEvents > m_statThreshold) {
410 if (m_runtype == "physics") {
411 Float_t difference_physics = fabs(mean_PeakInCenter - m_refMeanP);
412 if (difference_physics > m_timeThreshold) {
413 hasError = true;
414 }
415 } else if (m_runtype == "cosmic") {
416 Float_t difference_cosmic = fabs(mean_PeakInCenter - m_refMeanC);
417 if (difference_cosmic > m_timeThreshold) {
418 hasError = true;
419 }
420 } else { // taking cosmic limits
421 B2WARNING("Run type:" << m_runtype << "taken cosmics criteria");
422 Float_t difference_cosmic = fabs(mean_PeakInCenter - m_refMeanC);
423 if (difference_cosmic > m_timeThreshold)
424 hasError = true;
425 }
426 } else {
427 lowStat = true;
428 }
429
430 if (! hasError) {
434 } else {
438 }
439
440 if (lowStat) {
444 }
445
446 } else {
447 B2INFO("Histogram SVDClsTrk/c_SVDTRK_ClusterTimeV456 from SVDDQMClustersOnTrack module not found!");
451 }
452
453 if (hasError)
454 m_legTiProblem->Draw();
455 else if (lowStat)
456 m_legTiEmpty->Draw();
457 else
458 m_legTiNormal->Draw();
459
460
461 m_cClusterOnTrackTime_L456V->Modified();
463
464 if (m_printCanvas)
465 m_cClusterOnTrackTime_L456V->Print("c_SVDClusterOnTrackTime_L456V.pdf");
466
467
468 // cluster time for clusters of track for 3 samples
469 if (m_3Samples) {
470 m_h = findHist("SVDClsTrk/SVDTRK_Cluster3TimeV456");
471 bool hasError3 = false;
472 bool lowStat3 = false;
473
474 if (m_h != NULL) {
477 m_hClusterOnTrackTimeL456V3Samples.GetXaxis()->SetRange(110, 190); // [-40 ns,40 ns]
478 Float_t mean_PeakInCenter = m_hClusterOnTrackTimeL456V3Samples.GetMean(); //
479 m_hClusterOnTrackTimeL456V3Samples.GetXaxis()->SetRange(); // back to [-150 ns,150 ns]
480 m_hClusterOnTrackTimeL456V3Samples.SetTitle(Form("ClusterOnTrack Time L456V 3 samples %s", runID.Data()));
481
482 if (nEvents > m_statThreshold) {
483 if (m_runtype == "physics") {
484 Float_t difference_physics = fabs(mean_PeakInCenter - m_refMeanP);
485 if (difference_physics > m_timeThreshold) {
486 hasError3 = true;
487 }
488 } else if (m_runtype == "cosmic") {
489 Float_t difference_cosmic = fabs(mean_PeakInCenter - m_refMeanC);
490 if (difference_cosmic > m_timeThreshold) {
491 hasError3 = true;
492 }
493 } else {
494 B2WARNING("Run type:" << m_runtype);
495 }
496 } else {
497 lowStat3 = true;
498 }
499 if (! hasError3) {
503 } else {
507 }
508
509 if (lowStat3) {
513 }
514
515 } else {
516 B2INFO("Histogram SVDClsTrk/c_SVDTRK_Cluster3TimeV456 from SVDDQMClustersOnTrack module not found!");
520 }
521
522 if (hasError3)
523 m_legTi3Problem->Draw();
524 else if (lowStat3)
525 m_legTi3Empty->Draw();
526 else
527 m_legTi3Normal->Draw();
528
531
532 if (m_printCanvas)
533 m_cClusterOnTrackTimeL456V3Samples->Print("c_SVDClusterOnTrack3Time_L456V.pdf");
534
535 ratio3_6 = m_hClusterOnTrackTimeL456V3Samples.GetEntries() / m_hClusterOnTrackTime_L456V.GetEntries();
536 }
537
538 setEpicsPV("ratio3_6", ratio3_6);
539
540 //check MODULE OCCUPANCY online & offline
541 //reset canvas color
542 m_occUstatus = 0;
543 m_occVstatus = 0;
546 m_occUGroupId0 = 0;
547 m_occVGroupId0 = 0;
548
551
552 m_occU3Samples = 0;
553 m_occV3Samples = 0;
554
555 //update titles with exp and run number
556
559 m_hOccupancy->setRunID(runID);
560
564
568
569 if (m_3Samples) {
573
577 }
578
579 //set dedicate gStyle
580 const Int_t colNum = 4;
581 Int_t palette[colNum] {kBlack, c_ColorGood, c_ColorWarning, c_ColorError};
582 gStyle->SetPalette(colNum, palette);
583 gStyle->SetOptStat(0);
584 gStyle->SetPaintTextFormat("2.3f");
585
586 TH1F* htmp = NULL;
587
588 for (unsigned int i = 0; i < m_SVDModules.size(); i++) {
589 int tmp_layer = m_SVDModules[i].getLayerNumber();
590 int tmp_ladder = m_SVDModules[i].getLadderNumber();
591 int tmp_sensor = m_SVDModules[i].getSensorNumber();
592
593 //look for U histogram - OFFLINE ZS
594 TString tmpname = Form("SVDExpReco/SVDDQM_%d_%d_%d_StripCountU", tmp_layer, tmp_ladder, tmp_sensor);
595
596 htmp = (TH1F*)findHist(tmpname.Data());
597 if (htmp == NULL) {
598 B2INFO("Occupancy U histogram not found");
599 m_cOccupancyU->Draw();
600 m_cOccupancyU->cd();
601 m_hOccupancy->getHistogram(1)->Draw("text");
603 } else {
604
605 Int_t nStrips = 768;
606
607 Float_t occU = htmp->GetEntries() / nStrips / nEvents * 100;
608 m_hOccupancy->fill(m_SVDModules[i], 1, occU);
609
610 if (occU <= m_occEmpty) {
611 if (m_occUstatus < 1) m_occUstatus = 1;
612 } else if (occU > m_occWarning) {
613 if (occU < m_occError) {
614 if (m_occUstatus < 2) m_occUstatus = 2;
615 } else {
616 if (m_occUstatus < 3) m_occUstatus = 3;
617 }
618 }
619
620 //produce the occupancy plot
621 if (m_additionalPlots) {
622 m_hStripOccupancyU[i].Clear();
623 htmp->Copy(m_hStripOccupancyU[i]);
624 m_hStripOccupancyU[i].Scale(1 / nEvents);
625 m_hStripOccupancyU[i].SetName(Form("%d_%d_%d_OccupancyU", tmp_layer, tmp_ladder, tmp_sensor));
626 m_hStripOccupancyU[i].SetTitle(Form("SVD Sensor %d_%d_%d U-Strip OFFLINE Occupancy vs Strip Number %s", tmp_layer, tmp_ladder,
627 tmp_sensor, runID.Data()));
628 } else {
629 if (i == 0 || i == 1) {
630 m_hStripOccupancyU[i].Clear();
631 htmp->Copy(m_hStripOccupancyU[i]);
632 m_hStripOccupancyU[i].Scale(1 / nEvents);
633 m_hStripOccupancyU[i].SetName(Form("%d_%d_%d_OccupancyU", tmp_layer, tmp_ladder, tmp_sensor));
634 m_hStripOccupancyU[i].SetTitle(Form("SVD Sensor %d_%d_%d U-Strip OFFLINE Occupancy vs Strip Number %s", tmp_layer, tmp_ladder,
635 tmp_sensor, runID.Data()));
636 }
637 }
638 }
639
640 if (m_3Samples) {
641 //look for U histogram - OFFLINE ZS for 3 samples
642 tmpname = Form("SVDExpReco/SVDDQM_%d_%d_%d_Strip3CountU", tmp_layer, tmp_ladder, tmp_sensor);
643
644 htmp = (TH1F*)findHist(tmpname.Data());
645 if (htmp == NULL) {
646 B2INFO("Occupancy U histogram not found for 3 samples");
647 m_cOccupancyU3Samples->Draw();
649 m_hOccupancy3Samples->getHistogram(1)->Draw("text");
651 } else {
652
653 Int_t nStrips = 768;
654
655 Float_t occU = htmp->GetEntries() / nStrips / nEvents * 100;
657
658
659 if (occU <= m_occEmpty) {
660 if (m_occU3Samples < 1) m_occU3Samples = 1;
661 } else if (occU > m_occWarning) {
662 if (occU < m_occError) {
663 if (m_occU3Samples < 2) m_occU3Samples = 2;
664 } else {
665 if (m_occU3Samples < 3) m_occU3Samples = 3;
666 }
667 }
668 }
669 }
670
671 // groupId0 side U
672 TString tmpnameGrpId0 = Form("SVDExpReco/SVDDQM_%d_%d_%d_StripCountGroupId0U", tmp_layer, tmp_ladder, tmp_sensor);
673 htmp = (TH1F*)findHist(tmpnameGrpId0.Data());
674 if (htmp == NULL) {
675 B2INFO("Occupancy U histogram for group Id0 not found");
676 m_cOccupancyUGroupId0->Draw();
678 m_hOccupancyGroupId0->getHistogram(1)->Draw("text");
680 } else {
681
682 Int_t nStrips = 768;
683
684 Float_t occU = htmp->GetEntries() / nStrips / nEvents * 100;
686
687 if (occU <= m_occEmpty) {
688 if (m_occUGroupId0 < 1) m_occUGroupId0 = 1;
689 } else if (occU > m_occWarning) {
690 if (occU < m_occError) {
691 if (m_occUGroupId0 < 2) m_occUGroupId0 = 2;
692 } else {
693 if (m_occUGroupId0 < 3) m_occUGroupId0 = 3;
694 }
695 }
696 }
697
698 //look for V histogram - OFFLINE ZS
699 tmpname = Form("SVDExpReco/SVDDQM_%d_%d_%d_StripCountV", tmp_layer, tmp_ladder, tmp_sensor);
700
701 htmp = (TH1F*)findHist(tmpname.Data());
702 if (htmp == NULL) {
703 B2INFO("Occupancy V histogram not found");
704 m_cOccupancyV->Draw();
705 m_cOccupancyV->cd();
706 m_hOccupancy->getHistogram(0)->Draw("text");
708 } else {
709
710 Int_t nStrips = 768;
711 if (tmp_layer != 3)
712 nStrips = 512;
713
714 Float_t occV = htmp->GetEntries() / nStrips / nEvents * 100;
715 m_hOccupancy->fill(m_SVDModules[i], 0, occV);
716
717 if (occV <= m_occEmpty) {
718 if (m_occVstatus < 1) m_occVstatus = 1;
719 } else if (occV > m_occWarning) {
720 if (occV < m_occError) {
721 if (m_occVstatus < 2) m_occVstatus = 2;
722 } else {
723 if (m_occVstatus < 3) m_occVstatus = 3;
724 }
725 }
726 //produce the occupancy plot
727 if (m_additionalPlots) {
728 m_hStripOccupancyV[i].Clear();
729 htmp->Copy(m_hStripOccupancyV[i]);
730 m_hStripOccupancyV[i].Scale(1 / nEvents);
731 m_hStripOccupancyV[i].SetName(Form("%d_%d_%d_OccupancyV", tmp_layer, tmp_ladder, tmp_sensor));
732 m_hStripOccupancyV[i].SetTitle(Form("SVD Sensor %d_%d_%d V-Strip OFFLINE Occupancy vs Strip Number %s", tmp_layer, tmp_ladder,
733 tmp_sensor, runID.Data()));
734 } else {
735 if (i == 0 || i == 1) {
736 m_hStripOccupancyV[i].Clear();
737 htmp->Copy(m_hStripOccupancyV[i]);
738 m_hStripOccupancyV[i].Scale(1 / nEvents);
739 m_hStripOccupancyV[i].SetName(Form("%d_%d_%d_OccupancyV", tmp_layer, tmp_ladder, tmp_sensor));
740 m_hStripOccupancyV[i].SetTitle(Form("SVD Sensor %d_%d_%d V-Strip OFFLINE Occupancy vs Strip Number %s", tmp_layer, tmp_ladder,
741 tmp_sensor, runID.Data()));
742 }
743 }
744 }
745
746 if (m_3Samples) {
747 //look for V histogram - OFFLINE ZS for 3 samples
748 tmpname = Form("SVDExpReco/SVDDQM_%d_%d_%d_Strip3CountV", tmp_layer, tmp_ladder, tmp_sensor);
749
750 htmp = (TH1F*)findHist(tmpname.Data());
751 if (htmp == NULL) {
752 B2INFO("Occupancy V histogram not found");
753 m_cOccupancyV3Samples->Draw();
755 m_hOccupancy3Samples->getHistogram(0)->Draw("text");
757 } else {
758
759 Int_t nStrips = 768;
760 if (tmp_layer != 3)
761 nStrips = 512;
762
763 Float_t occV = htmp->GetEntries() / nStrips / nEvents * 100;
765
766 if (occV <= m_occEmpty) {
767 if (m_occV3Samples < 1) m_occV3Samples = 1;
768 } else if (occV > m_occWarning) {
769 if (occV < m_occError) {
770 if (m_occV3Samples < 2) m_occV3Samples = 2;
771 } else {
772 if (m_occV3Samples < 3) m_occV3Samples = 3;
773 }
774 }
775 }
776 }
777
778 // groupId0 side V
779 tmpnameGrpId0 = Form("SVDExpReco/SVDDQM_%d_%d_%d_StripCountGroupId0V", tmp_layer, tmp_ladder, tmp_sensor);
780
781 htmp = (TH1F*)findHist(tmpnameGrpId0.Data());
782 if (htmp == NULL) {
783 B2INFO("Occupancy U histogram for group Id0 not found");
784 m_cOccupancyVGroupId0->Draw();
786 m_hOccupancyGroupId0->getHistogram(0)->Draw("text");
788 } else {
789
790 Int_t nStrips = 768;
791 if (tmp_layer != 3)
792 nStrips = 512;
793
794 Float_t occV = htmp->GetEntries() / nStrips / nEvents * 100;
796
797 if (occV <= m_occEmpty) {
798 if (m_occVGroupId0 < 1) m_occVGroupId0 = 1;
799 } else if (occV > m_occWarning) {
800 if (occV < m_occError) {
801 if (m_occVGroupId0 < 2) m_occVGroupId0 = 2;
802 } else {
803 if (m_occVGroupId0 < 3) m_occVGroupId0 = 3;
804 }
805 }
806 }
807
808 //look for V histogram - ONLINE ZS
809 tmpname = Form("SVDExpReco/SVDDQM_%d_%d_%d_OnlineZSStripCountV", tmp_layer, tmp_ladder, tmp_sensor);
810
811 htmp = (TH1F*)findHist(tmpname.Data());
812 if (htmp == NULL) {
813 B2INFO("OnlineOccupancy V histogram not found");
814 m_cOnlineOccupancyV->Draw();
816 m_hOnlineOccupancy->getHistogram(0)->Draw("text");
818 } else {
819
820 Int_t nStrips = 768;
821 if (tmp_layer != 3)
822 nStrips = 512;
823
824 Float_t onlineOccV = htmp->GetEntries() / nStrips / nEvents * 100;
825 m_hOnlineOccupancy->fill(m_SVDModules[i], 0, onlineOccV);
826
827
828 for (int b = 1; b < htmp->GetNbinsX() + 1; b++) {
829 htmp->SetBinContent(b, htmp->GetBinContent(b) / nEvents * 100);
830 }
831 htmp->GetYaxis()->SetTitle("ZS3 ccupancy (%)");
832
833 if (onlineOccV <= m_onlineOccEmpty) {
835 } else if (onlineOccV > m_onlineOccWarning) {
836 if (onlineOccV < m_onlineOccError) {
838 } else {
840 }
841 }
842 }
843
844 if (m_3Samples) {
845 //look for V histogram - ONLINE ZS for 3 samples
846 tmpname = Form("SVDExpReco/SVDDQM_%d_%d_%d_OnlineZSStrip3CountV", tmp_layer, tmp_ladder, tmp_sensor);
847
848 htmp = (TH1F*)findHist(tmpname.Data());
849 if (htmp == NULL) {
850 B2INFO("OnlineOccupancy3 V histogram not found");
855 } else {
856
857 Int_t nStrips = 768;
858 if (tmp_layer != 3)
859 nStrips = 512;
860
861 Float_t onlineOccV = htmp->GetEntries() / nStrips / nEvents * 100;
862 m_hOnlineOccupancy3Samples->fill(m_SVDModules[i], 0, onlineOccV);
863
864 for (int b = 1; b < htmp->GetNbinsX() + 1; b++) {
865 htmp->SetBinContent(b, htmp->GetBinContent(b) / nEvents * 100);
866 }
867 htmp->GetYaxis()->SetTitle("ZS3 ccupancy (%)");
868
869 if (onlineOccV <= m_onlineOccEmpty) {
871 } else if (onlineOccV > m_onlineOccWarning) {
872 if (onlineOccV < m_onlineOccError) {
874 } else {
876 }
877 }
878 }
879 }
880
881
882 //look for U histogram - ONLINE ZS
883 tmpname = Form("SVDExpReco/SVDDQM_%d_%d_%d_OnlineZSStripCountU", tmp_layer, tmp_ladder, tmp_sensor);
884
885 htmp = (TH1F*)findHist(tmpname.Data());
886 if (htmp == NULL) {
887 B2INFO("OnlineOccupancy U histogram not found");
888 m_cOnlineOccupancyU->Draw();
890 m_hOnlineOccupancy->getHistogram(1)->Draw("text");
892 } else {
893
894 Int_t nStrips = 768;
895
896 Float_t onlineOccU = htmp->GetEntries() / nStrips / nEvents * 100;
897 m_hOnlineOccupancy->fill(m_SVDModules[i], 1, onlineOccU);
898
899 for (int b = 1; b < htmp->GetNbinsX() + 1; b++) {
900 htmp->SetBinContent(b, htmp->GetBinContent(b) / nEvents * 100);
901 }
902 htmp->GetYaxis()->SetTitle("ZS3 ccupancy (%)");
903
904 if (onlineOccU <= m_onlineOccEmpty) {
906 } else if (onlineOccU > m_onlineOccWarning) {
907 if (onlineOccU < m_onlineOccError) {
909 } else {
911 }
912 }
913 }
914
915 if (m_3Samples) {
916 //look for U histogram - ONLINE ZS for 3 samples
917 tmpname = Form("SVDExpReco/SVDDQM_%d_%d_%d_OnlineZSStrip3CountU", tmp_layer, tmp_ladder, tmp_sensor);
918
919 htmp = (TH1F*)findHist(tmpname.Data());
920 if (htmp == NULL) {
921 B2INFO("OnlineOccupancy3 U histogram not found");
926 } else {
927
928 Int_t nStrips = 768;
929
930 Float_t onlineOccU = htmp->GetEntries() / nStrips / nEvents * 100;
931 m_hOnlineOccupancy3Samples->fill(m_SVDModules[i], 1, onlineOccU);
932
933 for (int b = 1; b < htmp->GetNbinsX() + 1; b++) {
934 htmp->SetBinContent(b, htmp->GetBinContent(b) / nEvents * 100);
935 }
936 htmp->GetYaxis()->SetTitle("ZS3 ccupancy (%)");
937
938 if (onlineOccU <= m_onlineOccEmpty) {
940 } else if (onlineOccU > m_onlineOccWarning) {
941 if (onlineOccU < m_onlineOccError) {
943 } else {
945 }
946 }
947 }
948 }
949
950 //update sensor occupancy canvas U and V
951 if (m_additionalPlots) {
952 m_cStripOccupancyU[i]->cd();
953 m_hStripOccupancyU[i].Draw("histo");
954 m_cStripOccupancyV[i]->cd();
955 m_hStripOccupancyV[i].Draw("histo");
956 } else {
957 if (i == 0 || i == 1) {
958 m_cStripOccupancyU[i]->cd();
959 m_hStripOccupancyU[i].Draw("histo");
960 m_cStripOccupancyV[i]->cd();
961 m_hStripOccupancyV[i].Draw("histo");
962 }
963 }
964 }
965
966 //update summary offline occupancy U canvas
967 m_cOccupancyU->Draw();
968 m_cOccupancyU->cd();
969 m_hOccupancy->getHistogram(1)->Draw("text");
970
971 if (m_occUstatus == 0) {
973 m_legNormal->Draw();
974 } else {
975 if (m_occUstatus == 3) {
977 m_legProblem->Draw();
978 }
979 if (m_occUstatus == 2) {
981 m_legWarning->Draw();
982 }
983 if (m_occUstatus == 1) {
985 m_legEmpty->Draw();
986 }
987 }
988 m_cOccupancyU->Update();
989 m_cOccupancyU->Modified();
990 m_cOccupancyU->Update();
991
992 if (m_3Samples) {
993 //update summary offline occupancy U canvas for 3 samples
994 m_cOccupancyU3Samples->Draw();
996 m_hOccupancy3Samples->getHistogram(1)->Draw("text");
997
998 if (m_occU3Samples == 0) {
1000 m_legNormal->Draw();
1001 } else {
1002 if (m_occU3Samples == 3) {
1004 m_legProblem->Draw();
1005 }
1006 if (m_occU3Samples == 2) {
1008 m_legWarning->Draw();
1009 }
1010 if (m_occU3Samples == 1) {
1012 m_legEmpty->Draw();
1013 }
1014 }
1015 m_cOccupancyU3Samples->Update();
1016 m_cOccupancyU3Samples->Modified();
1017 m_cOccupancyU3Samples->Update();
1018 }
1019
1020 //update summary offline occupancy U canvas for groupId0
1021 m_cOccupancyUGroupId0->Draw();
1023 m_hOccupancyGroupId0->getHistogram(1)->Draw("text");
1024
1025 if (m_occUGroupId0 == 0) {
1027 m_legNormal->Draw();
1028 } else {
1029 if (m_occUGroupId0 == 3) {
1031 m_legProblem->Draw();
1032 }
1033 if (m_occUGroupId0 == 2) {
1035 m_legWarning->Draw();
1036 }
1037 if (m_occUGroupId0 == 1) {
1039 m_legEmpty->Draw();
1040 }
1041 }
1042 m_cOccupancyUGroupId0->Update();
1043 m_cOccupancyUGroupId0->Modified();
1044 m_cOccupancyUGroupId0->Update();
1045
1046 //update summary offline occupancy V canvas
1047 m_cOccupancyV->Draw();
1048 m_cOccupancyV->cd();
1049 m_hOccupancy->getHistogram(0)->Draw("text");
1050
1051 if (m_occVstatus == 0) {
1053 m_legNormal->Draw();
1054 } else {
1055 if (m_occVstatus == 3) {
1057 m_legProblem->Draw();
1058 }
1059 if (m_occVstatus == 2) {
1061 m_legWarning->Draw();
1062 }
1063 if (m_occVstatus == 1) {
1065 m_legEmpty->Draw();
1066 }
1067 }
1068
1069 m_cOccupancyV->Update();
1070 m_cOccupancyV->Modified();
1071 m_cOccupancyV->Update();
1072
1073 if (m_3Samples) {
1074 //update summary offline occupancy V canvas for 3 samples
1075 m_cOccupancyV3Samples->Draw();
1077 m_hOccupancy3Samples->getHistogram(0)->Draw("text");
1078
1079 if (m_occV3Samples == 0) {
1081 m_legNormal->Draw();
1082 } else {
1083 if (m_occV3Samples == 3) {
1085 m_legProblem->Draw();
1086 }
1087 if (m_occV3Samples == 2) {
1089 m_legWarning->Draw();
1090 }
1091 if (m_occV3Samples == 1) {
1093 m_legEmpty->Draw();
1094 }
1095 }
1096
1097 m_cOccupancyV3Samples->Update();
1098 m_cOccupancyV3Samples->Modified();
1099 m_cOccupancyV3Samples->Update();
1100 }
1101
1102 //update summary offline occupancy V canvas for groupId0
1103 m_cOccupancyVGroupId0->Draw();
1105 m_hOccupancyGroupId0->getHistogram(0)->Draw("text");
1106
1107 if (m_occVGroupId0 == 0) {
1109 m_legNormal->Draw();
1110 } else {
1111 if (m_occVGroupId0 == 3) {
1113 m_legProblem->Draw();
1114 }
1115 if (m_occVGroupId0 == 2) {
1117 m_legWarning->Draw();
1118 }
1119 if (m_occVGroupId0 == 1) {
1121 m_legEmpty->Draw();
1122 }
1123 }
1124 m_cOccupancyVGroupId0->Update();
1125 m_cOccupancyVGroupId0->Modified();
1126 m_cOccupancyVGroupId0->Update();
1127
1128 //update summary online occupancy U canvas
1129 m_cOnlineOccupancyU->Draw();
1130 m_cOnlineOccupancyU->cd();
1131 m_hOnlineOccupancy->getHistogram(1)->Draw("text");
1132
1133 if (m_onlineOccUstatus == 0) {
1135 m_legOnNormal->Draw();
1136 } else {
1137 if (m_onlineOccUstatus == 3) {
1139 m_legOnProblem->Draw();
1140 }
1141 if (m_onlineOccUstatus == 2) {
1143 m_legOnWarning->Draw();
1144 }
1145 if (m_onlineOccUstatus == 1) {
1147 m_legOnEmpty->Draw();
1148 }
1149 }
1150
1151 m_cOnlineOccupancyU->Update();
1152 m_cOnlineOccupancyU->Modified();
1153 m_cOnlineOccupancyU->Update();
1154
1155 //update summary online occupancy V canvas
1156 m_cOnlineOccupancyV->Draw();
1157 m_cOnlineOccupancyV->cd();
1158 m_hOnlineOccupancy->getHistogram(0)->Draw("text");
1159
1160 if (m_onlineOccVstatus == 0) {
1162 m_legOnNormal->Draw();
1163 } else {
1164 if (m_onlineOccVstatus == 3) {
1166 m_legOnProblem->Draw();
1167 }
1168 if (m_onlineOccVstatus == 2) {
1170 m_legOnWarning->Draw();
1171 }
1172 if (m_onlineOccVstatus == 1) {
1174 m_legOnEmpty->Draw();
1175 }
1176 }
1177
1178 m_cOnlineOccupancyV->Update();
1179 m_cOnlineOccupancyV->Modified();
1180 m_cOnlineOccupancyV->Update();
1181
1182 if (m_printCanvas) {
1183 m_cOccupancyU->Print("c_SVDOccupancyU.pdf");
1184 m_cOccupancyV->Print("c_SVDOccupancyV.pdf");
1185 m_cOnlineOccupancyU->Print("c_SVDOnlineOccupancyU.pdf");
1186 m_cOnlineOccupancyV->Print("c_SVDOnlineOccupancyV.pdf");
1187 }
1188
1189 if (m_3Samples) {
1190 //update summary online occupancy U canvas for 3 samples
1193 m_hOnlineOccupancy3Samples->getHistogram(1)->Draw("text");
1194
1195 if (m_onlineOccU3Samples == 0) {
1197 m_legOnNormal->Draw();
1198 } else {
1199 if (m_onlineOccU3Samples == 3) {
1201 m_legOnProblem->Draw();
1202 }
1203 if (m_onlineOccU3Samples == 2) {
1205 m_legOnWarning->Draw();
1206 }
1207 if (m_onlineOccU3Samples == 1) {
1209 m_legOnEmpty->Draw();
1210 }
1211 }
1212
1214 m_cOnlineOccupancyU3Samples->Modified();
1216
1217 //update summary online occupancy V canvas for 3 samples
1220 m_hOnlineOccupancy3Samples->getHistogram(0)->Draw("text");
1221
1222 if (m_onlineOccV3Samples == 0) {
1224 m_legOnNormal->Draw();
1225 } else {
1226 if (m_onlineOccV3Samples == 3) {
1228 m_legOnProblem->Draw();
1229 }
1230 if (m_onlineOccV3Samples == 2) {
1232 m_legOnWarning->Draw();
1233 }
1234 if (m_onlineOccV3Samples == 1) {
1236 m_legOnEmpty->Draw();
1237 }
1238 }
1239
1241 m_cOnlineOccupancyV3Samples->Modified();
1243 }
1244}
static TH1 * findHist(const std::string &histname, bool onlyIfUpdated=false)
Get histogram from list (no other search).
void setEpicsPV(std::string keyname, double value)
Write value to a EPICS PV.
Int_t m_onlineOccV3Samples
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
TPaveText * m_legError
OfflineOccupancy plot legend, error.
TString m_runtype
string with runtype: physics or cosmic
Int_t m_occUstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
std::vector< VxdID > m_SVDModules
IDs of all SVD Modules to iterate over.
SVDSummaryPlots * m_hOccupancy3Samples
occupancy histos for 3 samples
Int_t m_onlineOccUstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
Int_t m_onlineOccVstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
SVDSummaryPlots * m_hOnlineOccupancy3Samples
online occupancy histos for 3 samples
SVDSummaryPlots * m_hOccupancy
occupancy histos
SVDSummaryPlots * m_hOccupancyGroupId0
occupancy histos for cluster time group id=0
TH1F m_hStripOccupancyV[172]
u-side strip chart occupancy histos
Int_t m_occUGroupId0
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
TH1F m_hClusterOnTrackTime_L456V
time for clusters on Track for L456V histo
Int_t m_onlineOccU3Samples
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 sample
SVDSummaryPlots * m_hOnlineOccupancy
online occupancy histos
Int_t m_occVstatus
0 = normal, 1 = empty, 2 = warning, 3 = error
Int_t m_occV3Samples
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
Int_t m_occU3Samples
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
TH1F m_hClusterOnTrackTimeL456V3Samples
time for clusters on Track for L456V histo for 3 samples
Int_t m_occVGroupId0
0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples
TH1F m_hStripOccupancyU[172]
u-side strip chart occupancy histos
void setStats(bool stats=true)
set histograms stat
void fill(int layer, int ladder, int sensor, int view, float value)
fill the histogram for
TH2F * getHistogram(int view)
get a reference to the histogram for
void setRunID(const TString &runID)
set run ids in title
void reset()
Reset histograms.

◆ 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 setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
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

◆ ExtractEvent()

void ExtractEvent ( std::vector< TH1 * > &  hs)
inherited

Extract event processed from daq histogram, called from input module.

Definition at line 377 of file DQMHistAnalysis.cc.

378{
380 for (size_t i = 0; i < hs.size(); i++) {
381 if (hs[i]->GetName() == std::string("DAQ/Nevent")) {
382 s_eventProcessed = hs[i]->GetEntries();
383 return;
384 }
385 }
386 B2ERROR("ExtractEvent: Histogram \"DAQ/Nevent\" missing");
387}
static int s_eventProcessed
Number of Events processed to fill histograms.

◆ ExtractRunType()

void ExtractRunType ( std::vector< TH1 * > &  hs)
inherited

Extract Run Type from histogram title, called from input module.

Definition at line 365 of file DQMHistAnalysis.cc.

366{
367 s_runType = "";
368 for (size_t i = 0; i < hs.size(); i++) {
369 if (hs[i]->GetName() == std::string("DQMInfo/rtype")) {
370 s_runType = hs[i]->GetTitle();
371 return;
372 }
373 }
374 B2ERROR("ExtractRunType: Histogram \"DQMInfo/rtype\" missing");
375}
static std::string s_runType
The Run type.

◆ findBinY()

Int_t findBinY ( Int_t  layer,
Int_t  sensor 
)
private

find Y bin corresponding to sensor, occupancy plot

Definition at line 1294 of file DQMHistAnalysisSVDGeneral.cc.

1295{
1296 if (layer == 3)
1297 return sensor; //2
1298 if (layer == 4)
1299 return 2 + 1 + sensor; //6
1300 if (layer == 5)
1301 return 6 + 1 + sensor; // 11
1302 if (layer == 6)
1303 return 11 + 1 + sensor; // 17
1304 else
1305 return -1;
1306}

◆ findCanvas()

TCanvas * findCanvas ( TString  cname)
inherited

Find canvas by name.

Parameters
cnameName of the canvas
Returns
The pointer to the canvas, or nullptr if not found.

Definition at line 147 of file DQMHistAnalysis.cc.

148{
149 TIter nextkey(gROOT->GetListOfCanvases());
150 TObject* obj{};
151
152 while ((obj = dynamic_cast<TObject*>(nextkey()))) {
153 if (obj->IsA()->InheritsFrom("TCanvas")) {
154 if (obj->GetName() == canvas_name)
155 return dynamic_cast<TCanvas*>(obj);
156 }
157 }
158 return nullptr;
159}

◆ findHist() [1/2]

TH1 * findHist ( const std::string &  dirname,
const std::string &  histname,
bool  onlyIfUpdated = false 
)
staticinherited

Find histogram.

Parameters
dirnameThe name of the directory.
histnameThe name of the histogram.
onlyIfUpdatedreq only updated hists, return nullptr otherwise
Returns
The found histogram, or nullptr if not found.

Definition at line 175 of file DQMHistAnalysis.cc.

176{
177 if (dirname.size() > 0) {
178 return findHist(dirname + "/" + histname, updated);
179 }
180 return findHist(histname, updated);
181}

◆ findHist() [2/2]

TH1 * findHist ( const std::string &  histname,
bool  onlyIfUpdated = false 
)
staticinherited

Get histogram from list (no other search).

Parameters
histnameThe name of the histogram (incl dir).
onlyIfUpdatedreq only updated hists, return nullptr otherwise
Returns
The found histogram, or nullptr if not found.

Definition at line 161 of file DQMHistAnalysis.cc.

162{
163 if (s_histList.find(histname) != s_histList.end()) {
164 if (was_updated && !s_histList[histname].isUpdated()) return nullptr;
165 if (s_histList[histname].getHist()) {
166 return s_histList[histname].getHist();
167 } else {
168 B2ERROR("Histogram " << histname << " in histogram list but nullptr.");
169 }
170 }
171 B2INFO("Histogram " << histname << " not in list.");
172 return nullptr;
173}

◆ findHistInCanvas()

TH1 * findHistInCanvas ( const std::string &  hname,
TCanvas **  canvas = nullptr 
)
inherited

Find histogram in corresponding canvas.

Parameters
hnameName of the histogram (dir+name)
canvasptr to specific canvas ptr or nullptr
Returns
The pointer to the histogram, or nullptr if not found.

Definition at line 229 of file DQMHistAnalysis.cc.

230{
231 TCanvas* cnv = nullptr;
232 // try to get canvas from outside
233 if (cobj) cnv = *cobj;
234 // if no canvas search for it
235 if (cnv == nullptr) {
236 // parse the dir+histo name and create the corresponding canvas name
237 auto s = StringSplit(histo_name, '/');
238 if (s.size() != 2) {
239 B2ERROR("findHistInCanvas: histoname not valid (missing dir?), should be 'dirname/histname': " << histo_name);
240 return nullptr;
241 }
242 auto dirname = s.at(0);
243 auto hname = s.at(1);
244 std::string canvas_name = dirname + "/c_" + hname;
245 cnv = findCanvas(canvas_name);
246 // set canvas pointer for outside
247 if (cnv && cobj) *cobj = cnv;
248 }
249
250 // get histogram pointer
251 if (cnv != nullptr) {
252 TIter nextkey(cnv->GetListOfPrimitives());
253 TObject* obj{};
254 while ((obj = dynamic_cast<TObject*>(nextkey()))) {
255 if (obj->IsA()->InheritsFrom("TH1")) {
256 if (obj->GetName() == histo_name)
257 return dynamic_cast<TH1*>(obj);
258 }
259 }
260 }
261 return nullptr;
262}
TCanvas * findCanvas(TString cname)
Find canvas by name.
std::vector< std::string > StringSplit(const std::string &s, const char delim)
Helper function for string token split.

◆ findHistInFile()

TH1 * findHistInFile ( TFile *  file,
const std::string &  histname 
)
staticinherited

Find histogram in specific TFile (e.g.

ref file).

Parameters
fileThe TFile to search.
histnameThe name of the histogram, can incl directory
Returns
The found histogram, or nullptr if not found.

Definition at line 264 of file DQMHistAnalysis.cc.

265{
266 // find histogram by name in file, histname CAN contain directory!
267 // will return nullptr if file is zeroptr, not found or not correct type
268 if (file && file->IsOpen()) {
269 auto obj = file->Get(histname.data());
270 if (obj != nullptr) {
271 // check class type
272 if (obj->IsA()->InheritsFrom("TH1")) {
273 B2DEBUG(20, "Histogram " << histname << " found in file");
274 return dynamic_cast<TH1*>(obj);
275 } else {
276 B2INFO("Found Object " << histname << " in file is not a histogram");
277 }
278 } else {
279 B2INFO("Histogram " << histname << " not found in file");
280 }
281 }
282 return nullptr;
283}

◆ findMonitoringObject()

MonitoringObject * findMonitoringObject ( const std::string &  objName)
staticinherited

Find MonitoringObject.

Parameters
objNameThe name of the MonitoringObject.
Returns
The found MonitoringObject, or nullptr if not found.

Definition at line 285 of file DQMHistAnalysis.cc.

286{
287 if (s_monObjList.find(objName) != s_monObjList.end()) {
288 return &s_monObjList[objName];
289 }
290 B2INFO("MonitoringObject " << objName << " not in memfile.");
291 return nullptr;
292}
static MonObjList s_monObjList
The list of MonitoringObjects.

◆ findRefHist() [1/2]

TH1 * findRefHist ( const std::string &  dirname,
const std::string &  histname,
ERefScaling  scaling = ERefScaling::c_RefScaleNone,
const TH1 *  hist = nullptr 
)
staticinherited

Find reference histogram.

Parameters
dirnameThe name of the directory.
histnameThe name of the histogram.
scalingenum what scaling to use
histhistogram to scale to
Returns
The found histogram, or nullptr if not found.

Definition at line 220 of file DQMHistAnalysis.cc.

222{
223 if (dirname.size() > 0) {
224 return findRefHist(dirname + "/" + histname, scaling, hist);
225 }
226 return findRefHist(histname, scaling, hist);
227}
static TH1 * findRefHist(const std::string &histname, ERefScaling scaling=ERefScaling::c_RefScaleNone, const TH1 *hist=nullptr)
Get referencehistogram from list (no other search).

◆ findRefHist() [2/2]

TH1 * findRefHist ( const std::string &  histname,
ERefScaling  scaling = ERefScaling::c_RefScaleNone,
const TH1 *  hist = nullptr 
)
staticinherited

Get referencehistogram from list (no other search).

Parameters
histnameThe name of the histogram (incl dir).
scalingenum what scaling to use
histhistogram to scale to
Returns
The found histogram, or nullptr if not found.

Definition at line 209 of file DQMHistAnalysis.cc.

210{
211 if (s_refList.find(histname) != s_refList.end()) {
212 // get a copy of the reference which we can modify
213 // (it is still owned and managed by the framework)
214 // then do the scaling
215 return scaleReference(scaling, hist, s_refList[histname].getReference());
216 }
217 return nullptr;
218}
static TH1 * scaleReference(ERefScaling scaling, const TH1 *hist, TH1 *ref)
Using the original and reference, create scaled version.

◆ 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 }

◆ getCanvasUpdatedList()

static const CanvasUpdatedList & getCanvasUpdatedList ( )
inlinestaticinherited

Get the list of the canvas update status.

Returns
The list of the canvases.

Definition at line 202 of file DQMHistAnalysis.h.

202{ return s_canvasUpdatedList;};

◆ 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

◆ getDelta() [1/2]

TH1 * getDelta ( const std::string &  dirname,
const std::string &  histname,
int  n = 0,
bool  onlyIfUpdated = true 
)
inherited

Get Delta histogram.

Parameters
dirnamedirectory
histnamename of histogram
nindex of delta histogram, 0 is most recent one
onlyIfUpdatedreq only updated deltas, return nullptr otherwise
Returns
delta histogram or nullptr

Definition at line 119 of file DQMHistAnalysis.cc.

120{
121 std::string fullname;
122 if (dirname.size() > 0) {
123 fullname = dirname + "/" + histname;
124 } else {
125 fullname = histname;
126 }
127 return getDelta(fullname, n, onlyIfUpdated);
128}
TH1 * getDelta(const std::string &fullname, int n=0, bool onlyIfUpdated=true)
Get Delta histogram.

◆ getDelta() [2/2]

TH1 * getDelta ( const std::string &  fullname,
int  n = 0,
bool  onlyIfUpdated = true 
)
inherited

Get Delta histogram.

Parameters
fullnamedirectory+name of histogram
nindex of delta histogram, 0 is most recent one
onlyIfUpdatedreq only updated deltas, return nullptr otherwise
Returns
delta histogram or nullptr

Definition at line 130 of file DQMHistAnalysis.cc.

131{
132 auto it = s_deltaList.find(fullname);
133 if (it != s_deltaList.end()) {
134 return it->second.getDelta(n, onlyIfUpdated);
135 }
136 B2WARNING("Delta hist " << fullname << " not found");
137 return nullptr;
138}

◆ getDeltaList()

static const DeltaList & getDeltaList ( )
inlinestaticinherited

Get the list of the delta histograms.

Returns
The list of the delta histograms.

Definition at line 196 of file DQMHistAnalysis.h.

196{ return s_deltaList;};

◆ 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

◆ getEpicsPV() [1/2]

double getEpicsPV ( int  index)
inherited

Read value from a EPICS PV.

Parameters
indexindex of PV
Returns
value or NAN if not existing

Definition at line 530 of file DQMHistAnalysis.cc.

531{
532 double value{NAN};
533 if (!m_useEpics) return value;
534#ifdef _BELLE2_EPICS
535 if (index < 0 || index >= (int)m_epicsChID.size()) {
536 B2ERROR("Epics PV with " << index << " not registered!");
537 return value;
538 }
539 // From EPICS doc. When ca_get or ca_array_get are invoked the returned channel value can't be assumed to be stable
540 // in the application supplied buffer until after ECA_NORMAL is returned from ca_pend_io. If a connection is lost
541 // outstanding get requests are not automatically reissued following reconnect.
542 auto r = ca_get(DBR_DOUBLE, m_epicsChID[index], (void*)&value);
543 if (r == ECA_NORMAL) r = ca_pend_io(5.0); // this is needed!
544 if (r == ECA_NORMAL) {
545 return value;
546 } else {
547 CheckEpicsError(r, "Read PV failed in ca_get or ca_pend_io failure", m_epicsChID[index]);
548 }
549#endif
550 return NAN;
551}
static bool m_useEpics
Flag if to use EPICS do not set by yourself, use EpicsEnable module to set.

◆ getEpicsPV() [2/2]

double getEpicsPV ( std::string  keyname)
inherited

Read value from a EPICS PV.

Parameters
keynamekey name (or full PV name) of PV
Returns
value or NAN if not existing

Definition at line 507 of file DQMHistAnalysis.cc.

508{
509 double value{NAN};
510 if (!m_useEpics) return value;
511#ifdef _BELLE2_EPICS
512 if (m_epicsNameToChID[keyname] == nullptr) {
513 B2ERROR("Epics PV " << keyname << " not registered!");
514 return value;
515 }
516 // From EPICS doc. When ca_get or ca_array_get are invoked the returned channel value can't be assumed to be stable
517 // in the application supplied buffer until after ECA_NORMAL is returned from ca_pend_io. If a connection is lost
518 // outstanding get requests are not automatically reissued following reconnect.
519 auto r = ca_get(DBR_DOUBLE, m_epicsNameToChID[keyname], (void*)&value);
520 if (r == ECA_NORMAL) r = ca_pend_io(5.0); // this is needed!
521 if (r == ECA_NORMAL) {
522 return value;
523 } else {
524 CheckEpicsError(r, "Read PV failed in ca_get or ca_pend_io failure", keyname);
525 }
526#endif
527 return NAN;
528}

◆ getEpicsPVChID() [1/2]

chid getEpicsPVChID ( int  index)
inherited

Get EPICS PV Channel Id.

Parameters
indexindex of PV
Returns
Channel ID is written on success, otherwise nullptr

Definition at line 617 of file DQMHistAnalysis.cc.

618{
619#ifdef _BELLE2_EPICS
620 if (m_useEpics) {
621 if (index >= 0 && index < (int)m_epicsChID.size()) {
622 return m_epicsChID[index];
623 } else {
624 B2ERROR("Epics PV with " << index << " not registered!");
625 }
626 }
627#endif
628 return nullptr;
629}

◆ getEpicsPVChID() [2/2]

chid getEpicsPVChID ( std::string  keyname)
inherited

Get EPICS PV Channel Id.

Parameters
keynamekey name (or full PV name) of PV
Returns
Channel ID is written on success, otherwise nullptr

Definition at line 603 of file DQMHistAnalysis.cc.

604{
605#ifdef _BELLE2_EPICS
606 if (m_useEpics) {
607 if (m_epicsNameToChID[keyname] != nullptr) {
608 return m_epicsNameToChID[keyname];
609 } else {
610 B2ERROR("Epics PV " << keyname << " not registered!");
611 }
612 }
613#endif
614 return nullptr;
615}

◆ getEpicsStringPV() [1/2]

std::string getEpicsStringPV ( int  index,
bool &  status 
)
inherited

Read value from a EPICS PV.

Parameters
indexindex of PV
statusreturn status (true on success)
Returns
string value (empty string if non existing)

Definition at line 578 of file DQMHistAnalysis.cc.

579{
580 status = false;
581 char value[40] = "";
582 if (!m_useEpics) return std::string(value);
583#ifdef _BELLE2_EPICS
584 if (index < 0 || index >= (int)m_epicsChID.size()) {
585 B2ERROR("Epics PV with " << index << " not registered!");
586 return std::string(value);
587 }
588 // From EPICS doc. When ca_get or ca_array_get are invoked the returned channel value can't be assumed to be stable
589 // in the application supplied buffer until after ECA_NORMAL is returned from ca_pend_io. If a connection is lost
590 // outstanding get requests are not automatically reissued following reconnect.
591 auto r = ca_get(DBR_DOUBLE, m_epicsChID[index], value);
592 if (r == ECA_NORMAL) r = ca_pend_io(5.0); // this is needed!
593 if (r == ECA_NORMAL) {
594 status = true;
595 return std::string(value);
596 } else {
597 CheckEpicsError(r, "Read PV (string) failed in ca_get or ca_pend_io failure", m_epicsChID[index]);
598 }
599#endif
600 return std::string(value);
601}

◆ getEpicsStringPV() [2/2]

std::string getEpicsStringPV ( std::string  keyname,
bool &  status 
)
inherited

Read value from a EPICS PV.

Parameters
keynamekey name (or full PV name) of PV
statusreturn status (true on success)
Returns
string value (empty string if non existing)

Definition at line 553 of file DQMHistAnalysis.cc.

554{
555 status = false;
556 char value[40] = "";
557 if (!m_useEpics) return std::string(value);
558#ifdef _BELLE2_EPICS
559 if (m_epicsNameToChID[keyname] == nullptr) {
560 B2ERROR("Epics PV " << keyname << " not registered!");
561 return std::string(value);
562 }
563 // From EPICS doc. When ca_get or ca_array_get are invoked the returned channel value can't be assumed to be stable
564 // in the application supplied buffer until after ECA_NORMAL is returned from ca_pend_io. If a connection is lost
565 // outstanding get requests are not automatically reissued following reconnect.
566 auto r = ca_get(DBR_STRING, m_epicsNameToChID[keyname], value);
567 if (r == ECA_NORMAL) r = ca_pend_io(5.0); // this is needed!
568 if (r == ECA_NORMAL) {
569 status = true;
570 return std::string(value);
571 } else {
572 CheckEpicsError(r, "Read PV (string) failed in ca_get or ca_pend_io failure", keyname);
573 }
574#endif
575 return std::string(value);
576}

◆ getEventProcessed()

static int getEventProcessed ( void  )
inlinestaticinherited

Get the number of processed events.

(Attention, asynch histogram updates!)

Returns
Processed events.

Definition at line 220 of file DQMHistAnalysis.h.

220{ return s_eventProcessed;};

◆ 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 }

◆ getHistList()

static HistList & getHistList ( )
inlinestaticinherited

Get the list of the histograms.

Returns
The list of the histograms.

Definition at line 184 of file DQMHistAnalysis.h.

184{ return s_histList;};

◆ 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>(); }

◆ getMonitoringObject()

MonitoringObject * getMonitoringObject ( const std::string &  name)
staticinherited

Get MonitoringObject with given name (new object is created if non-existing)

Parameters
namename of MonitoringObject to get
Returns
The MonitoringObject

Definition at line 140 of file DQMHistAnalysis.cc.

141{
142 auto obj = &s_monObjList[objName];
143 obj->SetName(objName.c_str());
144 return obj;
145}

◆ getMonObjList()

static MonObjList & getMonObjList ( )
inlinestaticinherited

Get the list of MonitoringObjects.

Returns
The list of the MonitoringObjects.

Definition at line 190 of file DQMHistAnalysis.h.

190{ return s_monObjList;};

◆ 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}

◆ getPVPrefix()

std::string & getPVPrefix ( void  )
inlineinherited

get global Prefix for EPICS PVs

Returns
prefix in use

Definition at line 609 of file DQMHistAnalysis.h.

609{return m_PVPrefix;};
static std::string m_PVPrefix
The Prefix for EPICS PVs.

◆ getRefList()

static RefList & getRefList ( )
inlinestaticinherited

Get the list of the reference histograms.

Returns
The list of the reference histograms.

Definition at line 208 of file DQMHistAnalysis.h.

208{ return s_refList;};

◆ 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; }

◆ getRunType()

static const std::string & getRunType ( void  )
inlinestaticinherited

Get the Run Type.

Returns
Run type string.

Definition at line 214 of file DQMHistAnalysis.h.

214{ return s_runType;};

◆ getSigma68()

double getSigma68 ( TH1 *  h) const
inherited

Helper function to compute half of the central interval covering 68% of a distribution.

This quantity is an alternative to the standard deviation.

Parameters
hhistogram
Returns
Half of the central interval covering 68% of a distribution.

Definition at line 294 of file DQMHistAnalysis.cc.

295{
296 double probs[2] = {0.16, 1 - 0.16};
297 double quant[2] = {0, 0};
298 h->GetQuantiles(2, quant, probs);
299 const double sigma68 = (-quant[0] + quant[1]) / 2;
300 return sigma68;
301}

◆ getStatusColor()

DQMHistAnalysisModule::EStatusColor getStatusColor ( EStatus  status)
inherited

Return color for canvas state.

Parameters
statuscanvas status
Returns
alarm color

Definition at line 723 of file DQMHistAnalysis.cc.

724{
725 // white color is the default, if no colorize
727 switch (stat) {
728 case c_StatusTooFew:
729 color = c_ColorTooFew; // Magenta or Gray
730 break;
731 case c_StatusDefault:
732 color = c_ColorDefault; // default no colors
733 break;
734 case c_StatusGood:
735 color = c_ColorGood; // Good
736 break;
737 case c_StatusWarning:
738 color = c_ColorWarning; // Warning
739 break;
740 case c_StatusError:
741 color = c_ColorError; // Severe
742 break;
743 default:
744 color = c_ColorDefault; // default no colors
745 break;
746 }
747 return color;
748}
EStatusColor
Status colors of histogram/canvas (corresponding to status)

◆ 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

◆ getUseEpics()

bool getUseEpics ( void  )
inlineinherited

Getter for EPICS usage.

Returns
flag is in use

Definition at line 592 of file DQMHistAnalysis.h.

592{return m_useEpics;};

◆ getUseEpicsReadOnly()

bool getUseEpicsReadOnly ( void  )
inlineinherited

Getter EPICS flag in read only mode.

Returns
flag if read only

Definition at line 598 of file DQMHistAnalysis.h.

598{return m_epicsReadOnly;};
static bool m_epicsReadOnly
Flag if to use EPICS in ReadOnly mode (for reading limits) do not set by yourself,...

◆ 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(); };

◆ hasDeltaPar()

bool hasDeltaPar ( const std::string &  dirname,
const std::string &  histname 
)
inherited

Check if Delta histogram parameters exist for histogram.

Parameters
dirnamedirectory
histnamename of histogram
Returns
true if parameters have been set already

Definition at line 108 of file DQMHistAnalysis.cc.

109{
110 std::string fullname;
111 if (dirname.size() > 0) {
112 fullname = dirname + "/" + histname;
113 } else {
114 fullname = histname;
115 }
116 return s_deltaList.find(fullname) != s_deltaList.end(); // contains() if we switch to C++20
117}

◆ 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}

◆ initHistListBeforeEvent()

void initHistListBeforeEvent ( void  )
staticinherited

Reset the list of histograms.

Definition at line 324 of file DQMHistAnalysis.cc.

325{
326 for (auto& it : s_histList) {
327 // attention, we must use reference, otherwise we work on a copy
328 it.second.resetBeforeEvent();
329 }
330 for (auto& it : s_deltaList) {
331 // attention, we must use reference, otherwise we work on a copy
332 it.second.setNotUpdated();
333 }
334
335 s_canvasUpdatedList.clear();
336}

◆ initialize()

void initialize ( void  )
finaloverridevirtual

Initializer.

Reimplemented from Module.

Definition at line 67 of file DQMHistAnalysisSVDGeneral.cc.

68{
69 B2DEBUG(10, "DQMHistAnalysisSVDGeneral: initialized.");
70
71 m_legError = new TPaveText(-1, 54, 3, 57.5);
72 m_legError->AddText("ERROR!!");
73 m_legError->SetFillColor(c_ColorDefault);
74 m_legError->SetTextColor(c_ColorDefault);
75
77
78 //collect the list of all SVD Modules in the geometry here
79 std::vector<VxdID> sensors = geo.getListOfSensors();
80 for (VxdID& aVxdID : sensors) {
81 VXD::SensorInfoBase info = geo.getSensorInfo(aVxdID);
82 // B2INFO("VXD " << aVxdID);
83 if (info.getType() != VXD::SensorInfoBase::SVD) continue;
84 m_SVDModules.push_back(aVxdID); // reorder, sort would be better
85 }
86 std::sort(m_SVDModules.begin(), m_SVDModules.end()); // back to natural order
87
88 //occupancy chart chip
89 m_cOccupancyChartChip = new TCanvas("SVDOccupancy/c_OccupancyChartChip");
90
91 //strip occupancy per sensor
93 m_sensors = m_SVDModules.size();
94 else
95 m_sensors = 2;
96
97 m_cStripOccupancyU = new TCanvas*[m_sensors];
98 m_cStripOccupancyV = new TCanvas*[m_sensors];
99 for (int i = 0; i < m_sensors; i++) {
100 int tmp_layer = m_SVDModules[i].getLayerNumber();
101 int tmp_ladder = m_SVDModules[i].getLadderNumber();
102 int tmp_sensor = m_SVDModules[i].getSensorNumber();
103 m_cStripOccupancyU[i] = new TCanvas(Form("SVDOccupancy/c_StripOccupancyU_%d_%d_%d", tmp_layer, tmp_ladder, tmp_sensor));
104 m_cStripOccupancyV[i] = new TCanvas(Form("SVDOccupancy/c_StripOccupancyV_%d_%d_%d", tmp_layer, tmp_ladder, tmp_sensor));
105 }
106
107 gROOT->cd();
108 m_cUnpacker = new TCanvas("SVDAnalysis/c_SVDDataFormat");
109 m_cUnpacker->SetGrid(1);
110 m_cOccupancyU = new TCanvas("SVDAnalysis/c_SVDOccupancyU");
111 m_cOccupancyV = new TCanvas("SVDAnalysis/c_SVDOccupancyV");
112
113 m_cOnlineOccupancyU = new TCanvas("SVDAnalysis/c_SVDOnlineOccupancyU");
114 m_cOnlineOccupancyV = new TCanvas("SVDAnalysis/c_SVDOnlineOccupancyV");
115
116 m_cClusterOnTrackTime_L456V = new TCanvas("SVDAnalysis/c_ClusterOnTrackTime_L456V");
117
118 if (m_3Samples) {
119 m_cOccupancyU3Samples = new TCanvas("SVDAnalysis/c_SVDOccupancyU3Samples");
120 // m_cOccupancyU->SetGrid(1);
121 m_cOccupancyV3Samples = new TCanvas("SVDAnalysis/c_SVDOccupancyV3Samples");
122 // m_cOccupancyV->SetGrid(1);
123
124 m_cOnlineOccupancyU3Samples = new TCanvas("SVDAnalysis/c_SVDOnlineOccupancyU3Samples");
125 // m_cOnlineOccupancyU->SetGrid(1);
126 m_cOnlineOccupancyV3Samples = new TCanvas("SVDAnalysis/c_SVDOnlineOccupancyV3Samples");
127 // m_cOnlineOccupancyV->SetGrid(1);
128 m_cClusterOnTrackTimeL456V3Samples = new TCanvas("SVDAnalysis/c_ClusterOnTrackTime_L456V3Samples");
129 }
130
131 m_cOccupancyUGroupId0 = new TCanvas("SVDAnalysis/c_SVDOccupancyUGroupId0");
132 m_cOccupancyVGroupId0 = new TCanvas("SVDAnalysis/c_SVDOccupancyVGroupId0");
133
134 m_hOccupancy = new SVDSummaryPlots("hOccupancy@view", "Average OFFLINE Sensor Occupancy (%), @view/@side Side");
136
137 m_hOnlineOccupancy = new SVDSummaryPlots("hOnlineOccupancy@view", "Average ONLINE Sensor Occupancy (%), @view/@side Side");
139
140 m_hOccupancyGroupId0 = new SVDSummaryPlots("hOccupancyGroupId0@view",
141 "Average OFFLINE Sensor Occupancy (%), @view/@side Side for cluster time group Id = 0");
143
144 if (m_3Samples) {
145 m_hOccupancy3Samples = new SVDSummaryPlots("hOccupancy3@view",
146 "Average OFFLINE Sensor Occupancy (%), @view/@side Side for 3 samples");
148
149 m_hOnlineOccupancy3Samples = new SVDSummaryPlots("hOnlineOccupancy3@view",
150 "Average ONLINE Sensor Occupancy (%), @view/@side Side for 3 samples");
152 }
153
154
155 //register limits for EPICS
156 registerEpicsPV(m_pvPrefix + "ratio3_6", "ratio3_6");
157 registerEpicsPV(m_pvPrefix + "UnpackError", "UnpackError");
158 registerEpicsPV(m_pvPrefix + "occupancyLimits", "occLimits");
159 registerEpicsPV(m_pvPrefix + "occupancyOnlineLimits", "occOnlineLimits");
160 registerEpicsPV(m_pvPrefix + "clusterTimeOnTrackLimits", "clusTimeOnTrkLimits");
161}
int registerEpicsPV(std::string pvname, std::string keyname="")
EPICS related Functions.
class to summarize SVD quantities per sensor and side
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
Definition: GeoCache.h:39
const std::vector< VxdID > getListOfSensors() const
Get list of all sensors.
Definition: GeoCache.cc:59
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:67
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
Base class to provide Sensor Information for PXD and SVD.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33

◆ makeStatus()

DQMHistAnalysisModule::EStatus makeStatus ( bool  enough,
bool  warn_flag,
bool  error_flag 
)
inherited

Helper function to judge the status for coloring and EPICS.

Parameters
enoughenough events for judging
warn_flagoutside of expected range
error_flagoutside of warning range
Returns
the status

Definition at line 705 of file DQMHistAnalysis.cc.

706{
707 // white color is the default, if no colorize
708 if (!enough) {
709 return (c_StatusTooFew);
710 } else {
711 if (error_flag) {
712 return (c_StatusError);
713 } else if (warn_flag) {
714 return (c_StatusWarning);
715 } else {
716 return (c_StatusGood);
717 }
718 }
719
720 return (c_StatusDefault); // default, but should not be reached
721}

◆ printPVStatus()

void printPVStatus ( chid  pv,
bool  onlyError = true 
)
inherited

check the status of a PVs and report if disconnected or not found

Parameters
pvthe chid of the PV to check
onlyErrorprint only if in error condition (default)

Definition at line 773 of file DQMHistAnalysis.cc.

774{
775 if (pv == nullptr) {
776 B2WARNING("PV chid was nullptr");
777 return;
778 }
779 auto state = ca_state(pv);
780 switch (state) {
781 case cs_never_conn: /* valid chid, server not found or unavailable */
782 B2WARNING("Channel never connected " << ca_name(pv));
783 break;
784 case cs_prev_conn: /* valid chid, previously connected to server */
785 B2WARNING("Channel was connected, but now is not " << ca_name(pv));
786 break;
787 case cs_closed: /* channel deleted by user */
788 B2WARNING("Channel deleted already " << ca_name(pv));
789 break;
790 case cs_conn: /* valid chid, connected to server */
791 if (!onlyError) B2INFO("Channel connected and OK " << ca_name(pv));
792 break;
793 default:
794 B2WARNING("Undefined status for channel " << ca_name(pv));
795 break;
796 }
797}

◆ registerEpicsPV()

int registerEpicsPV ( std::string  pvname,
std::string  keyname = "" 
)
inherited

EPICS related Functions.

Register a PV with its name and a key name

Parameters
pvnamefull PV name
keynamekey name for easier access
Returns
an index which can be used to access the PV instead of key name, -1 if failure

Definition at line 389 of file DQMHistAnalysis.cc.

390{
391 return registerEpicsPVwithPrefix(m_PVPrefix, pvname, keyname);
392}
int registerEpicsPVwithPrefix(std::string prefix, std::string pvname, std::string keyname="")
Register a PV with its name and a key name.

◆ registerEpicsPVwithPrefix()

int registerEpicsPVwithPrefix ( std::string  prefix,
std::string  pvname,
std::string  keyname = "" 
)
privateinherited

Register a PV with its name and a key name.

Parameters
prefixprefix to PV name
pvnamefull PV name without prefix
keynamekey name for easier access
Returns
an index which can be used to access the PV instead of key name, -1 if failure

Definition at line 399 of file DQMHistAnalysis.cc.

400{
401 if (!m_useEpics) return -1;
402#ifdef _BELLE2_EPICS
403 if (m_epicsNameToChID[pvname] != nullptr) {
404 B2ERROR("Epics PV " << pvname << " already registered!");
405 return -1;
406 }
407 if (keyname != "" && m_epicsNameToChID[keyname] != nullptr) {
408 B2ERROR("Epics PV with key " << keyname << " already registered!");
409 return -1;
410 }
411
412 m_epicsChID.emplace_back();
413 auto ptr = &m_epicsChID.back();
414 if (!ca_current_context()) SEVCHK(ca_context_create(ca_disable_preemptive_callback), "ca_context_create");
415 // the subscribed name includes the prefix, the map below does *not*
416 CheckEpicsError(ca_create_channel((prefix + pvname).data(), NULL, NULL, 10, ptr), "ca_create_channel failure", pvname);
417
418 m_epicsNameToChID[pvname] = *ptr;
419 if (keyname != "") m_epicsNameToChID[keyname] = *ptr;
420 return m_epicsChID.size() - 1; // return index to last added item
421#else
422 return -1;
423#endif
424}

◆ registerExternalEpicsPV()

int registerExternalEpicsPV ( std::string  pvname,
std::string  keyname = "" 
)
inherited

Register a PV with its name and a key name.

Parameters
pvnamefull PV name
keynamekey name for easier access
Returns
an index which can be used to access the PV instead of key name, -1 if failure

Definition at line 394 of file DQMHistAnalysis.cc.

395{
396 return registerEpicsPVwithPrefix(std::string(""), pvname, keyname);
397}

◆ requestLimitsFromEpicsPVs() [1/3]

bool requestLimitsFromEpicsPVs ( chid  id,
double &  lowerAlarm,
double &  lowerWarn,
double &  upperWarn,
double &  upperAlarm 
)
inherited

Get Alarm Limits from EPICS PV.

Parameters
idChannel ID
&lowerAlarmreturn low Alarm limit (lolo) if set, not changed otherwise
&lowerWarnreturn low Warning limit (low) if set, not changed otherwise
&upperWarnreturn upper Warning limit (high) if set, not changed otherwise
&upperAlarmreturn upper Alarm limit (hihi) if set, not changed otherwise
Returns
true if limits could be read (even if there are none set)

Definition at line 670 of file DQMHistAnalysis.cc.

672{
673 // get warn and error limit only if pv exists
674 // overwrite only if limit is defined (not NaN)
675 // user should initialize with NaN before calling, unless
676 // some "default" values should be set otherwise
677 if (pv != nullptr) {
678 struct dbr_ctrl_double tPvData;
679 // From EPICS doc. When ca_get or ca_array_get are invoked the returned channel value can't be assumed to be stable
680 // in the application supplied buffer until after ECA_NORMAL is returned from ca_pend_io. If a connection is lost
681 // outstanding get requests are not automatically reissued following reconnect.
682 auto r = ca_get(DBR_CTRL_DOUBLE, pv, &tPvData);
683 if (r == ECA_NORMAL) r = ca_pend_io(5.0); // this is needed!
684 if (r == ECA_NORMAL) {
685 if (!std::isnan(tPvData.lower_alarm_limit)) {
686 lowerAlarm = tPvData.lower_alarm_limit;
687 }
688 if (!std::isnan(tPvData.lower_warning_limit)) {
689 lowerWarn = tPvData.lower_warning_limit;
690 }
691 if (!std::isnan(tPvData.upper_warning_limit)) {
692 upperWarn = tPvData.upper_warning_limit;
693 }
694 if (!std::isnan(tPvData.upper_alarm_limit)) {
695 upperAlarm = tPvData.upper_alarm_limit;
696 }
697 return true;
698 } else {
699 CheckEpicsError(r, "Reading PV Limits failed in ca_get or ca_pend_io failure", pv);
700 }
701 }
702 return false;
703}

◆ requestLimitsFromEpicsPVs() [2/3]

bool requestLimitsFromEpicsPVs ( int  index,
double &  lowerAlarm,
double &  lowerWarn,
double &  upperWarn,
double &  upperAlarm 
)
inherited

Get Alarm Limits from EPICS PV.

Parameters
indexindex of PV
&lowerAlarmreturn low Alarm limit (lolo) if set, not changed otherwise
&lowerWarnreturn low Warning limit (low) if set, not changed otherwise
&upperWarnreturn upper Warning limit (high) if set, not changed otherwise
&upperAlarmreturn upper Alarm limit (hihi) if set, not changed otherwise
Returns
true if limits could be read (even if there are none set)

Definition at line 664 of file DQMHistAnalysis.cc.

666{
667 return requestLimitsFromEpicsPVs(getEpicsPVChID(index), lowerAlarm, lowerWarn, upperWarn, upperAlarm);
668}
chid getEpicsPVChID(std::string keyname)
Get EPICS PV Channel Id.

◆ requestLimitsFromEpicsPVs() [3/3]

bool requestLimitsFromEpicsPVs ( std::string  keyname,
double &  lowerAlarm,
double &  lowerWarn,
double &  upperWarn,
double &  upperAlarm 
)
inherited

Get Alarm Limits from EPICS PV.

Parameters
keynamekey name (or full PV name) of PV
&lowerAlarmreturn low Alarm limit (lolo) if set, not changed otherwise
&lowerWarnreturn low Warning limit (low) if set, not changed otherwise
&upperWarnreturn upper Warning limit (high) if set, not changed otherwise
&upperAlarmreturn upper Alarm limit (hihi) if set, not changed otherwise
Returns
true if limits could be read (even if there are none set)

Definition at line 658 of file DQMHistAnalysis.cc.

660{
661 return requestLimitsFromEpicsPVs(getEpicsPVChID(name), lowerAlarm, lowerWarn, upperWarn, upperAlarm);
662}

◆ resetDeltaList()

void resetDeltaList ( void  )
inherited

Reset Delta.

Definition at line 348 of file DQMHistAnalysis.cc.

349{
350 for (auto& d : s_deltaList) {
351 d.second.reset();
352 }
353}

◆ scaleReference()

TH1 * scaleReference ( ERefScaling  scaling,
const TH1 *  hist,
TH1 *  ref 
)
staticinherited

Using the original and reference, create scaled version.

Parameters
scalingscaling algorithm
histpointer to histogram
refpointer to reference
Returns
scaled reference

Definition at line 183 of file DQMHistAnalysis.cc.

184{
185 // if hist/ref is nullptr, nothing to do
186 if (!hist || !ref)
187 return ref;
188
189 switch (scaling) {
190 // default: do nothing
191 case ERefScaling::c_RefScaleNone: //do nothing
192 break;
193 case ERefScaling::c_RefScaleEntries: // Integral
194 // only if we have entries in reference
195 if (hist->Integral() != 0 and ref->Integral() != 0) {
196 ref->Scale(hist->Integral() / ref->Integral());
197 }
198 break;
199 case ERefScaling::c_RefScaleMax: // Maximum
200 // only if we have entries in reference
201 if (hist->GetMaximum() != 0 and ref->GetMaximum() != 0) {
202 ref->Scale(hist->GetMaximum() / ref->GetMaximum());
203 }
204 break;
205 }
206 return ref;
207}

◆ 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}

◆ setEpicsPV() [1/4]

void setEpicsPV ( int  index,
double  value 
)
inherited

Write value to a EPICS PV.

Parameters
indexindex of PV
valuevalue to write

Definition at line 468 of file DQMHistAnalysis.cc.

469{
470 if (!m_useEpics || m_epicsReadOnly) return;
471#ifdef _BELLE2_EPICS
472 if (index < 0 || index >= (int)m_epicsChID.size()) {
473 B2ERROR("Epics PV with " << index << " not registered!");
474 return;
475 }
476 CheckEpicsError(ca_put(DBR_DOUBLE, m_epicsChID[index], (void*)&value), "ca_set failure", m_epicsChID[index]);
477#endif
478}

◆ setEpicsPV() [2/4]

void setEpicsPV ( int  index,
int  value 
)
inherited

Write value to a EPICS PV.

Parameters
indexindex of PV
valuevalue to write

Definition at line 480 of file DQMHistAnalysis.cc.

481{
482 if (!m_useEpics || m_epicsReadOnly) return;
483#ifdef _BELLE2_EPICS
484 if (index < 0 || index >= (int)m_epicsChID.size()) {
485 B2ERROR("Epics PV with " << index << " not registered!");
486 return;
487 }
488 CheckEpicsError(ca_put(DBR_SHORT, m_epicsChID[index], (void*)&value), "ca_set failure", m_epicsChID[index]);
489#endif
490}

◆ setEpicsPV() [3/4]

void setEpicsPV ( std::string  keyname,
double  value 
)
inherited

Write value to a EPICS PV.

Parameters
keynamekey name (or full PV name) of PV
valuevalue to write

Definition at line 426 of file DQMHistAnalysis.cc.

427{
428 if (!m_useEpics || m_epicsReadOnly) return;
429#ifdef _BELLE2_EPICS
430 if (m_epicsNameToChID[keyname] == nullptr) {
431 B2ERROR("Epics PV " << keyname << " not registered!");
432 return;
433 }
434 CheckEpicsError(ca_put(DBR_DOUBLE, m_epicsNameToChID[keyname], (void*)&value), "ca_set failure", keyname);
435#endif
436}

◆ setEpicsPV() [4/4]

void setEpicsPV ( std::string  keyname,
int  value 
)
inherited

Write value to a EPICS PV.

Parameters
keynamekey name (or full PV name) of PV
valuevalue to write

Definition at line 438 of file DQMHistAnalysis.cc.

439{
440 if (!m_useEpics || m_epicsReadOnly) return;
441#ifdef _BELLE2_EPICS
442 if (m_epicsNameToChID[keyname] == nullptr) {
443 B2ERROR("Epics PV " << keyname << " not registered!");
444 return;
445 }
446 CheckEpicsError(ca_put(DBR_SHORT, m_epicsNameToChID[keyname], (void*)&value), "ca_set failure", keyname);
447#endif
448}

◆ setEpicsStringPV() [1/2]

void setEpicsStringPV ( int  index,
std::string  value 
)
inherited

Write string to a EPICS PV.

Parameters
indexindex of PV
valuestring to write

Definition at line 492 of file DQMHistAnalysis.cc.

493{
494 if (!m_useEpics || m_epicsReadOnly) return;
495#ifdef _BELLE2_EPICS
496 if (index < 0 || index >= (int)m_epicsChID.size()) {
497 B2ERROR("Epics PV with " << index << " not registered!");
498 return;
499 }
500 char text[41];
501 strncpy(text, value.c_str(), 40);
502 text[40] = 0;
503 CheckEpicsError(ca_put(DBR_STRING, m_epicsChID[index], text), "ca_set failure", m_epicsChID[index]);
504#endif
505}

◆ setEpicsStringPV() [2/2]

void setEpicsStringPV ( std::string  keyname,
std::string  value 
)
inherited

Write string to a EPICS PV.

Parameters
keynamekey name (or full PV name) of PV
valuestring to write

Definition at line 450 of file DQMHistAnalysis.cc.

451{
452 if (!m_useEpics || m_epicsReadOnly) return;
453#ifdef _BELLE2_EPICS
454 if (m_epicsNameToChID[keyname] == nullptr) {
455 B2ERROR("Epics PV " << keyname << " not registered!");
456 return;
457 }
458 if (value.length() > 40) {
459 B2ERROR("Epics string PV " << keyname << " too long (>40 characters)!");
460 return;
461 }
462 char text[40];
463 strcpy(text, value.c_str());
464 CheckEpicsError(ca_put(DBR_STRING, m_epicsNameToChID[keyname], text), "ca_set failure", keyname);
465#endif
466}

◆ setEventProcessed()

void setEventProcessed ( int  e)
inlineinherited

Set the number of processed events.

(Attention, asynch histogram updates!)

e Processed events.

Definition at line 232 of file DQMHistAnalysis.h.

232{s_eventProcessed = e;};

◆ 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}

◆ setPVPrefix()

void setPVPrefix ( std::string &  prefix)
inlineinherited

set global Prefix for EPICS PVs

Parameters
prefixPrefix to set

Definition at line 615 of file DQMHistAnalysis.h.

615{ m_PVPrefix = prefix;};

◆ 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}

◆ setRunType()

void setRunType ( std::string &  t)
inlineinherited

Set the Run Type.

t Run type string.

Definition at line 226 of file DQMHistAnalysis.h.

226{s_runType = t;};

◆ 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}

◆ setUseEpics()

void setUseEpics ( bool  flag)
inlineinherited

Setter for EPICS usage.

Parameters
flagset in use

Definition at line 580 of file DQMHistAnalysis.h.

580{m_useEpics = flag;};

◆ setUseEpicsReadOnly()

void setUseEpicsReadOnly ( bool  flag)
inlineinherited

Setter EPICS flag in read only mode.

Parameters
flagset read only

Definition at line 586 of file DQMHistAnalysis.h.

586{m_epicsReadOnly = flag;};

◆ StringSplit()

std::vector< std::string > StringSplit ( const std::string &  s,
const char  delim 
)
inherited

Helper function for string token split.

Parameters
sString to split
delimdelimiter
Returns
vector of strings

Definition at line 303 of file DQMHistAnalysis.cc.

304{
305 std::vector <std::string> out;
306 boost::split(out, in, [delim](char c) {return c == delim;});
307 return out;
308}

◆ terminate()

void terminate ( void  )
finaloverridevirtual

This method is called at the end of the event processing.

Reimplemented from Module.

Definition at line 1252 of file DQMHistAnalysisSVDGeneral.cc.

1253{
1254 B2DEBUG(10, "DQMHistAnalysisSVDGeneral: terminate called");
1255
1256 delete m_refFile;
1257 delete m_legProblem;
1258 delete m_legWarning;
1259 delete m_legNormal;
1260 delete m_legEmpty;
1261 delete m_legError;
1262 delete m_legOnProblem;
1263 delete m_legOnWarning;
1264 delete m_legOnNormal;
1265 delete m_legOnEmpty;
1266 delete m_legOnError;
1267
1268 delete m_cUnpacker;
1269
1270 delete m_cOccupancyU;
1271 delete m_cOccupancyV;
1272
1273 delete m_hOccupancy;
1274 delete m_hOnlineOccupancy;
1275 delete m_hOccupancyGroupId0;
1276 delete m_hOccupancy3Samples;
1278
1279 delete m_cOnlineOccupancyU;
1280 delete m_cOnlineOccupancyV;
1281
1282 delete m_cOccupancyChartChip;
1283
1284 for (int module = 0; module < m_sensors; module++) {
1285 delete m_cStripOccupancyU[module];
1286 delete m_cStripOccupancyV[module];
1287 }
1288 delete m_cStripOccupancyU;
1289 delete m_cStripOccupancyV;
1290
1292}
TPaveText * m_legOnError
onlineOccupancy plot legend, error
TFile * m_refFile
The pointer to the reference file.

◆ UpdateCanvas() [1/2]

void UpdateCanvas ( std::string  name,
bool  updated = true 
)
inherited

Mark canvas as updated (or not)

Parameters
namename of Canvas
updatedwas updated

Definition at line 355 of file DQMHistAnalysis.cc.

356{
357 s_canvasUpdatedList[name] = updated;
358}

◆ UpdateCanvas() [2/2]

void UpdateCanvas ( TCanvas *  canvas,
bool  updated = true 
)
inherited

Mark canvas as updated (or not)

Parameters
canvasCanvas from which to take the name for update
updatedwas updated

Definition at line 360 of file DQMHistAnalysis.cc.

361{
362 if (c) UpdateCanvas(c->GetName(), updated);
363}
void UpdateCanvas(std::string name, bool updated=true)
Mark canvas as updated (or not)

◆ updateEpicsPVs()

int updateEpicsPVs ( float  timeout)
inherited

Update all EPICS PV (flush to network)

Parameters
timeoutmaximum time until timeout in s
Returns
status of ca_pend_io

Definition at line 631 of file DQMHistAnalysis.cc.

632{
633 int state = ECA_NORMAL;
634 if (!m_useEpics) return state;
635#ifdef _BELLE2_EPICS
636 if (wait > 0.) {
637 state = ca_pend_io(wait);
638 SEVCHK(state, "ca_pend_io failure");
639 }
640#endif
641 return state;
642}

Member Data Documentation

◆ m_3Samples

bool m_3Samples
private

if true enable 3 samples histograms analysis

Definition at line 76 of file DQMHistAnalysisSVDGeneral.h.

◆ m_additionalPlots

bool m_additionalPlots = false
private

additional plots flag

Definition at line 115 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cClusterOnTrackTime_L456V

TCanvas* m_cClusterOnTrackTime_L456V = nullptr
private

time for clusters on Track for L456V canvas

Definition at line 132 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cClusterOnTrackTimeL456V3Samples

TCanvas* m_cClusterOnTrackTimeL456V3Samples = nullptr
private

time for clusters on Track for L456V canvas for 3 sampples

Definition at line 135 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cOccupancyChartChip

TCanvas* m_cOccupancyChartChip = nullptr
private

occupancy chart histo canvas

Definition at line 118 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cOccupancyU

TCanvas* m_cOccupancyU = nullptr
private

occupancy U histo canvas

Definition at line 106 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cOccupancyU3Samples

TCanvas* m_cOccupancyU3Samples = nullptr
private

occupancy U histo canvas for 3 samples

Definition at line 107 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cOccupancyUGroupId0

TCanvas* m_cOccupancyUGroupId0 = nullptr
private

occupancy U histo canvas for cluster time group Id = 0

Definition at line 108 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cOccupancyV

TCanvas* m_cOccupancyV = nullptr
private

occupancy V histo canvas

Definition at line 110 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cOccupancyV3Samples

TCanvas* m_cOccupancyV3Samples = nullptr
private

occupancy V histo canvas for 3 samples

Definition at line 111 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cOccupancyVGroupId0

TCanvas* m_cOccupancyVGroupId0 = nullptr
private

occupancy V histo canvas for cluster time group Id = 0

Definition at line 112 of file DQMHistAnalysisSVDGeneral.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_cOnlineOccupancyU

TCanvas* m_cOnlineOccupancyU = nullptr
private

online occupancy U histo canvas

Definition at line 120 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cOnlineOccupancyU3Samples

TCanvas* m_cOnlineOccupancyU3Samples = nullptr
private

online occupancy U histo canvas for 3 samples

Definition at line 121 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cOnlineOccupancyV

TCanvas* m_cOnlineOccupancyV = nullptr
private

online Occupancy V histo canvas

Definition at line 122 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cOnlineOccupancyV3Samples

TCanvas* m_cOnlineOccupancyV3Samples = nullptr
private

online Occupancy V histo canvas for 3 samples

Definition at line 123 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cStripOccupancyU

TCanvas** m_cStripOccupancyU = nullptr
private

u-side strip chart occupancy canvas

Definition at line 127 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cStripOccupancyV

TCanvas** m_cStripOccupancyV = nullptr
private

u-side strip chart occupancy canvas

Definition at line 129 of file DQMHistAnalysisSVDGeneral.h.

◆ m_cUnpacker

TCanvas* m_cUnpacker = nullptr
private

unpacker plot canvas

Definition at line 98 of file DQMHistAnalysisSVDGeneral.h.

◆ m_description

std::string m_description
privateinherited

The description of the module.

Definition at line 511 of file Module.h.

◆ m_epicsReadOnly

bool m_epicsReadOnly
staticprivateinherited
Initial value:
=
false

Flag if to use EPICS in ReadOnly mode (for reading limits) do not set by yourself, use EpicsEnable module to set.

Definition at line 155 of file DQMHistAnalysis.h.

◆ m_hasReturnValue

bool m_hasReturnValue
privateinherited

True, if the return value is set.

Definition at line 518 of file Module.h.

◆ m_hClusterOnTrackTime_L456V

TH1F m_hClusterOnTrackTime_L456V
private

time for clusters on Track for L456V histo

Definition at line 131 of file DQMHistAnalysisSVDGeneral.h.

◆ m_hClusterOnTrackTimeL456V3Samples

TH1F m_hClusterOnTrackTimeL456V3Samples
private

time for clusters on Track for L456V histo for 3 samples

Definition at line 134 of file DQMHistAnalysisSVDGeneral.h.

◆ m_hOccupancy

SVDSummaryPlots* m_hOccupancy = nullptr
private

occupancy histos

Definition at line 100 of file DQMHistAnalysisSVDGeneral.h.

◆ m_hOccupancy3Samples

SVDSummaryPlots* m_hOccupancy3Samples = nullptr
private

occupancy histos for 3 samples

Definition at line 103 of file DQMHistAnalysisSVDGeneral.h.

◆ m_hOccupancyChartChip

TH1F m_hOccupancyChartChip
private

occupancy chart histo

Definition at line 117 of file DQMHistAnalysisSVDGeneral.h.

◆ m_hOccupancyGroupId0

SVDSummaryPlots* m_hOccupancyGroupId0 = nullptr
private

occupancy histos for cluster time group id=0

Definition at line 102 of file DQMHistAnalysisSVDGeneral.h.

◆ m_hOnlineOccupancy

SVDSummaryPlots* m_hOnlineOccupancy = nullptr
private

online occupancy histos

Definition at line 101 of file DQMHistAnalysisSVDGeneral.h.

◆ m_hOnlineOccupancy3Samples

SVDSummaryPlots* m_hOnlineOccupancy3Samples = nullptr
private

online occupancy histos for 3 samples

Definition at line 104 of file DQMHistAnalysisSVDGeneral.h.

◆ m_hStripOccupancyU

TH1F m_hStripOccupancyU[172]
private

u-side strip chart occupancy histos

Definition at line 126 of file DQMHistAnalysisSVDGeneral.h.

◆ m_hStripOccupancyV

TH1F m_hStripOccupancyV[172]
private

u-side strip chart occupancy histos

Definition at line 128 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legEmpty

TPaveText* m_legEmpty = nullptr
private

OfflineOccupancy plot legend, empty.

Definition at line 142 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legError

TPaveText* m_legError = nullptr
private

OfflineOccupancy plot legend, error.

Definition at line 143 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legNormal

TPaveText* m_legNormal = nullptr
private

OfflineOccupancy plot legend, normal.

Definition at line 141 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legOnEmpty

TPaveText* m_legOnEmpty = nullptr
private

onlineOccupancy plot legend, empty

Definition at line 147 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legOnError

TPaveText* m_legOnError = nullptr
private

onlineOccupancy plot legend, error

Definition at line 148 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legOnNormal

TPaveText* m_legOnNormal = nullptr
private

onlineOccupancy plot legend, normal

Definition at line 146 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legOnProblem

TPaveText* m_legOnProblem = nullptr
private

onlineOccupancy plot legend, problem

Definition at line 144 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legOnWarning

TPaveText* m_legOnWarning = nullptr
private

onlineOccupancy plot legend, warning

Definition at line 145 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legProblem

TPaveText* m_legProblem = nullptr
private

OfflineOccupancy plot legend, problem.

Definition at line 139 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legTi3Empty

TPaveText* m_legTi3Empty = nullptr
private

cluster time on tracks for 3 samples plot legend, empty

Definition at line 156 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legTi3Normal

TPaveText* m_legTi3Normal = nullptr
private

cluster time on tracks for 3 samples plot legend, normal

Definition at line 155 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legTi3Problem

TPaveText* m_legTi3Problem = nullptr
private

cluster time on tracks for 3 samples plot legend, problem

Definition at line 154 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legTiEmpty

TPaveText* m_legTiEmpty = nullptr
private

cluster time on tracks plot legend, empty

Definition at line 152 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legTiNormal

TPaveText* m_legTiNormal = nullptr
private

cluster time on tracks plot legend, normal

Definition at line 151 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legTiProblem

TPaveText* m_legTiProblem = nullptr
private

cluster time on tracks plot legend, problem

Definition at line 150 of file DQMHistAnalysisSVDGeneral.h.

◆ m_legWarning

TPaveText* m_legWarning = nullptr
private

OfflineOccupancy plot legend, warning.

Definition at line 140 of file DQMHistAnalysisSVDGeneral.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_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_occEmpty

double m_occEmpty
private

empty level of the occupancy

Definition at line 79 of file DQMHistAnalysisSVDGeneral.h.

◆ m_occError

double m_occError
private

error level of the occupancy

Definition at line 77 of file DQMHistAnalysisSVDGeneral.h.

◆ m_occU3Samples

Int_t m_occU3Samples = 0
private

0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples

Definition at line 161 of file DQMHistAnalysisSVDGeneral.h.

◆ m_occUGroupId0

Int_t m_occUGroupId0 = 0
private

0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples

Definition at line 164 of file DQMHistAnalysisSVDGeneral.h.

◆ m_occUstatus

Int_t m_occUstatus = 0
private

0 = normal, 1 = empty, 2 = warning, 3 = error

Definition at line 159 of file DQMHistAnalysisSVDGeneral.h.

◆ m_occV3Samples

Int_t m_occV3Samples = 0
private

0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples

Definition at line 162 of file DQMHistAnalysisSVDGeneral.h.

◆ m_occVGroupId0

Int_t m_occVGroupId0 = 0
private

0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples

Definition at line 165 of file DQMHistAnalysisSVDGeneral.h.

◆ m_occVstatus

Int_t m_occVstatus = 0
private

0 = normal, 1 = empty, 2 = warning, 3 = error

Definition at line 160 of file DQMHistAnalysisSVDGeneral.h.

◆ m_occWarning

double m_occWarning
private

warning level of the occupancy

Definition at line 78 of file DQMHistAnalysisSVDGeneral.h.

◆ m_onlineOccEmpty

double m_onlineOccEmpty
private

empty level of the occupancy

Definition at line 83 of file DQMHistAnalysisSVDGeneral.h.

◆ m_onlineOccError

double m_onlineOccError
private

error level of the onlineOccupancy

Definition at line 81 of file DQMHistAnalysisSVDGeneral.h.

◆ m_onlineOccU3Samples

Int_t m_onlineOccU3Samples = 0
private

0 = normal, 1 = empty, 2 = warning, 3 = error for 3 sample

Definition at line 170 of file DQMHistAnalysisSVDGeneral.h.

◆ m_onlineOccUstatus

Int_t m_onlineOccUstatus = 0
private

0 = normal, 1 = empty, 2 = warning, 3 = error

Definition at line 167 of file DQMHistAnalysisSVDGeneral.h.

◆ m_onlineOccV3Samples

Int_t m_onlineOccV3Samples = 0
private

0 = normal, 1 = empty, 2 = warning, 3 = error for 3 samples

Definition at line 171 of file DQMHistAnalysisSVDGeneral.h.

◆ m_onlineOccVstatus

Int_t m_onlineOccVstatus = 0
private

0 = normal, 1 = empty, 2 = warning, 3 = error

Definition at line 168 of file DQMHistAnalysisSVDGeneral.h.

◆ m_onlineOccWarning

double m_onlineOccWarning
private

warning level of the onlineOccupancy

Definition at line 82 of file DQMHistAnalysisSVDGeneral.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_printCanvas

bool m_printCanvas
private

if true print the pdf of the canvases

Definition at line 75 of file DQMHistAnalysisSVDGeneral.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_pvPrefix

std::string m_pvPrefix
private

string prefix for EPICS PVs

Definition at line 175 of file DQMHistAnalysisSVDGeneral.h.

◆ m_PVPrefix

std::string m_PVPrefix = "TEST:"
staticprivateinherited

The Prefix for EPICS PVs.

Definition at line 160 of file DQMHistAnalysis.h.

◆ m_refFile

TFile* m_refFile = nullptr
private

The pointer to the reference file.

Definition at line 96 of file DQMHistAnalysisSVDGeneral.h.

◆ m_refFileName

std::string m_refFileName
private

Parameters accessible from basf2 scripts.

Reference Histogram Root file name

Definition at line 94 of file DQMHistAnalysisSVDGeneral.h.

◆ m_refMeanC

float m_refMeanC
private

mean of the signal time peak from Cosmic reference run

Definition at line 88 of file DQMHistAnalysisSVDGeneral.h.

◆ m_refMeanP

float m_refMeanP
private

mean of the signal time peak from Physics reference run

Definition at line 87 of file DQMHistAnalysisSVDGeneral.h.

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 519 of file Module.h.

◆ m_runtype

TString m_runtype = nullptr
private

string with runtype: physics or cosmic

Definition at line 173 of file DQMHistAnalysisSVDGeneral.h.

◆ m_sensors

int m_sensors = 0
private

number of sensors to considired

Definition at line 125 of file DQMHistAnalysisSVDGeneral.h.

◆ m_statThreshold

double m_statThreshold
private

minimal number of events to compare histograms

Definition at line 85 of file DQMHistAnalysisSVDGeneral.h.

◆ m_SVDModules

std::vector<VxdID> m_SVDModules
private

IDs of all SVD Modules to iterate over.

Definition at line 178 of file DQMHistAnalysisSVDGeneral.h.

◆ m_timeThreshold

double m_timeThreshold
private

difference between mean of cluster time for present and reference run

Definition at line 86 of file DQMHistAnalysisSVDGeneral.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_unpackError

Double_t m_unpackError = 0
private

Maximum bin_content/ # events allowed before throwing ERROR.

Definition at line 158 of file DQMHistAnalysisSVDGeneral.h.

◆ m_useEpics

bool m_useEpics = false
staticprivateinherited

Flag if to use EPICS do not set by yourself, use EpicsEnable module to set.

Definition at line 149 of file DQMHistAnalysis.h.

◆ s_canvasUpdatedList

DQMHistAnalysisModule::CanvasUpdatedList s_canvasUpdatedList
staticprivateinherited

The list of canvas updated status.

Definition at line 124 of file DQMHistAnalysis.h.

◆ s_deltaList

DQMHistAnalysisModule::DeltaList s_deltaList
staticinherited

The list of Delta Histograms and settings.

Definition at line 118 of file DQMHistAnalysis.h.

◆ s_eventProcessed

int s_eventProcessed = 0
inlinestaticprivateinherited

Number of Events processed to fill histograms.

Attention: histograms are updates asynchronously Thus the number for a specific histogram may be lower or higher. If you need precise number, you must fill it in the histogram itself (e.g. underflow bin)

Definition at line 138 of file DQMHistAnalysis.h.

◆ s_histList

DQMHistAnalysisModule::HistList s_histList
staticprivateinherited

The list of Histograms.

Definition at line 108 of file DQMHistAnalysis.h.

◆ s_monObjList

DQMHistAnalysisModule::MonObjList s_monObjList
staticprivateinherited

The list of MonitoringObjects.

Definition at line 112 of file DQMHistAnalysis.h.

◆ s_refList

DQMHistAnalysisModule::RefList s_refList
staticprivateinherited

The list of references.

Definition at line 129 of file DQMHistAnalysis.h.

◆ s_runType

std::string s_runType = ""
inlinestaticprivateinherited

The Run type.

Definition at line 143 of file DQMHistAnalysis.h.


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