def initialize(self): self.msg.info('************************************') self.msg.info('==> initialize %s...', self.name()) self.msg.info(' jetCollectionType = %r', self.jetCollectionType) self.msg.info(' jetCollectionName = %r', self.jetCollectionName) self.msg.info(' recordGoodJets = %r', self.recordGoodJets) self.msg.info(' goodJetCollectionName = %r', self.goodJetCollectionName) self.msg.info('Will apply the following cuts:') self.msg.info(' useUncalibratedJets = %r', self.useUncalibratedJets) self.msg.info(' EtMin (GeV) = %r', self.cutEtMin / Units.GeV) self.msg.info(' EtMax (GeV) = %r', self.cutEtMax / Units.GeV) self.msg.info(' EtaMin = %r', self.cutEtaMin) self.msg.info(' EtaMax = %r', self.cutEtaMax) self.msg.info(' cutSumPtTrkMax = %r', self.cutSumPtTrkMax) self.msg.info(' removeOverlap = %r', self.removeOverlap) self.msg.info(' deltaR = %r', self.deltaR) self.msg.info(' leptonContainerTypeList = %r', self.leptonContainerTypeList) self.msg.info(' leptonContainerNameList = %r', self.leptonContainerNameList) self.msg.info(' nLeadingsForCheck = %r', self.nLeadingsForCheck) self.msg.info(' minNumberPassed = %r', self.minNumberPassed) self.msg.info(' passAll = %r', self.passAll) self.msg.info('************************************') ## Initialize the counters self.nProcessed = 0 self.nJets = 0 self.nEventPassed = 0 ## Import needed modules import PyUtils.RootUtils as ru ROOT = ru.import_root() ## Get the StoreGate service self.storeGateSvc = PyAthena.py_svc('StoreGateSvc') if self.storeGateSvc is None: self.msg.error("Problem retrieving StoreGateSvc pointer !!") return StatusCode.Failure ## Eagerly load library due to reflex bug (autoloading enums/namespaces doesn't work) PyAthena.load_library('FourMomUtils') ## Get the JetSignalState helper self.jss = PyAthena.SignalStateHelper(PyAthena.P4SignalState.JETFINAL) ## import some 4-mom utils import FourMomUtils.Bindings self.utils = {'deltaR': PyAthena.P4Helpers.deltaR} return StatusCode.Success
def initialize(self): _res = pymon() _msg = self.msg _msg.info("initialization [cpu=%8.3f ms vmem=%8.3f MB]", _res[0], _res[1]) _msg.info("configuring %s to store perfmon-infos into [%s]", self.name, self.outFileName) _msg.info("Components being monitored: %i", len(self.components)) _msg.info("I/O containers: %i", len(self.ioContainers)) import os self.pmon_stream = os.path.splitext(self.outFileName)[0] + '.stream' _msg.info('pmon-stream: [%s]', self.pmon_stream) if self._do_malloc_mon and '_MEMPROF_SOCKET' in os.environ: _msg.info('not installing malloc hooks b/c memprof is running') self._do_malloc_mon = False _msg.info('installing pmon-malloc hooks: %s', self._do_malloc_mon) import AthenaPython.PyAthena as PyAthena lib = PyAthena.load_library('PerfMonEventDict') memstats = PyAthena.PerfMon.MemStats memstats.enable(bool(self._do_malloc_mon)) _msg.info('pmon-malloc hooks enabled: %s', bool(memstats.enabled())) memstats.start() _res = pymon() _msg.info("initialization [cpu=%8.3f ms vmem=%8.3f MB] [OK]", _res[0], _res[1]) return
AANTupleStream.OutputName = CafJobOutputs[0] AANTupleStream.ExistDataHeader = False theApp.HistogramPersistency = "ROOT" from GaudiSvc.GaudiSvcConf import THistSvc svcMgr += THistSvc() svcMgr.THistSvc.Output += [ "AANT DATAFILE='" + CafJobOutputs[0] + "' OPT='RECREATE'" ] from AthenaCommon.AppMgr import ServiceMgr as svcMgr theAuditorSvc = svcMgr.AuditorSvc theAuditorSvc.Auditors += ["ChronoAuditor"] #svcMgr.ChronoStatSvc.ChronoDestinationCout = True svcMgr.ChronoStatSvc.PrintUserTime = True svcMgr.ChronoStatSvc.PrintSystemTime = True svcMgr.ChronoStatSvc.PrintEllapsedTime = True #svcMgr.ChronoStatSvc.NumberOfSkippedEventsForMemStat = 1 #svcMgr.ChronoStatSvc.AsciiStatsOutputFile = "chronoStats.ascii" svcMgr.AthenaPoolCnvSvc.UseDetailChronoStat = True theApp.AuditAlgorithms = True #Hack to load the right dict to write vector< vector < X > > to TTRee import AthenaPython.PyAthena as PyAthena PyAthena.load_library('AtlasSTLAddReflexDict')
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from RecExConfig.RecFlags import rec from AthenaCommon.SystemOfUnits import GeV from AthenaPython.PyAthena import egammaPID from MissingET.METRefGetter_plup import make_METRefAlg from PhotonAnalysisUtils.PhotonNeuralNetworkTool import PhotonNeuralNetworkTool from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags from AthenaCommon.AlgSequence import AlgSequence from PhotonD3PDMaker.PhotonD3PDMakerFlags import PhotonD3PDMakerFlags import D3PDMakerCoreComps import PhotonD3PDMaker import AthenaPython.PyAthena as PyAthena PyAthena.load_library('egammaEnumsDict') def PhotonCustomMET(): from AthenaCommon.AppMgr import ToolSvc topSequence = AlgSequence() photongetter = D3PDMakerCoreComps.SGDataVectorGetterTool( 'photonTight_Getter', TypeName='PhotonContainer', SGKey=D3PDMakerFlags.PhotonSGKey()) ToolSvc += photongetter electrongetter = D3PDMakerCoreComps.SGDataVectorGetterTool( 'electronTight_Getter',