10#include <ecl/modules/eclDQMConnectedRegions/eclDQMConnectedRegions.h>
13#include <framework/core/HistoModule.h>
14#include <framework/datastore/StoreArray.h>
15#include <ecl/dataobjects/ECLConnectedRegion.h>
16#include <ecl/dataobjects/ECLLocalMaximum.h>
17#include <ecl/dataobjects/ECLCalDigit.h>
20#include <TDirectory.h>
34 setDescription(
"ECL Data Quality Monitor to monitor ECL Connected Regions");
38 "histogram directory in ROOT file", std::string(
"ECL"));
43 TDirectory* oldDir = gDirectory;
50 m_largestCRCrystalsNum =
new TH1F(
"Crystals_distribution_in_largest_cr",
"Crystals distribution in largest ECLConnectedRegions",
53 m_largestCRLocalMaxNum =
new TH1F(
"LocalMaximum_distribution_in_largest_cr",
"LocalMaximum distribution in ECLConnectedRegion",
75 size_t max_crystals = 0;
76 size_t localmax_in_largest_cr = 0;
77 for (
auto& region : ecl_connected_regions) {
78 auto cr_crystals_num = region.getRelationsWith<
ECLCalDigit>().size();
79 auto cr_localmax_num = region.getRelationsWith<
ECLLocalMaximum>().size();
80 if (cr_crystals_num > max_crystals) {
81 max_crystals = cr_crystals_num;
82 localmax_in_largest_cr = cr_localmax_num;
Class to store calibrated ECLDigits: ECLCalDigits.
TH1F * m_largestCRCrystalsNum
Histogram to hold number of crystals in largest ECL connected region.
ECLDQMConnectedRegionsModule()
< derived from HistoModule class.
virtual void initialize() override
Initialize the module.
virtual void event() override
Event processor.
virtual void beginRun() override
Call when a run begins.
std::string m_histogramDirectoryName
Histogram directory in ROOT file.
TH1F * m_largestCRLocalMaxNum
Histogram to hold number of local maximum in ECL connected region.
virtual void defineHisto() override
Function to define histograms.
Class to store local maxima (LM)
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...
Accessor to arrays stored in the data store.
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.