diff --git a/Trigger/TrigValidation/TrigAnalysisTest/CMakeLists.txt b/Trigger/TrigValidation/TrigAnalysisTest/CMakeLists.txt index 4bbf827976c3e5bffc49d0789bbec818b438e0c6..6c34ff7bfbea917427e8e5d2df8f30dc0820c0ce 100644 --- a/Trigger/TrigValidation/TrigAnalysisTest/CMakeLists.txt +++ b/Trigger/TrigValidation/TrigAnalysisTest/CMakeLists.txt @@ -1,3 +1,4 @@ +# $Id: CMakeLists.txt 782969 2016-11-08 13:31:24Z krasznaa $ ################################################################################ # Package: TrigAnalysisTest ################################################################################ @@ -5,41 +6,71 @@ # Declare the package name: atlas_subdir( TrigAnalysisTest ) +# Extra dependencies, based on the build environment: +set( extra_deps ) +if( XAOD_STANDALONE ) + set( extra_deps Control/AthToolSupport/AsgTools Control/xAODRootAccess ) +else() + set( extra_deps Control/AthenaBaseComps GaudiKernel ) +endif() + # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - GaudiKernel - TestPolicy - Trigger/TrigAnalysis/TrigDecisionTool - PRIVATE - Event/xAOD/xAODJet - Event/xAOD/xAODMuon - Event/xAOD/xAODTrigBphys - Event/xAOD/xAODTrigMissingET - Trigger/TrigConfiguration/TrigConfxAOD ) +atlas_depends_on_subdirs( + PUBLIC + Trigger/TrigAnalysis/TrigDecisionTool + PRIVATE + Event/xAOD/xAODJet + Event/xAOD/xAODMuon + Event/xAOD/xAODTrigBphys + Event/xAOD/xAODTrigMissingET + Trigger/TrigConfiguration/TrigConfxAOD + ${extra_deps} ) # External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( ROOT COMPONENTS Core MathCore Hist RIO ) + +# Extra sources and libraries, based on the build environment: +set( extra_srcs ) +set( extra_libs ) +if( XAOD_STANDALONE ) + set( extra_srcs Root/*.cxx ) + set( extra_libs AsgTools xAODRootAccess ) +endif() # Component(s) in the package: atlas_add_library( TrigAnalysisTestLib - Root/BasicTriggerFired.cxx - Root/Run1BStoxAODTrigger.cxx - Root/TestFactory.cxx - src/*.cxx - PUBLIC_HEADERS TrigAnalysisTest - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES AthenaBaseComps GaudiKernel TrigDecisionToolLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} xAODJet xAODMuon xAODTrigBphys xAODTrigMissingET ) - -atlas_add_component( TrigAnalysisTest - src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel TrigDecisionToolLib xAODJet xAODMuon xAODTrigBphys xAODTrigMissingET TrigAnalysisTestLib ) + TrigAnalysisTest/*.h + Root/BasicTriggerFired.cxx + Root/Run1BStoxAODTrigger.cxx + Root/TestFactory.cxx + ${extra_srcs} + PUBLIC_HEADERS TrigAnalysisTest + PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES TrigDecisionToolLib + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} xAODJet xAODMuon xAODTrigBphys + xAODTrigMissingET ${extra_libs} ) + +if( NOT XAOD_STANDALONE ) + atlas_add_component( TrigAnalysisTest + src/*.h src/*.cxx src/components/*.cxx + LINK_LIBRARIES AthenaBaseComps GaudiKernel TrigDecisionToolLib + TrigAnalysisTestLib ) +endif() + +# Test(s) in the package: +if( XAOD_STANDALONE ) + atlas_add_test( ut_triggers_fired + SOURCES test/ut_triggers_fired.cxx + LINK_LIBRARIES TrigAnalysisTestLib ) + + atlas_add_test( ut_validate_run1_bs_to_xaod + SOURCES test/ut_validate_run1_bs_to_xaod.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} TrigAnalysisTestLib ) +endif() # Install files from the package: atlas_install_python_modules( python/__init__.py python/PassedTriggerFilter.py ) atlas_install_joboptions( share/*.py ) -atlas_install_runtime( test/*.xml share/*py Testing/*.conf bin/RttScriptRunner_TrigAnalysisTest.py bin/CheckLog_TrigAnalysisTest.py bin/LogTail_TrigAnalysisTest.py bin/TruncateLog_TrigAnalysisTest.py python/ValgrindAnalysisScript_TrigAnalysisTest.py python/ValGrindPostScript_TrigAnalysisTest.py bin/checkFileTrigSize_RTT.py bin/CheckForHLTChainAllZero_TrigAnalysisTest.py bin/CheckForHLTTEAllZero_TrigAnalysisTest.py bin/CheckForL1AllZero_TrigAnalysisTest.py bin/CheckForExpertMonHistZero_TrigAnalysisTest.py ) +atlas_install_runtime( test/*.xml share/*py Testing/*.conf ) atlas_install_scripts( Testing/*.sh bin/*.py ) - diff --git a/Trigger/TrigValidation/TrigAnalysisTest/Testing/TrigAnalysisTest.conf b/Trigger/TrigValidation/TrigAnalysisTest/Testing/TrigAnalysisTest.conf old mode 100755 new mode 100644 index bfc86e0f6ccb1b4f7eacd7b41c20de2c9105911a..1216b68090c7e003cec2ca04b63278533ca42df8 --- a/Trigger/TrigValidation/TrigAnalysisTest/Testing/TrigAnalysisTest.conf +++ b/Trigger/TrigValidation/TrigAnalysisTest/Testing/TrigAnalysisTest.conf @@ -179,7 +179,7 @@ test 17 checklog --config checklogTriggerTest.conf --showexcludestats # compresslog pre_command RecExCommon_links.sh - athena_cmd athena.py -c 'menu="Physics_pp_v6"; jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(3); jp.AthenaCommonFlags.FilesInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1"]' + athena_cmd athena.py -c 'menu="Physics_pp_v7"; jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(3); jp.AthenaCommonFlags.FilesInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1"]' post_command rm -f raw._0001.data fullregtest REGTEST /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/triganalysistest_AthenaRDOtoBS.reference rootcomp /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/triganalysistest_AthenaTrigRDOtoBS.root @@ -250,7 +250,7 @@ test 23 doc runs trigger from RDO writes AOD, Physics menu name AthenaTrigRDOtoAOD_Physics joboptions testAthenaTrigRDOtoAOD.py - athena_cmd athena.py -c 'menu="Physics_pp_v6"; jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(10); from AthenaCommon.AthenaCommonFlags import athenaCommonFlags as acf;acf.FilesInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1"]' + athena_cmd athena.py -c 'menu="Physics_pp_v7"; jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(10); from AthenaCommon.AthenaCommonFlags import athenaCommonFlags as acf;acf.FilesInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1"]' checklog --config checklogTriggerTest.conf --showexcludestats pre_command RecExCommon_links.sh #pre_command get_files -jo checkFileTrigSize_RTT.py @@ -316,7 +316,7 @@ test 27 name AthenaTrigRDOtoESDAOD_Physics doc Basic, standard, RecExCommon-based, read-RDO, run-trigger job. Reco enabled, Physics menu joboptions testAthenaTrigRDOtoESDAOD.py - athena_cmd athena.py -c 'menu="Physics_pp_v6"; jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(10); from AthenaCommon.AthenaCommonFlags import athenaCommonFlags as acf;acf.FilesInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1"]' + athena_cmd athena.py -c 'menu="Physics_pp_v7"; jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(10); from AthenaCommon.AthenaCommonFlags import athenaCommonFlags as acf;acf.FilesInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1"]' checklog --config checklogTriggerTest.conf --showexcludestats pre_command RecExCommon_links.sh fullregtest REGTEST /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/triganalysistest_AthenaRDOtoESDAOD_Physics.reference @@ -396,7 +396,7 @@ test 32 doc test if ATLAS-R2-2015-01-01-00 is already working name ATLAS_R2_READY_OR_NOT joboptions testAthenaTrigRDOtoAOD.py - athena_cmd athena.py -c 'from AthenaCommon.GlobalFlags import jobproperties;jobproperties.Global.DetDescrVersion="ATLAS-R2-2015-01-01-00";from AthenaCommon.AthenaCommonFlags import athenaCommonFlags;athenaCommonFlags.FilesInput=["/afs/cern.ch/user/p/physval/validafs/disk2/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e2928_s1982_s2008_r5787_tid01606245_00/RDO.01606245._000001.pool.root.1"];menu="Physics_pp_v6"' + athena_cmd athena.py -c 'from AthenaCommon.GlobalFlags import jobproperties;jobproperties.Global.DetDescrVersion="ATLAS-R2-2015-01-01-00";from AthenaCommon.AthenaCommonFlags import athenaCommonFlags;athenaCommonFlags.FilesInput=["/afs/cern.ch/user/p/physval/validafs/disk2/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e2928_s1982_s2008_r5787_tid01606245_00/RDO.01606245._000001.pool.root.1"];menu="Physics_pp_v7"' checklog --config checklogTriggerTest.conf --showexcludestats pre_command RecExCommon_links.sh fullregtest REGTEST /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/ATN/postrel20/latest/triganalysistest_AthenaRDOtoAOD_Physics_ATLAS_R2_READY_OR_NOT.reference diff --git a/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py b/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py index f4c6ba98eeebcccf98ab52bc615336d76342634e..3983bf602a97f3736abd0f392ba714669501fcae 100755 --- a/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py +++ b/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py @@ -42,6 +42,13 @@ class checkFileTrigSize_RTT: self.error = -1 self.checkFile = paramDict.get('checkFile', 'AOD.pool.root.checkFile') + self.triggerAlgList = [] + self.triggerAlgListNotIncluded = [] + self.nontriggerAlgList = [] + self.triggerAlgSize = {} + self.totalAlgSize = 0.0 + self.totalAlgSizeInLists = 0.0 + self.total = 0.0 def run(self): @@ -1024,7 +1031,7 @@ class checkFileTrigSize_RTT: if file == 0: return self.error - total = 0 + self.total = 0 notUsedList = [] #if an entry in the checkFile output is not included in a Counter doublesList = {} #if an entry in the checkFile output matches >=2 Counter items @@ -1035,10 +1042,10 @@ class checkFileTrigSize_RTT: ## Added by Rodger ## list of trigger algorithms found in AOD, their category, and their size in the AOD - triggerAlgList = [] + self.triggerAlgList = [] triggerAlgListNotIncluded = [] nontriggerAlgList = [] - totalAlgSize = 0.0 + self.totalAlgSize = 0.0 while 1: @@ -1050,12 +1057,12 @@ class checkFileTrigSize_RTT: #get the total from the last line of the file if re.search("TOTAL",line): - total = float(splitline[4]) + self.total = float(splitline[4]) #for new xAOD if re.search("Total",line): if (unicode(splitline[4])).isnumeric(): - total = float(splitline[4]) + self.total = float(splitline[4]) #only count the good lines (ie. not "=====", etc.) if len(splitline)!=10: @@ -1076,7 +1083,7 @@ class checkFileTrigSize_RTT: ## ======================================================== # sum of all algorithm sizes in checkFile - totalAlgSize += float(sizePerEvent) + self.totalAlgSize += float(sizePerEvent) # Variable for testing if algorithm might be trigger related # Used in the last elif statement @@ -1086,13 +1093,13 @@ class checkFileTrigSize_RTT: ## Add trigger algorithm to trigger list if it's found in TriggerEDM.py dictionary ## !! It should definately be found if it's a trigger algorithm !! if getCategory(name) != 'NOTFOUND': - triggerAlgList.append([name, getCategory(name), float(sizePerEvent)]) + self.triggerAlgList.append([name, getCategory(name), float(sizePerEvent)]) ## IOVMetaDataContainer* are not in TriggerEDM.py dictionary ## Add these manually to list elif getCategory(name) == 'NOTFOUND' and name.count('IOVMetaDataContainer'): - triggerAlgList.append([name, 'Config', float(sizePerEvent)]) + self.triggerAlgList.append([name, 'Config', float(sizePerEvent)]) ## Do some simple checks if algorithm is not found in dictionary (and isn't IOVMetaDataContainer*) ## Add these to triggerAlgsNotIncluded @@ -1140,17 +1147,17 @@ class checkFileTrigSize_RTT: ## Added by Rodger ## Calculate trigger category sizes and store in dictionary ## ======================================================== - triggerAlgSize = {} - triggerAlgSize[ 'Total' ] = 0.0 - for triggerAlg in triggerAlgList: - if not triggerAlg[1] in triggerAlgSize: triggerAlgSize[ triggerAlg[1] ] = triggerAlg[2] - else: triggerAlgSize[ triggerAlg[1] ] += triggerAlg[2] - triggerAlgSize[ 'Total' ] += triggerAlg[2] + self.triggerAlgSize = {} + self.triggerAlgSize[ 'Total' ] = 0.0 + for triggerAlg in self.triggerAlgList: + if not triggerAlg[1] in self.triggerAlgSize: self.triggerAlgSize[ triggerAlg[1] ] = triggerAlg[2] + else: self.triggerAlgSize[ triggerAlg[1] ] += triggerAlg[2] + self.triggerAlgSize[ 'Total' ] += triggerAlg[2] - totalAlgSizeInLists = 0.0 - allAlgList = triggerAlgList + triggerAlgListNotIncluded + nontriggerAlgList + self.totalAlgSizeInLists = 0.0 + allAlgList = self.triggerAlgList + triggerAlgListNotIncluded + nontriggerAlgList for item in allAlgList: - totalAlgSizeInLists += item[2] + self.totalAlgSizeInLists += item[2] ## ======================================================== fout =open(self.checkFile+"trigSize.txt",'w') @@ -1170,10 +1177,10 @@ class checkFileTrigSize_RTT: sumTrig += counter.size # print counter.name.ljust(24), "%6.3f" % counter.size # fout.write( counter.name.ljust(24) + "%6.3f" % counter.size + "\n") - for key in sorted(triggerAlgSize): + for key in sorted(self.triggerAlgSize): if not key == 'Total': - print "trigger"+key.ljust(24), "%6.3f" % triggerAlgSize[key] - fout.write( "trigger"+key.ljust(24) + "%6.3f" % triggerAlgSize[key] + "\n") + print "trigger"+key.ljust(24), "%6.3f" % self.triggerAlgSize[key] + fout.write( "trigger"+key.ljust(24) + "%6.3f" % self.triggerAlgSize[key] + "\n") #Compute the total size of non trigger component for counter in listofNonTrigCounters: @@ -1187,19 +1194,19 @@ class checkFileTrigSize_RTT: #print "sumNonTrig = ", sumNonTrig # print "Total Trigger Size".ljust(23), "%6.3f" % sumTrig # fout.write("Total Trigger Size".ljust(23) + "%6.3f" % sumTrig + "\n") - print "Total Trigger Size".ljust(23), "%6.3f" % triggerAlgSize[ 'Total' ] - fout.write("Total Trigger Size".ljust(23) + "%6.3f" % triggerAlgSize[ 'Total' ] + "\n") + print "Total Trigger Size".ljust(23), "%6.3f" % self.triggerAlgSize[ 'Total' ] + fout.write("Total Trigger Size".ljust(23) + "%6.3f" % self.triggerAlgSize[ 'Total' ] + "\n") #print "trig+nonTrig=", sumNonTrig+sumTrig #print "sum = ", sum tsize = sumNU+sum # print "Total file size".ljust(23), tsize # fout.write("Total file size".ljust(23) + "%6.3f" % tsize + "\n") - print "Total file size".ljust(23), totalAlgSize - fout.write("Total file size".ljust(23) + "%6.3f" % totalAlgSize + "\n") - print "Total file size (list)".ljust(23), totalAlgSizeInLists - fout.write("Total file size (list)".ljust(23) + "%6.3f" % totalAlgSizeInLists + "\n") - print "Total (from checkFile)".ljust(23), total - fout.write("Total (from checkFile)".ljust(23)+"%6.3f" % total + "\n") + print "Total file size".ljust(23), self.totalAlgSize + fout.write("Total file size".ljust(23) + "%6.3f" % self.totalAlgSize + "\n") + print "Total file size (list)".ljust(23), self.totalAlgSizeInLists + fout.write("Total file size (list)".ljust(23) + "%6.3f" % self.totalAlgSizeInLists + "\n") + print "Total (from checkFile)".ljust(23), self.total + fout.write("Total (from checkFile)".ljust(23)+"%6.3f" % self.total + "\n") print ##print triggerlist in order of size #orderedlist = [(v, k) for k, v in triggerlist.items()] @@ -1222,7 +1229,7 @@ class checkFileTrigSize_RTT: # return self.error fout.write( "\nThe following were found in TriggerEDM and counted but have a classification 'Unknown'. \n") - for item in triggerAlgList: + for item in self.triggerAlgList: if item[1] == 'Unknown': fout.write( "INFO: "+item[0]+"\n" ) diff --git a/Trigger/TrigValidation/TrigAnalysisTest/bin/compareTrigSizes.py b/Trigger/TrigValidation/TrigAnalysisTest/bin/compareTrigSizes.py new file mode 100755 index 0000000000000000000000000000000000000000..e188b7e2cd4932ca6c16564d4cdb183e5406ecd4 --- /dev/null +++ b/Trigger/TrigValidation/TrigAnalysisTest/bin/compareTrigSizes.py @@ -0,0 +1,246 @@ +#!/usr/bin/env python + +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +#import sys + +from checkFileTrigSize_RTT import * + + +params = [ + +# Add/replace new files to compare sizes of trigger xAOD containers in this list. +# the format for adding new file /path/myAOD.pool.root for comparison: +# +# ({'checkFile':'/path/myAOD.pool.root.checkFile'},'AODEDMSET', 'RELEASE_VERSION') +# +# add ".checkFile" in the end of the file name!!! +# AODEDMSET and RELEASE_VERISON can take any string value, but the set of variables +# AODEDMSET and RELEASE_VERSION must be unique for each entry in this params list! +# Otherwise the results will be not correct (you will see this in the output, +# some entries will be missing for some containers). +# To launch, navigate to TrigAnalysisTest/bin and do +# +# ./compareTrigSizes.py +# +# the output will be printed to a screen. + + + # ({'checkFile':'../../../../../../AtlasProduction210Xrel6_161023_checkTriggerSizeNODYN/run/AODFULL/myAOD.pool.root.checkFile'}, 'AODFULL'), + # ({'checkFile':'../../../../../../AtlasProduction210Xrel6_161023_checkTriggerSizeNODYN/run/AODFULLNODYN/myAOD.pool.root.checkFile'}, 'AODFULLNODYN'), + # ({'checkFile':'../../../../../../AtlasProduction210Xrel6_161023_checkTriggerSizeNODYN/run/AODSLIM/myAOD.pool.root.checkFile'}, 'AODSLIM'), + # ({'checkFile':'../../../../../../AtlasProduction210Xrel6_161023_checkTriggerSizeNODYN/run/AODSLIMNODYN/myAOD.pool.root.checkFile'}, 'AODSLIMNODYN'), + # ({'checkFile':'../../../../../../AtlasProduction207XYVAL_rel3_161005_checkTriggerSize/myAOD.pool.root.checkFile'},'20.7AODSLIM') + + ({'checkFile':'/afs/cern.ch/work/o/okuprash/public/AtlasProduction210Xrel6_161106_checkTrigSizeRyan/run/AODFULL/myAOD.pool.root.checkFile'},'AODFULL','21.0.X'), + ({'checkFile':'/afs/cern.ch/work/o/okuprash/public/AtlasProduction210Xrel6_161106_checkTrigSizeRyan/run/AODFULLNODYN/myAOD.pool.root.checkFile'},'AODFULLNODYN','21.0.X'), + ({'checkFile':'/afs/cern.ch/work/o/okuprash/public/AtlasProduction210Xrel6_161106_checkTrigSizeRyan/run/myAOD.pool.root.checkFile'},'AODSLIM','21.0.X'), + ({'checkFile':'/afs/cern.ch/work/o/okuprash/public/AtlasProduction210Xrel6_161106_checkTrigSizeRyan/run/AODSLIMNODYN/myAOD.pool.root.checkFile'},'AODSLIMNODYN','21.0.X'), + +# ({'checkFile':'/afs/cern.ch/work/o/okuprash/public/AtlasProduction210XVALrel6_161106_checkTrigSizeRyan/run/AODFULL/myAOD.pool.root.checkFile'},'AODFULL'), +# ({'checkFile':'/afs/cern.ch/work/o/okuprash/public/AtlasProduction210XVALrel6_161106_checkTrigSizeRyan/run/AODFULLNODYN/myAOD.pool.root.checkFile'},'AODFULLNODYN'), +# ({'checkFile':'/afs/cern.ch/work/o/okuprash/public/AtlasProduction210XVALrel6_161106_checkTrigSizeRyan/run/myAOD.pool.root.checkFile'},'AODSLIM'), + ({'checkFile':'/afs/cern.ch/work/o/okuprash/public/AtlasProduction210XVALrel6_161106_checkTrigSizeRyan/run/AODSLIMNODYN/myAOD.pool.root.checkFile'},'AODSLIMNODYN','21.0.X-VAL'), + ({'checkFile':'/afs/cern.ch/work/o/okuprash/public/AtlasProduction207Xrel6_161106_checkTrigSizeRyan/myAOD.pool.root.checkFile'},'AODSLIM','20.7.X') + +] +#params = {} + +# a delimiter to be used in office spreadsheet to separate data to columns +spreadsheetDelimiter = ";" +numberFormat = "%12s" + +versions = [] #'AODFULL', 'AODFULLNODYN', 'AODSLIM', 'AODSLIMNODYN', '20.7AODSLIM' +releases = [] #'21.0.X', '21.0.X-VAL' etc + +# the order of elements in these lists will be kept the same throughout the code (the same as in input "params" list) +for param in params: + versions.append( param[1] ) + releases.append( param[2] ) + +trigContainerLists = [] +trigSizesPerCategory = [] +trigTotalFileSizes = [] +trigTotalFileSizesLists = [] +trigTotalFileSizesCheckFile = [] + +# launch checkFileTrigSize_RTT for each input file and store the output in variables +for param in params: + r = checkFileTrigSize_RTT(param[0]) +# print "trigger container list:" +# print r.triggerAlgList + print "processing ",param + status = r.run() + print "done processing ",param +# print "trigger container list:" +# print r.triggerAlgList + trigContainerLists.append( (r.triggerAlgList, param[1], param[2]) ) + trigSizesPerCategory.append( (r.triggerAlgSize, param[1], param[2]) ) + trigTotalFileSizes.append( (r.totalAlgSize, param[1], param[2]) ) + trigTotalFileSizesLists.append( (r.totalAlgSizeInLists, param[1], param[2]) ) + trigTotalFileSizesCheckFile.append( (r.total, param[1], param[2]) ) + + +# let's setup the full list of container names and the full list of categories: +fullListContainers = [] +fullListCategories = [] +for containerList in trigContainerLists: + for item in reversed(containerList[0]): + if item[0] not in [it[0] for it in fullListContainers]: + fullListContainers.append( [item[0], item[1]] ) + if item[1] not in fullListCategories: + fullListCategories.append( item[1] ) + +# the comparison part + +print "" +print "copypaste the part below to a spredsheet and use ",spreadsheetDelimiter," as a delimiter" +print "" + +# first print the summary (total size) for different categories +# table header +print "release ", +print spreadsheetDelimiter, +for release in releases: + print numberFormat % release, + print spreadsheetDelimiter, +print "" + +print "AOD EDM set ", +print spreadsheetDelimiter, +for version in versions: + print numberFormat % version, + print spreadsheetDelimiter, +print "" +print " ", +print spreadsheetDelimiter, +for version in versions: + print numberFormat % "kB/event", + print spreadsheetDelimiter, +print "" +# categories sizes +for category in fullListCategories: + print "trigger%-15s" % category, + print spreadsheetDelimiter, + for version, release in zip(versions, releases): + for catSize in trigSizesPerCategory: + if catSize[1] == version and catSize[2] == release: + if category in catSize[0]: + # the category size is printed here: + print numberFormat % catSize[0][ category ], + print spreadsheetDelimiter, + else: + # if the category does not exist for the given AODEDMSET and RELEASE_VERSION, then just print "x" instead of size + print numberFormat % "x", + print spreadsheetDelimiter, + print "" + +# total trigger and file sizes +print "triggerTotal ", +print spreadsheetDelimiter, +for version,release in zip(versions,releases): + for catSize in trigSizesPerCategory: + if catSize[1] == version and catSize[2] == release: + print numberFormat % catSize[0][ 'Total' ], + print spreadsheetDelimiter, +print "" + +print "File size: ", +print spreadsheetDelimiter, +for version,release in zip(versions,releases): + for t in trigTotalFileSizes: + if t[1] == version and t[2] == release: + print "%12.3f" % t[0], + print spreadsheetDelimiter, +print "" +print "File size (from lists): ", +print spreadsheetDelimiter, +for version,release in zip(versions,releases): + for t in trigTotalFileSizesLists: + if t[1] == version and t[2] == release: + print "%12.3f" % t[0], + print spreadsheetDelimiter, +print "" +print "File size (from checkFile): ", +print spreadsheetDelimiter, +for version,release in zip(versions,releases): + for t in trigTotalFileSizesCheckFile: + if t[1] == version and t[2] == release: + print "%12.3f" % t[0], + print spreadsheetDelimiter, +print "" +print "" + + +# now let's print for each category all containers within it +for category in fullListCategories: + + print "\nSummary for ", category + # table header + print "%-80s" % "release", + print spreadsheetDelimiter, + for release in releases: + print numberFormat % release, + print spreadsheetDelimiter, + print "" + + print "%-80s" % "AOD EDM set", + print spreadsheetDelimiter, + for version in versions: + print numberFormat % version, + print spreadsheetDelimiter, + print "" + print "%-80s" % "", + print spreadsheetDelimiter, + for version in versions: + print numberFormat % "kB/event", + print spreadsheetDelimiter, + print "" + # the actual numbers + for container in fullListContainers: + if container[1] == category: + containerSizePerVersion = [] + for containerList in trigContainerLists: + contList = containerList[0] + description = containerList[1] + release = containerList[2] + + for currentContainer in contList: + if currentContainer[0] == container[0]: +# print "size of ",currentContainer[0]," from category ",category," of type ",description," is ",currentContainer[2] + containerSizePerVersion.append( (currentContainer[0], category, description, currentContainer[2], release) ) + if len(container[0]) < 80: + print "%-80s" % container[0], + print spreadsheetDelimiter, + elif len(container[0]) < 100: + print "%-100s" % container[0], + print spreadsheetDelimiter, + else: + print container[0], + print spreadsheetDelimiter, + for version,release in zip(versions,releases): + if (version not in [it[2] for it in containerSizePerVersion]) or (release not in [it[4] for it in containerSizePerVersion]): + # if the container does not exist for the given AODEDMSET and RELEASE_VERSION, then just print "x" instead of its size + print numberFormat % "x", + print spreadsheetDelimiter, + else: + for contSize in containerSizePerVersion: + if contSize[2] == version and contSize[4] == release: + # the container size is printed here + print numberFormat % contSize[3], + print spreadsheetDelimiter, + print "" + # print summary for this category again, in the bottom of the list of containers + print "Total for %-69s:" % category, + print spreadsheetDelimiter, + for version,release in zip(versions,releases): + for catSize in trigSizesPerCategory: + if catSize[1] == version and catSize[2] == release: + if category in catSize[0]: + print numberFormat % catSize[0][ category ], + print spreadsheetDelimiter, + else: + print numberFormat % "x", + print spreadsheetDelimiter, + print "" + diff --git a/Trigger/TrigValidation/TrigAnalysisTest/cmt/requirements b/Trigger/TrigValidation/TrigAnalysisTest/cmt/requirements old mode 100755 new mode 100644 diff --git a/Trigger/TrigValidation/TrigAnalysisTest/python/PassedTriggerFilter.py b/Trigger/TrigValidation/TrigAnalysisTest/python/PassedTriggerFilter.py old mode 100755 new mode 100644 diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/compareTrigESDs.py b/Trigger/TrigValidation/TrigAnalysisTest/share/compareTrigESDs.py old mode 100755 new mode 100644 diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAODtoAOD_TrigNavSlimming.py b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAODtoAOD_TrigNavSlimming.py old mode 100755 new mode 100644 diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigBStoESD.py b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigBStoESD.py old mode 100755 new mode 100644 diff --git a/Trigger/TrigValidation/TrigAnalysisTest/src/AthenaTestHarness.cxx b/Trigger/TrigValidation/TrigAnalysisTest/src/AthenaTestHarness.cxx old mode 100755 new mode 100644 index 45da0bd3dd613742ee7fd3a005a40ac7b3a8194b..9f0b97afcc04fdca72f0b0cc04221f05e9f85d8d --- a/Trigger/TrigValidation/TrigAnalysisTest/src/AthenaTestHarness.cxx +++ b/Trigger/TrigValidation/TrigAnalysisTest/src/AthenaTestHarness.cxx @@ -4,7 +4,7 @@ /** J.Montejo - 10/11/2015 - AthenaTestHarness **/ -#include "TrigAnalysisTest/AthenaTestHarness.h" +#include "AthenaTestHarness.h" #include "TrigAnalysisTest/TestFactory.h" #include <cmath> diff --git a/Trigger/TrigValidation/TrigAnalysisTest/TrigAnalysisTest/AthenaTestHarness.h b/Trigger/TrigValidation/TrigAnalysisTest/src/AthenaTestHarness.h old mode 100755 new mode 100644 similarity index 100% rename from Trigger/TrigValidation/TrigAnalysisTest/TrigAnalysisTest/AthenaTestHarness.h rename to Trigger/TrigValidation/TrigAnalysisTest/src/AthenaTestHarness.h diff --git a/Trigger/TrigValidation/TrigAnalysisTest/src/TriggersFiredTest.cxx b/Trigger/TrigValidation/TrigAnalysisTest/src/TriggersFiredTest.cxx old mode 100755 new mode 100644 index d0953421dd486567af38deeb05508b2c00b958a2..b02b500f4b8f8a183a1f413cb49a8be5415f5d14 --- a/Trigger/TrigValidation/TrigAnalysisTest/src/TriggersFiredTest.cxx +++ b/Trigger/TrigValidation/TrigAnalysisTest/src/TriggersFiredTest.cxx @@ -4,7 +4,7 @@ /** J.Montejo - 15/10/2015 - tests for TrigDecisionTool **/ -#include "TrigAnalysisTest/TriggersFiredTest.h" +#include "TriggersFiredTest.h" #include <cmath> #include <algorithm> diff --git a/Trigger/TrigValidation/TrigAnalysisTest/TrigAnalysisTest/TriggersFiredTest.h b/Trigger/TrigValidation/TrigAnalysisTest/src/TriggersFiredTest.h old mode 100755 new mode 100644 similarity index 100% rename from Trigger/TrigValidation/TrigAnalysisTest/TrigAnalysisTest/TriggersFiredTest.h rename to Trigger/TrigValidation/TrigAnalysisTest/src/TriggersFiredTest.h diff --git a/Trigger/TrigValidation/TrigAnalysisTest/src/components/TrigAnalysisTest_entries.cxx b/Trigger/TrigValidation/TrigAnalysisTest/src/components/TrigAnalysisTest_entries.cxx index 58bee670a6a1030113a5ebd0b03840f55434478a..79a2c4e35cf067b006a4315ad99d90d7d5c4698f 100644 --- a/Trigger/TrigValidation/TrigAnalysisTest/src/components/TrigAnalysisTest_entries.cxx +++ b/Trigger/TrigValidation/TrigAnalysisTest/src/components/TrigAnalysisTest_entries.cxx @@ -3,10 +3,13 @@ #include "GaudiKernel/DeclareFactoryEntries.h" //derived algorithm classes -#include "TrigAnalysisTest/AthenaTestHarness.h" +#include "../AthenaTestHarness.h" +#include "../TriggersFiredTest.h" DECLARE_ALGORITHM_FACTORY( AthenaTestHarness ) +DECLARE_ALGORITHM_FACTORY( TriggersFiredTest ) DECLARE_FACTORY_ENTRIES( TrigAnalysisTest ) { - DECLARE_ALGORITHM( AthenaTestHarness ); + DECLARE_ALGORITHM( AthenaTestHarness ) + DECLARE_ALGORITHM( TriggersFiredTest ) } diff --git a/Trigger/TrigValidation/TrigAnalysisTest/test/TrigAnalysisTest_AthAnalysisBaseTestConfiguration.xml b/Trigger/TrigValidation/TrigAnalysisTest/test/TrigAnalysisTest_AthAnalysisBaseTestConfiguration.xml old mode 100755 new mode 100644 diff --git a/Trigger/TrigValidation/TrigAnalysisTest/test/TrigAnalysisTest_TestConfiguration.xml b/Trigger/TrigValidation/TrigAnalysisTest/test/TrigAnalysisTest_TestConfiguration.xml old mode 100755 new mode 100644 index 9cdc48ffca45d6ef1c7b39343257252d0b045d29..a317cb9b9201a7d10c02af764a6b88085cef2b7c --- a/Trigger/TrigValidation/TrigAnalysisTest/test/TrigAnalysisTest_TestConfiguration.xml +++ b/Trigger/TrigValidation/TrigAnalysisTest/test/TrigAnalysisTest_TestConfiguration.xml @@ -357,11 +357,11 @@ <athena userJobId="RDOtoAOD_Physics" doMonitoring="True"> <doc> - Menu: Physics_pp_v6 Sample: top - produces AOD 100 events + Menu: Physics_pp_v7 Sample: top - produces AOD 100 events </doc> <displayName>RDOtoAOD_Physics</displayName> <commandLineFlags> - RunningRTT=TRUE;menu='Physics_pp_v6';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(100);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;dsName='/eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00';fileRange=[1,2] + RunningRTT=TRUE;menu='Physics_pp_v7';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(100);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;dsName='/eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00';fileRange=[1,2] </commandLineFlags> <options>testAthenaTrigRDOtoAOD.py</options> <package>Trigger/TrigValidation/TrigAnalysisTest</package> @@ -402,11 +402,11 @@ <athena userJobId="RDOtoESDAOD_Physics" doMonitoring="True"> <doc> - Menu: Physics_pp_v6 Sample: top - produces AOD and ESD 100 events + Menu: Physics_pp_v7 Sample: top - produces AOD and ESD 100 events </doc> <displayName>RDOtoESDAOD_Physics</displayName> <commandLineFlags> - RunningRTT=TRUE;menu='Physics_pp_v6';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(100);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;dsName='/eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00';fileRange=[1,2] + RunningRTT=TRUE;menu='Physics_pp_v7';jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(100);jp.Rec.OutputLevel=WARNING;LVL1OutputLevel=WARNING;HLTOutputLevel=WARNING;dsName='/eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00';fileRange=[1,2] </commandLineFlags> <options>testAthenaTrigRDOtoESDAOD.py</options> <package>Trigger/TrigValidation/TrigAnalysisTest</package>