Exemple #1
0
    def configure(self):
        if self._done:
            log.info("configuration already done, who is calling it again?")
            return True
        self._done = True

        # setup configuration services
        from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter
        cfg = TriggerConfigGetter()  # noqa: F841

        # after the menu xml file has been created or the TriggerDB access is configured,
        # the COOL/SQlite db can be written
        from TrigConfigSvc.TrigConf2COOL import theConfCOOLWriter
        theConfCOOLWriter.writeConf2COOL()

        # preconfigure TrigDecisionTool
        from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
        from AthenaCommon.AppMgr import ToolSvc
        ToolSvc += Trig__TrigDecisionTool("TrigDecisionTool")
        from PyUtils.MetaReaderPeekerFull import metadata
        if "metadata_items" in metadata and any(
            ('TriggerMenu' in key)
                for key in metadata["metadata_items"].keys()):
            # Use xAOD configuration.
            from AthenaCommon.AppMgr import ServiceMgr as svcMgr
            if not hasattr(svcMgr, 'xAODConfigSvc'):
                from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODConfigSvc
                svcMgr += TrigConf__xAODConfigSvc('xAODConfigSvc')
            ToolSvc += Trig__TrigDecisionTool("TrigDecisionTool")
            ToolSvc.TrigDecisionTool.TrigConfigSvc = svcMgr.xAODConfigSvc
        else:
            # Use TrigConfigSvc
            ToolSvc.TrigDecisionTool.TrigConfigSvc = "TrigConf::TrigConfigSvc/TrigConfigSvc"

        from TrigEDMConfig.TriggerEDM import EDMLibraries
        ToolSvc.TrigDecisionTool.Navigation.Dlls = [
            e for e in EDMLibraries if 'TPCnv' not in e
        ]

        if withLVL1():
            # setup Lvl1
            # initialize LVL1ConfigSvc
            log.info("configuring lvl1")
            from TriggerJobOpts.Lvl1ResultBuilderGetter import Lvl1ResultBuilderGetter
            lvl1 = Lvl1ResultBuilderGetter()  # noqa: F841

        if withHLT():
            # setup HLT
            # initialize HLT config svc
            log.info("configuring hlt")
            from TriggerJobOpts.HLTTriggerResultGetter import HLTTriggerResultGetter
            hlt = HLTTriggerResultGetter()  # noqa: F841

        #Call the tools to unpack the bytestream
        #bsu=ByteStreamUnpackGetter()

        #Call the tool to make the TrigDecision object for ESD or AOD
        #tdg=TrigDecisionGetter()

        return True
Exemple #2
0
def TrigConfBunchCrossingTool():

    # The default name of the tool:
    __defaultToolName = "BunchCrossingTool"

    # Get ourselves a logger:
    from AthenaCommon.Logging import logging
    __logger = logging.getLogger("TrigConfBunchCrossingTool")

    # Check if the tool already exists. If it does, let's just return it without
    # any modifications:
    from AthenaCommon.AppMgr import ToolSvc
    if hasattr(ToolSvc, __defaultToolName):
        __logger.debug("Tool already exists, not configuring it again")
        return getattr(ToolSvc, __defaultToolName)

    # Create a new instance of the tool if it doesn't exist yet:
    from TrigBunchCrossingTool.TrigBunchCrossingToolConf import \
         Trig__TrigConfBunchCrossingTool
    __tool = Trig__TrigConfBunchCrossingTool(__defaultToolName)

    # Create a default configuration for it:
    __logger.info("Set the default values for the TrigConfBunchCrossingTool "
                  "configuration")

    # Check for a TrigConfigSvc:
    from AthenaCommon.AppMgr import ServiceMgr as svcMgr
    if not hasattr(svcMgr, "TrigConfigSvc"):
        __logger.info(
            "Job has no TrigConfigSvc, falling back to xAODConfigSvc")
        from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODConfigSvc
        from AthenaCommon.AppMgr import ServiceMgr
        cfgsvc = TrigConf__xAODConfigSvc('xAODConfigSvc')
        ServiceMgr += cfgsvc
        __tool.ConfigSvc = cfgsvc
    else:
        # We do have a TrigConfigSvc. Now make sure that DSConfigSvc has access to the BG COOL folders:
        from IOVDbSvc.CondDB import conddb
        __dbConnection = "TRIGGER"
        __folders = [
            "LVL1/BunchGroupKey", "LVL1/BunchGroupDescription",
            "LVL1/BunchGroupContent"
        ]
        for f in __folders:
            if not conddb.folderRequested("/TRIGGER/%s" % f):
                __logger.info("Adding folder to IOVDbSvc: /TRIGGER/%s", f)
                conddb.addFolderWithTag(__dbConnection, "/TRIGGER/%s" % f,
                                        "HEAD")
                pass
            pass

    # Add the tool to ToolSvc and return it to the user:
    ToolSvc += __tool
    return getattr(ToolSvc, __defaultToolName)
