示例#1
0
    def _action():
        """
        Reset all DaVinci sequences
        """
        from Gaudi.Configuration import allConfigurables
        from Gaudi.Configuration import getConfigurable
        for seq in ('DaVinciInitSeq', 'DaVinciMainSequence', 'DaVinciSequence',
                    'MonitoringSequence', 'FilteredEventSeq'):

            if not seq in allConfigurables: continue
            cSeq = getConfigurable(seq)
            if cSeq and hasattr(cSeq, 'Members'):
                logger.info('Reset the sequence %s' % cSeq.name())
                cSeq.Members = []

            ## reset the list of top-level algorithms
            from Configurables import ApplicationMgr
            a = ApplicationMgr()
            a.TopAlg = []
            a.OutputLevel = options.OutputLevel

            from Configurables import MessageSvc
            m = MessageSvc(OutputLevel=options.OutputLevel)

            from GaudiConf import IOHelper
            ioh = IOHelper()
            ioh.setupServices()
                    TESPrefix = stripTESPrefix,
                    ActiveMDSTStream = True,
                    Verbose = True,
                    DSTStreams = dstStreams,
                    MicroDSTStreams = mdstStreams )

from Configurables import ApplicationMgr, AuditorSvc, SequencerTimerTool
	
# Initial IOV time
# http://www.onlineconversion.com/unix_time.htm
# values in ns (so multiply values from above link by 1e9)
#from Configurables import EventClockSvc
#EventClockSvc().EventTimeDecoder = "OdinTimeDecoder"

appMgr = ApplicationMgr()
appMgr.OutputLevel = 6
appMgr.ExtSvc += [ 'ToolSvc', 'AuditorSvc' ]

appMgr.HistogramPersistency = "ROOT"
ntSvc = NTupleSvc()
appMgr.ExtSvc += [ ntSvc ]

from Configurables import ( LHCbApp, PhysConf, AnalysisConf,
                            DstConf, LumiAlgsConf, DDDBConf )

#LHCbApp().DDDBtag   = "dddb-20150724"
#LHCbApp().CondDBtag = "cond-20150805"

# Can be enabled for next full stack release
PhysConf().OutputLevel     = appMgr.OutputLevel
#AnalysisConf().OutputLevel = appMgr.OutputLevel
示例#3
0
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)
示例#4
0
import os
from Gaudi.Configuration import *

from Configurables import ApplicationMgr
app = ApplicationMgr()
app.TopAlg = []
app.EvtSel = 'NONE'
app.EvtMax = 1
app.ExtSvc = []
app.OutputLevel = INFO

# DD4hep geometry service
from Configurables import GeoSvc
## parse the given xml file
path_to_detectors = os.environ.get("FCCDETECTORS", "")
geoservice = GeoSvc("GeoSvc")
geoservice.detectors = [
    os.path.join(path_to_detectors,
                 'Detector/DetFCCeeCLD/compact/FCCee_o2_v02/FCCee_o2_v02.xml'),
]
ApplicationMgr().ExtSvc += [geoservice]

from Configurables import SimG4Svc
geantservice = SimG4Svc("SimG4Svc")
ApplicationMgr().ExtSvc += [geantservice]

from Configurables import GeoToGdmlDumpSvc
geodumpservice = GeoToGdmlDumpSvc()
geodumpservice.gdml = "DetFCCeeCLD.gdml"
ApplicationMgr().ExtSvc += [geodumpservice]
示例#5
0
from Gaudi.Configuration import *
import GaudiKernel.SystemOfUnits as units

from Configurables import ApplicationMgr
app = ApplicationMgr()
app.EvtSel = "NONE"
app.EvtMax = 100
app.ExtSvc = []
app.TopAlg = []
app.OutputLevel = DEBUG


from Configurables import FCCDataSvc
podioevent = FCCDataSvc("EventDataSvc")
app.ExtSvc += [podioevent]

from Configurables import GeoSvc
geoservice = GeoSvc("GeoSvc")
geoservice.detectors = [
                         'Detector/DetFCCeeIDEA/compact/FCCee_DectMaster.xml',
                       ] 
geoservice.OutputLevel = INFO
app.ExtSvc +=[geoservice]

from Configurables import SimG4ConstantMagneticFieldTool
field = SimG4ConstantMagneticFieldTool()
field.FieldOn = True
field.IntegratorStepper = "ClassicalRK4"
field.FieldComponentZ = 2*units.tesla
field.MaximumStep = 10000.0