ATLAS Offline Software
Loading...
Searching...
No Matches
DQHistogramMergeMod.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3import os,sys
4
5CWD = os.getcwd()
6
7
8from ROOT import gROOT
9
10
13from ROOT import gSystem
14
15
16gSystem.Load('libDataQualityUtils')
17from ROOT import dqutils
18
19os.chdir(CWD)
20gROOT.SetBatch(True)
21
22MODVERSION = '$Id: DQHistogramMergeMod.py,v 1.8 2009-05-12 11:38:35 ponyisi Exp $'
23
24DoProcMon=False
25if DoProcMon:
26 from . import DQProcMonitor
27 DQProcMonitor.startProcMonThread()
28
29def DQHistogramMerge( listFileName, outFileName, runPostProcessing, directoryRegularExpression=".*", histogramRegularExpression=".*", isIncremental=False, compressionLevel=1,debugLevel=0,doTiming=False ):
30
32 if directoryRegularExpression!=".*" or histogramRegularExpression!=".*":
33 mf.setDirectoryRegEx(directoryRegularExpression)
34 mf.setHistogramRegEx(histogramRegularExpression)
35 mf.setDebugLevel(debugLevel)
36 mf.setCompressionLevel(compressionLevel)
37 if (doTiming): mf.doTiming()
38
39 stat=-1
40 try:
41 stat=mf.mergeFiles( outFileName, listFileName )
42 except Exception as e:
43 print(f"Exception of type {type(e)} during MonitoringFile::MergeFile: {e}")
44 if stat: sys.exit(stat)
45
46 try:
47 stat=mf.mergeLBintervals( outFileName )
48 except Exception as e:
49 print(f"Exception of type {type(e)} during MonitoringFile::mergeLBInterval: {e}")
50 if stat: sys.exit(stat)
51
52 if runPostProcessing:
53 from . import DQPostProcessMod
54 try:
55 DQPostProcessMod.DQPostProcess( outFileName, isIncremental )
56 except Exception as e:
57 print(f"Exception of type {type(e)} during MonitoringFile::mergeLBInterval: {e}")
void print(char *figname, TCanvas *c1)