Belle II Software development
DQMHistAnalysisEventT0TriggerJitterModule Class Referencefinal

Class definition. More...

#include <DQMHistAnalysisEventT0TriggerJitter.h>

Inheritance diagram for DQMHistAnalysisEventT0TriggerJitterModule:
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

 DQMHistAnalysisEventT0TriggerJitterModule ()
 Constructor.
 
 ~DQMHistAnalysisEventT0TriggerJitterModule ()
 Destructor.
 
void initialize () override final
 create TCanvas and MonitoringObject
 
void beginRun () override final
 clear TCanvas
 
void event () override final
 fit the histograms in the event
 
void endRun () override final
 final fit of T0 distributions
 
void terminate () override final
 delete pointers
 
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 addRefHist (const std::string &dirname, TH1 *hist)
 Add reference histogram.
 
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 ExtractNEvent (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 const std::string & getRunType (void)
 Get the list of the reference histograms.
 
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

std::tuple< bool, std::optional< double > > processHistogram (TH1 *h, TString tag, bool retrieveMeanT0=false)
 process the EventT0 distribution fitting with two gaussians filling the MonitoringObject
 
void analyseECLTRGEventT0Distributions (bool retrieveDeltas=true)
 Analyse the ECLTRG EventT0 distributions The only function to retrieve deltaT values ECL-SVD, CDC-SVD, TOP-SVD as the ECLTRG is the most abundant.
 
void analyseCDCTRGEventT0Distributions ()
 Analyse the CDCTRG EventT0 distributions.
 
void analyseTOPTRGEventT0Distributions ()
 Analyse the TOPTRG EventT0 distributions.
 
void initializeCanvases ()
 Initialise canvases.
 
void clearCanvases ()
 Initialise canvases.
 
void printCanvases ()
 Print canvases if required.
 
void deleteCanvases ()
 Delete canvases.
 
void setDeltaT0Values ()
 Set the deltaT0 values in the monObj.
 
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.
 

Static Private Member Functions

static double fDoubleGaus (double *x, double *par)
 double gaussian fitting function for the jitter distribution
 

Private Attributes

std::string m_prefixCanvas
 prefix to be added to canvas name when saved as pdf
 
bool m_printCanvas
 if true print the pdf of the canvases
 
uint m_nEntriesMin = 100
 minimum number of entries to process the histogram
 
MonitoringObjectm_monObj = nullptr
 MonitoringObject to be produced by this module.
 
TCanvas * m_cECLTimeHadronsECLTRG = nullptr
 Canvas for ECL time ECLTRG jitter hadrons.
 
TCanvas * m_cECLTimeBhaBhaECLTRG = nullptr
 Canvas for ECL time ECLTRG jitter bhabhas.
 
TCanvas * m_cECLTimeMuMuECLTRG = nullptr
 Canvas for ECL time ECLTRG jitter mumu.
 
TCanvas * m_cCDCTimeHadronsECLTRG = nullptr
 Canvas for CDC time ECLTRG jitter hadrons.
 
TCanvas * m_cCDCTimeBhaBhaECLTRG = nullptr
 Canvas for CDC time ECLTRG jitter bhabhas.
 
TCanvas * m_cCDCTimeMuMuECLTRG = nullptr
 Canvas for CDC time ECLTRG jitter mumu.
 
TCanvas * m_cTOPTimeHadronsECLTRG = nullptr
 Canvas for TOP time ECLTRG jitter hadrons.
 
TCanvas * m_cTOPTimeBhaBhaECLTRG = nullptr
 Canvas for TOP time ECLTRG jitter bhabhas.
 
TCanvas * m_cTOPTimeMuMuECLTRG = nullptr
 Canvas for TOP time ECLTRG jitter mumu.
 
TCanvas * m_cSVDTimeHadronsECLTRG = nullptr
 Canvas for SVD time ECLTRG jitter hadrons.
 
TCanvas * m_cSVDTimeBhaBhaECLTRG = nullptr
 Canvas for SVD time ECLTRG jitter bhabhas.
 
TCanvas * m_cSVDTimeMuMuECLTRG = nullptr
 Canvas for SVD time ECLTRG jitter mumu.
 
TCanvas * m_cECLTimeHadronsCDCTRG = nullptr
 Canvas for ECL time CDCTRG jitter hadrons.
 
TCanvas * m_cECLTimeBhaBhaCDCTRG = nullptr
 Canvas for ECL time CDCTRG jitter bhabhas.
 
TCanvas * m_cECLTimeMuMuCDCTRG = nullptr
 Canvas for ECL time CDCTRG jitter mumu.
 
TCanvas * m_cCDCTimeHadronsCDCTRG = nullptr
 Canvas for CDC time CDCTRG jitter hadrons.
 
TCanvas * m_cCDCTimeBhaBhaCDCTRG = nullptr
 Canvas for CDC time CDCTRG jitter bhabhas.
 
TCanvas * m_cCDCTimeMuMuCDCTRG = nullptr
 Canvas for CDC time CDCTRG jitter mumu.
 
TCanvas * m_cTOPTimeHadronsCDCTRG = nullptr
 Canvas for TOP time CDCTRG jitter hadrons.
 
TCanvas * m_cTOPTimeBhaBhaCDCTRG = nullptr
 Canvas for TOP time CDCTRG jitter bhabhas.
 
TCanvas * m_cTOPTimeMuMuCDCTRG = nullptr
 Canvas for TOP time CDCTRG jitter mumu.
 
TCanvas * m_cSVDTimeHadronsCDCTRG = nullptr
 Canvas for SVD time CDCTRG jitter hadrons.
 
TCanvas * m_cSVDTimeBhaBhaCDCTRG = nullptr
 Canvas for SVD time CDCTRG jitter bhabhas.
 
TCanvas * m_cSVDTimeMuMuCDCTRG = nullptr
 Canvas for SVD time CDCTRG jitter mumu.
 
TCanvas * m_cECLTimeHadronsTOPTRG = nullptr
 Canvas for ECL time TOPTRG jitter hadrons.
 
TCanvas * m_cECLTimeBhaBhaTOPTRG = nullptr
 Canvas for ECL time TOPTRG jitter bhabhas.
 
TCanvas * m_cECLTimeMuMuTOPTRG = nullptr
 Canvas for ECL time TOPTRG jitter mumu.
 
TCanvas * m_cCDCTimeHadronsTOPTRG = nullptr
 Canvas for CDC time TOPTRG jitter hadrons.
 
TCanvas * m_cCDCTimeBhaBhaTOPTRG = nullptr
 Canvas for CDC time TOPTRG jitter bhabhas.
 
TCanvas * m_cCDCTimeMuMuTOPTRG = nullptr
 Canvas for CDC time TOPTRG jitter mumu.
 
TCanvas * m_cTOPTimeHadronsTOPTRG = nullptr
 Canvas for TOP time TOPTRG jitter hadrons.
 
TCanvas * m_cTOPTimeBhaBhaTOPTRG = nullptr
 Canvas for TOP time TOPTRG jitter bhabhas.
 
TCanvas * m_cTOPTimeMuMuTOPTRG = nullptr
 Canvas for TOP time TOPTRG jitter mumu.
 
TCanvas * m_cSVDTimeHadronsTOPTRG = nullptr
 Canvas for SVD time TOPTRG jitter hadrons.
 
TCanvas * m_cSVDTimeBhaBhaTOPTRG = nullptr
 Canvas for SVD time TOPTRG jitter bhabhas.
 
TCanvas * m_cSVDTimeMuMuTOPTRG = nullptr
 Canvas for SVD time TOPTRG jitter mumu.
 
double m_ECLTRGHLThadronECLT0 = -999.
 ECL T0 for ECLTRG jitter for HLT hadron events.
 
double m_ECLTRGHLThadronCDCT0 = -999.
 CDC T0 for ECLTRG jitter for HLT hadron events.
 
double m_ECLTRGHLThadronTOPT0 = -999.
 TOP T0 for ECLTRG jitter for HLT hadron events.
 
double m_ECLTRGHLThadronSVDT0 = -999.
 SVD T0 for ECLTRG jitter for HLT hadron events.
 
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.

Definition at line 28 of file DQMHistAnalysisEventT0TriggerJitter.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,
80 c_ParallelProcessingCertified = 4,
81 c_HistogramManager = 8,
82 c_InternalSerializer = 16,
83 c_TerminateInAllProcesses = 32,
84 c_DontCollectStatistics = 64,
85 };
@ c_Output
Output Process.
Definition ProcHelper.h:19
@ c_Input
Input Process.
Definition ProcHelper.h:17

◆ 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,
70 c_RefScaleEntries = 1,
71 c_RefScaleMax = 2
72 };

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

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

Constructor & Destructor Documentation

◆ DQMHistAnalysisEventT0TriggerJitterModule()

Constructor.

Definition at line 32 of file DQMHistAnalysisEventT0TriggerJitter.cc.

34{
35 setDescription("Determining and processing EventT0s from different subdetectors (ECL, CDC, TOP, SVD) for different L1 trigger sources (ECL, CDC, and TOP) to estimate trigger jitter information for different HLT event types (hadron, BhaBha, µµ).");
36
37 //Parameter definition
38 addParam("min_nEntries", m_nEntriesMin, "Minimum number of entries to process the histogram.", m_nEntriesMin);
39 addParam("prefixCanvas", m_prefixCanvas, "Prefix to be added to canvas filename when saved as pdf.", std::string("c"));
40 addParam("printCanvas", m_printCanvas, "If true, prints pdf of the analysis canvas.", bool(false));
41}
std::string m_prefixCanvas
prefix to be added to canvas name when saved as pdf
uint m_nEntriesMin
minimum number of entries to process the histogram
DQMHistAnalysisModule()
Constructor / Destructor.
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:559

◆ ~DQMHistAnalysisEventT0TriggerJitterModule()

Destructor.

Definition at line 44 of file DQMHistAnalysisEventT0TriggerJitter.cc.

44{ }

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 95 of file DQMHistAnalysis.cc.

97{
98 std::string fullname;
99 if (dirname.size() > 0) {
100 fullname = dirname + "/" + histname;
101 } else {
102 fullname = histname;
103 }
104 s_deltaList[fullname].set(t, p, a);
105}
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.

◆ addRefHist()

void addRefHist ( const std::string & dirname,
TH1 * hist )
inherited

Add reference histogram.

Parameters
dirnameThe name of the directory.
histThe TH1 pointer for the reference.

Definition at line 81 of file DQMHistAnalysis.cc.

82{
83 string histname = hist->GetName();
84 std::string name = dirname + "/" + histname;
85 auto& n = s_refList[name];
86 n.m_orghist_name = name;
87 n.m_refhist_name = "ref/" + name;
88 hist->SetName((n.m_refhist_name).c_str());
89 hist->SetDirectory(0);
90 n.setRefHist(hist); // transfer ownership!
91 n.setRefCopy(nullptr);
92 n.setCanvas(nullptr);
93}
static RefList s_refList
The list of references.

◆ analyseCDCTRGEventT0Distributions()

void analyseCDCTRGEventT0Distributions ( )
private

Analyse the CDCTRG EventT0 distributions.

Definition at line 426 of file DQMHistAnalysisEventT0TriggerJitter.cc.

