6 from PyJobTransforms.CommonRunArgsToFlags
import commonRunArgsToFlags
7 from PyJobTransforms.TransformUtils
import processPreExec, processPreInclude, processPostExec, processPostInclude
8 from LArCalibTools.LArSC2NtupleConfig
import LArSC2NtupleCfg
9 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
14 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
17 from TrigConfigSvc.TrigConfigSvcCfg
import L1ConfigSvcCfg, HLTConfigSvcCfg, L1PrescaleCondAlgCfg, HLTPrescaleCondAlgCfg
18 from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig
import L1TriggerByteStreamDecoderCfg
27 from TrigConfigSvc.TrigConfigSvcCfg
import BunchGroupCondAlgCfg
30 from AthenaConfiguration.ComponentFactory
import CompFactory
31 tdm = CompFactory.getComp(
'TrigDec::TrigDecisionMakerMT')()
34 acc.addEventAlgo( tdm,
'AthAlgSeq' )
41 from AthenaCommon.Logging
import logging
42 mlog_SCD = logging.getLogger(
'LArSCDumpSkeleton' )
44 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
47 from LArCafJobs.LArSCDumperFlags
import addSCDumpFlags
55 flags.Input.Files=runArgs.inputBSFile
56 flags.LArSCDump.outputNtup=runArgs.outputNTUP_SCMONFile
59 flags.LArSCDump.doGeom=
False
63 runinfo=
getLArDTInfoForRun(flags.Input.RunNumbers[0], connstring=
"COOLONL_LAR/CONDBR2")
65 mlog_SCD.warning(
"Could not get DT run info, using defaults !")
66 flags.LArSCDump.doEt=
True
67 flags.LArSCDump.nSamples=5
72 flags.LArSCDump.digitsKey=
""
73 for i
in range(0,len(runinfo.streamTypes())):
74 if runinfo.streamTypes()[i] ==
"SelectedEnergy":
76 flags.LArSCDump.doEt=
True
77 flags.LArSCDump.nEt=runinfo.streamLengths()[i]
78 elif runinfo.streamTypes()[i] ==
"Energy":
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]
90 flags.LArSCDump.doRawChan=
True
91 flags.LArSCDump.fillNoisyRO=
False
92 CKeys+=[
"LArRawChannels"]
94 mlog_SCD.debug(
"CKeys generated %s",
str(CKeys))
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
102 flags.Trigger.enableL1CaloLegacy =
True
103 flags.Trigger.enableL1CaloPhase1 =
True
113 from TrigDecisionTool.TrigDecisionToolConfig
import TrigDecisionToolCfg
116 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
119 if flags.LArSCDump.doBC:
121 from LArBadChannelTool.LArBadChannelConfig
import LArBadFebCfg, LArBadChannelCfg
125 from LArCellRec.LArTimeVetoAlgConfig
import LArTimeVetoAlgCfg
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,
130 NSamples=flags.LArSCDump.nSamples, FTlist=[], FillBCID=flags.LArSCDump.doBCID, ContainerKey=flags.LArSCDump.digitsKey,
131 SCContainerKeys=CKeys, OverwriteEventNumber = flags.LArSCDump.overwriteEvN, Net=flags.LArSCDump.nEt,
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,
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")
153 sys.exit(
not sc.isSuccess())