ATLAS Offline Software
Loading...
Searching...
No Matches
MonitoringFile_HLTCaloPostProcess.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
14namespace dqutils {
15 void MonitoringFile::HLTCaloPostProcess(const std::string& inFilename, bool isIncremental) {
16 if (isIncremental == true) {
17 return;
18 }
19
20 int debugLevel = MonitoringFile::getDebugLevel();
21 if (debugLevel > 1) {
22 std::cout << "--> HLTCaloPostProcess: Begin HLTCalo post-processing" << std::endl;
23 }
24
25 //open root file
26 TFile* f = TFile::Open(inFilename.c_str(), "UPDATE");
27
28 //check files are loaded.
29 if (f == 0 || !f->IsOpen()) {
30 std::cerr << "--> HLTCaloPostProcess: Input file not opened" << std::endl;
31 return;
32 }
33
34 if (f->IsZombie()) {
35 std::cerr << "--> HLTCaloPostProcess: Input file " << inFilename << " cannot be opened. " << std::endl;
36 return;
37 }
38
39 //check file size is not too small.
40 if (f->GetSize() < 1000.) {
41 std::cerr << "--> HLTCaloPostProcess: Input file empty" << std::endl;
42 f->Close();
43 return;
44 }
45
46 //start postprocessing
47 std::string run_dir;
49 //close root file
50 f->Close();
51 delete f;
52
53 if (debugLevel > 1) {
54 std::cout << "--> HLTCaloPostProcess: End HLTCalo post-processing " << std::endl;
55 }
56
57 return;
58 }
59}//namespace
static void HLTCaloPostProcess(const std::string &inFileName, bool isIncremental=false)
static int getDebugLevel()
static void HLTCaloAveragePtPhiEtaMaps(TFile *f, std::string &run_dir)