 |
ATLAS Offline Software
|
◆ diff_root()
| def python.runDiffRootOnChanged.diff_root |
( |
|
pool_list, |
|
|
|
test, |
|
|
|
ftype |
|
) |
| |
Definition at line 42 of file runDiffRootOnChanged.py.
43 outfile =
"%s_%s.log" %(test, ftype)
44 command =
"acmd.py diff-root %s %s --error-mode resilient --ignore-leaves RecoTimingObj_p1_HITStoRDO_timings RecoTimingObj_p1_RAWtoESD_mems RecoTimingObj_p1_RAWtoESD_timings RAWtoESD_mems RAWtoESD_timings ESDtoAOD_mems ESDtoAOD_timings HITStoRDO_timings --entries 10 >> %s" %(pool_list[0], pool_list[1], outfile)
53 since some pool files are located on eos others are on afs
54 this little hack is needed to get all files for the comparison
◆ get_test_pool_files()
| def python.runDiffRootOnChanged.get_test_pool_files |
( |
|
logfile, |
|
|
|
tests |
|
) |
| |
Definition at line 70 of file runDiffRootOnChanged.py.
77 f =
open(logfile,
'r')
79 if ".pool.root" in line
and "open" in line
and test
in line:
81 AOD_list.append( line.split(
'[')[1].
split(
']')[0])
83 ESD_list.append( line.split(
'[')[1].
split(
']')[0])
87 if len(ESD_list) == 1:
89 if len(AOD_list) == 1:
93 print (
"ERROR missing ESD file for diff-root comparison" )
95 print (
"INFO evaluate ESD diff-root")
99 print (
"ERROR missing AOD file for diff-root comparison")
101 print (
"INFO evaluate AOD diff-root")
◆ guessSecond()
| def python.runDiffRootOnChanged.guessSecond |
( |
|
ESD_list | ) |
|
Definition at line 56 of file runDiffRootOnChanged.py.
58 repl =
"rel%s" %(ref.split(
"rel")[1].
split(
"/")[0])
59 newversion =
"rel_%i" %(
int(repl.split(
"_")[1])+1)
60 filename = ref.replace(repl,newversion)
61 if os.path.isfile(filename):
62 ESD_list.append(filename)
66 extract path to pool files from diff-pool log
67 skip tests with failing tests
68 then execute diff_root for every pair
◆ read_diff_pool_log()
| def python.runDiffRootOnChanged.read_diff_pool_log |
( |
|
filename | ) |
|
Definition at line 29 of file runDiffRootOnChanged.py.
31 f =
open(filename,
'r')
32 lines = f.readlines(); f.close()
33 for line
in lines[-40:]:
35 changed_tests.append(line.split()[0])
40 exectute diff-root command
◆ test_pool_files()
| def python.runDiffRootOnChanged.test_pool_files |
( |
|
logfile, |
|
|
|
tests |
|
) |
| |
Definition at line 106 of file runDiffRootOnChanged.py.
107 rels = [
"rel_2",
"rel_3"]
109 path =
"/afs/cern.ch/atlas/project/RTT/prod/Results/tct/REL/20.1.X.Y-VAL/build/x86_64-slc6-gcc48-opt/offline/Tier0ChainTests/%s/" %(test)
116 aod = path.replace(
"REL",rel)+
"myAOD.pool.root"
117 esd = path.replace(
"REL",rel)+
"myESD.pool.root"
118 if os.path.isfile(aod):
120 if os.path.isfile(esd):
124 if len(ESD_list) < 2:
125 print (
"ERROR missing ESD file for diff-root comparison" )
127 print (
"INFO evaluate ESD diff-root")
130 if len(AOD_list) < 2:
131 print (
"ERROR missing AOD file for diff-root comparison")
133 print (
"INFO evaluate AOD diff-root")
136 parser=OptionParser(usage=
"\n ./runDiffRootOnChanged.py --file <file name with full diff-pool log > \n")
137 parser.add_option(
"-f",
"--file" ,type=
"string" ,dest=
"filename" ,default=
"none" ,help=
"diff pool log file")
138 parser.add_option(
"-d",
"--dryRun", action=
"store_true" ,dest=
"dryrun" ,default=
False ,help=
"only dumps commands on screen")
141 (options,args)=parser.parse_args()
◆ logfile
| python.runDiffRootOnChanged.logfile |
◆ tests
| python.runDiffRootOnChanged.tests |
def test_pool_files(logfile, tests)
def guessSecond(ESD_list)
def get_test_pool_files(logfile, tests)
def diff_root(pool_list, test, ftype)
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
void print(char *figname, TCanvas *c1)
def read_diff_pool_log(filename)