12#include <dqm/core/DQMHistAnalysis.h>
24#include <ecl/mapper/ECLChannelMapper.h>
25#include <ecl/geometry/ECLNeighbours.h>
54 void event()
override final;
56 void endRun()
override final;
75 const std::vector< std::vector<short> >& neighbours,
76 double max_deviation,
bool occupancy_histogram);
113 std::vector< std::vector<int> >
updateAlarmCounts(
bool update_mirabelle =
false);
146 std::map<std::string, std::set<int> >
m_mask;
This module provides a high-level display to show which ECLCollectors have channels with various type...
std::map< int, int > getSuspiciousChannels(TH1 *hist, double total_events, const std::vector< std::vector< short > > &neighbours, double max_deviation, bool occupancy_histogram)
Get outlier channels, ones with values (occupancy, errors, etc) that are much higher than the values ...
double m_total_events
Number of events with ECL data in the current run.
double m_maxDeviationForChi2
The higher this parameter, the larger differences in the number of hits with bad chi2 are allowed for...
TH1F * h_bad_occ_overlay
Overlay to indicate bad channels on occupancy histogram.
void initialize() override final
Initialize the module.
void updateAlarmConfig()
Set alarm limits in DQM based on EPICS PV limits.
std::vector< std::vector< int > > updateAlarmCounts(bool update_mirabelle=false)
Calculate and return number of problems per crate for all alarm categories.
std::vector< TText * > m_labels
Labels on the ECL alarms histogram.
ECL::ECLChannelMapper m_mapper
Object to map ECL crystal ID to ECL crate ID.
void drawGrid(TH2 *hist)
Draw grid with TLine primitives for the specified histogram.
TCanvas * c_channels_summary
TCanvas for ECL alarms regarding suspicious channels.
std::map< int, int > getChannelsWithChi2Problems()
static const int c_max_masked_channels
Size of an array with masked channels.
std::pair< int, ECLAlarmType > getAlarmByName(std::string name)
Returns index of the specific alarm type and detailed information.
TH2F * h_channels_summary
Summarized information about ECL channels.
double m_maxDeviationForOccupancy
The higher this parameter, the larger differences in occupancy are allowed for adjacent channels.
ECL::ECLNeighbours m_neighbours_obj
Object to get ECL crystal neighbours.
~DQMHistAnalysisECLSummaryModule()
Destructor.
TCanvas * c_occupancy
ECL occupancy histogram with highlighted suspicious channels.
TExec * m_ecl_style
Special object to specify style parameters.
std::string m_pvPrefix
Prefix to use for PVs registered by this module.
MonitoringObject * m_monObj
MiraBelle monitoring object.
void terminate() override final
Terminate.
void event() override final
Event processor.
TCanvas * c_bad_chi2
ECL bad chi2 histogram with highlighted suspicious channels.
TH1F * h_bad_chi2_overlay
Overlay to indicate bad channels on chi2 histogram.
void endRun() override final
Call when a run ends.
bool m_onlyIfUpdated
If true (default), update EPICS PVs only if there were changes in the histograms.
std::map< int, int > getChannelsWithOccupancyProblems()
TH1F * h_bad_chi2_overlay_green
Overlay to indicate masked bad channels on chi2 histogram.
void beginRun() override final
Call when a run begins.
DQMHistAnalysisECLSummaryModule()
< derived from DQMHistAnalysisModule class.
TExec * m_default_style
Special object to revert changes done by ecl_style.
TH1F * h_bad_occ_overlay_green
Overlay to indicate masked bad channels on occupancy histogram.
std::map< std::string, std::set< int > > m_mask
List of masked Cell IDs for each alarm type.
bool getMaskedChannels(std::map< std::string, dbr_sts_long_array > &mask_info)
Get the array of masked channels for each type of alarm case monitored by this module.
bool m_useChannelMask
If true, mask Cell IDs based on DQM:ECL:channels_info:{alarm_type} PV info.
std::vector< ECLAlarmType > m_ecl_alarms
Different alarms monitored in h_channels_summary.
The base class for the histogram analysis module.
This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbo...
Class to get the neighbours for a given cell id.
MonitoringObject is a basic object to hold data for the run-dependency monitoring Run summary TCanvas...
Abstract base class for different kinds of events.
Definition for different ECL alarm types.
int alarm_limit
If value > alarm_limit, show error.
int warning_limit
If value > warning_limit, show warning.
std::string name
Internal name.
std::string title
Name to be shown on canvas.
double required_statistics
Minimum number of events for this alarm to be active.
structure to get an array of long values from EPICS
dbr_short_t status
status of value
dbr_long_t value[c_max_masked_channels]
current value
dbr_short_t severity
severity of alarm