427{
428 // --- ECL EventT0 plots for CDCTRG ---
429
430 // find ECL EventT0 Hadrons CDCTRG histogram and process it
431 TH1* h = findHist("EventT0/m_histEventT0_ECL_hadron_L1_CDCTRG");
432 TString tag = "hadronCDCTRG_ECLT0";
434 if (std::get<0>(processHistogram(h, tag))) {
435 m_cECLTimeHadronsCDCTRG->SetFillColor(0);
436 m_cECLTimeHadronsCDCTRG->Modified();
437 m_cECLTimeHadronsCDCTRG->Update();
439 } else {
440 B2DEBUG(29, Form("Histogram ECL EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
441 if (h) h->Draw();
442 m_cECLTimeHadronsCDCTRG->SetFillColor(kGray);
444 }
445
446 // find ECL EventT0 Bhabhas CDCTRG histogram and process it
447 h = findHist("EventT0/m_histEventT0_ECL_bhabha_L1_CDCTRG");
448 tag = "bhabhaCDCTRG_ECLT0";
450 if (std::get<0>(processHistogram(h, tag))) {
451 m_cECLTimeBhaBhaCDCTRG->SetFillColor(0);
452 m_cECLTimeBhaBhaCDCTRG->Modified();
453 m_cECLTimeBhaBhaCDCTRG->Update();
455 } else {
456 B2DEBUG(29, Form("Histogram ECL EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
457 if (h) h->Draw();
458 m_cECLTimeBhaBhaCDCTRG->SetFillColor(kGray);
460 }
461
462 // find ECL EventT0 Mumus CDCTRG histogram and process it
463 h = findHist("EventT0/m_histEventT0_ECL_mumu_L1_CDCTRG");
464 tag = "mumuCDCTRG_ECLT0";
466 if (std::get<0>(processHistogram(h, tag))) {
467 m_cECLTimeMuMuCDCTRG->SetFillColor(0);
468 m_cECLTimeMuMuCDCTRG->Modified();
469 m_cECLTimeMuMuCDCTRG->Update();
470 } else {
471 B2DEBUG(29, Form("Histogram ECL EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
472 if (h) h->Draw();
473 m_cECLTimeMuMuCDCTRG->SetFillColor(kGray);
474 m_cECLTimeMuMuCDCTRG->Draw();
475 }
476
477
478 // --- CDC EventT0 plots for CDCTRG ---
479
480 // find CDC EventT0 Hadrons CDCTRG histogram and process it
481 h = findHist("EventT0/m_histEventT0_CDC_hadron_L1_CDCTRG");
482 tag = "hadronCDCTRG_CDCT0";
484 if (std::get<0>(processHistogram(h, tag))) {
485 m_cCDCTimeHadronsCDCTRG->SetFillColor(0);
486 m_cCDCTimeHadronsCDCTRG->Modified();
487 m_cCDCTimeHadronsCDCTRG->Update();
489 } else {
490 B2DEBUG(29, Form("Histogram CDC EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
491 if (h) h->Draw();
492 m_cCDCTimeHadronsCDCTRG->SetFillColor(kGray);
494 }
495
496 // find CDC EventT0 Bhabhas CDCTRG histogram and process it
497 h = findHist("EventT0/m_histEventT0_CDC_bhabha_L1_CDCTRG");
498 tag = "bhabhaCDCTRG_CDCT0";
500 if (std::get<0>(processHistogram(h, tag))) {
501 m_cCDCTimeBhaBhaCDCTRG->SetFillColor(0);
502 m_cCDCTimeBhaBhaCDCTRG->Modified();
503 m_cCDCTimeBhaBhaCDCTRG->Update();
505 } else {
506 B2DEBUG(29, Form("Histogram CDC EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
507 if (h) h->Draw();
508 m_cCDCTimeBhaBhaCDCTRG->SetFillColor(kGray);
510 }
511
512 // find CDC EventT0 Mumus CDCTRG histogram and process it
513 h = findHist("EventT0/m_histEventT0_CDC_mumu_L1_CDCTRG");
514 tag = "mumuCDCTRG_CDCT0";
516 if (std::get<0>(processHistogram(h, tag))) {
517 m_cCDCTimeMuMuCDCTRG->SetFillColor(0);
518 m_cCDCTimeMuMuCDCTRG->Modified();
519 m_cCDCTimeMuMuCDCTRG->Update();
520 } else {
521 B2DEBUG(29, Form("Histogram CDC EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
522 if (h) h->Draw();
523 m_cCDCTimeMuMuCDCTRG->SetFillColor(kGray);
524 m_cCDCTimeMuMuCDCTRG->Draw();
525 }
526
527
528 // --- TOP EventT0 plots for CDCTRG ---
529
530 // find TOP EventT0 Hadrons CDCTRG histogram and process it
531 h = findHist("EventT0/m_histEventT0_TOP_hadron_L1_CDCTRG");
532 tag = "hadronCDCTRG_TOPT0";
534 if (std::get<0>(processHistogram(h, tag))) {
535 m_cTOPTimeHadronsCDCTRG->SetFillColor(0);
536 m_cTOPTimeHadronsCDCTRG->Modified();
537 m_cTOPTimeHadronsCDCTRG->Update();
539 } else {
540 B2DEBUG(29, Form("Histogram TOP EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
541 if (h) h->Draw();
542 m_cTOPTimeHadronsCDCTRG->SetFillColor(kGray);
544 }
545
546 // find TOP EventT0 Bhabhas CDCTRG histogram and process it
547 h = findHist("EventT0/m_histEventT0_TOP_bhabha_L1_CDCTRG");
548 tag = "bhabhaCDCTRG_TOPT0";
550 if (std::get<0>(processHistogram(h, tag))) {
551 m_cTOPTimeBhaBhaCDCTRG->SetFillColor(0);
552 m_cTOPTimeBhaBhaCDCTRG->Modified();
553 m_cTOPTimeBhaBhaCDCTRG->Update();
555 } else {
556 B2DEBUG(29, Form("Histogram TOP EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
557 if (h) h->Draw();
558 m_cTOPTimeBhaBhaCDCTRG->SetFillColor(kGray);
560 }
561
562 // find TOP EventT0 Mumus CDCTRG histogram and process it
563 h = findHist("EventT0/m_histEventT0_TOP_mumu_L1_CDCTRG");
564 tag = "mumuCDCTRG_TOPT0";
566 if (std::get<0>(processHistogram(h, tag))) {
567 m_cTOPTimeMuMuCDCTRG->SetFillColor(0);
568 m_cTOPTimeMuMuCDCTRG->Modified();
569 m_cTOPTimeMuMuCDCTRG->Update();
570 } else {
571 B2DEBUG(29, Form("Histogram TOP EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
572 if (h) h->Draw();
573 m_cTOPTimeMuMuCDCTRG->SetFillColor(kGray);
574 m_cTOPTimeMuMuCDCTRG->Draw();
575 }
576
577
578 // --- SVD EventT0 plots for CDCTRG ---
579
580 // find SVD EventT0 Hadrons CDCTRG histogram and process it
581 h = findHist("EventT0/m_histEventT0_SVD_hadron_L1_CDCTRG");
582 tag = "hadronCDCTRG_SVDT0";
584 if (std::get<0>(processHistogram(h, tag))) {
585 m_cSVDTimeHadronsCDCTRG->SetFillColor(0);
586 m_cSVDTimeHadronsCDCTRG->Modified();
587 m_cSVDTimeHadronsCDCTRG->Update();
589 } else {
590 B2DEBUG(29, Form("Histogram SVD EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
591 if (h) h->Draw();
592 m_cSVDTimeHadronsCDCTRG->SetFillColor(kGray);
594 }
595
596 // find SVD EventT0 Bhabhas CDCTRG histogram and process it
597 h = findHist("EventT0/m_histEventT0_SVD_bhabha_L1_CDCTRG");
598 tag = "bhabhaCDCTRG_SVDT0";
600 if (std::get<0>(processHistogram(h, tag))) {
601 m_cSVDTimeBhaBhaCDCTRG->SetFillColor(0);
602 m_cSVDTimeBhaBhaCDCTRG->Modified();
603 m_cSVDTimeBhaBhaCDCTRG->Update();
605 } else {
606 B2DEBUG(29, Form("Histogram SVD EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
607 if (h) h->Draw();
608 m_cSVDTimeBhaBhaCDCTRG->SetFillColor(kGray);
610 }
611
612 // find SVD EventT0 Mumus CDCTRG histogram and process it
613 h = findHist("EventT0/m_histEventT0_SVD_mumu_L1_CDCTRG");
614 tag = "mumuCDCTRG_SVDT0";
616 if (std::get<0>(processHistogram(h, tag))) {
617 m_cSVDTimeMuMuCDCTRG->SetFillColor(0);
618 m_cSVDTimeMuMuCDCTRG->Modified();
619 m_cSVDTimeMuMuCDCTRG->Update();
620 } else {
621 B2DEBUG(29, Form("Histogram SVD EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
622 if (h) h->Draw();
623 m_cSVDTimeMuMuCDCTRG->SetFillColor(kGray);
624 m_cSVDTimeMuMuCDCTRG->Draw();
625 }
626}
TCanvas * m_cECLTimeHadronsCDCTRG
Canvas for ECL time CDCTRG jitter hadrons.
TCanvas * m_cCDCTimeBhaBhaCDCTRG
Canvas for CDC time CDCTRG jitter bhabhas.
std::tuple< bool, std::optional< double > > processHistogram(TH1 *h, TString tag, bool retrieveMeanT0=false)
process the EventT0 distribution fitting with two gaussians filling the MonitoringObject
TCanvas * m_cCDCTimeMuMuCDCTRG
Canvas for CDC time CDCTRG jitter mumu.
TCanvas * m_cCDCTimeHadronsCDCTRG
Canvas for CDC time CDCTRG jitter hadrons.
TCanvas * m_cTOPTimeBhaBhaCDCTRG
Canvas for TOP time CDCTRG jitter bhabhas.
TCanvas * m_cECLTimeMuMuCDCTRG
Canvas for ECL time CDCTRG jitter mumu.
TCanvas * m_cSVDTimeMuMuCDCTRG
Canvas for SVD time CDCTRG jitter mumu.
TCanvas * m_cECLTimeBhaBhaCDCTRG
Canvas for ECL time CDCTRG jitter bhabhas.
TCanvas * m_cTOPTimeHadronsCDCTRG
Canvas for TOP time CDCTRG jitter hadrons.
TCanvas * m_cTOPTimeMuMuCDCTRG
Canvas for TOP time CDCTRG jitter mumu.
TCanvas * m_cSVDTimeHadronsCDCTRG
Canvas for SVD time CDCTRG jitter hadrons.
TCanvas * m_cSVDTimeBhaBhaCDCTRG
Canvas for SVD time CDCTRG jitter bhabhas.
static TH1 * findHist(const std::string &histname, bool onlyIfUpdated=false)
Get histogram from list (no other search).

◆ analyseECLTRGEventT0Distributions()

void analyseECLTRGEventT0Distributions ( bool retrieveDeltas = true)
private

Analyse the ECLTRG EventT0 distributions The only function to retrieve deltaT values ECL-SVD, CDC-SVD, TOP-SVD as the ECLTRG is the most abundant.

Parameters
retrieveDeltasif true, calculate deltaT values (ECL-SVD, CDC-SVD, TOP-SVD) in case of ECLTRG, default: false value is forwarded to processHistogram to retrieve the individual values

Definition at line 209 of file DQMHistAnalysisEventT0TriggerJitter.cc.

210{
211
212 const bool retrieveMeanT0 = retrieveDeltas;
213 bool processingSuccessful = false;
214 std::optional<double> currentT0;
215
216 // --- ECL EventT0 plots for ECLTRG ---
217
218 // find ECL EventT0 Hadrons ECLTRG histogram and process it
219 TH1* h = findHist("EventT0/m_histEventT0_ECL_hadron_L1_ECLTRG");
220 TString tag = "hadronECLTRG_ECLT0";
222 std::tie(processingSuccessful, currentT0) = processHistogram(h, tag, retrieveMeanT0);
223 if (processingSuccessful) {
224 m_cECLTimeHadronsECLTRG->SetFillColor(0);
225 m_cECLTimeHadronsECLTRG->Modified();
226 m_cECLTimeHadronsECLTRG->Update();
227 if (*currentT0) {
228 m_ECLTRGHLThadronECLT0 = *currentT0;
229 }
230 } else {
231 B2DEBUG(29, Form("Histogram ECL EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
232 if (h) h->Draw();
233 m_cECLTimeHadronsECLTRG->SetFillColor(kGray);
235 }
236
237 // find ECL EventT0 Bhabhas ECLTRG histogram and process it
238 h = findHist("EventT0/m_histEventT0_ECL_bhabha_L1_ECLTRG");
239 tag = "bhabhaECLTRG_ECLT0";
241 if (std::get<0>(processHistogram(h, tag))) {
242 m_cECLTimeBhaBhaECLTRG->SetFillColor(0);
243 m_cECLTimeBhaBhaECLTRG->Modified();
244 m_cECLTimeBhaBhaECLTRG->Update();
245 } else {
246 B2DEBUG(29, Form("Histogram ECL EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
247 if (h) h->Draw();
248 m_cECLTimeBhaBhaECLTRG->SetFillColor(kGray);
250 }
251
252 // find ECL EventT0 Mumus ECLTRG histogram and process it
253 h = findHist("EventT0/m_histEventT0_ECL_mumu_L1_ECLTRG");
254 tag = "mumuECLTRG_ECLT0";
256 if (std::get<0>(processHistogram(h, tag))) {
257 m_cECLTimeMuMuECLTRG->SetFillColor(0);
258 m_cECLTimeMuMuECLTRG->Modified();
259 m_cECLTimeMuMuECLTRG->Update();
260 } else {
261 B2DEBUG(29, Form("Histogram ECL EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
262 if (h) h->Draw();
263 m_cECLTimeMuMuECLTRG->SetFillColor(kGray);
264 m_cECLTimeMuMuECLTRG->Draw();
265 }
266
267
268 // --- CDC EventT0 plots for ECLTRG ---
269
270 // find CDC EventT0 Hadrons ECLTRG histogram and process it
271 h = findHist("EventT0/m_histEventT0_CDC_hadron_L1_ECLTRG");
272 tag = "hadronECLTRG_CDCT0";
274 std::tie(processingSuccessful, currentT0) = processHistogram(h, tag, retrieveMeanT0);
275 if (processingSuccessful) {
276 m_cCDCTimeHadronsECLTRG->SetFillColor(0);
277 m_cCDCTimeHadronsECLTRG->Modified();
278 m_cCDCTimeHadronsECLTRG->Update();
279 if (*currentT0) {
280 m_ECLTRGHLThadronCDCT0 = *currentT0;
281 }
282 } else {
283 B2DEBUG(29, Form("Histogram CDC EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
284 if (h) h->Draw();
285 m_cCDCTimeHadronsECLTRG->SetFillColor(kGray);
287 }
288
289 // find CDC EventT0 Bhabhas ECLTRG histogram and process it
290 h = findHist("EventT0/m_histEventT0_CDC_bhabha_L1_ECLTRG");
291 tag = "bhabhaECLTRG_CDCT0";
293 if (std::get<0>(processHistogram(h, tag))) {
294 m_cCDCTimeBhaBhaECLTRG->SetFillColor(0);
295 m_cCDCTimeBhaBhaECLTRG->Modified();
296 m_cCDCTimeBhaBhaECLTRG->Update();
297 } else {
298 B2DEBUG(29, Form("Histogram CDC EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
299 if (h) h->Draw();
300 m_cCDCTimeBhaBhaECLTRG->SetFillColor(kGray);
302 }
303
304 // find CDC EventT0 Mumus ECLTRG histogram and process it
305 h = findHist("EventT0/m_histEventT0_CDC_mumu_L1_ECLTRG");
306 tag = "mumuECLTRG_CDCT0";
308 if (std::get<0>(processHistogram(h, tag))) {
309 m_cCDCTimeMuMuECLTRG->SetFillColor(0);
310 m_cCDCTimeMuMuECLTRG->Modified();
311 m_cCDCTimeMuMuECLTRG->Update();
312 } else {
313 B2DEBUG(29, Form("Histogram CDC EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
314 if (h) h->Draw();
315 m_cCDCTimeMuMuECLTRG->SetFillColor(kGray);
316 m_cCDCTimeMuMuECLTRG->Draw();
317 }
318
319
320 // --- TOP EventT0 plots for ECLTRG ---
321
322 // find TOP EventT0 Hadrons ECLTRG histogram and process it
323 h = findHist("EventT0/m_histEventT0_TOP_hadron_L1_ECLTRG");
324 tag = "hadronECLTRG_TOPT0";
326 std::tie(processingSuccessful, currentT0) = processHistogram(h, tag, retrieveMeanT0);
327 if (processingSuccessful) {
328 m_cTOPTimeHadronsECLTRG->SetFillColor(0);
329 m_cTOPTimeHadronsECLTRG->Modified();
330 m_cTOPTimeHadronsECLTRG->Update();
331 if (*currentT0) {
332 m_ECLTRGHLThadronTOPT0 = *currentT0;
333 }
334 } else {
335 B2DEBUG(29, Form("Histogram TOP EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
336 if (h) h->Draw();
337 m_cTOPTimeHadronsECLTRG->SetFillColor(kGray);
339 }
340
341 // find TOP EventT0 Bhabhas ECLTRG histogram and process it
342 h = findHist("EventT0/m_histEventT0_TOP_bhabha_L1_ECLTRG");
343 tag = "bhabhaECLTRG_TOPT0";
345 if (std::get<0>(processHistogram(h, tag))) {
346 m_cTOPTimeBhaBhaECLTRG->SetFillColor(0);
347 m_cTOPTimeBhaBhaECLTRG->Modified();
348 m_cTOPTimeBhaBhaECLTRG->Update();
349 } else {
350 B2DEBUG(29, Form("Histogram TOP EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
351 if (h) h->Draw();
352 m_cTOPTimeBhaBhaECLTRG->SetFillColor(kGray);
354 }
355
356 // find TOP EventT0 Mumus ECLTRG histogram and process it
357 h = findHist("EventT0/m_histEventT0_TOP_mumu_L1_ECLTRG");
358 tag = "mumuECLTRG_TOPT0";
360 if (std::get<0>(processHistogram(h, tag))) {
361 m_cTOPTimeMuMuECLTRG->SetFillColor(0);
362 m_cTOPTimeMuMuECLTRG->Modified();
363 m_cTOPTimeMuMuECLTRG->Update();
364 } else {
365 B2DEBUG(29, Form("Histogram TOP EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
366 if (h) h->Draw();
367 m_cTOPTimeMuMuECLTRG->SetFillColor(kGray);
368 m_cTOPTimeMuMuECLTRG->Draw();
369 }
370
371
372 // --- SVD EventT0 plots for ECLTRG ---
373
374 // find SVD EventT0 Hadrons ECLTRG histogram and process it
375 h = findHist("EventT0/m_histEventT0_SVD_hadron_L1_ECLTRG");
376 tag = "hadronECLTRG_SVDT0";
378 std::tie(processingSuccessful, currentT0) = processHistogram(h, tag, retrieveMeanT0);
379 if (processingSuccessful) {
380 m_cSVDTimeHadronsECLTRG->SetFillColor(0);
381 m_cSVDTimeHadronsECLTRG->Modified();
382 m_cSVDTimeHadronsECLTRG->Update();
383 if (*currentT0) {
384 m_ECLTRGHLThadronSVDT0 = *currentT0;
385 }
386 } else {
387 B2DEBUG(29, Form("Histogram SVD EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
388 if (h) h->Draw();
389 m_cSVDTimeHadronsECLTRG->SetFillColor(kGray);
391 }
392
393 // find SVD EventT0 Bhabhas ECLTRG histogram and process it
394 h = findHist("EventT0/m_histEventT0_SVD_bhabha_L1_ECLTRG");
395 tag = "bhabhaECLTRG_SVDT0";
397 if (std::get<0>(processHistogram(h, tag))) {
398 m_cSVDTimeBhaBhaECLTRG->SetFillColor(0);
399 m_cSVDTimeBhaBhaECLTRG->Modified();
400 m_cSVDTimeBhaBhaECLTRG->Update();
401 } else {
402 B2DEBUG(29, Form("Histogram SVD EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
403 if (h) h->Draw();
404 m_cSVDTimeBhaBhaECLTRG->SetFillColor(kGray);
406 }
407
408 // find SVD EventT0 Mumus ECLTRG histogram and process it
409 h = findHist("EventT0/m_histEventT0_SVD_mumu_L1_ECLTRG");
410 tag = "mumuECLTRG_SVDT0";
412 if (std::get<0>(processHistogram(h, tag))) {
413 m_cSVDTimeMuMuECLTRG->SetFillColor(0);
414 m_cSVDTimeMuMuECLTRG->Modified();
415 m_cSVDTimeMuMuECLTRG->Update();
416 } else {
417 B2DEBUG(29, Form("Histogram SVD EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
418 if (h) h->Draw();
419 m_cSVDTimeMuMuECLTRG->SetFillColor(kGray);
420 m_cSVDTimeMuMuECLTRG->Draw();
421 }
422
423
424}
TCanvas * m_cCDCTimeMuMuECLTRG
Canvas for CDC time ECLTRG jitter mumu.
TCanvas * m_cECLTimeHadronsECLTRG
Canvas for ECL time ECLTRG jitter hadrons.
TCanvas * m_cTOPTimeHadronsECLTRG
Canvas for TOP time ECLTRG jitter hadrons.
TCanvas * m_cECLTimeMuMuECLTRG
Canvas for ECL time ECLTRG jitter mumu.
TCanvas * m_cCDCTimeHadronsECLTRG
Canvas for CDC time ECLTRG jitter hadrons.
double m_ECLTRGHLThadronCDCT0
CDC T0 for ECLTRG jitter for HLT hadron events.
double m_ECLTRGHLThadronTOPT0
TOP T0 for ECLTRG jitter for HLT hadron events.
TCanvas * m_cCDCTimeBhaBhaECLTRG
Canvas for CDC time ECLTRG jitter bhabhas.
double m_ECLTRGHLThadronSVDT0
SVD T0 for ECLTRG jitter for HLT hadron events.
TCanvas * m_cECLTimeBhaBhaECLTRG
Canvas for ECL time ECLTRG jitter bhabhas.
double m_ECLTRGHLThadronECLT0
ECL T0 for ECLTRG jitter for HLT hadron events.
TCanvas * m_cTOPTimeBhaBhaECLTRG
Canvas for TOP time ECLTRG jitter bhabhas.
TCanvas * m_cSVDTimeBhaBhaECLTRG
Canvas for SVD time ECLTRG jitter bhabhas.
TCanvas * m_cSVDTimeHadronsECLTRG
Canvas for SVD time ECLTRG jitter hadrons.
TCanvas * m_cSVDTimeMuMuECLTRG
Canvas for SVD time ECLTRG jitter mumu.
TCanvas * m_cTOPTimeMuMuECLTRG
Canvas for TOP time ECLTRG jitter mumu.

◆ analyseTOPTRGEventT0Distributions()

void analyseTOPTRGEventT0Distributions ( )
private

Analyse the TOPTRG EventT0 distributions.

Definition at line 628 of file DQMHistAnalysisEventT0TriggerJitter.cc.

629{
630 // --- ECL EventT0 plots for TOPTRG ---
631
632 // find ECL EventT0 Hadrons TOPTRG histogram and process it
633 TH1* h = findHist("EventT0/m_histEventT0_ECL_hadron_L1_TOPTRG");
634 TString tag = "hadronTOPTRG_ECLT0";
636 if (std::get<0>(processHistogram(h, tag))) {
637 m_cECLTimeHadronsTOPTRG->SetFillColor(0);
638 m_cECLTimeHadronsTOPTRG->Modified();
639 m_cECLTimeHadronsTOPTRG->Update();
641 } else {
642 B2DEBUG(29, Form("Histogram ECL EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
643 if (h) h->Draw();
644 m_cECLTimeHadronsTOPTRG->SetFillColor(kGray);
646 }
647
648 // find ECL EventT0 Bhabhas TOPTRG histogram and process it
649 h = findHist("EventT0/m_histEventT0_ECL_bhabha_L1_TOPTRG");
650 tag = "bhabhaTOPTRG_ECLT0";
652 if (std::get<0>(processHistogram(h, tag))) {
653 m_cECLTimeBhaBhaTOPTRG->SetFillColor(0);
654 m_cECLTimeBhaBhaTOPTRG->Modified();
655 m_cECLTimeBhaBhaTOPTRG->Update();
657 } else {
658 B2DEBUG(29, Form("Histogram ECL EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
659 if (h) h->Draw();
660 m_cECLTimeBhaBhaTOPTRG->SetFillColor(kGray);
662 }
663
664 // find ECL EventT0 Mumus TOPTRG histogram and process it
665 h = findHist("EventT0/m_histEventT0_ECL_mumu_L1_TOPTRG");
666 tag = "mumuTOPTRG_ECLT0";
668 if (std::get<0>(processHistogram(h, tag))) {
669 m_cECLTimeMuMuTOPTRG->SetFillColor(0);
670 m_cECLTimeMuMuTOPTRG->Modified();
671 m_cECLTimeMuMuTOPTRG->Update();
672 } else {
673 B2DEBUG(29, Form("Histogram ECL EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
674 if (h) h->Draw();
675 m_cECLTimeMuMuTOPTRG->SetFillColor(kGray);
676 m_cECLTimeMuMuTOPTRG->Draw();
677 }
678
679
680 // --- CDC EventT0 plots for TOPTRG ---
681
682 // find CDC EventT0 Hadrons TOPTRG histogram and process it
683 h = findHist("EventT0/m_histEventT0_CDC_hadron_L1_TOPTRG");
684 tag = "hadronTOPTRG_CDCT0";
686 if (std::get<0>(processHistogram(h, tag))) {
687 m_cCDCTimeHadronsTOPTRG->SetFillColor(0);
688 m_cCDCTimeHadronsTOPTRG->Modified();
689 m_cCDCTimeHadronsTOPTRG->Update();
691 } else {
692 B2DEBUG(29, Form("Histogram CDC EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
693 if (h) h->Draw();
694 m_cCDCTimeHadronsTOPTRG->SetFillColor(kGray);
696 }
697
698 // find CDC EventT0 Bhabhas TOPTRG histogram and process it
699 h = findHist("EventT0/m_histEventT0_CDC_bhabha_L1_TOPTRG");
700 tag = "bhabhaTOPTRG_CDCT0";
702 if (std::get<0>(processHistogram(h, tag))) {
703 m_cCDCTimeBhaBhaTOPTRG->SetFillColor(0);
704 m_cCDCTimeBhaBhaTOPTRG->Modified();
705 m_cCDCTimeBhaBhaTOPTRG->Update();
707 } else {
708 B2DEBUG(29, Form("Histogram CDC EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
709 if (h) h->Draw();
710 m_cCDCTimeBhaBhaTOPTRG->SetFillColor(kGray);
712 }
713
714 // find CDC EventT0 Mumus TOPTRG histogram and process it
715 h = findHist("EventT0/m_histEventT0_CDC_mumu_L1_TOPTRG");
716 tag = "mumuTOPTRG_CDCT0";
718 if (std::get<0>(processHistogram(h, tag))) {
719 m_cCDCTimeMuMuTOPTRG->SetFillColor(0);
720 m_cCDCTimeMuMuTOPTRG->Modified();
721 m_cCDCTimeMuMuTOPTRG->Update();
722 } else {
723 B2DEBUG(29, Form("Histogram CDC EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
724 if (h) h->Draw();
725 m_cCDCTimeMuMuTOPTRG->SetFillColor(kGray);
726 m_cCDCTimeMuMuTOPTRG->Draw();
727 }
728
729
730 // --- TOP EventT0 plots for TOPTRG ---
731
732 // find TOP EventT0 Hadrons TOPTRG histogram and process it
733 h = findHist("EventT0/m_histEventT0_TOP_hadron_L1_TOPTRG");
734 tag = "hadronTOPTRG_TOPT0";
736 if (std::get<0>(processHistogram(h, tag))) {
737 m_cTOPTimeHadronsTOPTRG->SetFillColor(0);
738 m_cTOPTimeHadronsTOPTRG->Modified();
739 m_cTOPTimeHadronsTOPTRG->Update();
741 } else {
742 B2DEBUG(29, Form("Histogram TOP EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
743 if (h) h->Draw();
744 m_cTOPTimeHadronsTOPTRG->SetFillColor(kGray);
746 }
747
748 // find TOP EventT0 Bhabhas TOPTRG histogram and process it
749 h = findHist("EventT0/m_histEventT0_TOP_bhabha_L1_TOPTRG");
750 tag = "bhabhaTOPTRG_TOPT0";
752 if (std::get<0>(processHistogram(h, tag))) {
753 m_cTOPTimeBhaBhaTOPTRG->SetFillColor(0);
754 m_cTOPTimeBhaBhaTOPTRG->Modified();
755 m_cTOPTimeBhaBhaTOPTRG->Update();
757 } else {
758 B2DEBUG(29, Form("Histogram TOP EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
759 if (h) h->Draw();
760 m_cTOPTimeBhaBhaTOPTRG->SetFillColor(kGray);
762 }
763
764 // find TOP EventT0 Mumus TOPTRG histogram and process it
765 h = findHist("EventT0/m_histEventT0_TOP_mumu_L1_TOPTRG");
766 tag = "mumuTOPTRG_TOPT0";
768 if (std::get<0>(processHistogram(h, tag))) {
769 m_cTOPTimeMuMuTOPTRG->SetFillColor(0);
770 m_cTOPTimeMuMuTOPTRG->Modified();
771 m_cTOPTimeMuMuTOPTRG->Update();
772 } else {
773 B2DEBUG(29, Form("Histogram TOP EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
774 if (h) h->Draw();
775 m_cTOPTimeMuMuTOPTRG->SetFillColor(kGray);
776 m_cTOPTimeMuMuTOPTRG->Draw();
777 }
778
779
780 // --- SVD EventT0 plots for TOPTRG ---
781
782 // find SVD EventT0 Hadrons TOPTRG histogram and process it
783 h = findHist("EventT0/m_histEventT0_SVD_hadron_L1_TOPTRG");
784 tag = "hadronTOPTRG_SVDT0";
786 if (std::get<0>(processHistogram(h, tag))) {
787 m_cSVDTimeHadronsTOPTRG->SetFillColor(0);
788 m_cSVDTimeHadronsTOPTRG->Modified();
789 m_cSVDTimeHadronsTOPTRG->Update();
791 } else {
792 B2DEBUG(29, Form("Histogram SVD EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
793 if (h) h->Draw();
794 m_cSVDTimeHadronsTOPTRG->SetFillColor(kGray);
796 }
797
798 // find SVD EventT0 Bhabhas TOPTRG histogram and process it
799 h = findHist("EventT0/m_histEventT0_SVD_bhabha_L1_TOPTRG");
800 tag = "bhabhaTOPTRG_SVDT0";
802 if (std::get<0>(processHistogram(h, tag))) {
803 m_cSVDTimeBhaBhaTOPTRG->SetFillColor(0);
804 m_cSVDTimeBhaBhaTOPTRG->Modified();
805 m_cSVDTimeBhaBhaTOPTRG->Update();
807 } else {
808 B2DEBUG(29, Form("Histogram SVD EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
809 if (h) h->Draw();
810 m_cSVDTimeBhaBhaTOPTRG->SetFillColor(kGray);
812 }
813
814 // find SVD EventT0 Mumus TOPTRG histogram and process it
815 h = findHist("EventT0/m_histEventT0_SVD_mumu_L1_TOPTRG");
816 tag = "mumuTOPTRG_SVDT0";
818 if (std::get<0>(processHistogram(h, tag))) {
819 m_cSVDTimeMuMuTOPTRG->SetFillColor(0);
820 m_cSVDTimeMuMuTOPTRG->Modified();
821 m_cSVDTimeMuMuTOPTRG->Update();
822 } else {
823 B2DEBUG(29, Form("Histogram SVD EventT0 for %s from EventT0 DQM not processed!", tag.Data()));
824 if (h) h->Draw();
825 m_cSVDTimeMuMuTOPTRG->SetFillColor(kGray);
826 m_cSVDTimeMuMuTOPTRG->Draw();
827 }
828}
TCanvas * m_cSVDTimeMuMuTOPTRG
Canvas for SVD time TOPTRG jitter mumu.
TCanvas * m_cCDCTimeHadronsTOPTRG
Canvas for CDC time TOPTRG jitter hadrons.
TCanvas * m_cCDCTimeMuMuTOPTRG
Canvas for CDC time TOPTRG jitter mumu.
TCanvas * m_cTOPTimeHadronsTOPTRG
Canvas for TOP time TOPTRG jitter hadrons.
TCanvas * m_cECLTimeBhaBhaTOPTRG
Canvas for ECL time TOPTRG jitter bhabhas.
TCanvas * m_cSVDTimeHadronsTOPTRG
Canvas for SVD time TOPTRG jitter hadrons.
TCanvas * m_cTOPTimeBhaBhaTOPTRG
Canvas for TOP time TOPTRG jitter bhabhas.
TCanvas * m_cTOPTimeMuMuTOPTRG
Canvas for TOP time TOPTRG jitter mumu.
TCanvas * m_cECLTimeHadronsTOPTRG
Canvas for ECL time TOPTRG jitter hadrons.
TCanvas * m_cCDCTimeBhaBhaTOPTRG
Canvas for CDC time TOPTRG jitter bhabhas.
TCanvas * m_cECLTimeMuMuTOPTRG
Canvas for ECL time TOPTRG jitter mumu.
TCanvas * m_cSVDTimeBhaBhaTOPTRG
Canvas for SVD time TOPTRG jitter bhabhas.

◆ beginRun()

void beginRun ( void )
finaloverridevirtual

clear TCanvas

Reimplemented from Module.

Definition at line 60 of file DQMHistAnalysisEventT0TriggerJitter.cc.

◆ 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 806 of file DQMHistAnalysis.cc.

807{
808 if (state != ECA_NORMAL) {
809 std::string name;
810 if (id) name = ca_name(id);
811 B2WARNING(message << ": " << name);
812 printPVStatus(id, false);
813 }
814}
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 798 of file DQMHistAnalysis.cc.

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

◆ checkPVStatus()

void checkPVStatus ( void )
inherited

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

Definition at line 762 of file DQMHistAnalysis.cc.

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

◆ cleanupEpicsPVs()

void cleanupEpicsPVs ( void )
inherited

Unsubscribe from EPICS PVs on terminate.

Definition at line 643 of file DQMHistAnalysis.cc.

644{
645 // this should be called in terminate function of analysis modules
646#ifdef _BELLE2_EPICS
647 if (getUseEpics()) {
648 for (auto& it : m_epicsChID) CheckEpicsError(ca_clear_channel(it), "ca_clear_channel failure", it);
649 updateEpicsPVs(5.0);
650 // Make sure we clean up both afterwards!
651 m_epicsChID.clear();
652 m_epicsNameToChID.clear();
653 }
654#endif
655}
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 )
private

Initialise canvases.

Definition at line 875 of file DQMHistAnalysisEventT0TriggerJitter.cc.

876{
878 m_cECLTimeBhaBhaECLTRG->Clear();
879 m_cECLTimeMuMuECLTRG->Clear();
881 m_cCDCTimeBhaBhaECLTRG->Clear();
882 m_cCDCTimeMuMuECLTRG->Clear();
884 m_cTOPTimeBhaBhaECLTRG->Clear();
885 m_cTOPTimeMuMuECLTRG->Clear();
887 m_cSVDTimeBhaBhaECLTRG->Clear();
888 m_cSVDTimeMuMuECLTRG->Clear();
889
891 m_cECLTimeBhaBhaCDCTRG->Clear();
892 m_cECLTimeMuMuCDCTRG->Clear();
894 m_cCDCTimeBhaBhaCDCTRG->Clear();
895 m_cCDCTimeMuMuCDCTRG->Clear();
897 m_cTOPTimeBhaBhaCDCTRG->Clear();
898 m_cTOPTimeMuMuCDCTRG->Clear();
900 m_cSVDTimeBhaBhaCDCTRG->Clear();
901 m_cSVDTimeMuMuCDCTRG->Clear();
902
904 m_cECLTimeBhaBhaTOPTRG->Clear();
905 m_cECLTimeMuMuTOPTRG->Clear();
907 m_cCDCTimeBhaBhaTOPTRG->Clear();
908 m_cCDCTimeMuMuTOPTRG->Clear();
910 m_cTOPTimeBhaBhaTOPTRG->Clear();
911 m_cTOPTimeMuMuTOPTRG->Clear();
913 m_cSVDTimeBhaBhaTOPTRG->Clear();
914 m_cSVDTimeMuMuTOPTRG->Clear();
915}

◆ clearHistList()

void clearHistList ( void )
staticinherited

Clears the list of histograms.

Definition at line 337 of file DQMHistAnalysis.cc.

338{
339 s_histList.clear();
340}

◆ 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 CanvasUpdatedList s_canvasUpdatedList
The list of canvas updated status.

◆ clearRefList()

void clearRefList ( void )
staticinherited

Clears the list of ref histograms.

Definition at line 342 of file DQMHistAnalysis.cc.

343{
344 s_refList.clear();
345}

◆ 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{
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.
void setParameters(const ModuleParamList &params)
Set values for parameters from other parameter list.
const ModuleParamList & getParamList() const
Return module param list.
Definition Module.h:362
const std::string & getName() const
Returns the name of the module.
Definition Module.h:186
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:511
ModuleParamList m_moduleParamList
List storing and managing all parameter of the module.
Definition Module.h:515
void setName(const std::string &name)
Set the name of the module.
Definition Module.h:213
LogConfig m_logConfig
The log system configuration of the module.
Definition Module.h:513
std::vector< ModuleCondition > m_conditions
Module condition, only non-null if set.
Definition Module.h:520
std::string m_package
Package this module is found in (may be empty).
Definition Module.h:509
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 749 of file DQMHistAnalysis.cc.

750{
751 if (!canvas) return;
752 auto color = getStatusColor(stat);
753
754 canvas->Pad()->SetFillColor(color);
755
756 canvas->Pad()->SetFrameFillColor(10); // White (kWhite is not used since it results in transparent!)
757 canvas->Pad()->SetFrameFillStyle(1001);// White
758 canvas->Pad()->Modified();
759 canvas->Pad()->Update();
760}
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 425 of file Module.h.

425{ beginRun(); }

◆ 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 438 of file Module.h.

438{ endRun(); }

◆ 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 431 of file Module.h.

431{ event(); }

◆ 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 419 of file Module.h.

419{ initialize(); }

◆ 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 444 of file Module.h.

444{ terminate(); }

◆ deleteCanvases()

void deleteCanvases ( )
private

Delete canvases.

Definition at line 960 of file DQMHistAnalysisEventT0TriggerJitter.cc.

961{
974
987
1000}

◆ endRun()

void endRun ( void )
finaloverridevirtual

final fit of T0 distributions

Reimplemented from Module.

Definition at line 84 of file DQMHistAnalysisEventT0TriggerJitter.cc.

85{
86 // final calculation of the mean values for MiraBelle
90
91 if (m_printCanvas) {
93 }
94}
void analyseECLTRGEventT0Distributions(bool retrieveDeltas=true)
Analyse the ECLTRG EventT0 distributions The only function to retrieve deltaT values ECL-SVD,...
void analyseTOPTRGEventT0Distributions()
Analyse the TOPTRG EventT0 distributions.
void analyseCDCTRGEventT0Distributions()
Analyse the CDCTRG EventT0 distributions.

◆ 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:518
bool m_hasReturnValue
True, if the return value is set.
Definition Module.h:517

◆ event()

void event ( void )
finaloverridevirtual

fit the histograms in the event

Reimplemented from Module.

Definition at line 70 of file DQMHistAnalysisEventT0TriggerJitter.cc.

◆ 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 paths */
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>()),
491 &Module::setLogConfig)
@ 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: "<".
void if_value(const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
Add a condition to the module.
Definition Module.cc:79
void if_true(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to set the condition of the module.
Definition Module.cc:90
Module()
Constructor.
Definition Module.cc:30
void setReturnValue(int value)
Sets the return value for this module as integer.
Definition Module.cc:220
@ 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_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
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
ModuleCondition::EAfterConditionPath EAfterConditionPath
Forward the EAfterConditionPath definition from the ModuleCondition.
Definition Module.h:88

◆ ExtractNEvent()

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

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

Definition at line 376 of file DQMHistAnalysis.cc.

377{
379 for (size_t i = 0; i < hs.size(); i++) {
380 if (hs[i]->GetName() == std::string("DAQ/Nevent")) {
381 s_eventProcessed = hs[i]->GetEntries();
382 return;
383 }
384 }
385 B2ERROR("ExtractEvent: Histogram \"DAQ/Nevent\" missing");
386}
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 364 of file DQMHistAnalysis.cc.

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

◆ fDoubleGaus()

double fDoubleGaus ( double * x,
double * par )
staticprivate

double gaussian fitting function for the jitter distribution

Parameters
xData used to fit double gaussians
parNormalization + fraction + double gaussian parameters (mu, sigma)

Definition at line 101 of file DQMHistAnalysisEventT0TriggerJitter.cc.

102{
103 double N = par[0];
104 double frac = par[1];
105 double mean = par[2];
106 double sigma = par[3];
107 double mean2 = par[4];
108 double sigma2 = par[5];
109
110 return N * frac * TMath::Gaus(x[0], mean, sigma) + N * (1 - frac) * TMath::Gaus(x[0], mean2, sigma2);
111}

◆ 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 146 of file DQMHistAnalysis.cc.

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

◆ 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 174 of file DQMHistAnalysis.cc.

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

◆ 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 160 of file DQMHistAnalysis.cc.

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

◆ 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 228 of file DQMHistAnalysis.cc.

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

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

◆ 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 284 of file DQMHistAnalysis.cc.

285{
286 if (s_monObjList.find(objName) != s_monObjList.end()) {
287 return &s_monObjList[objName];
288 }
289 B2INFO("MonitoringObject " << objName << " not in memfile.");
290 return nullptr;
291}
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 219 of file DQMHistAnalysis.cc.

221{
222 if (dirname.size() > 0) {
223 return findRefHist(dirname + "/" + histname, scaling, hist);
224 }
225 return findRefHist(histname, scaling, hist);
226}
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 208 of file DQMHistAnalysis.cc.

209{
210 if (s_refList.find(histname) != s_refList.end()) {
211 // get a copy of the reference which we can modify
212 // (it is still owned and managed by the framework)
213 // then do the scaling
214 return scaleReference(scaling, hist, s_refList[histname].getReference());
215 }
216 return nullptr;
217}
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 323 of file Module.h.

324 {
325 return m_conditions;
326 }

◆ 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 313 of file Module.h.

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

◆ 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 118 of file DQMHistAnalysis.cc.

119{
120 std::string fullname;
121 if (dirname.size() > 0) {
122 fullname = dirname + "/" + histname;
123 } else {
124 fullname = histname;
125 }
126 return getDelta(fullname, n, onlyIfUpdated);
127}
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 129 of file DQMHistAnalysis.cc.

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

◆ 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 201 of file Module.h.

201{return m_description;}

◆ 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 529 of file DQMHistAnalysis.cc.

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

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

◆ 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 616 of file DQMHistAnalysis.cc.

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

◆ 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 602 of file DQMHistAnalysis.cc.

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

◆ 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 577 of file DQMHistAnalysis.cc.

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

◆ 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 552 of file DQMHistAnalysis.cc.

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

◆ getEventProcessed()

static int getEventProcessed ( void )
inlinestaticinherited

Get the number of processed events.

(Attention, asynch histogram updates!)

Returns
Processed events.

Definition at line 221 of file DQMHistAnalysis.h.

221{ 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, RootOutputModule, and StorageRootOutputModule.

Definition at line 133 of file Module.h.

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

◆ 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 224 of file Module.h.

224{return m_logConfig;}

◆ getModules()

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

no submodules, return empty list

Implements PathElement.

Definition at line 505 of file Module.h.

505{ 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 139 of file DQMHistAnalysis.cc.

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

◆ 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 186 of file Module.h.

186{return m_name;}

◆ getPackage()

const std::string & getPackage ( ) const
inlineinherited

Returns the package this module is in.

Definition at line 196 of file Module.h.

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

◆ getParamList()

const ModuleParamList & getParamList ( ) const
inlineinherited

Return module param list.

Definition at line 362 of file Module.h.

362{ 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 608 of file DQMHistAnalysis.h.

608{return m_PVPrefix;};

◆ 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 380 of file Module.h.

380{ return m_returnValue; }

◆ getRunType()

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

Get the list of the reference histograms.

Returns
The list of the reference histograms. Get the Run Type.
Run type string.

Definition at line 215 of file DQMHistAnalysis.h.

215{ 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 293 of file DQMHistAnalysis.cc.

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

◆ getStatusColor()

DQMHistAnalysisModule::EStatusColor getStatusColor ( EStatus status)
inherited

Return color for canvas state.

Parameters
statuscanvas status
Returns
alarm color

Definition at line 722 of file DQMHistAnalysis.cc.

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

◆ 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:508

◆ getUseEpics()

bool getUseEpics ( void )
inlineinherited

Getter for EPICS usage.

Returns
flag is in use

Definition at line 591 of file DQMHistAnalysis.h.

591{return m_useEpics;};

◆ getUseEpicsReadOnly()

bool getUseEpicsReadOnly ( void )
inlineinherited

Getter EPICS flag in read only mode.

Returns
flag if read only

Definition at line 597 of file DQMHistAnalysis.h.

597{return m_epicsReadOnly;};

◆ hasCondition()

bool hasCondition ( ) const
inlineinherited

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

Definition at line 310 of file Module.h.

310{ 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 107 of file DQMHistAnalysis.cc.

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

◆ 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 377 of file Module.h.

377{ 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 323 of file DQMHistAnalysis.cc.

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

◆ initialize()

void initialize ( void )
finaloverridevirtual

create TCanvas and MonitoringObject

Reimplemented from Module.

Definition at line 46 of file DQMHistAnalysisEventT0TriggerJitter.cc.

47{
48 gROOT->cd();
49
51
52 m_monObj = getMonitoringObject("eventT0");
53
54 registerEpicsPV("EventT0:ECLTRG_Hadron_Delta_CDCEventT0_SVDEventT0", "ECLTRG_Hadron_Delta_CDCEventT0_SVDEventT0");
55 registerEpicsPV("EventT0:ECLTRG_Hadron_Delta_ECLEventT0_SVDEventT0", "ECLTRG_Hadron_Delta_ECLEventT0_SVDEventT0");
56 registerEpicsPV("EventT0:ECLTRG_Hadron_Delta_TOPEventT0_SVDEventT0", "ECLTRG_Hadron_Delta_TOPEventT0_SVDEventT0");
57}
MonitoringObject * m_monObj
MonitoringObject to be produced by this module.
static MonitoringObject * getMonitoringObject(const std::string &name)
Get MonitoringObject with given name (new object is created if non-existing)
int registerEpicsPV(std::string pvname, std::string keyname="")
EPICS related Functions.

◆ initializeCanvases()

void initializeCanvases ( )
private

Initialise canvases.

Definition at line 830 of file DQMHistAnalysisEventT0TriggerJitter.cc.

831{
832 //ECLTRG canvas
833 m_cECLTimeHadronsECLTRG = new TCanvas("ECLTimeHadronsECLTRG", "ECL time hadrons ECLTRG jitter");
834 m_cECLTimeBhaBhaECLTRG = new TCanvas("ECLTimeBhaBhaECLTRG", "ECL time BhaBha ECLTRG jitter");
835 m_cECLTimeMuMuECLTRG = new TCanvas("ECLTimeMuMuECLTRG", "ECL time #mu#mu ECLTRG jitter");
836 m_cCDCTimeHadronsECLTRG = new TCanvas("CDCTimeHadronsECLTRG", "CDC time hadrons ECLTRG jitter");
837 m_cCDCTimeBhaBhaECLTRG = new TCanvas("CDCTimeBhaBhaECLTRG", "CDC time BhaBha ECLTRG jitter");
838 m_cCDCTimeMuMuECLTRG = new TCanvas("CDCTimeMuMuECLTRG", "CDC time #mu#mu ECLTRG jitter");
839 m_cTOPTimeHadronsECLTRG = new TCanvas("TOPTimeHadronsECLTRG", "TOP time hadrons ECLTRG jitter");
840 m_cTOPTimeBhaBhaECLTRG = new TCanvas("TOPTimeBhaBhaECLTRG", "TOP time BhaBha ECLTRG jitter");
841 m_cTOPTimeMuMuECLTRG = new TCanvas("TOPTimeMuMuECLTRG", "TOP time #mu#mu ECLTRG jitter");
842 m_cSVDTimeHadronsECLTRG = new TCanvas("SVDTimeHadronsECLTRG", "SVD time hadrons ECLTRG jitter");
843 m_cSVDTimeBhaBhaECLTRG = new TCanvas("SVDTimeBhaBhaECLTRG", "SVD time BhaBha ECLTRG jitter");
844 m_cSVDTimeMuMuECLTRG = new TCanvas("SVDTimeMuMuECLTRG", "SVD time #mu#mu ECLTRG jitter");
845
846 //CDCTRG canvas
847 m_cECLTimeHadronsCDCTRG = new TCanvas("ECLTimeHadronsCDCTRG", "ECL time hadrons CDCTRG jitter");
848 m_cECLTimeBhaBhaCDCTRG = new TCanvas("ECLTimeBhaBhaCDCTRG", "ECL time BhaBha CDCTRG jitter");
849 m_cECLTimeMuMuCDCTRG = new TCanvas("ECLTimeMuMuCDCTRG", "ECL time #mu#mu CDCTRG jitter");
850 m_cCDCTimeHadronsCDCTRG = new TCanvas("CDCTimeHadronsCDCTRG", "CDC time hadrons CDCTRG jitter");
851 m_cCDCTimeBhaBhaCDCTRG = new TCanvas("CDCTimeBhaBhaCDCTRG", "CDC time BhaBha CDCTRG jitter");
852 m_cCDCTimeMuMuCDCTRG = new TCanvas("CDCTimeMuMuCDCTRG", "CDC time #mu#mu CDCTRG jitter");
853 m_cTOPTimeHadronsCDCTRG = new TCanvas("TOPTimeHadronsCDCTRG", "TOP time hadrons CDCTRG jitter");
854 m_cTOPTimeBhaBhaCDCTRG = new TCanvas("TOPTimeBhaBhaCDCTRG", "TOP time BhaBha CDCTRG jitter");
855 m_cTOPTimeMuMuCDCTRG = new TCanvas("TOPTimeMuMuCDCTRG", "TOP time #mu#mu CDCTRG jitter");
856 m_cSVDTimeHadronsCDCTRG = new TCanvas("SVDTimeHadronsCDCTRG", "SVD time hadrons CDCTRG jitter");
857 m_cSVDTimeBhaBhaCDCTRG = new TCanvas("SVDTimeBhaBhaCDCTRG", "SVD time BhaBha CDCTRG jitter");
858 m_cSVDTimeMuMuCDCTRG = new TCanvas("SVDTimeMuMuCDCTRG", "SVD time #mu#mu CDCTRG jitter");
859
860 //TOPTRG canvas
861 m_cECLTimeHadronsTOPTRG = new TCanvas("ECLTimeHadronsTOPTRG", "ECL time hadrons TOPTRG jitter");
862 m_cECLTimeBhaBhaTOPTRG = new TCanvas("ECLTimeBhaBhaTOPTRG", "ECL time BhaBha TOPTRG jitter");
863 m_cECLTimeMuMuTOPTRG = new TCanvas("ECLTimeMuMuTOPTRG", "ECL time #mu#mu TOPTRG jitter");
864 m_cCDCTimeHadronsTOPTRG = new TCanvas("CDCTimeHadronsTOPTRG", "CDC time hadrons TOPTRG jitter");
865 m_cCDCTimeBhaBhaTOPTRG = new TCanvas("CDCTimeBhaBhaTOPTRG", "CDC time BhaBha TOPTRG jitter");
866 m_cCDCTimeMuMuTOPTRG = new TCanvas("CDCTimeMuMuTOPTRG", "CDC time #mu#mu TOPTRG jitter");
867 m_cTOPTimeHadronsTOPTRG = new TCanvas("TOPTimeHadronsTOPTRG", "TOP time hadrons TOPTRG jitter");
868 m_cTOPTimeBhaBhaTOPTRG = new TCanvas("TOPTimeBhaBhaTOPTRG", "TOP time BhaBha TOPTRG jitter");
869 m_cTOPTimeMuMuTOPTRG = new TCanvas("TOPTimeMuMuTOPTRG", "TOP time #mu#mu TOPTRG jitter");
870 m_cSVDTimeHadronsTOPTRG = new TCanvas("SVDTimeHadronsTOPTRG", "SVD time hadrons TOPTRG jitter");
871 m_cSVDTimeBhaBhaTOPTRG = new TCanvas("SVDTimeBhaBhaTOPTRG", "SVD time BhaBha TOPTRG jitter");
872 m_cSVDTimeMuMuTOPTRG = new TCanvas("SVDTimeMuMuTOPTRG", "SVD time #mu#mu TOPTRG jitter");
873}

◆ 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 704 of file DQMHistAnalysis.cc.

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

◆ printCanvases()

void printCanvases ( )
private

Print canvases if required.

Definition at line 917 of file DQMHistAnalysisEventT0TriggerJitter.cc.

918{
919 m_cECLTimeHadronsECLTRG->Print("EventT0_TriggerJitter.pdf(");
920 m_cECLTimeBhaBhaECLTRG->Print("EventT0_TriggerJitter.pdf");
921 m_cECLTimeMuMuECLTRG->Print("EventT0_TriggerJitter.pdf");
922 m_cCDCTimeHadronsECLTRG->Print("EventT0_TriggerJitter.pdf");
923 m_cCDCTimeBhaBhaECLTRG->Print("EventT0_TriggerJitter.pdf");
924 m_cCDCTimeMuMuECLTRG->Print("EventT0_TriggerJitter.pdf");
925 m_cTOPTimeHadronsECLTRG->Print("EventT0_TriggerJitter.pdf");
926 m_cTOPTimeBhaBhaECLTRG->Print("EventT0_TriggerJitter.pdf");
927 m_cTOPTimeMuMuECLTRG->Print("EventT0_TriggerJitter.pdf");
928 m_cSVDTimeHadronsECLTRG->Print("EventT0_TriggerJitter.pdf");
929 m_cSVDTimeBhaBhaECLTRG->Print("EventT0_TriggerJitter.pdf");
930 m_cSVDTimeMuMuECLTRG->Print("EventT0_TriggerJitter.pdf");
931
932 m_cECLTimeHadronsCDCTRG->Print("EventT0_TriggerJitter.pdf");
933 m_cECLTimeBhaBhaCDCTRG->Print("EventT0_TriggerJitter.pdf");
934 m_cECLTimeMuMuCDCTRG->Print("EventT0_TriggerJitter.pdf");
935 m_cCDCTimeHadronsCDCTRG->Print("EventT0_TriggerJitter.pdf");
936 m_cCDCTimeBhaBhaCDCTRG->Print("EventT0_TriggerJitter.pdf");
937 m_cCDCTimeMuMuCDCTRG->Print("EventT0_TriggerJitter.pdf");
938 m_cTOPTimeHadronsCDCTRG->Print("EventT0_TriggerJitter.pdf");
939 m_cTOPTimeBhaBhaCDCTRG->Print("EventT0_TriggerJitter.pdf");
940 m_cTOPTimeMuMuCDCTRG->Print("EventT0_TriggerJitter.pdf");
941 m_cSVDTimeHadronsCDCTRG->Print("EventT0_TriggerJitter.pdf");
942 m_cSVDTimeBhaBhaCDCTRG->Print("EventT0_TriggerJitter.pdf");
943 m_cSVDTimeMuMuCDCTRG->Print("EventT0_TriggerJitter.pdf");
944
945 m_cECLTimeHadronsTOPTRG->Print("EventT0_TriggerJitter.pdf");
946 m_cECLTimeBhaBhaTOPTRG->Print("EventT0_TriggerJitter.pdf");
947 m_cECLTimeMuMuTOPTRG->Print("EventT0_TriggerJitter.pdf");
948 m_cCDCTimeHadronsTOPTRG->Print("EventT0_TriggerJitter.pdf");
949 m_cCDCTimeBhaBhaTOPTRG->Print("EventT0_TriggerJitter.pdf");
950 m_cCDCTimeMuMuTOPTRG->Print("EventT0_TriggerJitter.pdf");
951 m_cTOPTimeHadronsTOPTRG->Print("EventT0_TriggerJitter.pdf");
952 m_cTOPTimeBhaBhaTOPTRG->Print("EventT0_TriggerJitter.pdf");
953 m_cTOPTimeMuMuTOPTRG->Print("EventT0_TriggerJitter.pdf");
954 m_cSVDTimeHadronsTOPTRG->Print("EventT0_TriggerJitter.pdf");
955 m_cSVDTimeBhaBhaTOPTRG->Print("EventT0_TriggerJitter.pdf");
956 m_cSVDTimeMuMuTOPTRG->Print("EventT0_TriggerJitter.pdf)");
957}

◆ 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 772 of file DQMHistAnalysis.cc.

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

◆ processHistogram()

std::tuple< bool, std::optional< double > > processHistogram ( TH1 * h,
TString tag,
bool retrieveMeanT0 = false )
private

process the EventT0 distribution fitting with two gaussians filling the MonitoringObject

Parameters
hEventT0 histogram
tagto distinguish results
retrieveMeanT0if true, calculate meanT0 values for checking T0 drifts wrt SVD, default: false
Returns
tuple of a bool indicating whether the fit was successful, and an std::optional<double> to retrieve the meanT0 value

Definition at line 113 of file DQMHistAnalysisEventT0TriggerJitter.cc.

115{
116
117 if (h == nullptr) {
118 B2DEBUG(20, "h == nullptr");
119 m_monObj->setVariable(Form("fit_%s", tag.Data()), 0);
120 return {false, {}};
121 }
122
123 // The default value for the EventT0 value is -1000, but bins start at -100, so we might mostly fill the underflow bin if
124 // EventT0 for a detector is not present. And also the nominal EventT0 might be too big or too small. Only use the content
125 // of the actually useful bins to decide whether or not to fit the histogram.
126 auto nValidEntries = h->GetEntries() - h->GetBinContent(0) - h->GetBinContent(h->GetNbinsX() + 1);
127 if (static_cast<uint>(nValidEntries) < m_nEntriesMin) {
128 B2DEBUG(20, "not enough entries");
129 m_monObj->setVariable(Form("fit_%s", tag.Data()), 0);
130 return {false, {}};
131 }
132
133
134 //scale the histogram only with content of valid bins, ignore over and underflow bins
135 h->Scale(1. / nValidEntries);
136 h->GetXaxis()->SetRangeUser(-50, 50);
137
138 //define the fitting function
140 fitf.SetParNames("N", "f_{1}", "#mu_{1}", "#sigma_{1}", "#mu_{2}", "#sigma_{2}");
141 fitf.SetParameters(0.1, 0.8, 0, 5, 0, 15);
142 fitf.SetParLimits(1, 0, 1); //fraction
143 fitf.SetParLimits(3, 0, 100); //sigma1
144 fitf.SetParLimits(5, 0, 100); //sigma2
145
146 if (h->Fit(&fitf, "SR+") != 0) {
147 B2DEBUG(20, "failed fit");
148 m_monObj->setVariable(Form("fit_%s", tag.Data()), 0);
149 return {false, {}};
150 }
151
152 Double_t par[6];
153 fitf.GetParameters(&par[0]);
154 Double_t parErr[6];
155 for (int i = 0; i < 6; i++)
156 parErr[i] = fitf.GetParError(i) ;
157
158
159 //define gaussian components
160 TF1 gauss1("gauss1", "gaus", -100, 100);
161 TF1 gauss2("gauss2", "gaus", -100, 100);
162
163 // Sometimes the first Gaussian isn't the main one, messing up the DQM plots
164 // Thus, chose the Gaussian with the larger relative contribution to be the main one
165 const double mainFrac = par[1] > 0.5 ? par[1] : (1 - par[1]);
166 const double mainMean = par[1] > 0.5 ? par[2] : par[4];
167 const double mainSigma = par[1] > 0.5 ? par[3] : par[5];
168 const double miniMean = par[1] > 0.5 ? par[4] : par[2];
169 const double miniSigma = par[1] > 0.5 ? par[5] : par[3];
170 const double mainMeanErr = par[1] > 0.5 ? parErr[2] : parErr[4];
171 const double mainSigmaErr = par[1] > 0.5 ? parErr[3] : parErr[5];
172 const double miniMeanErr = par[1] > 0.5 ? parErr[4] : parErr[2];
173 const double miniSigmaErr = par[1] > 0.5 ? parErr[5] : parErr[3];
174
175 gauss1.SetLineColor(kBlue);
176 gauss1.SetLineStyle(kDashed);
177 gauss1.SetParameters(par[0]*mainFrac, mainMean, mainSigma);
178
179 gauss2.SetLineColor(kRed);
180 gauss2.SetLineStyle(kDashed);
181 gauss2.SetParameters(par[0] * (1 - mainFrac), miniMean, miniSigma);
182
183 m_monObj->setVariable(Form("fit_%s", tag.Data()), 1);
184 m_monObj->setVariable(Form("N_%s", tag.Data()), nValidEntries, TMath::Sqrt(nValidEntries));
185 m_monObj->setVariable(Form("f_%s", tag.Data()), mainFrac, parErr[1]);
186 m_monObj->setVariable(Form("mean1_%s", tag.Data()), mainMean, mainMeanErr);
187 m_monObj->setVariable(Form("sigma1_%s", tag.Data()), mainSigma, mainSigmaErr);
188 m_monObj->setVariable(Form("mean2_%s", tag.Data()), miniMean, miniMeanErr);
189 m_monObj->setVariable(Form("sigma2_%s", tag.Data()), miniSigma, miniSigmaErr);
190
191 //SETUP gSTYLE - all plots
192 gStyle->SetOptFit(1111);
193
194 gPad->Clear();// better clear before to get rid of all fit lines drawn before
195 h->Draw();
196 fitf.DrawCopy("same");// Do not use DrawClone, it result in meory leak (even so unclear why)
197 gauss1.DrawCopy("same");
198 gauss2.DrawCopy("same");
199
200 if (retrieveMeanT0) {
201 // return mean of the core Gaussian
202 return {true, mainMean};
203 }
204 return {true, {}};
205
206
207}
static double fDoubleGaus(double *x, double *par)
double gaussian fitting function for the jitter distribution

◆ 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 388 of file DQMHistAnalysis.cc.

389{
390 return registerEpicsPVwithPrefix(m_PVPrefix, pvname, keyname);
391}
static std::string m_PVPrefix
The Prefix for EPICS PVs.
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 398 of file DQMHistAnalysis.cc.

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

◆ 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 393 of file DQMHistAnalysis.cc.

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

◆ 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 669 of file DQMHistAnalysis.cc.

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

◆ 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 663 of file DQMHistAnalysis.cc.

665{
666 return requestLimitsFromEpicsPVs(getEpicsPVChID(index), lowerAlarm, lowerWarn, upperWarn, upperAlarm);
667}
chid getEpicsPVChID(std::string keyname)
Get EPICS PV Channel Id.
bool requestLimitsFromEpicsPVs(chid id, double &lowerAlarm, double &lowerWarn, double &upperWarn, double &upperAlarm)
Get Alarm Limits from EPICS PV.

◆ 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 657 of file DQMHistAnalysis.cc.

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

◆ resetDeltaList()

void resetDeltaList ( void )
inherited

Reset Delta.

Definition at line 347 of file DQMHistAnalysis.cc.

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

◆ 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 182 of file DQMHistAnalysis.cc.

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

◆ 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

◆ setDeltaT0Values()

void setDeltaT0Values ( )
private

Set the deltaT0 values in the monObj.

Definition at line 1003 of file DQMHistAnalysisEventT0TriggerJitter.cc.

1004{
1005 // Set the deltaT0 values to be accissble on the DQM web page for the shifters, with SVD EventT0 being the reference
1006 // As we are only interested in trends, just the raw difference is used, no (error) weighted values
1007 // However, not all values might exist, so make the algorithm fault tolerant
1008 if (m_ECLTRGHLThadronSVDT0 > -998) {
1009 if (m_ECLTRGHLThadronCDCT0 > -998) {
1010 setEpicsPV("ECLTRG_Hadron_Delta_CDCEventT0_SVDEventT0", m_ECLTRGHLThadronCDCT0 - m_ECLTRGHLThadronSVDT0);
1011 }
1012 if (m_ECLTRGHLThadronECLT0 > -998) {
1013 setEpicsPV("ECLTRG_Hadron_Delta_ECLEventT0_SVDEventT0", m_ECLTRGHLThadronECLT0 - m_ECLTRGHLThadronSVDT0);
1014 }
1015 if (m_ECLTRGHLThadronTOPT0 > -998) {
1016 setEpicsPV("ECLTRG_Hadron_Delta_TOPEventT0_SVDEventT0", m_ECLTRGHLThadronTOPT0 - m_ECLTRGHLThadronSVDT0);
1017 }
1018 }
1019}
void setEpicsPV(std::string keyname, double value)
Write value to a EPICS PV.

◆ 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}
std::string m_description
The description of the module.
Definition Module.h:510

◆ 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 467 of file DQMHistAnalysis.cc.

468{
469 if (!m_useEpics || m_epicsReadOnly) return;
470#ifdef _BELLE2_EPICS
471 if (index < 0 || index >= (int)m_epicsChID.size()) {
472 B2ERROR("Epics PV with " << index << " not registered!");
473 return;
474 }
475 CheckEpicsError(ca_put(DBR_DOUBLE, m_epicsChID[index], (void*)&value), "ca_set failure", m_epicsChID[index]);
476#endif
477}
static bool m_epicsReadOnly
Flag if to use EPICS in ReadOnly mode (for reading limits) do not set by yourself,...

◆ 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 479 of file DQMHistAnalysis.cc.

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

◆ 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 425 of file DQMHistAnalysis.cc.

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

◆ 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 437 of file DQMHistAnalysis.cc.

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

◆ 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 491 of file DQMHistAnalysis.cc.

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

◆ 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 449 of file DQMHistAnalysis.cc.

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

◆ setEventProcessed()

void setEventProcessed ( int e)
inlineinherited

Set the number of processed events.

(Attention, asynch histogram updates!)

e Processed events.

Definition at line 233 of file DQMHistAnalysis.h.

233{s_eventProcessed = e;};

◆ setLogConfig()

void setLogConfig ( const LogConfig & logConfig)
inlineinherited

Set the log system configuration.

Definition at line 229 of file Module.h.

229{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 213 of file Module.h.

213{ m_name = name; };

◆ setParamList()

void setParamList ( const ModuleParamList & params)
inlineprotectedinherited

Replace existing parameter list.

Definition at line 500 of file Module.h.

500{ 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}
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:200
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Definition LogSystem.cc:28
LogConfig & getLogConfig()
Returns the log system configuration.
Definition Module.h:224
std::string m_name
The name of the module, saved as a string (user-modifiable)
Definition Module.h:507
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 614 of file DQMHistAnalysis.h.

614{ 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 227 of file DQMHistAnalysis.h.

227{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 579 of file DQMHistAnalysis.h.

579{m_useEpics = flag;};

◆ setUseEpicsReadOnly()

void setUseEpicsReadOnly ( bool flag)
inlineinherited

Setter EPICS flag in read only mode.

Parameters
flagset read only

Definition at line 585 of file DQMHistAnalysis.h.

585{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 302 of file DQMHistAnalysis.cc.

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

◆ terminate()

void terminate ( void )
finaloverridevirtual

delete pointers

Reimplemented from Module.

Definition at line 96 of file DQMHistAnalysisEventT0TriggerJitter.cc.

◆ 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 354 of file DQMHistAnalysis.cc.

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

◆ 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 359 of file DQMHistAnalysis.cc.

360{
361 if (c) UpdateCanvas(c->GetName(), updated);
362}
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 630 of file DQMHistAnalysis.cc.

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

Member Data Documentation

◆ m_cCDCTimeBhaBhaCDCTRG

TCanvas* m_cCDCTimeBhaBhaCDCTRG = nullptr
private

Canvas for CDC time CDCTRG jitter bhabhas.

Definition at line 114 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cCDCTimeBhaBhaECLTRG

TCanvas* m_cCDCTimeBhaBhaECLTRG = nullptr
private

Canvas for CDC time ECLTRG jitter bhabhas.

Definition at line 100 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cCDCTimeBhaBhaTOPTRG

TCanvas* m_cCDCTimeBhaBhaTOPTRG = nullptr
private

Canvas for CDC time TOPTRG jitter bhabhas.

Definition at line 128 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cCDCTimeHadronsCDCTRG

TCanvas* m_cCDCTimeHadronsCDCTRG = nullptr
private

Canvas for CDC time CDCTRG jitter hadrons.

Definition at line 113 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cCDCTimeHadronsECLTRG

TCanvas* m_cCDCTimeHadronsECLTRG = nullptr
private

Canvas for CDC time ECLTRG jitter hadrons.

Definition at line 99 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cCDCTimeHadronsTOPTRG

TCanvas* m_cCDCTimeHadronsTOPTRG = nullptr
private

Canvas for CDC time TOPTRG jitter hadrons.

Definition at line 127 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cCDCTimeMuMuCDCTRG

TCanvas* m_cCDCTimeMuMuCDCTRG = nullptr
private

Canvas for CDC time CDCTRG jitter mumu.

Definition at line 115 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cCDCTimeMuMuECLTRG

TCanvas* m_cCDCTimeMuMuECLTRG = nullptr
private

Canvas for CDC time ECLTRG jitter mumu.

Definition at line 101 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cCDCTimeMuMuTOPTRG

TCanvas* m_cCDCTimeMuMuTOPTRG = nullptr
private

Canvas for CDC time TOPTRG jitter mumu.

Definition at line 129 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cECLTimeBhaBhaCDCTRG

TCanvas* m_cECLTimeBhaBhaCDCTRG = nullptr
private

Canvas for ECL time CDCTRG jitter bhabhas.

Definition at line 111 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cECLTimeBhaBhaECLTRG

TCanvas* m_cECLTimeBhaBhaECLTRG = nullptr
private

Canvas for ECL time ECLTRG jitter bhabhas.

Definition at line 97 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cECLTimeBhaBhaTOPTRG

TCanvas* m_cECLTimeBhaBhaTOPTRG = nullptr
private

Canvas for ECL time TOPTRG jitter bhabhas.

Definition at line 125 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cECLTimeHadronsCDCTRG

TCanvas* m_cECLTimeHadronsCDCTRG = nullptr
private

Canvas for ECL time CDCTRG jitter hadrons.

Definition at line 110 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cECLTimeHadronsECLTRG

TCanvas* m_cECLTimeHadronsECLTRG = nullptr
private

Canvas for ECL time ECLTRG jitter hadrons.

Definition at line 96 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cECLTimeHadronsTOPTRG

TCanvas* m_cECLTimeHadronsTOPTRG = nullptr
private

Canvas for ECL time TOPTRG jitter hadrons.

Definition at line 124 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cECLTimeMuMuCDCTRG

TCanvas* m_cECLTimeMuMuCDCTRG = nullptr
private

Canvas for ECL time CDCTRG jitter mumu.

Definition at line 112 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cECLTimeMuMuECLTRG

TCanvas* m_cECLTimeMuMuECLTRG = nullptr
private

Canvas for ECL time ECLTRG jitter mumu.

Definition at line 98 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cECLTimeMuMuTOPTRG

TCanvas* m_cECLTimeMuMuTOPTRG = nullptr
private

Canvas for ECL time TOPTRG jitter mumu.

Definition at line 126 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_conditions

std::vector<ModuleCondition> m_conditions
privateinherited

Module condition, only non-null if set.

Definition at line 520 of file Module.h.

◆ m_cSVDTimeBhaBhaCDCTRG

TCanvas* m_cSVDTimeBhaBhaCDCTRG = nullptr
private

Canvas for SVD time CDCTRG jitter bhabhas.

Definition at line 120 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cSVDTimeBhaBhaECLTRG

TCanvas* m_cSVDTimeBhaBhaECLTRG = nullptr
private

Canvas for SVD time ECLTRG jitter bhabhas.

Definition at line 106 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cSVDTimeBhaBhaTOPTRG

TCanvas* m_cSVDTimeBhaBhaTOPTRG = nullptr
private

Canvas for SVD time TOPTRG jitter bhabhas.

Definition at line 134 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cSVDTimeHadronsCDCTRG

TCanvas* m_cSVDTimeHadronsCDCTRG = nullptr
private

Canvas for SVD time CDCTRG jitter hadrons.

Definition at line 119 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cSVDTimeHadronsECLTRG

TCanvas* m_cSVDTimeHadronsECLTRG = nullptr
private

Canvas for SVD time ECLTRG jitter hadrons.

Definition at line 105 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cSVDTimeHadronsTOPTRG

TCanvas* m_cSVDTimeHadronsTOPTRG = nullptr
private

Canvas for SVD time TOPTRG jitter hadrons.

Definition at line 133 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cSVDTimeMuMuCDCTRG

TCanvas* m_cSVDTimeMuMuCDCTRG = nullptr
private

Canvas for SVD time CDCTRG jitter mumu.

Definition at line 121 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cSVDTimeMuMuECLTRG

TCanvas* m_cSVDTimeMuMuECLTRG = nullptr
private

Canvas for SVD time ECLTRG jitter mumu.

Definition at line 107 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cSVDTimeMuMuTOPTRG

TCanvas* m_cSVDTimeMuMuTOPTRG = nullptr
private

Canvas for SVD time TOPTRG jitter mumu.

Definition at line 135 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cTOPTimeBhaBhaCDCTRG

TCanvas* m_cTOPTimeBhaBhaCDCTRG = nullptr
private

Canvas for TOP time CDCTRG jitter bhabhas.

Definition at line 117 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cTOPTimeBhaBhaECLTRG

TCanvas* m_cTOPTimeBhaBhaECLTRG = nullptr
private

Canvas for TOP time ECLTRG jitter bhabhas.

Definition at line 103 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cTOPTimeBhaBhaTOPTRG

TCanvas* m_cTOPTimeBhaBhaTOPTRG = nullptr
private

Canvas for TOP time TOPTRG jitter bhabhas.

Definition at line 131 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cTOPTimeHadronsCDCTRG

TCanvas* m_cTOPTimeHadronsCDCTRG = nullptr
private

Canvas for TOP time CDCTRG jitter hadrons.

Definition at line 116 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cTOPTimeHadronsECLTRG

TCanvas* m_cTOPTimeHadronsECLTRG = nullptr
private

Canvas for TOP time ECLTRG jitter hadrons.

Definition at line 102 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cTOPTimeHadronsTOPTRG

TCanvas* m_cTOPTimeHadronsTOPTRG = nullptr
private

Canvas for TOP time TOPTRG jitter hadrons.

Definition at line 130 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cTOPTimeMuMuCDCTRG

TCanvas* m_cTOPTimeMuMuCDCTRG = nullptr
private

Canvas for TOP time CDCTRG jitter mumu.

Definition at line 118 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cTOPTimeMuMuECLTRG

TCanvas* m_cTOPTimeMuMuECLTRG = nullptr
private

Canvas for TOP time ECLTRG jitter mumu.

Definition at line 104 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_cTOPTimeMuMuTOPTRG

TCanvas* m_cTOPTimeMuMuTOPTRG = nullptr
private

Canvas for TOP time TOPTRG jitter mumu.

Definition at line 132 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_description

std::string m_description
privateinherited

The description of the module.

Definition at line 510 of file Module.h.

◆ m_ECLTRGHLThadronCDCT0

double m_ECLTRGHLThadronCDCT0 = -999.
private

CDC T0 for ECLTRG jitter for HLT hadron events.

Definition at line 138 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_ECLTRGHLThadronECLT0

double m_ECLTRGHLThadronECLT0 = -999.
private

ECL T0 for ECLTRG jitter for HLT hadron events.

Definition at line 137 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_ECLTRGHLThadronSVDT0

double m_ECLTRGHLThadronSVDT0 = -999.
private

SVD T0 for ECLTRG jitter for HLT hadron events.

Definition at line 140 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_ECLTRGHLThadronTOPT0

double m_ECLTRGHLThadronTOPT0 = -999.
private

TOP T0 for ECLTRG jitter for HLT hadron events.

Definition at line 139 of file DQMHistAnalysisEventT0TriggerJitter.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 517 of file Module.h.

◆ m_logConfig

LogConfig m_logConfig
privateinherited

The log system configuration of the module.

Definition at line 513 of file Module.h.

◆ m_moduleParamList

ModuleParamList m_moduleParamList
privateinherited

List storing and managing all parameter of the module.

Definition at line 515 of file Module.h.

◆ m_monObj

MonitoringObject* m_monObj = nullptr
private

MonitoringObject to be produced by this module.

Definition at line 93 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_name

std::string m_name
privateinherited

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

Definition at line 507 of file Module.h.

◆ m_nEntriesMin

uint m_nEntriesMin = 100
private

minimum number of entries to process the histogram

Definition at line 60 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_package

std::string m_package
privateinherited

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

Definition at line 509 of file Module.h.

◆ m_prefixCanvas

std::string m_prefixCanvas
private

prefix to be added to canvas name when saved as pdf

Definition at line 56 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_printCanvas

bool m_printCanvas
private

if true print the pdf of the canvases

Definition at line 58 of file DQMHistAnalysisEventT0TriggerJitter.h.

◆ m_propertyFlags

unsigned int m_propertyFlags
privateinherited

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

Definition at line 511 of file Module.h.

◆ m_PVPrefix

std::string m_PVPrefix = "TEST:"
staticprivateinherited

The Prefix for EPICS PVs.

Definition at line 160 of file DQMHistAnalysis.h.

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 518 of file Module.h.

◆ m_type

std::string m_type
privateinherited

The type of the module, saved as a string.

Definition at line 508 of file Module.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: