ATLAS Offline Software
Functions
LArSCDumperSkeleton Namespace Reference

Functions

def L1CaloMenuCfg (flags)
 
def fromRunArgs (runArgs)
 

Function Documentation

◆ fromRunArgs()

def LArSCDumperSkeleton.fromRunArgs (   runArgs)

Definition at line 39 of file LArSCDumperSkeleton.py.

39 def fromRunArgs(runArgs):
40 
41  from AthenaCommon.Logging import logging
42  mlog_SCD = logging.getLogger( 'LArSCDumpSkeleton' )
43 
44  from AthenaConfiguration.AllConfigFlags import initConfigFlags
45  flags=initConfigFlags()
46 
47  from LArCafJobs.LArSCDumperFlags import addSCDumpFlags
48  addSCDumpFlags(flags)
49 
50  commonRunArgsToFlags(runArgs, flags)
51 
52  processPreInclude(runArgs, flags)
53  processPreExec(runArgs, flags)
54 
55  flags.Input.Files=runArgs.inputBSFile
56  flags.LArSCDump.outputNtup=runArgs.outputNTUP_SCMONFile
57 
58  # real geom not working yet
59  flags.LArSCDump.doGeom=False
60 
61  from LArConditionsCommon.LArRunFormat import getLArDTInfoForRun
62  try:
63  runinfo=getLArDTInfoForRun(flags.Input.RunNumbers[0], connstring="COOLONL_LAR/CONDBR2")
64  except Exception:
65  mlog_SCD.warning("Could not get DT run info, using defaults !")
66  flags.LArSCDump.doEt=True
67  flags.LArSCDump.nSamples=5
68  flags.LArSCDump.nEt=1
69  CKeys=["SC_ET"]
70  else:
71  CKeys=[]
72  flags.LArSCDump.digitsKey=""
73  for i in range(0,len(runinfo.streamTypes())):
74  if runinfo.streamTypes()[i] == "SelectedEnergy":
75  CKeys += ["SC_ET_ID"]
76  flags.LArSCDump.doEt=True
77  flags.LArSCDump.nEt=runinfo.streamLengths()[i]
78  elif runinfo.streamTypes()[i] == "Energy":
79  CKeys += ["SC_ET"]
80  flags.LArSCDump.doEt=True
81  flags.LArSCDump.nEt=runinfo.streamLengths()[i]
82  elif runinfo.streamTypes()[i] == "RawADC":
83  flags.LArSCDump.digitsKey="SC"
84  flags.LArSCDump.nSamples=runinfo.streamLengths()[i]
85  elif runinfo.streamTypes()[i] == "ADC":
86  CKeys += ["SC_ADC_BAS"]
87  flags.LArSCDump.nSamples=runinfo.streamLengths()[i]
88 
89  finally:
90  flags.LArSCDump.doRawChan=True
91  flags.LArSCDump.fillNoisyRO=False
92  CKeys+=["LArRawChannels"]
93 
94  mlog_SCD.debug("CKeys generated %s",str(CKeys))
95 
96  flags.Trigger.triggerConfig = 'DB'
97  flags.Trigger.L1.doCTP = True
98  flags.Trigger.L1.doMuon = False
99  flags.Trigger.L1.doCalo = False
100  flags.Trigger.L1.doTopo = False
101 
102  flags.Trigger.enableL1CaloLegacy = True
103  flags.Trigger.enableL1CaloPhase1 = True
104 
105  # To respect --athenaopts
106  flags.fillFromArgs()
107 
108  flags.lock()
109 
110  cfg=MainServicesCfg(flags)
111  cfg.merge(L1CaloMenuCfg(flags))
112 
113  from TrigDecisionTool.TrigDecisionToolConfig import TrigDecisionToolCfg
114  tdt = cfg.getPrimaryAndMerge(TrigDecisionToolCfg(flags))
115 
116  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
117  cfg.merge(LArGMCfg(flags))
118 
119  if flags.LArSCDump.doBC:
120  # FIXME should be SC version
121  from LArBadChannelTool.LArBadChannelConfig import LArBadFebCfg, LArBadChannelCfg
122  cfg.merge(LArBadChannelCfg(flags))
123  cfg.merge(LArBadFebCfg(flags))
124 
125  from LArCellRec.LArTimeVetoAlgConfig import LArTimeVetoAlgCfg
126  cfg.merge(LArTimeVetoAlgCfg(flags))
127 
128  cfg.merge(LArSC2NtupleCfg(flags, AddBadChannelInfo=flags.LArSCDump.doBC, AddFEBTempInfo=False, isSC=True, isFlat=False,
129  OffId=flags.LArSCDump.doOfflineId, AddHash=flags.LArSCDump.doHash, AddCalib=flags.LArSCDump.doCalib, RealGeometry=flags.LArSCDump.doGeom, ExpandId=flags.LArSCDump.expandId, # from LArCond2NtupleBase
130  NSamples=flags.LArSCDump.nSamples, FTlist=[], FillBCID=flags.LArSCDump.doBCID, ContainerKey=flags.LArSCDump.digitsKey, # from LArDigits2Ntuple
131  SCContainerKeys=CKeys, OverwriteEventNumber = flags.LArSCDump.overwriteEvN, Net=flags.LArSCDump.nEt, # from LArSC2Ntuple
132  FillRODEnergy = flags.LArSCDump.doRawChan, FillLB = True, FillTriggerType = True,
133  TrigNames=["L1_EM3","L1_EM7","L1_EM15","L1_EM22VHI","L1_eEM5","L1_eEM15","L1_eEM22M"],
134  TrigDecisionTool=tdt,
135  OutputLevel=3))
136 
137  if os.path.exists(flags.LArSCDump.outputNtup):
138  os.remove(flags.LArSCDump.outputNtup)
139  from AthenaConfiguration.ComponentFactory import CompFactory
140  cfg.addService(CompFactory.NTupleSvc(Output = [ "FILE1 DATAFILE='"+flags.LArSCDump.outputNtup+"' OPT='NEW'" ]))
141  cfg.setAppProperty("HistogramPersistency","ROOT")
142 
143 
144  processPostInclude(runArgs, flags, cfg)
145  processPostExec(runArgs, flags, cfg)
146 
147  #example how to dump the stores
148  #cfg.getService("StoreGateSvc").Dump=True
149  #from AthenaCommon.Constants import DEBUG
150  #cfg.getService("MessageSvc").OutputLevel=DEBUG
151  # Run the final accumulator
152  sc = cfg.run()
153  sys.exit(not sc.isSuccess())

