Beispiel #1
0
 def setOutputLevel(self, outputLevel):
     if outputLevel != -1:
         if self.state() == AthAppMgr.State.OFFLINE:  # not yet configured
             self.OutputLevel = outputLevel
         svcMgr = self.serviceMgr()
         if not hasattr(svcMgr, 'MessageSvc'):
             svcMgr += GaudiSvcConf.MessageSvc()
         svcMgr.MessageSvc.OutputLevel = outputLevel
Beispiel #2
0
def _setupAtlasUnixStandardJob():
    from .AppMgr import theApp
    from .AppMgr import ServiceMgr as svcMgr

    ## basic Gaudi services
    import GaudiSvc.GaudiSvcConf as GaudiSvcConf
    svcMgr += GaudiSvcConf.IncidentSvc()
    svcMgr += GaudiSvcConf.EvtPersistencySvc("EventPersistencySvc")
    svcMgr += GaudiSvcConf.HistogramSvc("HistogramDataSvc")
    svcMgr += GaudiSvcConf.NTupleSvc()
    # ToolSvc is already added in AppMgr.py.
    svcMgr += GaudiSvcConf.RndmGenSvc()
    svcMgr += GaudiSvcConf.ChronoStatSvc()

    import GaudiAud.GaudiAudConf as GaudiAudConf
    svcMgr.AuditorSvc += GaudiAudConf.AlgContextAuditor()

    # make the message service available
    # from GaudiSvc.GaudiSvcConf import MessageSvc
    svcMgr.MessageSvc = theApp.service("MessageSvc")  # already instantiated

    # StoreGate services configuration
    import StoreGate.StoreGateConf as StoreGateConf
    svcMgr += StoreGateConf.StoreGateSvc()
    svcMgr += StoreGateConf.StoreGateSvc("DetectorStore")
    svcMgr += StoreGateConf.StoreGateSvc("HistoryStore")
    svcMgr += StoreGateConf.StoreGateSvc("ConditionStore")

    #ClassIDSvc configuration
    import CLIDComps.CLIDCompsConf as CLIDCompsConf
    svcMgr += CLIDCompsConf.ClassIDSvc()
    svcMgr.ClassIDSvc.CLIDDBFiles += ["Gaudi_clid.db"]

    #Ignore certain Service loops
    theApp.InitializationLoopCheck = False

    # dictionary services
    # the dict loader
    import AthenaServices.AthenaServicesConf as AthenaServicesConf
    if not hasattr(svcMgr, 'AthDictLoaderSvc'):
        svcMgr += AthenaServicesConf.AthDictLoaderSvc()
    theApp.CreateSvc += [svcMgr.AthDictLoaderSvc.getFullJobOptName()]

    # add-in a service to handle core-dumps
    if not hasattr(svcMgr, 'CoreDumpSvc'):
        svcMgr += AthenaServicesConf.CoreDumpSvc()
    theApp.CreateSvc += [svcMgr.CoreDumpSvc.getFullJobOptName()]
