def _createWriter(self, sequence): ''' create writer sequence ''' writeLumiSequence = _sequenceAppender( Sequence('writeLumiSeq', ModeOR=False, ShortCircuit=True, IgnoreFilterPassed=False, MeasureTime=True, OutputLevel=self.getProp("OutputLevel"))) # create ODIN by hand writeLumiSequence(createODIN('createODIN')) # kill non-lumi banks to make output small if self.getProp('KillBanks'): writeLumiSequence( bankKiller('KillAll', BankTypes=['ODIN', 'HltLumiSummary', 'DAQ'], DefaultIsKill=True)) # tag input file --- writeLumiSequence( FileIdBankWriter(OutputLevel=self.getProp("OutputLevel"))) # and activate it sequence.Members += [Sequence('writeLumiSeq')] # create lumi sequence lumiFsrSeq = GaudiSequencer("LumiFsrSeq", OutputLevel=INFO) LumiAlgsConf().LumiSequencer = lumiFsrSeq sequence.Members += [lumiFsrSeq]
def __call__(self): from Configurables import EventClockSvc, FakeEventTime clkSvc = EventClockSvc() clkSvc.EventTimeDecoder = "FakeEventTime" clkSvc.addTool(FakeEventTime, "FakeEventTime") clkSvc.FakeEventTime.StartTime = self.__initialTime + 1 from Configurables import GaudiSequencer, createODIN initSeq = GaudiSequencer("InitEscherSeq") initSeq.Members.insert(0, createODIN())
def touchFSR(self): '''make sure the FSR is touched and readable''' from Configurables import createODIN odin = createODIN() from Configurables import (LumiIntegrateFSR) readingFSR = LumiIntegrateFSR("TouchLumiFSR", OutputLevel=self.getProp("OutputLevel")) # this also touches the LumiLow FSRs readingLumiLowFSR = LumiIntegrateFSR( "TouchLumiLowFSR", FSRName="/LumiLowFSR", IntegratorToolName="LumiLowIntegrator", OutputLevel=self.getProp("OutputLevel")) return [odin, readingFSR, readingLumiLowFSR]
def configMonitor(): import os from Gaudi.Configuration import EventPersistencySvc, HistogramPersistencySvc from Configurables import (LHCbApp, LHCb__RawDataCnvSvc, GaudiSequencer, UpdateAndReset, createODIN, ApplicationMgr ) app = LHCbApp() app.DataType = '2015' app.EvtMax = -1 EventPersistencySvc().CnvServices.append( LHCb__RawDataCnvSvc('RawDataCnvSvc') ) HistogramPersistencySvc().OutputFile = '' HistogramPersistencySvc().Warnings = False UpdateAndReset().saveHistograms = 1 #UpdateAndReset().saverCycle = 3600 from Configurables import EventClockSvc EventClockSvc().EventTimeDecoder = 'OdinTimeDecoder' appMgr = ApplicationMgr() # Decoder from Configurables import HCRawBankDecoder decoder = HCRawBankDecoder() decoder.Monitoring = True # Monitor from Configurables import HCDigitMonitor monitor = HCDigitMonitor() monitor.CrateB = 0 monitor.CrateF = 1 monitor.ChannelsB0 = [47, 46, 45, 44] monitor.ChannelsB1 = [23, 22, 21, 20] monitor.ChannelsB2 = [11, 10, 9, 8] monitor.ChannelsF1 = [23, 22, 21, 46] monitor.ChannelsF2 = [11, 10, 9, 8] # Top level sequence topSeq = GaudiSequencer("TopSequence") topSeq.Members = [createODIN(), decoder, monitor] appMgr.TopAlg = [topSeq] return app, monitor
def configure(self, configuration): from Configurables import LHCbApp app = LHCbApp() for (attr, value) in configuration.items(): if hasattr(app, attr): setattr(app, attr, value) self._config[attr] = value EventSelector().Input = self._config['Input'] if 'Catalogs' in self._config.keys(): FileCatalog().Catalogs = self._config['Catalogs'] from Configurables import DecodeRawEvent importOptions("$L0DUOPTS/L0DUConfig.opts") EventPersistencySvc().CnvServices.append('LHCb::RawDataCnvSvc') EventSelector().PrintFreq = 1000 from Configurables import CondDB CondDB().Online = True from Configurables import GaudiSequencer as Sequence from Configurables import createODIN, HltRoutingBitsFilter seq = Sequence("MonitorSequence") physFilter = HltRoutingBitsFilter("PhysFilter", RequireMask=[0x0, 0x4, 0x0]) co = createODIN() seq.Members = [co, physFilter] from DAQSys.Decoders import DecoderDB from itertools import product for stage, t in product(('Hlt1', 'Hlt2'), ('Dec', 'Sel', 'Vertex')): an = "{0}{1}ReportsDecoder".format(stage, t) seq.Members += [ DecoderDB["Hlt%sReportsDecoder/%s" % (t, an)].setup() ] ApplicationMgr().TopAlg = [seq] self._extra_config(seq)
def configure(self, configuration): from Configurables import LHCbApp app = LHCbApp() for (attr, value) in configuration.items(): if hasattr(app, attr): setattr(app, attr, value) self._config[attr] = value EventSelector().Input = self._config['Input'] FileCatalog().Catalogs = self._config['Catalogs'] EventDataSvc().RootCLID = 1 from Configurables import LHCb__RawDataCnvSvc as RawDataCnvSvc EventPersistencySvc().CnvServices.append( RawDataCnvSvc('RawDataCnvSvc')) EventSelector().PrintFreq = 100 from Configurables import GaudiSequencer as Sequence from Configurables import createODIN seq = Sequence("OdinSequence") co = createODIN() seq.Members = [co] ApplicationMgr().TopAlg = [seq]
from Configurables import IOTest from GaudiConf.IOHelper import IOHelper from Configurables import ApplicationMgr, createODIN odin = createODIN() ApplicationMgr().TopAlg += [odin] IOTest(EvtMax=5, LoadAll=True) ioh = IOHelper('ROOT') ioh.setupServices() ioh.inputFiles(['PFN:Reco14-Stripping20.dst'])
#!/usr/bin/env gaudirun.py from Gaudi.Configuration import ApplicationMgr, EventSelector from GaudiConf import IOHelper from Configurables import createODIN, HltLumiSummaryDecoder from Configurables import DumpLumiEvents IOHelper(None, None).setupServices() #IOHelper(Input='MDF').inputFiles(inputs, clear=True) dumpLumiEvents = DumpLumiEvents() dumpLumiEvents.OutputFileName = "output.bz2" ApplicationMgr().TopAlg = [ createODIN(), HltLumiSummaryDecoder(), dumpLumiEvents ] ApplicationMgr().HistogramPersistency = 'NONE' EventSelector().PrintFreq = 100000
from Configurables import LHCbApp from Gaudi.Configuration import * LHCbApp().EvtMax = 100 from PRConfig import TestFileDB TestFileDB.test_file_db["2012_raw_default"].run() from Configurables import createODIN, EventCountAlg, PostScaler ApplicationMgr().TopAlg += [ createODIN(), EventCountAlg(), PostScaler(), GaudiSequencer("WAAAATUP") ] from Configurables import LHCbTimingAuditor, LHCbSequencerTimerTool, TimingAuditor, AuditorSvc LHCbTimingAuditor().addTool(LHCbSequencerTimerTool, name="TIMER") LHCbTimingAuditor().TIMER.SummaryFile = "timing.dat" LHCbTimingAuditor().TIMER.OutputLevel = DEBUG LHCbTimingAuditor().TIMER.NameSize = 2 ApplicationMgr().ExtSvc.append('AuditorSvc') AuditorSvc().Auditors.append(LHCbTimingAuditor()) LHCbTimingAuditor().Enable = True LHCbTimingAuditor().OutputLevel = VERBOSE AuditorSvc().Auditors.append(TimingAuditor()) TimingAuditor().Enable = True
#!/usr/bin/env gaudirun.py from Gaudi.Configuration import ApplicationMgr, EventSelector, FileCatalog, DEBUG from GaudiConf import IOHelper from Configurables import createODIN, HltLumiSummaryDecoder from Configurables import DumpLumiEvents FileCatalog().Catalogs = ["xmlcatalog_file:MyCatalog.xml"] inputs = ["lfn:/lhcb/data/2012/RAW/FULL/LHCb/COLLISION12/114753/114753_0000000298.raw"] IOHelper(None, None).setupServices() dumpLumiEvents = DumpLumiEvents() dumpLumiEvents.OutputLevel = DEBUG dumpLumiEvents.OutputFileName = "testDumpLumiEvents.bz2" dumpLumiEvents.NEventsHint = 100 ApplicationMgr().TopAlg = [createODIN(), HltLumiSummaryDecoder(), dumpLumiEvents] ApplicationMgr().HistogramPersistency = 'NONE' ApplicationMgr().EvtMax = 100 IOHelper(Input='MDF').inputFiles(inputs, clear=True) EventSelector().PrintFreq = 1
# Latest iteration, iter 6 # corrections = {'mx' : [9.55, -0.5, -143], # 'my' : [7.46, -0.5, -112], # 'x' : [0.75, 0.6, 0.49, 0.65], # 'y' : [0.483, 0.589, 0.738, 0.813]} ## Recombine RawEvent # from Configurables import RawEventFormatConf, RawEventJuggler, RecombineRawEvent # juggleSeq = GaudiSequencer("JuggleSeq") # RawEventJuggler().Input = 2.0 # RawEventJuggler().Output = 0.0 # RawEventJuggler().Sequencer = juggleSeq ## Configure Reco co = createODIN() mr = MuonRec() decodeVelo = DecodeVeloRawBuffer( "createVeloLiteClusters" ) recoVelo = FastVeloTracking( 'FastVeloHlt', OutputTracksName = "Hlt/Track/Velo" ) recoVelo.HLT1Only = False decodeIT = RawBankToSTLiteClusterAlg("createITLiteClusters") decodeIT.DetType = "IT" ## Configure L0 emulation by hand # from Configurables import L0DUFromRawAlg, L0DUFromRawTool # l0du = L0DUFromRawAlg("L0DUFromRaw") # l0du.addTool(L0DUFromRawTool,name = "L0DUFromRawTool") # l0du = getattr( l0du, 'L0DUFromRawTool' ) # l0du.StatusOnTES = False seq.Members = [ co, decodeVelo, recoVelo, decodeIT, mr ]