◆ L1CaloMenuCfg()

def LArSCDumperSkeleton.L1CaloMenuCfg (   flags)

Definition at line 11 of file LArSCDumperSkeleton.py.

11 def L1CaloMenuCfg(flags):
12 
13 
14  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
15 
17  from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg, HLTConfigSvcCfg, L1PrescaleCondAlgCfg, HLTPrescaleCondAlgCfg
18  from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1TriggerByteStreamDecoderCfg
19 
20  acc.merge( L1TriggerByteStreamDecoderCfg(flags) )
21  acc.merge( L1ConfigSvcCfg(flags) )
22  acc.merge( HLTConfigSvcCfg(flags) )
23  acc.merge( L1PrescaleCondAlgCfg(flags) )
24  acc.merge( HLTPrescaleCondAlgCfg(flags) )
25 
26 
27  from TrigConfigSvc.TrigConfigSvcCfg import BunchGroupCondAlgCfg
28  acc.merge( BunchGroupCondAlgCfg( flags ) )
29 
30  from AthenaConfiguration.ComponentFactory import CompFactory
31  tdm = CompFactory.getComp('TrigDec::TrigDecisionMakerMT')()
32  tdm.doL1 = True
33  tdm.doHLT = False
34  acc.addEventAlgo( tdm, 'AthAlgSeq' )
35 
36  return acc
37 
38 
python.TransformUtils.processPreExec
def processPreExec(runArgs, flags)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:41
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TransformUtils.processPostExec
def processPostExec(runArgs, flags, cfg)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:50
LArSCDumperSkeleton.L1CaloMenuCfg
def L1CaloMenuCfg(flags)
Definition: LArSCDumperSkeleton.py:11
python.LArBadChannelConfig.LArBadChannelCfg
def LArBadChannelCfg(configFlags, tag=None, isSC=False)
Definition: LArBadChannelConfig.py:8
python.TransformUtils.processPostInclude
def processPostInclude(runArgs, flags, cfg)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:69
LArSCDumperSkeleton.fromRunArgs
def fromRunArgs(runArgs)
Definition: LArSCDumperSkeleton.py:39
python.TransformUtils.processPreInclude
def processPreInclude(runArgs, flags)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:62
python.TrigConfigSvcCfg.HLTPrescaleCondAlgCfg
def HLTPrescaleCondAlgCfg(flags)
Definition: TrigConfigSvcCfg.py:327
python.BunchGroupCondAlgConfig.BunchGroupCondAlgCfg
def BunchGroupCondAlgCfg(flags)
Definition: BunchGroupCondAlgConfig.py:14
python.LArBadChannelConfig.LArBadFebCfg
def LArBadFebCfg(configFlags, tag=None)
Definition: LArBadChannelConfig.py:45
python.LArRunFormat.getLArDTInfoForRun
def getLArDTInfoForRun(run, quiet=False, connstring="COOLONL_LAR/CONDBR2")
Definition: LArRunFormat.py:114
LArRunFormat
LArSCDumperFlags.addSCDumpFlags
def addSCDumpFlags(flags)
Definition: LArSCDumperFlags.py:3
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
python.CommonRunArgsToFlags.commonRunArgsToFlags
def commonRunArgsToFlags(runArgs, configFlags)
Definition: CommonRunArgsToFlags.py:12
LArTimeVetoAlgConfig.LArTimeVetoAlgCfg
def LArTimeVetoAlgCfg(flags)
Definition: LArTimeVetoAlgConfig.py:7
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
python.TriggerInterface.TrigDecisionToolCfg
def TrigDecisionToolCfg(flags)
Definition: TriggerInterface.py:14
python.TrigConfigSvcCfg.L1PrescaleCondAlgCfg
def L1PrescaleCondAlgCfg(flags)
Definition: TrigConfigSvcCfg.py:272
python.TrigConfigSvcCfg.L1ConfigSvcCfg
def L1ConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:198
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.TrigConfigSvcCfg.HLTConfigSvcCfg
def HLTConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:231
str
Definition: BTagTrackIpAccessor.cxx:11
TrigT1ResultByteStreamConfig.L1TriggerByteStreamDecoderCfg
def L1TriggerByteStreamDecoderCfg(flags, returnEDM=False)
Definition: TrigT1ResultByteStreamConfig.py:133
LArSC2NtupleConfig.LArSC2NtupleCfg
def LArSC2NtupleCfg(flags, isEmf=False, **kwargs)
Definition: LArSC2NtupleConfig.py:6