Exemple #3
0
 from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
 from AthenaCommon.AppMgr import ToolSvc
 ToolSvc += Trig__TrigDecisionTool( "TrigDecisionTool" )
 from TrigEDMConfig.TriggerEDM import EDMLibraries
 ToolSvc.TrigDecisionTool.Navigation.Dlls = [e for e in  EDMLibraries if 'TPCnv' not in e]
 from TriggerJobOpts.TriggerFlags import TriggerFlags
 if TriggerFlags.doMT() or TriggerFlags.EDMDecodingVersion() == 3:
     ToolSvc.TrigDecisionTool.NavigationFormat="TrigComposite"
 
 if hasattr(runArgs,"useDB") and runArgs.useDB:
     ToolSvc.TrigDecisionTool.TrigConfigSvc = "Trig::TrigConfigSvc/TrigConfigSvc"
 else:
     log.info("Configure TrigConfigSvc by default")
     if not hasattr(svcMgr, 'xAODConfigSvc'):
       from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODConfigSvc
       svcMgr += TrigConf__xAODConfigSvc('xAODConfigSvc')
     ToolSvc.TrigDecisionTool.TrigConfigSvc = svcMgr.xAODConfigSvc
 
 # enable slices for monitoring 
 # otherwise enable slices via monFlags 
 HLTMonFlags.doMonTier0 = True
 if not hasattr(runArgs,"monFlags"):
     HLTMonFlags.doGeneral = True
     HLTMonFlags.doEgamma  = True
     HLTMonFlags.doMET     = True
     HLTMonFlags.doJet     = True
     HLTMonFlags.doBjet    = True
     HLTMonFlags.doTau     = True
     HLTMonFlags.doMuon    = True
     HLTMonFlags.doIDtrk   = True
     HLTMonFlags.doCalo    = True
from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
ToolSvc += Trig__TrigDecisionTool( "TrigDecisionTool" )
from TrigEDMConfig.TriggerEDM import EDMLibraries
ToolSvc.TrigDecisionTool.Navigation.Dlls = [e for e in  EDMLibraries if 'TPCnv' not in e]
#from TriggerJobOpts.TriggerFlags import TriggerFlags
#if TriggerFlags.EDMVersion() == 3:
#if TriggerFlags.EDMDecodingVersion() == 3:
from AthenaConfiguration.AllConfigFlags import ConfigFlags
ConfigFlags.Trigger.EDMVersion = 3
#if ConfigFlags.Trigger.EDMVersion == 3:
ToolSvc.TrigDecisionTool.NavigationFormat="TrigComposite"

if not hasattr(ServiceMgr, 'xAODConfigSvc'):
  from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODConfigSvc
  ServiceMgr += TrigConf__xAODConfigSvc('xAODConfigSvc')
ToolSvc.TrigDecisionTool.TrigConfigSvc = ServiceMgr.xAODConfigSvc
################

#from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()
# Setup the Run III behavior    
#from AthenaCommon.Configurable import Configurable
#Configurable.configurableRun3Behavior = 1

