ATLAS Offline Software
MakeSliceSet.py
Go to the documentation of this file.
1 import os
2 import argparse
3 import sys
4 import itertools
5 
6 # python MakeSliceSet.py /eos/atlas/atlascerngroupdisk/det-htt/HTTsim/user/abkahn/ExtrapolationEngine/ATLAS-P2-ITK-22-02-00/ATLAS-P2-ITK-22-02-00_01eta03_03phi05.root --outfilelabel rmaps/nosmear_eta_01_03_phi_03_05
7 
8 parser = argparse.ArgumentParser(description='')
9 parser.add_argument('--test',dest='test', action='store_true')
10 parser.add_argument('inname', metavar='inputfile', type=str, nargs='+',
11  help='input file name (extrapolator files or directory')
12 parser.add_argument('--outfilelabel', action='store', type=str,
13  help='label to start outfile with', default="Unlabeled")
14 
15 
16 args = parser.parse_args()
17 
18 def runAbortIfFails(command):
19  retv=os.system(command)
20  if retv!=0:
21  sys.exit(retv)
22 
23 
24 keylayers=["pixel,barrel,0",
25  "pixel,barrel,4",
26  "strip,barrel,0",
27  "strip,barrel,2"
28 ]
29 
30 configs=["--nslices 6",
31  "--fullgran"]
32 
33 for keylayer,config in itertools.product(keylayers,configs):
34  logname = args.outfilelabel+"_"+keylayer.replace(",","_")+"_"+config.replace("--","").replace(" ","")+".log"
35  runAbortIfFails("python module_driven_slicing.py --keylayer %s %s --outfilelabel %s --trim 0.01 %s > %s" %
36  (keylayer,config,args.outfilelabel," ".join(args.inname),logname))
37 
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
MakeSliceSet.runAbortIfFails
def runAbortIfFails(command)
Definition: MakeSliceSet.py:18
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10