![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "TProfile2D.h"
19 const std::string& histoPath)
22 size_t whereToStart = 0;
24 if (! histoPath.empty() && histoPath[0] ==
'/') {
27 size_t split = histoPath.find(
'/', whereToStart);
32 TClass::GetClass(
"TH1F");
33 TClass::GetClass(
"TH1D");
34 TClass::GetClass(
"TH1C");
35 TClass::GetClass(
"TH1S");
36 TClass::GetClass(
"TH1I");
37 TClass::GetClass(
"TH2F");
38 TClass::GetClass(
"TH2D");
39 TClass::GetClass(
"TH2C");
40 TClass::GetClass(
"TH2S");
41 TClass::GetClass(
"TH2I");
42 TClass::GetClass(
"TProfile");
43 TClass::GetClass(
"TProfile2D");
44 TClass::GetClass(
"TEfficiency");
45 TClass::GetClass(
"TTree");
53 if (def.
type ==
"TH1F") {
55 }
else if (def.
type ==
"TH1D") {
57 }
else if (def.
type ==
"TH1C") {
59 }
else if (def.
type ==
"TH1S") {
61 }
else if (def.
type ==
"TH1I") {
63 }
else if (def.
type ==
"TH2F") {
65 }
else if (def.
type ==
"TH2D") {
67 }
else if (def.
type ==
"TH2C") {
69 }
else if (def.
type ==
"TH2S") {
71 }
else if (def.
type ==
"TH2I") {
73 }
else if (def.
type ==
"TProfile") {
74 rootObj = create1DProfile<TProfile>(def);
75 }
else if (def.
type ==
"TProfile2D") {
76 rootObj = create2DProfile<TProfile2D>(def);
77 }
else if (def.
type ==
"TEfficiency") {
79 }
else if (def.
type ==
"TTree") {
85 "Try one of: TH1[F,D,C,S,I], TH2[F,D,C,S,I], TProfile, TProfile2D, " +
86 "TEfficiency, TTree.");
94 if ( def.
xarray.size()!=0 ) {
95 return create<H,TH1>(def, def.
xbins, &(def.
xarray)[0]);
103 if (def.
xarray.size()!=0) {
104 return create<H,TH1>(def, def.
xbins, &(def.
xarray)[0],
115 return create<H,TH2>(def, def.
xbins, &(def.
xarray)[0],
117 }
else if (def.
yarray.size()!=0) {
120 }
else if (def.
xarray.size()!=0) {
121 return create<H,TH2>(def, def.
xbins, &(def.
xarray)[0],
132 return create<H,TH2>(def, def.
xbins, &(def.
xarray)[0],
134 }
else if (def.
yarray.size()!=0) {
137 }
else if (def.
xarray.size()!=0) {
138 return create<H,TH2>(def, def.
xbins, &(def.
xarray)[0],
151 TEfficiency*
e =
nullptr;
164 if (def.
xarray.size()!=0) {
165 e =
new TEfficiency(def.
alias.c_str(), def.
title.c_str(),
168 e =
new TEfficiency(def.
alias.c_str(), def.
title.c_str(),
173 e =
new TEfficiency(def.
alias.c_str(), def.
title.c_str(),
176 e =
new TEfficiency(def.
alias.c_str(), def.
title.c_str(),
180 e =
new TEfficiency(def.
alias.c_str(), def.
title.c_str(),
199 template<
class H,
class HBASE,
typename...
Types>
204 HBASE*
histo =
nullptr;
226 h->GetYaxis()->SetTitleOffset(1.25);
250 t =
new TTree(def.
alias.c_str(),def.
title.c_str());
262 const unsigned canExtendPolicy = def.
kCanRebin ? TH1::kAllAxes : TH1::kNoAxis;
263 hist->SetCanExtend(canExtendPolicy);
277 const int nBin =
axis->GetNbins();
285 const static std::set<std::string> onlinePaths( {
"EXPERT",
"SHIFT",
"DEBUG",
"RUNSTAT",
"EXPRESS" } );
291 if ( onlinePaths.count( def.
path)!=0 ) {
293 }
else if ( def.
path==
"DEFAULT" ) {
302 [](
const char a,
const char b) {
303 return a == b and a ==
'/';
313 if (def.
type==
"TEfficiency") {
315 }
else if (def.
type==
"TGraph") {
317 }
else if (def.
type==
"TTree") {
virtual TNamed * create(const HistogramDef &def)
Book and register ROOT object for given definition.
bool kCanRebin
allow all axes to be rebinned
std::string m_streamName
defines the stream for THistSvc
std::string m_groupName
defines location of group of histograms
path
python interpreter configuration --------------------------------------—
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Represents error occurred during accessing histograms objects.
TH1 * create1D(const HistogramDef &def)
Helper for generic 'create' method for 1D histograms.
int xbins
number of y bins
std::vector< std::string > ylabels
labels for y axis
the internal class used to keep parsed Filler properties
std::tuple< WrapType< TYPES >... > Types
A simple tuple of multiple types.
std::vector< double > yarray
array of y bin edges
std::string tld
top level directory (below THistSvc stream)
static void setOpts(TH1 *hist, const HistogramDef &def)
Setup various histogram options.
TH2 * create2DProfile(const HistogramDef &def)
Helper for generic 'create' method for 2DProfile histograms.
ServiceHandle< ITHistSvc > m_histSvc
std::vector< double > xarray
array of x bin edges
int zbins
number of z bins
std::string path
booking path
static void setLabels(TH1 *hist, const HistogramDef &def)
Set labels for all axes.
Generic monitoring tool for athena components.
std::vector< std::string > xlabels
labels for x axis
std::string getFullName(const HistogramDef &def) const
Invent path name.
HistogramFactory(const ServiceHandle< ITHistSvc > &histSvc, const std::string &groupName)
Default constructor.
bool Sumw2
store sum of squares of weights
std::string alias
unique alias for THistSvc
TH1 * create1DProfile(const HistogramDef &def)
Helper for generic 'create' method for 1DProfile histograms.
TH2 * create2D(const HistogramDef &def)
Helper for generic 'create' method for 2D histograms.
TTree * createTree(const HistogramDef &def)
Create and register tree.
std::string type
class name
static std::mutex & globalROOTMutex()
#define ATLAS_THREAD_SAFE
int ybins
number of y bins
Define macros for attributes used to control the static checker.
virtual void remove(const HistogramDef &def)
Removes histogram (used online to get rid of old LB tagged histograms)
std::string title
title of the histogram
std::vector< std::string > zlabels
labels for z axis
TEfficiency * createEfficiency(const HistogramDef &def)
Create and register efficiency graph.