ATLAS Offline Software
caloCellD3PDConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 
5 def _args (level, name, kwin, **kw):
6  kw = kw.copy()
7  kw['level'] = level
8  for (k, v) in kwin.items():
9  if k.startswith (name + '_'):
10  kw[k[len(name)+1:]] = v
11  return kw
12 
13 def caloD3PDCfg (flags, stream = 'Calo', file = 'egamma.root',
14  level = 10,
15  clevel = 6,
16  autoflush = -1,
17  **kw):
18  acc = ComponentAccumulator()
19 
20  from D3PDMakerCoreComps.MakerAlgConfig import MakerAlgConfig
21  alg = MakerAlgConfig (flags, acc, stream, file,
22  clevel = clevel,
23  autoflush = autoflush)
24 
25  from LumiBlockComps.LumiBlockMuWriterConfig import LumiBlockMuWriterCfg
26  acc.merge(LumiBlockMuWriterCfg(flags))
27 
28  from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject
29  alg += EventInfoD3PDObject (**_args (0, 'EventInfo', kw))
30 
31  from TileConditions.TileBadChannelsConfig import TileBadChannelsCondAlgCfg
32  acc.merge( TileBadChannelsCondAlgCfg(configFlags))
33 
34  from CaloD3PDMaker.CaloCellD3PDObject import AllCaloCellD3PDObject
35  alg += AllCaloCellD3PDObject (**_args (level, 'Detail2', kw))
36 
37  acc.addEventAlgo (alg.alg)
38 
39  return acc
40 
41 if __name__=='__main__':
42 
43  from D3PDMakerConfig.D3PDMakerFlags import configFlags
44  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
45 
46  configFlags.fillFromArgs()
47 
48  from AthenaConfiguration.TestDefaults import defaultGeometryTags
49  configFlags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
50 
51  configFlags.lock()
52 
53  cfg = MainServicesCfg (configFlags)
54 
55  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
56  cfg.merge (PoolReadCfg (configFlags))
57 
58  from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
59  cfg.merge(CaloNoiseCondAlgCfg(configFlags,noisetype="totalNoise"))
60 
61  from LumiBlockComps.LuminosityCondAlgConfig import LuminosityCondAlgCfg
62  cfg.merge(LuminosityCondAlgCfg(configFlags))
63 
64  cfg.merge (caloD3PDCfg(configFlags, file = configFlags.D3PD.OutputFile))
65 
66  sc = cfg.run (configFlags.Exec.MaxEvents)
67 
68  import sys
69  sys.exit (sc.isFailure())
python.LuminosityCondAlgConfig.LuminosityCondAlgCfg
def LuminosityCondAlgCfg(flags, useOnlineLumi=None, suffix=None)
Definition: LuminosityCondAlgConfig.py:17
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.LumiBlockMuWriterConfig.LumiBlockMuWriterCfg
def LumiBlockMuWriterCfg(flags, name='LumiBlockMuWriter', seqName="AthAlgSeq")
Definition: LumiBlockMuWriterConfig.py:14
python.caloCellD3PDConfig._args
def _args(level, name, kwin, **kw)
Definition: caloCellD3PDConfig.py:5
python.TileBadChannelsConfig.TileBadChannelsCondAlgCfg
def TileBadChannelsCondAlgCfg(flags, **kwargs)
Definition: TileBadChannelsConfig.py:10
python.CaloNoiseCondAlgConfig.CaloNoiseCondAlgCfg
def CaloNoiseCondAlgCfg(flags, noisetype="totalNoise")
Definition: CaloNoiseCondAlgConfig.py:11
python.caloCellD3PDConfig.caloD3PDCfg
def caloD3PDCfg(flags, stream='Calo', file='egamma.root', level=10, clevel=6, autoflush=-1, **kw)
Definition: caloCellD3PDConfig.py:13