Beispiel #3
0
def _setupAtlasUnixStandardJob():
    from AppMgr import theApp
    from AppMgr import ServiceMgr as svcMgr

    import SystemOfUnits as Units
    from Constants import VERBOSE, DEBUG, INFO, ERROR

    ## basic Gaudi services
    import GaudiSvc.GaudiSvcConf as GaudiSvcConf
    svcMgr += GaudiSvcConf.IncidentSvc()
    svcMgr += GaudiSvcConf.EvtPersistencySvc( "EventPersistencySvc" )
    svcMgr += GaudiSvcConf.HistogramSvc( "HistogramDataSvc" )
    svcMgr += GaudiSvcConf.NTupleSvc()
    svcMgr += GaudiSvcConf.ToolSvc()
    svcMgr += GaudiSvcConf.RndmGenSvc()
    svcMgr += GaudiSvcConf.ChronoStatSvc()

    import GaudiAud.GaudiAudConf as GaudiAudConf
    svcMgr.AuditorSvc += GaudiAudConf.AlgContextAuditor()

    # make sure StatusCodeSvc messages are always printed
    svcMgr += GaudiSvcConf.StatusCodeSvc()
    svcMgr.StatusCodeSvc.OutputLevel = INFO
    svcMgr.StatusCodeSvc.Filter += [
              "Reflex::NewDelFunctionsT<StatusCode>::delete_T(void*)",
        "ROOT::Reflex::NewDelFunctionsT<StatusCode>::delete_T(void*)",
        ]
    # make sure StatusCodes are always checked
    svcMgr.StatusCodeSvc.AbortOnError=True


    
    # make the message service available
    # from GaudiSvc.GaudiSvcConf import MessageSvc
    svcMgr.MessageSvc = theApp.service( "MessageSvc" )     # already instantiated

    # StoreGate services configuration
    import StoreGate.StoreGateConf as StoreGateConf
    svcMgr += StoreGateConf.StoreGateSvc()
    svcMgr += StoreGateConf.StoreGateSvc("DetectorStore")
    svcMgr += StoreGateConf.StoreGateSvc("HistoryStore")

    #ClassIDSvc configuration
    import CLIDComps.CLIDCompsConf as CLIDCompsConf
    svcMgr += CLIDCompsConf.ClassIDSvc()
    svcMgr.ClassIDSvc.CLIDDBFiles += [ "Gaudi_clid.db" ]

    #Ignore certain Service loops
    try:
        theApp.InitializationLoopCheck = False
##         theApp.LoopCheckIgnore += [
##             "StoreGateSvc", "DetectorStore",
##             "PerfMonSvc", "AuditorSvc", "GeoModelSvc",
##             "IOVSvc"
##             ]
    except AttributeError:
        # gaudi v19r9... were art thou ?
        pass

    # dictionary services
    # the dict loader
    import AthenaServices.AthenaServicesConf as AthenaServicesConf
    if not hasattr(svcMgr, 'AthDictLoaderSvc'):
        svcMgr += AthenaServicesConf.AthDictLoaderSvc()
    theApp.CreateSvc += [svcMgr.AthDictLoaderSvc.getFullJobOptName()]

    # the dict checker
    if not hasattr(svcMgr, 'AthenaSealSvc'):
        svcMgr += AthenaServicesConf.AthenaSealSvc()
    theApp.CreateSvc += [svcMgr.AthenaSealSvc.getFullJobOptName()]
    
    # add-in a service to handle core-dumps
    if not hasattr(svcMgr, 'CoreDumpSvc'):
        svcMgr += AthenaServicesConf.CoreDumpSvc()
    theApp.CreateSvc += [ svcMgr.CoreDumpSvc.getFullJobOptName() ]
Beispiel #4
0
 def toolSvc(self, name='ToolSvc'):
     if '_toolsvc' not in self.__dict__:
         self.__dict__['_toolsvc'] = GaudiSvcConf.ToolSvc(name)
     return self._toolsvc
Beispiel #5
0
        try:
            self.Auditors.remove(c.getName())
        except ValueError:
            pass

    except AttributeError:
        pass

    super(GaudiSvcConf.AuditorSvc, self).__delattr__(attr)


GaudiSvcConf.AuditorSvc.__delattr__ = _delattr
del _delattr

# AuditorSvc globals
ServiceMgr += GaudiSvcConf.AuditorSvc()
theAuditorSvc = ServiceMgr.AuditorSvc


def AuditorSvc():  # backwards compatibility
    global theAuditorSvc
    return theAuditorSvc


### create default sequences:
#      athMasterSeq
#         |
#         +--- athAlgEvtSeq
#                 |
#                 +--- athBeginSeq
#                 |
Beispiel #6
0
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.

#--------------------------------------------------------------
# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
#--------------------------------------------------------------
svcMgr.MessageSvc.OutputLevel = 3
svcMgr.MessageSvc.debugLimit  = 100000
svcMgr.ClassIDSvc.OutputLevel = 3

# No stats printout
from GaudiSvc import GaudiSvcConf
ChronoStatSvc = GaudiSvcConf.ChronoStatSvc()
ChronoStatSvc.ChronoPrintOutTable = FALSE
ChronoStatSvc.PrintUserTime       = FALSE
ChronoStatSvc.StatPrintOutTable   = FALSE

include ('DataModelRunTests/setCatalog.py')