ATLAS Offline Software
MonitoringFile_BJetTaggingPostProcess.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 /* Methods to perform post-processing on run_nnnnnn/HLT/JetMon* histograms
6  * Mainly to adjust the impact parameter ranges according to the recorded lumi blocks.
7  * This file does a check of existing input and the calls the actual adjustment.
8  *
9  *
10  *
11  *
12  * ####################
13  * #Notes on debugLevel#
14  * ####################
15  * - At all debugLevels > 0 errors will be displayed
16  * - At debugLevels > 1 hints to the process flow will be shown
17  * ####################
18  *
19  *
20  *
21  *
22  *
23  * Author : Manuel Neumann (mneumann@cern.ch)
24  * Date : Aug 2011
25  *
26  * Based on the code of:
27  * Methods to perform post-processing on run_nnnnnn/HLT/METMon* histograms
28  * Author : Venkatesh Kaushik (venkat.kaushik@cern.ch)
29  * Date : Feb 2010
30  */
31 
33 
34 #include "TFile.h"
35 
36 namespace dqutils
37 {
38  void
39  MonitoringFile::BJetTaggingPostProcess(const std::string& inFilename, bool isIncremental) {
40  if (isIncremental == true) {
41  return;
42  }
43 
45  if (debugLevel > 1) {
46  std::cout << "--> JetTaggingPostProcess: Begin JetTagging post-processing" << std::endl;
47  }
48  //open root file
49  TFile* f = TFile::Open(inFilename.c_str(), "UPDATE");
50 
51  //check files are loaded.
52  if (f == 0 || !f->IsOpen()) {
53  std::cerr << "--> BJetTaggingPostProcess: Input file not opened" << std::endl;
54  return;
55  }
56 
57  if (f->IsZombie()) {
58  std::cerr << "--> BJetTaggingPostProcess: Input file " << inFilename
59  << " cannot be opened. " << std::endl;
60  return;
61  }
62 
63  //check file size is not too small.
64  if (f->GetSize() < 1000.) {
65  std::cerr << "--> BJetTaggingPostProcess: Input file empty" << std::endl;
66  f->Close();
67  return;
68  }
69 
70  //start postprocessing
71 
72  //here impact parameter histograms get a range in which they are actually filled
74 
75  //this will normalise some 2D histograms to the track/jet number
77 
78  //close root file
79  f->Close();
80  //delete f;
81 
82  if (debugLevel > 1) {
83  std::cout << "--> BJetTaggingPostProcess: End JetTagging post-processing " << std::endl;
84  }
85  return;
86  }
87 }//namespace
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
dqutils::MonitoringFile::getDebugLevel
static int getDebugLevel()
DQHistogramMerge.debugLevel
debugLevel
Definition: DQHistogramMerge.py:40
dqutils
Definition: CoolMdt.h:76
MonitoringFile.h
dqutils::MonitoringFile::BJetTaggingAdjustRanges
static void BJetTaggingAdjustRanges(TFile *f)
Definition: MonitoringFile_BJetTaggingAdjustRanges.cxx:27
dqutils::MonitoringFile::BJetTaggingPostProcess
static void BJetTaggingPostProcess(const std::string &inFileName, bool isIncremental=false)
Definition: MonitoringFile_BJetTaggingPostProcess.cxx:39
DQHistogramMerge.isIncremental
isIncremental
Definition: DQHistogramMerge.py:36
dqutils::MonitoringFile::BJetTaggingNormalise
static void BJetTaggingNormalise(TFile *f)
Definition: MonitoringFile_BJetTaggingNormalise.cxx:25