9#include "dqm/modules/DelayDQMModule.h"
11#include "TDirectory.h"
33 addParam(
"title",
m_title,
"Prefix for Title (ERECO, HLT, ...)", std::string(
"Processing "));
41 TAxis* axis = h->GetXaxis();
42 Int_t bins = axis->GetNbins();
44 Axis_t from = axis->GetXmin();
45 Axis_t to = axis->GetXmax();
46 Axis_t width = (to - from) / bins;
47 Axis_t* new_bins =
new Axis_t[bins + 1];
49 for (Int_t i = 0; i <= bins; i++) {
50 new_bins[i] = TMath::Power(10, from + i * width);
52 axis->Set(bins, new_bins);
63 TDirectory* oldDir = gDirectory;
70 m_DelayS =
new TH1D(
"DelayS", (
m_title +
"Delay;time /s").c_str(), 600, 0, 600);
71 m_DelayMs =
new TH1D(
"DelayMs", (
m_title +
"Delay;time /ms").c_str(), 200, 0, 2000);
72 m_DelayLog =
new TH1D(
"DelayLog", (
m_title +
"Delay; time /s").c_str(), 200, -3, 6);
107 using namespace std::chrono;
108 nanoseconds ns = duration_cast<nanoseconds> (system_clock::now().time_since_epoch());
109 nanoseconds event_time{};
119 it.GetPCTimeVal(0, &tv);
120 event_time = (
static_cast<seconds
>(tv.tv_sec)) + (
static_cast<microseconds
>(tv.tv_usec));
124 auto deltaT = (duration_cast<milliseconds> (ns - event_time)).count();
void initialize() override final
Initializer.
void defineHisto() override final
Definition of the histograms.
StoreArray< RawFTSW > m_rawFTSW
Input for FTSW.
StoreObjPtr< EventMetaData > m_eventMetaData
Input ptr for EventMetaData.
bool m_useMeta
use time from Meta or FTSW
void event() override final
This method is called for each event.
void BinLogX(TH1 *h)
helper function to replace X axis by a log scaled axis
std::string m_title
Prefix for title (NOT histo name)
TH1D * m_DelayS
Delay between trigger and end of processing in s.
std::string m_histogramDirectoryName
Name of the histogram directory in ROOT file.
TH1D * m_DelayLog
Delay between trigger and end of processing log scale.
TH1D * m_DelayMs
Delay between trigger and end of processing in ms.
void beginRun() override final
Called when entering a new run.
DelayDQMModule()
Constructor.
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
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.