ATLAS Offline Software
MonitoringFile_HLTCaloPostProcess.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 /* HLTCalo Post Processing on run_nnnn/HLT/HLTcalo histogram
6  * Author : Gareth Brown <gabrown@CERN.CH> based on HLTMET Post Processing
7  * Date : Oct 2011
8  */
9 
11 #include <iostream>
12 #include "TFile.h"
13 #include "TString.h"
14 
15 namespace dqutils {
16  void MonitoringFile::HLTCaloPostProcess(const std::string& inFilename, bool isIncremental) {
17  if (isIncremental == true) {
18  return;
19  }
20 
22  if (debugLevel > 1) {
23  std::cout << "--> HLTCaloPostProcess: Begin HLTCalo post-processing" << std::endl;
24  }
25 
26  //open root file
27  TFile* f = TFile::Open(inFilename.c_str(), "UPDATE");
28 
29  //check files are loaded.
30  if (f == 0 || !f->IsOpen()) {
31  std::cerr << "--> HLTCaloPostProcess: Input file not opened" << std::endl;
32  return;
33  }
34 
35  if (f->IsZombie()) {
36  std::cerr << "--> HLTCaloPostProcess: Input file " << inFilename << " cannot be opened. " << std::endl;
37  return;
38  }
39 
40  //check file size is not too small.
41  if (f->GetSize() < 1000.) {
42  std::cerr << "--> HLTCaloPostProcess: Input file empty" << std::endl;
43  f->Close();
44  return;
45  }
46 
47  //start postprocessing
48  TString run_dir;
49  HLTCaloAveragePtPhiEtaMaps(f, run_dir);
50  //close root file
51  f->Close();
52  delete f;
53 
54  if (debugLevel > 1) {
55  std::cout << "--> HLTCaloPostProcess: End HLTCalo post-processing " << std::endl;
56  }
57 
58  return;
59  }
60 }//namespace
dqutils::MonitoringFile::HLTCaloPostProcess
static void HLTCaloPostProcess(const std::string &inFileName, bool isIncremental=false)
Definition: MonitoringFile_HLTCaloPostProcess.cxx:16
dqutils::MonitoringFile::getDebugLevel
static int getDebugLevel()
dqutils::MonitoringFile::HLTCaloAveragePtPhiEtaMaps
static void HLTCaloAveragePtPhiEtaMaps(TFile *f, TString &run_dir)
Definition: MonitoringFile_HLTCaloAveragePtPhiEtaMaps.cxx:24
hist_file_dump.f
f
Definition: hist_file_dump.py:135
DQHistogramMerge.debugLevel
debugLevel
Definition: DQHistogramMerge.py:41
dqutils
Definition: CoolMdt.h:76
MonitoringFile.h
DQHistogramMerge.isIncremental
isIncremental
Definition: DQHistogramMerge.py:37