 |
Belle II Software
release-05-02-19
|
17 #include <dqm/analysis/modules/DQMHistAnalysis.h>
20 #include <TPaveText.h>
48 class DQMHistAnalysisSVDDoseModule :
public DQMHistAnalysisModule {
50 DQMHistAnalysisSVDDoseModule();
51 virtual ~DQMHistAnalysisSVDDoseModule();
68 double lastNHits = 0.0;
69 double lastNEvts = 0.0;
75 void event() override final;
76 void endRun() override final;
78 void updateCanvases();
82 inline T*
findHistT(TString name) {
return dynamic_cast<T*
>(
findHist(name.Data())); }
95 static T*
divide(T* num, T* den,
float scale = 1.0f)
97 TString name = TString(
"occu_from_") + num->GetName();
98 T* res = (T*)num->Clone(name);
99 for (
int i = 0; i < num->GetNcells(); i++) {
100 float n = num->GetBinContent(i), d = den->GetBinContent(i), e = num->GetBinError(i);
101 res->SetBinContent(i, d ? scale * n / d : 0.0f);
102 res->SetBinError(i, d ? scale * e / d : 0.0f);
143 std::vector<MyPV> m_myPVs;
144 double m_lastPVUpdate = -1.0;
145 chid m_timeSinceLastPVUpdateChan;
146 struct dbr_ctrl_enum m_stateCtrl;
std::vector< TCanvas * > m_c_instOccuAll
Canvases for the instantaneous occupancy.
MonitoringObject * m_monObj
Monitoring object for MiraBelle.
std::vector< TH2F * > m_h_occuHERAll
Histograms for the occu.
std::vector< TCanvas * > m_c_occuLER1All
Canvases for the 1D occu.
std::string m_pvPrefix
Prefix for EPICS PVs.
struct Belle2::DQMHistAnalysisSVDDoseModule::SensorGroup SensorGroup
A struct to define the sensors group we average over.
void endRun() override final
This method is called if the current run ends.
std::string m_statePVSuffix
Suffix of the state PV.
std::vector< TCanvas * > m_c_occuLERAll
Canvases for the occu.
static TH1 * findHist(const std::string &histname)
Find histogram.
bool m_useEpics
Whether to update EPICS PVs.
const char * pvMiddle
Middle part of the PV name.
std::vector< TH1F * > m_h_occuLER1All
Histograms for the 1D occu.
std::vector< TCanvas * > m_c_occuLER1
Canvases for the 1D occu.
std::vector< TH1F * > m_h_occuHER1
Histograms for the 1D occu.
Abstract base class for different kinds of events.
std::vector< TH1F * > m_h_occuHER1All
Histograms for the 1D occu.
std::vector< TH2F * > m_h_occuLER
Histograms for the occu.
double m_epicsUpdateSeconds
Minimum interval between successive PV updates.
std::vector< TH2F * > m_h_occuLERAll
Histograms for the occu.
void initialize() override final
Initialize the Module.
TPaveText * m_legend
Legend of the inst.
std::vector< TH2F * > m_h_occuHER
Histograms for the occu.
TString titleSuffix
Suffix for the title of the canvases.
std::string m_pvSuffix
Suffix for EPICS PVs.
static void carryOverflowOver(TH1F *h)
Carries the content of the overflow bin into the last bin.
TString nameSuffix
Suffix of the name of the histograms.
std::vector< TCanvas * > m_c_occuHER1
Canvases for the 1D occu.
std::vector< TCanvas * > m_c_occuLER
Canvases for the occu.
T * findHistT(TString name)
Utility method.
void beginRun() override final
Called when entering a new run.
std::string m_deltaTPVSuffix
Suffix of the update-time monitoring PV.
int nStrips
Total number of strips in the sensor group.
std::vector< TCanvas * > m_c_instOccu
Canvases for the instantaneous occupancy.
std::vector< TCanvas * > m_c_occuHER
Canvases for the occu.
std::vector< TH1F * > m_h_occuLER1
Histograms for the 1D occu.
std::vector< TCanvas * > m_c_occuHERAll
Canvases for the occu.
void event() override final
This method is the core of the module.
static const std::vector< SensorGroup > c_sensorGroups
List of sensors groups.
MonitoringObject is a basic object to hold data for the run-dependency monitoring Run summary TCanvas...
static T * divide(T *num, T *den, float scale=1.0f)
Divide two histograms, ignoring errors on the second histogram.
std::vector< TCanvas * > m_c_occuHER1All
Canvases for the 1D occu.