9#include <dqm/analysis/modules/DQMHistAnalysisEpicsExample.h>
34 B2DEBUG(20,
"DQMHistAnalysisEpicsExample: Constructor done.");
39 B2DEBUG(20,
"DQMHistAnalysisEpicsExample: initialized.");
43 m_f1->SetParameter(0, 1000);
44 m_f1->SetParameter(1, 0);
45 m_f1->SetParameter(2, 10);
46 m_f1->SetLineColor(4);
48 m_f1->SetNumberFitPoints(512);
50 m_line =
new TLine(0, 10, 0, 0);
76 aa =
m_f1->GetParName(i);
77 if (aa ==
"") aa = std::string(
"par") + std::string(TString::Itoa(i, 10).Data());
92 B2DEBUG(20,
"DQMHistAnalysisEpicsExample: beginRun called.");
111 double y1 = hh1->GetMaximum();
112 double y2 = hh1->GetMinimum();
113 m_line->SetY1(y1 + (y1 - y2) * 0.05);
119 double x =
m_f1->GetParameter(1);
135 data =
m_f1->GetParameter(i);
143 B2DEBUG(20,
"DQMHistAnalysisEpicsExample : endRun called");
149 B2DEBUG(20,
"DQMHistAnalysisEpicsExample: terminate called");
void initialize() override final
Initializer.
TF1 * m_f1
The fit function.
DQMHistAnalysisEpicsExampleModule()
Constructor.
std::string m_histogramName
The name of the histogram.
TLine * m_line_hi
The line for the higher bound.
std::string m_pvPrefix
The prefix of PVs.
void terminate() override final
This method is called at the end of the event processing.
Int_t m_parameters
The number of fit function parameters for EPICS.
void event() override final
This method is called for each event.
std::string m_histogramDirectoryName
The name of the directory the histogram is in.
TCanvas * m_c1
The drawing canvas.
TLine * m_line_lo
The line for the lower bound.
void endRun() override final
This method is called if the current run ends.
void beginRun() override final
Called when entering a new run.
TLine * m_line
The line for the fitting result.
std::vector< std::string > mypv
list of pv names
std::string m_function
The definition of the fit function.
int registerEpicsPV(const std::string &pvname, const std::string &keyname="")
EPICS related Functions.
static void UpdateCanvas(const std::string &name, bool updated=true)
Mark canvas as updated (or not)
DQMHistAnalysisModule()
Constructor / Destructor.
void setEpicsPV(const std::string &keyname, double value)
Write value to a EPICS PV.
static TH1 * findHist(const std::string &dirname, const std::string &histname="", bool onlyIfUpdated=false)
Find histogram.
void setDescription(const std::string &description)
Sets the description of the module.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.