ATLAS Offline Software
MonitoringFile_HLTJetPostProcess.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 
6 /* Methods to perform post-processing on run_nnnnnn/HLT/METMon* histograms
7  * Author : Venkatesh Kaushik (venkat.kaushik@cern.ch)
8  * Date : Feb 2010
9  */
10 
12 
13 #include <iostream>
14 #include <iomanip>
15 #include <algorithm>
16 #include <fstream>
17 #include <cmath>
18 #include <cstdlib>
19 #include <sstream>
20 #include <vector>
21 #include <utility>
22 #include <map>
23 #include <string>
24 
25 #include "TH1F.h"
26 #include "TH2F.h"
27 #include "TFile.h"
28 #include "TClass.h"
29 #include "TKey.h"
30 #include "TMath.h"
31 #include "TF1.h"
32 #include "TTree.h"
33 #include "TBranch.h"
34 
35 
36 
37 namespace dqutils {
38  void
39  MonitoringFile::HLTJetPostProcess(const std::string& inFilename, bool /* isIncremental */) {
40  bool dbgLevel = false;
41 
42  if (dbgLevel) std::cout << "--> HLTJetPostProcess: Begin HLTJet post-processing" << std::endl;
43 
44  //open root file
45  TFile* f = TFile::Open(inFilename.c_str(), "UPDATE");
46 
47  //check files are loaded.
48 
49  if (f == 0 || !f->IsOpen()) {
50  std::cerr << "--> HLTJetPostProcess: Input file not opened" << std::endl;
51  return;
52  }
53 
54  if (f->IsZombie()) {
55  std::cerr << "--> HLTJetPostProcess: Input file " << inFilename << " cannot be opened. " << std::endl;
56  return;
57  }
58 
59  //check file size is not too small.
60  if (f->GetSize() < 1000.) {
61  std::cerr << "--> HLTJetPostProcess: Input file empty" << std::endl;
62  f->Close();
63  return;
64  }
65 
66  //start postprocessing
67  TString run_dir;
69  //close root file
70  f->Close();
71  delete f;
72 
73  if (dbgLevel) std::cout << "--> HLTJetPostProcess: End HLTJet post-processing " << std::endl;
74 
75  return;
76  }
77 }//namespace
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
dqutils::MonitoringFile::HLTJetPostProcess
static void HLTJetPostProcess(const std::string &inFileName, bool isIncremental=false)
Definition: MonitoringFile_HLTJetPostProcess.cxx:39
dqutils
Definition: CoolMdt.h:76
dqutils::MonitoringFile::HLTJetCalcEfficiencyAndRate
static void HLTJetCalcEfficiencyAndRate(TFile *f, TString &run_dir)
Definition: MonitoringFile_HLTJetCalcEfficiencyAndRate.cxx:36
MonitoringFile.h