ATLAS Offline Software
Public Types | Static Public Member Functions | Public Attributes | List of all members
Monitored::HistogramDef Struct Reference

the internal class used to keep parsed Filler properties More...

#include <HistogramDef.h>

Collaboration diagram for Monitored::HistogramDef:

Public Types

enum  RunMode { RunMode::Online, RunMode::Offline, RunMode::Invalid }
 
enum  RunPeriod { RunPeriod::Run, RunPeriod::LowStat, RunPeriod::Lumiblock, RunPeriod::Invalid }
 

Static Public Member Functions

static const HistogramDef parse (const std::string &histogramDefinition)
 Parses histogram defintion from json data. More...
 

Public Attributes

std::vector< std::string > name
 names of monitored variables More...
 
std::string alias
 unique alias for THistSvc More...
 
std::string type
 class name More...
 
std::string path
 booking path More...
 
std::string title
 title of the histogram More...
 
std::string opt
 options More...
 
std::string tld
 top level directory (below THistSvc stream) More...
 
std::string weight
 name of weight variable More...
 
std::string cutMask
 variable that defines whether event is accepted More...
 
std::string convention
 path naming convention (e.g. More...
 
RunMode runmode = RunMode::Invalid
 online or offline More...
 
RunPeriod runperiod = RunPeriod::Invalid
 rebook period in offline monitoring More...
 
bool Sumw2 {false}
 store sum of squares of weights More...
 
int kLBNHistoryDepth {0}
 length of lb history More...
 
bool kAddBinsDynamically {false}
 add new bins outside the existing range More...
 
bool kRebinAxes {false}
 increase the axis range without adding new bins More...
 
bool kCanRebin {false}
 allow all axes to be rebinned More...
 
bool kVec {false}
 add content to each bin from each element of a vector More...
 
bool kVecUO {false}
 add content to each bin from vector, including overflow/underflow More...
 
bool kCumulative {false}
 fill bin of monitored object's value, and every bin below it More...
 
int kLive {0}
 fill only the last N lumiblocks in y_vs_lb plots More...
 
bool kAlwaysCreate {false}
 always create this histogram, even if never filled More...
 
std::string xvar
 name of x variable More...
 
int xbins {0}
 number of y bins More...
 
float xmin {0}
 x axis minimum More...
 
float xmax {0}
 x axis maximum More...
 
std::vector< std::string > xlabels
 labels for x axis More...
 
std::vector< double > xarray
 array of x bin edges More...
 
std::string yvar
 name of y variable More...
 
int ybins {0}
 number of y bins More...
 
float ymin {0}
 y axis minimum More...
 
float ymax {0}
 y axis maximum More...
 
std::vector< std::string > ylabels
 labels for y axis More...
 
std::vector< double > yarray
 array of y bin edges More...
 
std::string zvar
 name of z variable More...
 
int zbins {0}
 number of z bins More...
 
float zmin {0}
 z axis minimum More...
 
float zmax {0}
 z axis maximum More...
 
std::vector< std::string > zlabels
 labels for z axis More...
 
std::string treeDef
 defines output TTree of monitored quantities More...
 
std::string merge
 
bool ok {false}
 good declaration: parsing or copying successful More...
 

Detailed Description

the internal class used to keep parsed Filler properties

Definition at line 15 of file HistogramDef.h.

Member Enumeration Documentation

◆ RunMode

Enumerator
Online 

monitoring data online

Offline 

monitoring data offline

Invalid 

monitoring mode not specified

Definition at line 27 of file HistogramDef.h.

27  {
28  Online,
29  Offline,
30  Invalid,
31  };

◆ RunPeriod

Enumerator
Run 

rebook histogram after each run

LowStat 

rebook histogram after every 20 lumiblocks

Lumiblock 

rebook histogram after every 1 lumiblock

Invalid 

rebook period not specified

Definition at line 33 of file HistogramDef.h.

33  {
34  Run,
35  LowStat,
36  Lumiblock,
37  Invalid,
38  };

Member Function Documentation

◆ parse()

const HistogramDef HistogramDef::parse ( const std::string &  histogramDefinition)
static

Parses histogram defintion from json data.

Parameters
histogramDefinitionA string contains histogram definition to parse
Returns
HistogramDef Object that contains the parsed histogram definition

Definition at line 11 of file HistogramDef.cxx.

11  {
12  const json& setting = json::parse(histogramDefinition);
14 
15  result.name = setting["allvars"].get<std::vector<std::string>>();
16  result.alias = static_cast<std::string>(setting["alias"]);
17  result.type = static_cast<std::string>(setting["type"]);
18  result.path = static_cast<std::string>(setting["path"]);
19  result.title = static_cast<std::string>(setting["title"]);
20  result.weight = static_cast<std::string>(setting["weight"]);
21  result.cutMask = static_cast<std::string>(setting["cutMask"]);
22 
23  result.convention = static_cast<std::string>(setting["convention"]);
24  size_t offline = result.convention.find("OFFLINE");
25  if (offline != std::string::npos) {
26  result.runmode = RunMode::Offline;
27  std::string durationString = result.convention.substr(offline);
28  if (durationString.find("run") != std::string::npos) {
29  result.runperiod = RunPeriod::Run;
30  } else if (durationString.find("lowStat") != std::string::npos) {
31  result.runperiod = RunPeriod::LowStat;
32  } else {
33  result.runperiod = RunPeriod::Lumiblock;
34  }
35  } else {
36  result.runmode = RunMode::Online;
37  }
38 
39  // all histogram options arising from 'opt'
40  result.Sumw2 = setting["Sumw2"];
41  result.kLBNHistoryDepth = setting["kLBNHistoryDepth"];
42  result.kAddBinsDynamically = setting["kAddBinsDynamically"];
43  result.kRebinAxes = setting["kRebinAxes"];
44  result.kCanRebin = setting["kCanRebin"];
45  result.kVec = setting["kVec"];
46  result.kVecUO = setting["kVecUO"];
47  result.kCumulative = setting["kCumulative"];
48  result.kLive = setting["kLive"];
49  result.kAlwaysCreate = setting["kAlwaysCreate"];
50 
51  result.xvar = static_cast<std::string>(setting["xvar"]);
52  result.xbins = setting["xbins"];
53  result.xmin = setting["xmin"];
54  result.xmax = setting["xmax"];
55  result.xlabels = setting["xlabels"].get<std::vector<std::string>>();
56  result.xarray = setting["xarray"].get<std::vector<double>>();
57 
58  result.yvar = static_cast<std::string>(setting["yvar"]);
59  result.ybins = setting["ybins"];
60  result.ymin = setting["ymin"];
61  result.ymax = setting["ymax"];
62  result.ylabels = setting["ylabels"].get<std::vector<std::string>>();
63  result.yarray = setting["yarray"].get<std::vector<double>>();
64 
65  result.zvar = static_cast<std::string>(setting["zvar"]);
66  result.zbins = setting["zbins"];
67  result.zmin = setting["zmin"];
68  result.zmax = setting["zmax"];
69  result.zlabels = setting["zlabels"].get<std::vector<std::string>>();
70 
71  result.merge = static_cast<std::string>(setting["merge"]);
72 
73  result.treeDef = static_cast<std::string>(setting["treeDef"]);
74 
75  result.ok = true;
76  return result;
77 }

Member Data Documentation

◆ alias

std::string Monitored::HistogramDef::alias

unique alias for THistSvc

Definition at line 17 of file HistogramDef.h.

◆ convention

std::string Monitored::HistogramDef::convention

path naming convention (e.g.

OFFLINE:LowStat)

Definition at line 39 of file HistogramDef.h.

◆ cutMask

std::string Monitored::HistogramDef::cutMask

variable that defines whether event is accepted

Definition at line 24 of file HistogramDef.h.

◆ kAddBinsDynamically

bool Monitored::HistogramDef::kAddBinsDynamically {false}

add new bins outside the existing range

Definition at line 45 of file HistogramDef.h.

◆ kAlwaysCreate

bool Monitored::HistogramDef::kAlwaysCreate {false}

always create this histogram, even if never filled

Definition at line 52 of file HistogramDef.h.

◆ kCanRebin

bool Monitored::HistogramDef::kCanRebin {false}

allow all axes to be rebinned

Definition at line 47 of file HistogramDef.h.

◆ kCumulative

bool Monitored::HistogramDef::kCumulative {false}

fill bin of monitored object's value, and every bin below it

Definition at line 50 of file HistogramDef.h.

◆ kLBNHistoryDepth

int Monitored::HistogramDef::kLBNHistoryDepth {0}

length of lb history

Definition at line 44 of file HistogramDef.h.

◆ kLive

int Monitored::HistogramDef::kLive {0}

fill only the last N lumiblocks in y_vs_lb plots

Definition at line 51 of file HistogramDef.h.

◆ kRebinAxes

bool Monitored::HistogramDef::kRebinAxes {false}

increase the axis range without adding new bins

Definition at line 46 of file HistogramDef.h.

◆ kVec

bool Monitored::HistogramDef::kVec {false}

add content to each bin from each element of a vector

Definition at line 48 of file HistogramDef.h.

◆ kVecUO

bool Monitored::HistogramDef::kVecUO {false}

add content to each bin from vector, including overflow/underflow

Definition at line 49 of file HistogramDef.h.

◆ merge

std::string Monitored::HistogramDef::merge

Definition at line 75 of file HistogramDef.h.

◆ name

std::vector<std::string> Monitored::HistogramDef::name

names of monitored variables

Definition at line 16 of file HistogramDef.h.

◆ ok

bool Monitored::HistogramDef::ok {false}

good declaration: parsing or copying successful

Definition at line 77 of file HistogramDef.h.

◆ opt

std::string Monitored::HistogramDef::opt

options

Definition at line 21 of file HistogramDef.h.

◆ path

std::string Monitored::HistogramDef::path

booking path

Definition at line 19 of file HistogramDef.h.

◆ runmode

RunMode Monitored::HistogramDef::runmode = RunMode::Invalid

online or offline

Definition at line 40 of file HistogramDef.h.

◆ runperiod

RunPeriod Monitored::HistogramDef::runperiod = RunPeriod::Invalid

rebook period in offline monitoring

Definition at line 41 of file HistogramDef.h.

◆ Sumw2

bool Monitored::HistogramDef::Sumw2 {false}

store sum of squares of weights

Definition at line 43 of file HistogramDef.h.

◆ title

std::string Monitored::HistogramDef::title

title of the histogram

Definition at line 20 of file HistogramDef.h.

◆ tld

std::string Monitored::HistogramDef::tld

top level directory (below THistSvc stream)

Definition at line 22 of file HistogramDef.h.

◆ treeDef

std::string Monitored::HistogramDef::treeDef

defines output TTree of monitored quantities

Definition at line 74 of file HistogramDef.h.

◆ type

std::string Monitored::HistogramDef::type

class name

Definition at line 18 of file HistogramDef.h.

◆ weight

std::string Monitored::HistogramDef::weight

name of weight variable

Definition at line 23 of file HistogramDef.h.

◆ xarray

std::vector<double> Monitored::HistogramDef::xarray

array of x bin edges

Definition at line 59 of file HistogramDef.h.

◆ xbins

int Monitored::HistogramDef::xbins {0}

number of y bins

Definition at line 55 of file HistogramDef.h.

◆ xlabels

std::vector<std::string> Monitored::HistogramDef::xlabels

labels for x axis

Definition at line 58 of file HistogramDef.h.

◆ xmax

float Monitored::HistogramDef::xmax {0}

x axis maximum

Definition at line 57 of file HistogramDef.h.

◆ xmin

float Monitored::HistogramDef::xmin {0}

x axis minimum

Definition at line 56 of file HistogramDef.h.

◆ xvar

std::string Monitored::HistogramDef::xvar

name of x variable

Definition at line 54 of file HistogramDef.h.

◆ yarray

std::vector<double> Monitored::HistogramDef::yarray

array of y bin edges

Definition at line 66 of file HistogramDef.h.

◆ ybins

int Monitored::HistogramDef::ybins {0}

number of y bins

Definition at line 62 of file HistogramDef.h.

◆ ylabels

std::vector<std::string> Monitored::HistogramDef::ylabels

labels for y axis

Definition at line 65 of file HistogramDef.h.

◆ ymax

float Monitored::HistogramDef::ymax {0}

y axis maximum

Definition at line 64 of file HistogramDef.h.

◆ ymin

float Monitored::HistogramDef::ymin {0}

y axis minimum

Definition at line 63 of file HistogramDef.h.

◆ yvar

std::string Monitored::HistogramDef::yvar

name of y variable

Definition at line 61 of file HistogramDef.h.

◆ zbins

int Monitored::HistogramDef::zbins {0}

number of z bins

Definition at line 69 of file HistogramDef.h.

◆ zlabels

std::vector<std::string> Monitored::HistogramDef::zlabels

labels for z axis

Definition at line 72 of file HistogramDef.h.

◆ zmax

float Monitored::HistogramDef::zmax {0}

z axis maximum

Definition at line 71 of file HistogramDef.h.

◆ zmin

float Monitored::HistogramDef::zmin {0}

z axis minimum

Definition at line 70 of file HistogramDef.h.

◆ zvar

std::string Monitored::HistogramDef::zvar

name of z variable

Definition at line 68 of file HistogramDef.h.


The documentation for this struct was generated from the following files:
Monitored::HistogramDef::RunPeriod::Lumiblock
@ Lumiblock
rebook histogram after every 1 lumiblock
get_generator_info.result
result
Definition: get_generator_info.py:21
json
nlohmann::json json
Definition: HistogramDef.cxx:9
Monitored::HistogramDef::RunPeriod::Run
@ Run
rebook histogram after each run
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:990
offline
Monitored::HistogramDef::RunMode::Online
@ Online
monitoring data online
Monitored::HistogramDef
the internal class used to keep parsed Filler properties
Definition: HistogramDef.h:15
PixelByteStreamErrors::Invalid
@ Invalid
Definition: PixelByteStreamErrors.h:14
Monitored::HistogramDef::RunMode::Offline
@ Offline
monitoring data offline
Monitored::HistogramDef::RunPeriod::LowStat
@ LowStat
rebook histogram after every 20 lumiblocks
CaloLCWConfig.Run
Run
Definition: CaloLCWConfig.py:39