Skip to content
Snippets Groups Projects
Commit 170b7547 authored by Krzysztof Jamrog's avatar Krzysztof Jamrog
Browse files

Replaced print with logger

parent 68773da9
Branches
No related tags found
No related merge requests found
...@@ -2,10 +2,15 @@ ...@@ -2,10 +2,15 @@
# Configure the scheduler # Configure the scheduler
from AthenaCommon.AlgScheduler import AlgScheduler from AthenaCommon.AlgScheduler import AlgScheduler
from AthenaCommon.Constants import DEBUG from AthenaCommon.Constants import DEBUG, VERBOSE
from AthenaCommon.CFElements import parOR from AthenaCommon.CFElements import parOR
from AthenaCommon.Logging import logging
from L1Decoder.L1DecoderConf import CTPUnpackingEmulationTool, RoIsUnpackingEmulationTool, L1Decoder from L1Decoder.L1DecoderConf import CTPUnpackingEmulationTool, RoIsUnpackingEmulationTool, L1Decoder
log = logging.getLogger('EmuStepProcessingConfig')
log.setLevel(VERBOSE)
def generateL1DecoderAndChains(): def generateL1DecoderAndChains():
AlgScheduler.ShowControlFlow( True ) AlgScheduler.ShowControlFlow( True )
AlgScheduler.ShowDataFlow( True ) AlgScheduler.ShowDataFlow( True )
...@@ -145,7 +150,7 @@ def generateL1DecoderAndChains(): ...@@ -145,7 +150,7 @@ def generateL1DecoderAndChains():
if "MU" in s: EnabledMuComboChains.append(s +" : "+ c.name) if "MU" in s: EnabledMuComboChains.append(s +" : "+ c.name)
if "EM" in s: EnabledElComboChains.append(s +" : "+ c.name) if "EM" in s: EnabledElComboChains.append(s +" : "+ c.name)
print "enabled Combo chains: ", EnabledMuComboChains,EnabledElComboChains log.debug("enabled Combo chains: %s, %s", EnabledMuComboChains, EnabledElComboChains)
# this is a temporary hack to include new test chains # this is a temporary hack to include new test chains
...@@ -166,20 +171,20 @@ def generateL1DecoderAndChains(): ...@@ -166,20 +171,20 @@ def generateL1DecoderAndChains():
emUnpacker = RoIsUnpackingEmulationTool("EMRoIsUnpackingTool", OutputLevel=DEBUG, InputFilename="l1emroi.dat", OutputTrigRoIs="L1EMRoIs", Decisions="L1EM" ) emUnpacker = RoIsUnpackingEmulationTool("EMRoIsUnpackingTool", OutputLevel=DEBUG, InputFilename="l1emroi.dat", OutputTrigRoIs="L1EMRoIs", Decisions="L1EM" )
emUnpacker.ThresholdToChainMapping = EnabledElChains + EnabledElComboChains emUnpacker.ThresholdToChainMapping = EnabledElChains + EnabledElComboChains
emUnpacker.Decisions="L1EM" emUnpacker.Decisions="L1EM"
print "EMRoIsUnpackingTool enables chians:" log.debug("EMRoIsUnpackingTool enables chians:")
print emUnpacker.ThresholdToChainMapping log.debug(emUnpacker.ThresholdToChainMapping)
muUnpacker = RoIsUnpackingEmulationTool("MURoIsUnpackingTool", OutputLevel=DEBUG, InputFilename="l1muroi.dat", OutputTrigRoIs="L1MURoIs", Decisions="L1MU" ) muUnpacker = RoIsUnpackingEmulationTool("MURoIsUnpackingTool", OutputLevel=DEBUG, InputFilename="l1muroi.dat", OutputTrigRoIs="L1MURoIs", Decisions="L1MU" )
muUnpacker.ThresholdToChainMapping = EnabledMuChains + EnabledMuComboChains muUnpacker.ThresholdToChainMapping = EnabledMuChains + EnabledMuComboChains
muUnpacker.Decisions="L1MU" muUnpacker.Decisions="L1MU"
print "MURoIsUnpackingTool enables chians:" log.debug("MURoIsUnpackingTool enables chians:")
print muUnpacker.ThresholdToChainMapping log.debug(muUnpacker.ThresholdToChainMapping)
l1Decoder.roiUnpackers = [emUnpacker, muUnpacker] l1Decoder.roiUnpackers = [emUnpacker, muUnpacker]
#print l1Decoder #print l1Decoder
L1UnpackingSeq += l1Decoder L1UnpackingSeq += l1Decoder
print L1UnpackingSeq log.debug(L1UnpackingSeq)
########################## L1 ################################################# ########################## L1 #################################################
......
...@@ -5,7 +5,8 @@ Configurable.configurableRun3Behavior=1 ...@@ -5,7 +5,8 @@ Configurable.configurableRun3Behavior=1
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags
from AthenaCommon.Constants import INFO, DEBUG from AthenaCommon.Constants import INFO, DEBUG, VERBOSE
from AthenaCommon.Logging import logging
from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg
from TrigUpgradeTest.TriggerHistSvcConfig import TriggerHistSvcConfig from TrigUpgradeTest.TriggerHistSvcConfig import TriggerHistSvcConfig
from MuonConfig.MuonCablingConfig import RPCCablingConfigCfg, TGCCablingConfigCfg from MuonConfig.MuonCablingConfig import RPCCablingConfigCfg, TGCCablingConfigCfg
...@@ -19,6 +20,8 @@ from RegionSelector.RegSelConfig import regSelCfg ...@@ -19,6 +20,8 @@ from RegionSelector.RegSelConfig import regSelCfg
from TrigUpgradeTest.InDetConfig import TrigInDetCondConfig from TrigUpgradeTest.InDetConfig import TrigInDetCondConfig
from TrigUpgradeTest.EmuStepProcessingConfig import generateL1DecoderAndChains from TrigUpgradeTest.EmuStepProcessingConfig import generateL1DecoderAndChains
log = logging.getLogger('EmuNewJOTest')
log.setLevel(VERBOSE)
flags.needFlagsCategory("Trigger") flags.needFlagsCategory("Trigger")
flags.Input.isMC = False flags.Input.isMC = False
...@@ -92,7 +95,7 @@ acc.getEventAlgo( "TrigSignatureMoniMT").OutputLevel=DEBUG ...@@ -92,7 +95,7 @@ acc.getEventAlgo( "TrigSignatureMoniMT").OutputLevel=DEBUG
acc.printConfig() acc.printConfig()
fname = "EmuNewJOTest.pkl" fname = "EmuNewJOTest.pkl"
print("Storing config in the config", fname) log.debug("Storing config in the config %s", fname)
with file(fname, "w") as p: with file(fname, "w") as p:
acc.store( p, nEvents=4, useBootStrapFile=False, threaded=True ) acc.store( p, nEvents=4, useBootStrapFile=False, threaded=True )
p.close() p.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment