23 #include "TProfile2D.h"
25 #include "TEfficiency.h"
30 if (pParent !=
nullptr) {
33 std::string sParentDirectory = (pParent !=
nullptr) ? pParent->
getDirectory() :
"";
41 subNode->initialize();
57 subNode->setDetailLevel(iDetailLevel);
66 std::vector<HistData> subNodeHists = subNode->retrieveBookedHistograms();
67 vBookedHistograms.insert(vBookedHistograms.end(), subNodeHists.begin(), subNodeHists.end());
69 return vBookedHistograms;
76 std::vector<TreeData> subNodeTrees = subNode->retrieveBookedTrees();
77 vBookedTrees.insert(vBookedTrees.end(), subNodeTrees.begin(), subNodeTrees.end());
82 std::vector<EfficiencyData>
86 std::vector<EfficiencyData> subNodeHists = subNode->retrieveBookedEfficiencies();
87 vBookedEfficiencies.insert(vBookedEfficiencies.end(), subNodeHists.begin(), subNodeHists.end());
89 return vBookedEfficiencies;
97 Bool_t oldstat = TH1::AddDirectoryStatus();
98 TH1::AddDirectory(
false);
100 TH1::AddDirectory(oldstat);
110 Bool_t oldstat = TH1::AddDirectoryStatus();
111 TH1::AddDirectory(
false);
113 refHist->GetXaxis()->GetXbins()->GetArray());
115 TH1::AddDirectory(oldstat);
124 float startY,
float endY,
bool prependDir) {
126 Bool_t oldstat = TH2::AddDirectoryStatus();
127 TH2::AddDirectory(
false);
130 TH2::AddDirectory(oldstat);
139 return Book2D(
name,
labels, refHist->GetNbinsX(), refHist->GetXaxis()->GetXmin(), refHist->GetXaxis()->GetXmax(),
140 refHist->GetNbinsY(), refHist->GetYaxis()->GetXmin(), refHist->GetYaxis()->GetXmax(), prependDir);
145 Double_t startY, Double_t endY,
bool prependDir) {
147 Bool_t oldstat = TH2::AddDirectoryStatus();
148 TH2::AddDirectory(
false);
151 TH2::AddDirectory(oldstat);
158 float startY,
float endY,
int nBinsZ,
float startZ,
float endZ,
bool prependDir) {
160 Bool_t oldstat = TH3::AddDirectoryStatus();
161 TH3::AddDirectory(
false);
163 labels.c_str(), nBinsX, startX, endX, nBinsY, startY, endY, nBinsZ, startZ, endZ);
165 TH3::AddDirectory(oldstat);
173 Bool_t oldstat = TH3::AddDirectoryStatus();
174 TH3::AddDirectory(
false);
176 refHist->GetXaxis()->GetXbins()->GetArray(), refHist->GetNbinsY(),
177 refHist->GetYaxis()->GetXbins()->GetArray(), refHist->GetNbinsZ(),
178 refHist->GetZaxis()->GetXbins()->GetArray());
179 TH3::AddDirectory(oldstat);
187 float startY,
float endY,
bool prependDir,
bool useRMS) {
190 Bool_t oldstat = TProfile::AddDirectoryStatus();
191 TProfile::AddDirectory(
false);
192 std::string
opt = useRMS ?
"S" :
"";
193 if ((startY == -1) and (endY == -1)) {
198 TProfile::AddDirectory(oldstat);
207 Bool_t oldstat = TProfile::AddDirectoryStatus();
208 TProfile::AddDirectory(
false);
211 TProfile::AddDirectory(oldstat);
218 double startY,
double endY,
bool prependDir) {
221 Bool_t oldstat = TProfile::AddDirectoryStatus();
222 TProfile::AddDirectory(
false);
225 TProfile::AddDirectory(oldstat);
232 const double xlo,
const double xhi,
const int nBinsY,
const double ylo,
const double yhi,
233 bool prependDir,
bool useRMS) {
235 Bool_t oldstat = TProfile2D::AddDirectoryStatus();
236 TProfile2D::AddDirectory(
false);
237 std::string
opt = useRMS ?
"S" :
"";
239 TProfile2D::AddDirectory(oldstat);
247 Bool_t oldstat = TProfile2D::AddDirectoryStatus();
248 TProfile2D::AddDirectory(
false);
249 std::string
opt = useRMS ?
"S" :
"";
251 TProfile2D::AddDirectory(oldstat);
263 hist->SetDirectory(
nullptr);
274 hist->SetDirectory(
nullptr);
285 tree->SetAutoSave(0);
286 tree->SetAutoFlush(0);
287 tree->SetDirectory(
nullptr);