ATLAS Offline Software
HistogramDef.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef AthenaMonitoringKernel_HistogramDef_h
6 #define AthenaMonitoringKernel_HistogramDef_h
7 
8 #include <string>
9 #include <vector>
10 
11 namespace Monitored {
15  struct HistogramDef {
16  std::vector<std::string> name;
17  std::string alias;
18  std::string type;
19  std::string path;
20  std::string title;
21  std::string opt;
22  std::string tld;
23  std::string weight;
24  std::string cutMask;
25 
26  // RunMode enum created in case of future usage besides online and offline
27  enum class RunMode {
28  Online,
29  Offline,
30  Invalid,
31  };
32  // RunPeriod enum indicates when to rebook offline monitoring histograms
33  enum class RunPeriod {
34  Run,
35  LowStat,
36  Lumiblock,
37  Invalid,
38  };
39  std::string convention;
42 
43  bool Sumw2{false};
45  bool kAddBinsDynamically{false};
46  bool kRebinAxes{false};
47  bool kCanRebin{false};
48  bool kVec{false};
49  bool kVecUO{false};
50  bool kCumulative{false};
51  int kLive{0};
52  bool kAlwaysCreate{false};
53 
54  std::string xvar;
55  int xbins{0};
56  float xmin{0};
57  float xmax{0};
58  std::vector<std::string> xlabels;
59  std::vector<double> xarray;
60 
61  std::string yvar;
62  int ybins{0};
63  float ymin{0};
64  float ymax{0};
65  std::vector<std::string> ylabels;
66  std::vector<double> yarray;
67 
68  std::string zvar;
69  int zbins{0};
70  float zmin{0};
71  float zmax{0};
72  std::vector<std::string> zlabels;
73 
74  std::string treeDef;
75  std::string merge;
76 
77  bool ok{false};
78 
85  static const HistogramDef parse(const std::string& histogramDefinition);
86  };
87 } // namespace Monitored
88 
89 #endif /* AthenaMonitoringKernel_HistogramDef_h */
Monitored::HistogramDef::RunPeriod::Lumiblock
@ Lumiblock
rebook histogram after every 1 lumiblock
Monitored::HistogramDef::kCanRebin
bool kCanRebin
allow all axes to be rebinned
Definition: HistogramDef.h:47
Monitored::HistogramDef::kAddBinsDynamically
bool kAddBinsDynamically
add new bins outside the existing range
Definition: HistogramDef.h:45
Monitored::HistogramDef::RunPeriod::Run
@ Run
rebook histogram after each run
Monitored::HistogramDef::zvar
std::string zvar
name of z variable
Definition: HistogramDef.h:68
Monitored::HistogramDef::zmax
float zmax
z axis maximum
Definition: HistogramDef.h:71
Monitored::HistogramDef::xbins
int xbins
number of y bins
Definition: HistogramDef.h:55
Monitored::HistogramDef::runperiod
RunPeriod runperiod
rebook period in offline monitoring
Definition: HistogramDef.h:41
Monitored::HistogramDef::ylabels
std::vector< std::string > ylabels
labels for y axis
Definition: HistogramDef.h:65
Monitored::HistogramDef::RunMode::Online
@ Online
monitoring data online
Monitored::HistogramDef
the internal class used to keep parsed Filler properties
Definition: HistogramDef.h:15
Monitored::HistogramDef::yarray
std::vector< double > yarray
array of y bin edges
Definition: HistogramDef.h:66
Monitored::HistogramDef::tld
std::string tld
top level directory (below THistSvc stream)
Definition: HistogramDef.h:22
Monitored::HistogramDef::RunPeriod
RunPeriod
Definition: HistogramDef.h:33
Monitored::HistogramDef::ok
bool ok
good declaration: parsing or copying successful
Definition: HistogramDef.h:77
Monitored::HistogramDef::xarray
std::vector< double > xarray
array of x bin edges
Definition: HistogramDef.h:59
Monitored::HistogramDef::xmax
float xmax
x axis maximum
Definition: HistogramDef.h:57
Monitored::HistogramDef::opt
std::string opt
options
Definition: HistogramDef.h:21
Monitored::HistogramDef::weight
std::string weight
name of weight variable
Definition: HistogramDef.h:23
Monitored::HistogramDef::kVec
bool kVec
add content to each bin from each element of a vector
Definition: HistogramDef.h:48
Monitored::HistogramDef::zbins
int zbins
number of z bins
Definition: HistogramDef.h:69
Monitored::HistogramDef::path
std::string path
booking path
Definition: HistogramDef.h:19
Monitored::HistogramDef::RunMode::Invalid
@ Invalid
monitoring mode not specified
Monitored::HistogramDef::ymax
float ymax
y axis maximum
Definition: HistogramDef.h:64
Monitored
Generic monitoring tool for athena components.
Definition: GenericMonitoringTool.h:30
Monitored::HistogramDef::xlabels
std::vector< std::string > xlabels
labels for x axis
Definition: HistogramDef.h:58
Monitored::HistogramDef::name
std::vector< std::string > name
names of monitored variables
Definition: HistogramDef.h:16
Monitored::HistogramDef::parse
static const HistogramDef parse(const std::string &histogramDefinition)
Parses histogram defintion from json data.
Definition: HistogramDef.cxx:11
Monitored::HistogramDef::xmin
float xmin
x axis minimum
Definition: HistogramDef.h:56
Monitored::HistogramDef::kRebinAxes
bool kRebinAxes
increase the axis range without adding new bins
Definition: HistogramDef.h:46
Monitored::HistogramDef::treeDef
std::string treeDef
defines output TTree of monitored quantities
Definition: HistogramDef.h:74
Monitored::HistogramDef::Sumw2
bool Sumw2
store sum of squares of weights
Definition: HistogramDef.h:43
Monitored::HistogramDef::RunPeriod::Invalid
@ Invalid
rebook period not specified
Monitored::HistogramDef::alias
std::string alias
unique alias for THistSvc
Definition: HistogramDef.h:17
Monitored::HistogramDef::ymin
float ymin
y axis minimum
Definition: HistogramDef.h:63
Monitored::HistogramDef::RunMode
RunMode
Definition: HistogramDef.h:27
Monitored::HistogramDef::runmode
RunMode runmode
online or offline
Definition: HistogramDef.h:40
Monitored::HistogramDef::kVecUO
bool kVecUO
add content to each bin from vector, including overflow/underflow
Definition: HistogramDef.h:49
Monitored::HistogramDef::type
std::string type
class name
Definition: HistogramDef.h:18
Monitored::HistogramDef::convention
std::string convention
path naming convention (e.g.
Definition: HistogramDef.h:39
Monitored::HistogramDef::yvar
std::string yvar
name of y variable
Definition: HistogramDef.h:61
Monitored::HistogramDef::RunMode::Offline
@ Offline
monitoring data offline
Monitored::HistogramDef::kLive
int kLive
fill only the last N lumiblocks in y_vs_lb plots
Definition: HistogramDef.h:51
Monitored::HistogramDef::kCumulative
bool kCumulative
fill bin of monitored object's value, and every bin below it
Definition: HistogramDef.h:50
Monitored::HistogramDef::kAlwaysCreate
bool kAlwaysCreate
always create this histogram, even if never filled
Definition: HistogramDef.h:52
Monitored::HistogramDef::zmin
float zmin
z axis minimum
Definition: HistogramDef.h:70
Monitored::HistogramDef::cutMask
std::string cutMask
variable that defines whether event is accepted
Definition: HistogramDef.h:24
Monitored::HistogramDef::RunPeriod::LowStat
@ LowStat
rebook histogram after every 20 lumiblocks
Monitored::HistogramDef::ybins
int ybins
number of y bins
Definition: HistogramDef.h:62
Monitored::HistogramDef::kLBNHistoryDepth
int kLBNHistoryDepth
length of lb history
Definition: HistogramDef.h:44
Monitored::HistogramDef::title
std::string title
title of the histogram
Definition: HistogramDef.h:20
Monitored::HistogramDef::zlabels
std::vector< std::string > zlabels
labels for z axis
Definition: HistogramDef.h:72
Monitored::HistogramDef::merge
std::string merge
Definition: HistogramDef.h:75
Monitored::HistogramDef::xvar
std::string xvar
name of x variable
Definition: HistogramDef.h:54