|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "TProfile2D.h"
20 const std::string& histoPath)
27 if (
hs &&
hs->hasProperty(
"IncludeName")) {
31 size_t whereToStart = 0;
33 if (! histoPath.empty() && histoPath[0] ==
'/') {
36 size_t split = histoPath.find(
'/', whereToStart);
41 TClass::GetClass(
"TH1F");
42 TClass::GetClass(
"TH1D");
43 TClass::GetClass(
"TH1C");
44 TClass::GetClass(
"TH1S");
45 TClass::GetClass(
"TH1I");
46 TClass::GetClass(
"TH2F");
47 TClass::GetClass(
"TH2D");
48 TClass::GetClass(
"TH2C");
49 TClass::GetClass(
"TH2S");
50 TClass::GetClass(
"TH2I");
51 TClass::GetClass(
"TProfile");
52 TClass::GetClass(
"TProfile2D");
53 TClass::GetClass(
"TEfficiency");
54 TClass::GetClass(
"TTree");
62 if (def.
type ==
"TH1F") {
64 }
else if (def.
type ==
"TH1D") {
66 }
else if (def.
type ==
"TH1C") {
68 }
else if (def.
type ==
"TH1S") {
70 }
else if (def.
type ==
"TH1I") {
72 }
else if (def.
type ==
"TH2F") {
74 }
else if (def.
type ==
"TH2D") {
76 }
else if (def.
type ==
"TH2C") {
78 }
else if (def.
type ==
"TH2S") {
80 }
else if (def.
type ==
"TH2I") {
82 }
else if (def.
type ==
"TProfile") {
83 rootObj = create1DProfile<TProfile>(def);
84 }
else if (def.
type ==
"TProfile2D") {
85 rootObj = create2DProfile<TProfile2D>(def);
86 }
else if (def.
type ==
"TEfficiency") {
88 }
else if (def.
type ==
"TTree") {
94 "Try one of: TH1[F,D,C,S,I], TH2[F,D,C,S,I], TProfile, TProfile2D, " +
95 "TEfficiency, TTree.");
103 if ( def.
xarray.size()!=0 ) {
104 return create<H,TH1>(def, def.
xbins, &(def.
xarray)[0]);
112 if (def.
xarray.size()!=0) {
113 return create<H,TH1>(def, def.
xbins, &(def.
xarray)[0],
124 return create<H,TH2>(def, def.
xbins, &(def.
xarray)[0],
126 }
else if (def.
yarray.size()!=0) {
129 }
else if (def.
xarray.size()!=0) {
130 return create<H,TH2>(def, def.
xbins, &(def.
xarray)[0],
141 return create<H,TH2>(def, def.
xbins, &(def.
xarray)[0],
143 }
else if (def.
yarray.size()!=0) {
146 }
else if (def.
xarray.size()!=0) {
147 return create<H,TH2>(def, def.
xbins, &(def.
xarray)[0],
160 TEfficiency*
e =
nullptr;
173 if (def.
xarray.size()!=0) {
174 e =
new TEfficiency(def.
alias.c_str(), def.
title.c_str(),
177 e =
new TEfficiency(def.
alias.c_str(), def.
title.c_str(),
182 e =
new TEfficiency(def.
alias.c_str(), def.
title.c_str(),
185 e =
new TEfficiency(def.
alias.c_str(), def.
title.c_str(),
189 e =
new TEfficiency(def.
alias.c_str(), def.
title.c_str(),
207 template<
class H,
class HBASE,
typename...
Types>
212 HBASE*
histo =
nullptr;
232 h->GetYaxis()->SetTitleOffset(1.25);
255 t =
new TTree(def.
alias.c_str(),def.
title.c_str());
267 const unsigned canExtendPolicy = def.
kCanRebin ? TH1::kAllAxes : TH1::kNoAxis;
268 hist->SetCanExtend(canExtendPolicy);
282 const int nBin =
axis->GetNbins();
290 const static std::set<std::string> onlinePaths( {
"EXPERT",
"SHIFT",
"DEBUG",
"RUNSTAT",
"EXPRESS" } );
296 if ( onlinePaths.count( def.
path)!=0 ) {
298 }
else if ( def.
path==
"DEFAULT" ) {
307 [](
const char a,
const char b) {
308 return a == b and a ==
'/';
317 TObject*
obj =
nullptr;
318 if (def.
type==
"TEfficiency") {
322 }
else if (def.
type==
"TGraph") {
326 }
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.
bool m_deleteOnRemove
delete histogram during remove
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 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.