#-----------------------------------------------------------------------------
# Message Service
#-----------------------------------------------------------------------------
# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
ServiceMgr.MessageSvc.OutputLevel = ERROR
Exemple #5
0
    def configure(self):

        if self._done:
            log.info("configuration already done, who is calling it again?")
            return True
        self._done = True

        # start with print some information what this will do
        log.info(
            "Basic configuration flags RecAlgsFlag.doTrigger: %d   RecFlags.doTrigger: %d TriggerFlags.doTriggerConfigOnly %d",
            recAlgs.doTrigger(), rec.doTrigger(), TF.doTriggerConfigOnly())
        log.info(
            "TriggerFlags: doL1Topo: %s, doLVL1: %s, doLVL2: %s, doEF: %s, doHLT: %s, doMT: %s",
            TF.doL1Topo(), TF.doLVL1(), TF.doLVL2(), TF.doEF(), TF.doHLT(),
            TF.doMT())

        # RDOtoRDOTrigger MT temporarily coded in the transform skeleton, so skip here
        if TF.doMT() and rec.readRDO() and rec.doWriteRDO():
            log.info("Nothing happens in TriggerGetter for RDOtoRDOTrigger MT")
            return True
        else:  #GenerateMenu imports slice flags, which are Menu/MenuMT dependent
            from TriggerMenu.menu.GenerateMenu import GenerateMenu

        willGenerateMenu = recAlgs.doTrigger() and (
            TF.doLVL1() or TF.doLVL2() or TF.doEF()
            or TF.doHLT()) and not TF.doTriggerConfigOnly()
        willRunTriggerConfigGetter = recAlgs.doTrigger() or rec.doTrigger(
        ) or TF.doTriggerConfigOnly()
        willRunLVL1SimulationGetter = recAlgs.doTrigger(
        ) and not TF.doTriggerConfigOnly()
        willRunHLTSimulationGetter = willRunLVL1SimulationGetter and (
            TF.doLVL2() or TF.doEF() or TF.doHLT())

        log.info(
            "Will run: %s%s%s%s", "GenerateMenu " if willGenerateMenu else "",
            "TriggerConfigGetter " if willRunTriggerConfigGetter else "",
            "LVL1SimulationGetter " if willRunLVL1SimulationGetter else "",
            "HLTSimulationGetter " if willRunHLTSimulationGetter else "")

        log.info(
            "Will not run: %s%s%s%s",
            "GenerateMenu " if not willGenerateMenu else "",
            "TriggerConfigGetter " if not willRunTriggerConfigGetter else "",
            "LVL1SimulationGetter " if not willRunLVL1SimulationGetter else "",
            "HLTSimulationGetter " if not willRunHLTSimulationGetter else "")
        if recAlgs.doTrigger():

            if ((TF.doLVL1() or TF.doLVL2() or TF.doEF() or TF.doHLT())
                    and not TF.doTriggerConfigOnly()):
                log.info("generating menu")
                # trigger menu files generation
                g = GenerateMenu()
                g.generate()

                # after the menu xml file has been created or the TriggerDB access is configured,
                # the COOL/SQlite db can be written
                # TB this needs to be optimized -- we do not need ti always but only when AOD or ESD are created

        if recAlgs.doTrigger() or rec.doTrigger() or TF.doTriggerConfigOnly():
            # setup configuration services
            from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter
            cfg = TriggerConfigGetter()  # noqa: F841

            from TrigConfigSvc.TrigConf2COOL import theConfCOOLWriter
            theConfCOOLWriter.writeConf2COOL()

        # preconfigure TrigDecisionTool
        from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
        from AthenaCommon.AppMgr import ToolSvc
        ToolSvc += Trig__TrigDecisionTool("TrigDecisionTool")
        from PyUtils.MetaReaderPeekerFull import metadata
        if "metadata_items" in metadata and any(
            ('TriggerMenu' in key)
                for key in metadata["metadata_items"].keys()):
            # Use xAOD configuration.
            from AthenaCommon.AppMgr import ServiceMgr as svcMgr
            if not hasattr(svcMgr, 'xAODConfigSvc'):
                from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODConfigSvc
                svcMgr += TrigConf__xAODConfigSvc('xAODConfigSvc')
            ToolSvc += Trig__TrigDecisionTool("TrigDecisionTool")
            ToolSvc.TrigDecisionTool.TrigConfigSvc = svcMgr.xAODConfigSvc
        else:
            # Use TrigConfigSvc
            ToolSvc.TrigDecisionTool.TrigConfigSvc = "TrigConf::TrigConfigSvc/TrigConfigSvc"

        from TrigEDMConfig.TriggerEDM import EDMLibraries
        ToolSvc.TrigDecisionTool.Navigation.Dlls = [
            e for e in EDMLibraries if 'TPCnv' not in e
        ]

        # actuall trigger simulation running
        if recAlgs.doTrigger() and not TF.doTriggerConfigOnly():
            # setup Lvl1
            # initialize LVL1ConfigSvc
            log.info("configuring lvl1")
            from TriggerJobOpts.Lvl1TriggerGetter import Lvl1SimulationGetter
            lvl1 = Lvl1SimulationGetter()  # noqa: F841

            if TF.doTransientByteStream() or (
                    jobproperties.Global.InputFormat() != 'bytestream' and
                (TF.doLVL2() or TF.doEF() or TF.doHLT())):
                # Transient BS construction and intialization
                from ByteStreamCnvSvc import WriteByteStream
                StreamBS = WriteByteStream.getStream("Transient", "StreamBS")
                StreamBS.ItemList += [
                    "DataVector<LVL1::TriggerTower>#TriggerTowers"
                ]
                StreamBS.ItemList += ["TRT_RDO_Container#TRT_RDOs"]
                StreamBS.ItemList += ["SCT_RDO_Container#SCT_RDOs"]
                StreamBS.ItemList += ["PixelRDO_Container#PixelRDOs"]
                # StreamBS.ItemList +=["LArRawChannelContainer#*"]
                StreamBS.ItemList += ["2721#*"]
                # StreamBS.ItemList +=["TileRawChannelContainer#*"]
                StreamBS.ItemList += ["2927#*"]
                StreamBS.ItemList += [
                    "2934#*"
                ]  # added on request from: Arantxa Ruiz Martinez for TileRODMu

                # don't need Muons in transient BS
                # StreamBS.ItemList +=["MdtCsmContainer#*"]
                # StreamBS.ItemList +=["RpcPadContainer#*"]
                # StreamBS.ItemList +=["TgcRdoContainer#*"]
                # StreamBS.ItemList +=["CscRawDataContainer#*"]

                from AthenaCommon.Include import include
                # setup trans BS for the ID
                include("InDetRecExample/InDetRecCabling.py")

            # setup HLT
            # initialize HLT config svc
            log.info("TriggerFlags: doLVL2 %r", TF.doLVL2())
            log.info("TriggerFlags: doEF   %r", TF.doEF())
            log.info("TriggerFlags: doHLT  %r", TF.doHLT())
            if TF.doLVL2() or TF.doEF() or TF.doHLT():
                log.info("configuring hlt")
                from TriggerJobOpts.HLTTriggerGetter import HLTSimulationGetter
                hlt = HLTSimulationGetter(g)  # noqa: F841
            else:
                from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
                from AthenaCommon.AppMgr import ServiceMgr
                ServiceMgr += RegSelSvcDefault()
                ServiceMgr.RegSelSvc.enablePixel = False
                ServiceMgr.RegSelSvc.enableSCT = False

        # prepare result making of L1
        from TriggerJobOpts.Lvl1ResultBuilderGetter import Lvl1ResultBuilderGetter
        hltouput = Lvl1ResultBuilderGetter()

        # prepare result making of HLT
        if TF.doLVL2() or TF.doEF() or TF.doHLT() or (recAlgs.doTrigger()
                                                      and TF.readBS()):
            from TriggerJobOpts.HLTTriggerResultGetter import HLTTriggerResultGetter
            hltouput = HLTTriggerResultGetter()  # noqa: F841

        return True
