ATLAS Offline Software
MuonPRDTestCfg.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 def NswOccupancyAlgCfg(flags, binWidth = 100):
7  result = ComponentAccumulator()
8 
9  histSvc = CompFactory.THistSvc(Output=["NSWSTORIES DATAFILE='NswFairyTales.root' OPT='RECREATE'"])
10  result.addService(histSvc)
11  the_alg = CompFactory.NswOccupancyAlg("NswOccupancyAlgBin{width}".format(width = binWidth), BinWidth = binWidth)
12  result.addEventAlgo(the_alg, primary = True)
13  return result
14 
15 def AddMetaAlgCfg(flags, alg_name="MuonTPMetaAlg", OutStream="NSWPRDValAlg", **kwargs):
16  result = ComponentAccumulator()
17  from AthenaServices.MetaDataSvcConfig import MetaDataSvcCfg
18  from EventBookkeeperTools.EventBookkeeperToolsConfig import CutFlowSvcCfg
19  result.merge(CutFlowSvcCfg(flags))
20  result.merge(MetaDataSvcCfg(flags))
21  if len(OutStream):
22  kwargs.setdefault("OutStream", OutStream)
23  alg_name += "_" + OutStream
24  kwargs.setdefault("isData", not flags.Input.isMC)
25  kwargs.setdefault("ExtraOutputs", [('xAOD::EventInfo', 'StoreGateSvc+EventInfo.MetaData' + OutStream)])
26  the_alg = CompFactory.MuonVal.MuonTPMetaDataAlg(alg_name, **kwargs)
27  result.addEventAlgo(the_alg, primary=True) # top sequence
28  return result
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
vtune_athena.format
format
Definition: vtune_athena.py:14
python.MuonPRDTestCfg.AddMetaAlgCfg
def AddMetaAlgCfg(flags, alg_name="MuonTPMetaAlg", OutStream="NSWPRDValAlg", **kwargs)
Definition: MuonPRDTestCfg.py:15
python.MuonPRDTestCfg.NswOccupancyAlgCfg
def NswOccupancyAlgCfg(flags, binWidth=100)
Definition: MuonPRDTestCfg.py:6
python.MetaDataSvcConfig.MetaDataSvcCfg
def MetaDataSvcCfg(flags, toolNames=[], tools=[])
Definition: MetaDataSvcConfig.py:6
python.EventBookkeeperToolsConfig.CutFlowSvcCfg
def CutFlowSvcCfg(flags, **kwargs)
Definition: EventBookkeeperToolsConfig.py:24