def _configureDBSnapshot(self): from Configurables import CondDB conddb = CondDB() conddb.EnableRunStampCheck = False conddb.Tags["ONLINE"] = 'fake' conddb.setProp('IgnoreHeartBeat', self.getProp('IgnoreDBHeartBeat')) self.setOtherProps(conddb, [ 'UseDBSnapshot', 'DBSnapshotDirectory', 'EnableRunChangeHandler', 'RunChangeHandlerConditions' ]) # https://savannah.cern.ch/bugs/?94454#comment12 from Configurables import MagneticFieldSvc MagneticFieldSvc().UseSetCurrent = True
dets.append(det) print "Moving to Offline DB the following detector Data ",dets ecs = EventClockSvc() ecs.InitialTime = RunOption.RunStartTime*1000000000 ecs.addTool(FakeEventTime,"EventTimeDecoder") ecs.EventTimeDecoder.StartTime = ecs.InitialTime ecs.EventTimeDecoder.TimeStep = 10 #xmlCnvSvc = XmlCnvSvc(AllowGenericConversion = True) DDDBConf() #detDataSvc = DetectorDataSvc() #DetectorPersistencySvc( CnvServices = [ xmlCnvSvc ] ) cdb = CondDB() cdb.RunChangeHandlerConditions=CondMap.ConditionMap cdb.EnableRunChangeHandler = True cdb.EnableRunStampCheck=False cdb.UseDBSnapshot = True cdb.Tags = { "DDDB" : RunOption.DDDBTag, "LHCBCOND" : RunOption.CondDbTag, "ONLINE" : 'fake'} cdb.IgnoreHeartBeat = True dbxalg = DBXferAlg() dbxalg.RunNumber = RunOption.RunNumber dbxalg.RunStartTime = RunOption.RunStartTime*1000000000 dbxalg.OnlineXmlDir = RunOption.OutputDirectory wrconf = WriterConf("wconf",dets)#["Velo","IT","TT","OT"]) wrconf.CondFilePrefix = RunOption.OutputDirectory+"/offl/Conditions/Online" from Configurables import WriteMultiAlignmentConditionsTool xmlwriter = WriteMultiAlignmentConditionsTool()#"AlignWriterTool") wrconf.addXmlWriters(xmlwriter) app = ApplicationMgr()
def configOnline(app, alg, name): from Configurables import ApplicationMgr, UpdateAndReset appMgr = ApplicationMgr() ## Configure saving of histograms ur = UpdateAndReset() ur.saveHistograms = 1 appMgr.TopAlg.insert(0, ur) from Configurables import LoKiSvc LoKiSvc().Welcome = False import OnlineEnv app.DDDBtag = OnlineEnv.DDDBTag app.CondDBtag = OnlineEnv.CondDBTag from Configurables import CondDB conddb = CondDB() conddb.IgnoreHeartBeat = True conddb.UseDBSnapshot = True conddb.EnableRunChangeHandler = True conddb.EnableRunStampCheck = False conddb.Tags['ONLINE'] = 'fake' import ConditionsMap conddb.RunChangeHandlerConditions = ConditionsMap.RunChangeHandlerConditions from Gaudi.Configuration import EventLoopMgr EventLoopMgr().Warnings = False from Configurables import MonitorSvc MonitorSvc().disableDimPropServer = 1 MonitorSvc().disableDimCmdServer = 1 MonitorSvc().ExpandCounterServices = 0; MonitorSvc().ExpandNameInfix = "<part>_x_<program>/"; MonitorSvc().PartitionName = OnlineEnv.PartitionName; MonitorSvc().ProgramName = name + "_00"; # setup the histograms and the monitoring service appMgr.ExtSvc.append( 'MonitorSvc' ) from Configurables import RootHistCnv__PersSvc RootHistCnv__PersSvc().OutputEnabled = False from Gaudi.Configuration import allConfigurables # set up the event selector if 'EventSelector' in allConfigurables : del allConfigurables['EventSelector'] input = 'Events' mepMgr = OnlineEnv.mepManager(OnlineEnv.PartitionID,OnlineEnv.PartitionName,[input],True) mepMgr.ConnectWhen = "start"; appMgr.Runable = OnlineEnv.evtRunable(mepMgr) appMgr.SvcOptMapping.append('LHCb::OnlineEvtSelector/EventSelector') appMgr.SvcOptMapping.append('LHCb::FmcMessageSvc/MessageSvc') appMgr.ExtSvc.append(mepMgr) eventSelector = OnlineEnv.mbmSelector(input = input, type = 'ONE', decode = False, event_type = 2) appMgr.ExtSvc.append(eventSelector) appMgr.ExtSvc.append(mepMgr) appMgr.OutputLevel = 3 OnlineEnv.evtDataSvc() eventSelector.REQ1 = 'EvType=2;TriggerMask=0x0,0x4,0x0,0x0;VetoMask=0,0,0,0x300;MaskType=ANY;UserType=USER;Frequency=PERC;Perc=100.0' appMgr.EvtSel = eventSelector from Configurables import AuditorSvc AuditorSvc().Auditors = [] configMsgSvc( appMgr ) OnlineEnv.end_config(False)