Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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  if hasattr(runArgs,"ETThresh"):
62  flags.LArSCDump.ETThresh=float(runArgs.ETThresh)
63 
64  if hasattr(runArgs,"ETThreshMain"):
65  flags.LArSCDump.ETThreshMain=float(runArgs.ETThreshMain)
66 
67  from LArConditionsCommon.LArRunFormat import getLArDTInfoForRun
68  try:
69  runinfo=getLArDTInfoForRun(flags.Input.RunNumbers[0], connstring="COOLONL_LAR/CONDBR2")
70  except Exception:
71  mlog_SCD.warning("Could not get DT run info, using defaults !")
72  flags.LArSCDump.doEt=True
73  flags.LArSCDump.nSamples=5
74  flags.LArSCDump.nEt=1
75  CKeys=["SC_ET"]
76  fw=5
77  else:
78  fw=runinfo.FWversion()
79  CKeys=[]
80  flags.LArSCDump.digitsKey=""
81  for i in range(0,len(runinfo.streamTypes())):
82  if runinfo.streamTypes()[i] == "SelectedEnergy":
83  CKeys += ["SC_ET_ID"]
84  flags.LArSCDump.doEt=True
85  flags.LArSCDump.nEt=runinfo.streamLengths()[i]
86  elif runinfo.streamTypes()[i] == "Energy":
87  CKeys += ["SC_ET"]
88  flags.LArSCDump.doEt=True
89  flags.LArSCDump.nEt=runinfo.streamLengths()[i]
90  elif runinfo.streamTypes()[i] == "RawADC":
91  flags.LArSCDump.digitsKey="SC"
92  flags.LArSCDump.nSamples=runinfo.streamLengths()[i]
93  elif runinfo.streamTypes()[i] == "ADC":
94  CKeys += ["SC_ADC_BAS"]
95  flags.LArSCDump.nSamples=runinfo.streamLengths()[i]
96 
97  finally:
98  flags.LArSCDump.doRawChan=True
99  flags.LArSCDump.fillNoisyRO=False
100  CKeys+=["LArRawChannels"]
101 
102  mlog_SCD.debug("CKeys generated %s",str(CKeys))
103 
104  flags.Trigger.triggerConfig = 'DB'
105  flags.Trigger.L1.doCTP = True
106  flags.Trigger.L1.doMuon = False
107  flags.Trigger.L1.doCalo = False
108  flags.Trigger.L1.doTopo = False
109 
110  flags.Trigger.enableL1CaloLegacy = True
111  flags.Trigger.enableL1CaloPhase1 = True
112 
113  # To respect --athenaopts
114  flags.fillFromArgs()
115 
116  flags.lock()
117 
118  cfg=MainServicesCfg(flags)
119  cfg.merge(L1CaloMenuCfg(flags))
120 
121  from TrigDecisionTool.TrigDecisionToolConfig import TrigDecisionToolCfg
122  tdt = cfg.getPrimaryAndMerge(TrigDecisionToolCfg(flags))
123 
124  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
125  cfg.merge(LArGMCfg(flags))
126 
127  if fw==6:
128  from IOVDbSvc.IOVDbSvcConfig import addOverride
129  cfg.merge(addOverride(flags,"/LAR/Identifier/LatomeMapping","LARIdentifierLatomeMapping-fw6"))
130 
131  if flags.LArSCDump.doBC:
132  # FIXME should be SC version
133  from LArBadChannelTool.LArBadChannelConfig import LArBadFebCfg, LArBadChannelCfg
134  cfg.merge(LArBadChannelCfg(flags))
135  cfg.merge(LArBadFebCfg(flags))
136 
137  from LArCellRec.LArTimeVetoAlgConfig import LArTimeVetoAlgCfg
138  cfg.merge(LArTimeVetoAlgCfg(flags))
139 
140  cfg.merge(LArSC2NtupleCfg(flags, AddBadChannelInfo=flags.LArSCDump.doBC, AddFEBTempInfo=False, isSC=True, isFlat=False,
141  OffId=flags.LArSCDump.doOfflineId, AddHash=flags.LArSCDump.doHash, AddCalib=flags.LArSCDump.doCalib,
142  RealGeometry=flags.LArSCDump.doGeom, ExpandId=flags.LArSCDump.expandId, BadChanKey="LArBadChannelSC", # from LArCond2NtupleBase
143  NSamples=flags.LArSCDump.nSamples, FTlist=[], FillBCID=flags.LArSCDump.doBCID, ContainerKey=flags.LArSCDump.digitsKey, # from LArDigits2Ntuple
144  SCContainerKeys=CKeys, OverwriteEventNumber = flags.LArSCDump.overwriteEvN, Net=flags.LArSCDump.nEt,
145  FillRODEnergy = flags.LArSCDump.doRawChan, FillLB = True, FillTriggerType = True,
146  ETThreshold = flags.LArSCDump.ETThresh, ETThresholdMain = flags.LArSCDump.ETThreshMain, ADCThreshold=int(runArgs.ADCThresh),
147  TrigNames=["L1_EM3","L1_EM7","L1_EM15","L1_EM22VHI","L1_eEM5","L1_eEM15","L1_eEM22M"],
148  TrigDecisionTool=tdt,
149  OutputLevel=2))
150 
151  if os.path.exists(flags.LArSCDump.outputNtup):
152  os.remove(flags.LArSCDump.outputNtup)
153  from AthenaConfiguration.ComponentFactory import CompFactory
154  cfg.addService(CompFactory.NTupleSvc(Output = [ "FILE1 DATAFILE='"+flags.LArSCDump.outputNtup+"' OPT='NEW'" ]))
155  cfg.setAppProperty("HistogramPersistency","ROOT")
156 
157 
158  processPostInclude(runArgs, flags, cfg)
159  processPostExec(runArgs, flags, cfg)
160 
161  #example how to dump the stores
162  #cfg.getService("StoreGateSvc").Dump=True
163  #from AthenaCommon.Constants import DEBUG
164  #cfg.getService("MessageSvc").OutputLevel=DEBUG
165  # Run the final accumulator
166  sc = cfg.run()
167  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:334
python.BunchGroupCondAlgConfig.BunchGroupCondAlgCfg
def BunchGroupCondAlgCfg(flags)
Definition: BunchGroupCondAlgConfig.py:14
python.LArBadChannelConfig.LArBadFebCfg
def LArBadFebCfg(configFlags, tag=None)
Definition: LArBadChannelConfig.py:43
python.LArRunFormat.getLArDTInfoForRun
def getLArDTInfoForRun(run, quiet=False, connstring="COOLONL_LAR/CONDBR2")
Definition: LArRunFormat.py:152
LArRunFormat
LArSCDumperFlags.addSCDumpFlags
def addSCDumpFlags(flags)
Definition: LArSCDumperFlags.py:3
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:262
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.IOVDbSvcConfig.addOverride
def addOverride(flags, folder, tag, tagType="tag", db=None)
Definition: IOVDbSvcConfig.py:233
python.TrigConfigSvcCfg.L1PrescaleCondAlgCfg
def L1PrescaleCondAlgCfg(flags)
Definition: TrigConfigSvcCfg.py:278
python.TrigConfigSvcCfg.L1ConfigSvcCfg
def L1ConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:203
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.TrigConfigSvcCfg.HLTConfigSvcCfg
def HLTConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:236
str
Definition: BTagTrackIpAccessor.cxx:11
TrigT1ResultByteStreamConfig.L1TriggerByteStreamDecoderCfg
def L1TriggerByteStreamDecoderCfg(flags, returnEDM=False)
Definition: TrigT1ResultByteStreamConfig.py:132
LArSC2NtupleConfig.LArSC2NtupleCfg
def LArSC2NtupleCfg(flags, isEmf=False, **kwargs)
Definition: LArSC2NtupleConfig.py:5
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65