ATLAS Offline Software
mergeIDPVM.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 
4 import argparse
5 import glob
6 import subprocess
7 
8 def getArgs():
9  args= argparse.ArgumentParser()
10  args.add_argument('--filesInput', required=True)
11  args.add_argument('--outputFile', required=True)
12  return args.parse_args()
13 
14 
15 def main():
16  args = getArgs()
17 
18  inputs = []
19  for path in args.filesInput.split(','):
20  inputs += glob.glob(path)
21 
22 
23  cmd_1 = ['hadd', args.outputFile] + inputs
24  print(f"Running: {' '.join(cmd_1)}")
25  subprocess.run(cmd_1, check=True)
26 
27  cmd_2 = ['postProcessIDPVMHistos', args.outputFile]
28  print(f"Running: {' '.join(cmd_2)}")
29  subprocess.run(cmd_2, check=True)
30 
31 
32 if __name__ == '__main__':
33  main()
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
mergeIDPVM.getArgs
def getArgs()
Definition: mergeIDPVM.py:8
mergeIDPVM.main
def main()
Definition: mergeIDPVM.py:15