Exemple #6
0
    def configure(self):
        log = logging.getLogger( "TriggerConfigGetter.py" )
        from PyUtils.MetaReaderPeekerFull import metadata

        # first check the input
        if "HIT2RDO" in self._environment:
            TriggerFlags.doLVL2 = False
            TriggerFlags.doEF = False
            log.info("For simulation jobs the following flags are set:")
            log.info("globalflags.InputFormat             : %s", globalflags.InputFormat())
            log.info("globalflags.DataSource              : %s", globalflags.DataSource())
            log.info("TriggerFlags.configForStartup       : %s", TriggerFlags.configForStartup())
            log.info("TriggerFlags.dataTakingConditions   : %s", TriggerFlags.dataTakingConditions())
            log.info("TriggerFlags.doLVL2                 : %s", TriggerFlags.doLVL2())
            log.info("TriggerFlags.doEF                   : %s", TriggerFlags.doEF())
        else:
            if not self.checkInput():
                log.error("Could not determine job input. Can't setup trigger configuration and will return!")
                return
            # self.checkInput() may call TriggerConfigCheckMetadata, this can in turn set "rec.doTrigger.set_Value_and_Lock(False)"
            # but TriggerConfigGetter might have only been called in the first place due to this flag having been true, 
            # so re-check that we're still OK to be executing here
            if not (recAlgs.doTrigger() or rec.doTrigger() or TriggerFlags.doTriggerConfigOnly()):
                log.info("Aborting TriggerConfigGetter as the trigger flags were switched to false in checkInput()")
                return True

        self.readPool       = globalflags.InputFormat() == 'pool'
        self.readRDO        = rec.readRDO()
        self.writeESDAOD    = rec.doWriteESD() or rec.doWriteAOD() or rec.doWriteDPD()
        self.writeAOD       = rec.doWriteAOD() or rec.doWriteDPD()
        self.ConfigSrcList  = TriggerFlags.configurationSourceList()
        self.readMC         = globalflags.DataSource()=='geant3' or globalflags.DataSource()=='geant4'
        self.readTriggerDB  = TriggerFlags.readMenuFromTriggerDb() and self.readRDO
        self.isCommisioning = globalflags.DataSource()=='data' and globalflags.DetGeo()=='commis' 
        self.l1Folders      = TriggerFlags.dataTakingConditions()=='FullTrigger' or TriggerFlags.dataTakingConditions()=='Lvl1Only'
        self.hltFolders     = TriggerFlags.dataTakingConditions()=='FullTrigger' or TriggerFlags.dataTakingConditions()=='HltOnly'
        self.isRun1Data     = False 
        self.hasxAODMeta    = ("metadata_items" in metadata and any(('TriggerMenu' in key) for key in metadata["metadata_items"].keys()))
        if globalflags.DataSource()=='data':
            from RecExConfig.AutoConfiguration  import GetRunNumber
            runNumber = GetRunNumber()
            if runNumber is not None and runNumber > 0 and runNumber < 230000 :
                self.isRun1Data = True
        self.isTriggerReprocessing = False

        # the TriggerFlags.readMenuFromTriggerDb() tells us that we read the trigger menu from the database
        # the connection itself is defined in TriggerFlags.triggerDbConnection()

        # reading from the TriggerDB can mean different things:

        # a) TriggerFlags doLVL2() and doEF() are both False:
        #    - create a tmp sqlite file with the conditions (menu)
        #    - use DSConfigSvc


        # b) TriggerFlags doLVL2() or doEF() is True:
        #    - use HLTConfigSvc
        if self.readTriggerDB and (TriggerFlags.doLVL2() or TriggerFlags.doEF() or TriggerFlags.doHLT()):

            self.ConfigSrcList = ['xml'] # to use L1/HLTConfigSvc and not DSConfigSvc, but only if we are running the HLT


        if self._environment: # I don't think anyone calls TriggerConfigGetter with an argument
            self.readPool  = False
            self.writeESDAOD = False
            self.readHits = False
            if "ReadPoolRDO" in self._environment:
                self.readPool = True
                self.readRDO = True
            elif "ReadPool" in self._environment:
                self.readPool = True
                self.readRDO = False
            if "WritePool" in self._environment:
                self.writeESDAOD = True
            if "HIT2RDO" in self._environment:
                self.readRDO = False
                self.readHits = True


        # define ConfigSvc
        if not self.ConfigSrcList:
            if (self.readPool and not self.readRDO) or (self.readRDO and not self.readPool): # (ESD, AOD, DPD) or (RDO-BS)
                self.ConfigSrcList = ['ds']
            elif (self.readRDO and self.readPool) or rec.readTAG() or self.readHits:           # (RDO-MC) or TAG
                self.ConfigSrcList = ['xml']
            else: # should not get here: should be found by checkInput
                log.fatal('no reading of BS, RDO, AOD, ESD, or TAG specified')

        # we need the temporary COOL database, if we read the configuration from XML and write ESD/AOD (or have 'ds' set for some reason)
        self.makeTempCool   = self.readRDO and \
                              ( self.writeESDAOD or 'ds' in self.ConfigSrcList ) and \
                              ( self.readMC \
                                or (self.isCommisioning and (TriggerFlags.readLVL1configFromXML() and TriggerFlags.readHLTconfigFromXML())) \
                                or TriggerFlags.readMenuFromTriggerDb() )

        log.info("Need to create temporary cool file? : %r", self.makeTempCool)

        log.info('Creating the Trigger Configuration Services')

        from AthenaCommon.AppMgr import ServiceMgr as svcMgr

        ########################################################################
        # START OF TEMPORARY SOLUTION FOR RUN-3 TRIGGER DEVELOPMENT
        ########################################################################
        from TriggerJobOpts.HLTTriggerResultGetter import EDMDecodingVersion
        EDMDecodingVersion()  # In most use cases this needs to be called much earlier than in HLTTriggerResultGetter

        if TriggerFlags.EDMDecodingVersion() >= 3:
            if self.hasxAODMeta:
                if not hasattr(svcMgr, 'xAODConfigSvc'):
                    from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODConfigSvc
                    svcMgr += TrigConf__xAODConfigSvc('xAODConfigSvc')
            else: # Does not have xAODMeta
                # Run-3 Trigger Configuration Services
                from TrigConfigSvc.TrigConfigSvcCfg import getL1ConfigSvc, getHLTConfigSvc
                from AthenaConfiguration.AllConfigFlags import ConfigFlags
                svcMgr += getL1ConfigSvc(ConfigFlags)
                svcMgr += getHLTConfigSvc(ConfigFlags)

                # Needed for TrigConf::xAODMenuWriterMT
                from TrigConfigSvc.TrigConfigSvcConfig import TrigConfigSvc
                svcMgr += TrigConfigSvc("TrigConfigSvc")
                svcMgr.TrigConfigSvc.PriorityList = ["none", "ds", "xml"]

        else:
            # non-MT (Run-2) Trigger Configuration
            self.svc = SetupTrigConfigSvc()

            if 'xml' in self.ConfigSrcList or self.makeTempCool:
                # sets them if plain XML reading is to be used
                self.svc.l1topoXmlFile = TriggerFlags.outputL1TopoConfigFile()  # generated in python
                self.svc.l1XmlFile     = TriggerFlags.outputLVL1configFile()    # generated in python
                self.svc.hltXmlFile    = TriggerFlags.outputHLTconfigFile()     # generated in python
                if TriggerFlags.readL1TopoConfigFromXML():
                    self.svc.l1topoXmlFile  = TriggerFlags.inputL1TopoConfigFile() # given XML
                if TriggerFlags.readLVL1configFromXML():
                    self.svc.l1XmlFile  = TriggerFlags.inputLVL1configFile() # given XML
                if TriggerFlags.readHLTconfigFromXML():
                    self.svc.hltXmlFile  = TriggerFlags.inputHLTconfigFile()   # given XML

            try:
                self.svc.SetStates( self.ConfigSrcList )
            except Exception:
                log.error( 'Failed to set state of TrigConfigSvc to %r', self.ConfigSrcList )
            else:
                log.info('The following configuration services will be tried: %r', self.ConfigSrcList )

            try:
                self.svc.InitialiseSvc()
            except Exception as ex:
                log.error( 'Failed to activate TrigConfigSvc: %r', ex )
        ########################################################################
        # END OF TEMPORARY SOLUTION FOR RUN-3 TRIGGER DEVELOPMENT
        ########################################################################

        if self.readTriggerDB:
            log.info( "Using TriggerDB connection '%s'", TriggerFlags.triggerDbConnection() )
            self.trigDbConnectionParameters = interpretConnection(TriggerFlags.triggerDbConnection(), resolveAlias=False)
            self.setConfigSvcConnParams(self.trigDbConnectionParameters)

        log.info("TriggerFlags.triggerCoolDbConnection is '%s' [default: '']", TriggerFlags.triggerCoolDbConnection())
        TrigCoolDbConnection = TriggerFlags.triggerCoolDbConnection()

        if self.makeTempCool:
            TrigCoolDbConnection = self.setupTempCOOLWriting(TrigCoolDbConnection)

        if ('ds' in self.ConfigSrcList) and not self.hasxAODMeta:
            self.setupCOOLReading(TrigCoolDbConnection)

        if hasattr(svcMgr, 'DSConfigSvc'):
            db = 'TRIGGERDB'
            if self.isRun1Data:
                db = 'TRIGGERDB_RUN1'
            elif self.readMC:
                db = 'TRIGGERDBMC'
            elif self.isTriggerReprocessing:
                db = 'TRIGGERDBREPR'
            svcMgr.DSConfigSvc.ConfigSource = 'dblookup'
            svcMgr.DSConfigSvc.DBServer = db
            log.info("DSConfigSvc trigger database is '%s'", db)
        
        if not self.hasxAODMeta:
            self.setupxAODWriting()


        # all went fine we are configured
        return True