Exemple #1
0
    def setupxAODWriting(self):
        """
        Method setting up the writing of the ROOT-readable trigger configuration
        metadata.
        """

        # Get a logger:
        log = logging.getLogger("TriggerConfigGetter.py")
        log.info("ESD/AOD writing enabled, will set up xAOD trigger "
                 "configuration metadata writing")

        # Get the algorithm sequence:
        from AthenaCommon.AlgSequence import AlgSequence
        topAlgs = AlgSequence()

        # Add the algorithm creating the trigger configuration metadata for
        # the output:
        try:
            from TrigConfxAOD.TrigConfxAODConf import TrigConf__xAODMenuWriter
            topAlgs += TrigConf__xAODMenuWriter(OverwriteEventObj=True)

            # The metadata objects to add to the output:
            metadataItems = [
                "xAOD::TriggerMenuContainer#TriggerMenu",
                "xAOD::TriggerMenuAuxContainer#TriggerMenuAux."
            ]

            # Set up the metadata for the output ESD and AOD:
            from RecExConfig.ObjKeyStore import objKeyStore
            objKeyStore.addManyTypesMetaData(metadataItems)
        except ImportError:  # don't want to branch in rel 18
            pass

        # Return gracefully:
        return
Exemple #2
0
rec.doWriteESD = True 
cfg = TriggerConfigGetter()
rec.doWriteESD.set_Value_and_Lock( False )
# end of hack. 

#========================================================
# Central topOptions (this is one is a string not a list)
#========================================================
if hasattr(runArgs,"topOptions"): include(runArgs.topOptions)
else: include( "RecExCommon/RecExCommon_topOptions.py" )

if rec.doFileMetaData():
   from RecExConfig.ObjKeyStore import objKeyStore
   metadataItems = [ "xAOD::TriggerMenuContainer#TriggerMenu",
                 "xAOD::TriggerMenuAuxContainer#TriggerMenuAux." ]
   objKeyStore.addManyTypesMetaData( metadataItems )

from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig import \
        RoIBResultToAOD
idx=0
for i in topSequence.getAllChildren():
    idx += 1
    if "TrigSteer_HLT" in i.getName():
       if not hasattr(i,'RoIBResultToxAOD'):
           topSequence.insert(idx+1, RoIBResultToAOD("RoIBResultToxAOD"))
    if "StreamRDO" in i.getName():
       from TrigDecisionMaker.TrigDecisionMakerConfig import TrigDecisionMaker,WritexAODTrigDecision
       topSequence.insert(idx, TrigDecisionMaker('TrigDecMaker'))
       from AthenaCommon.Logging import logging 
       log = logging.getLogger( 'WriteTrigDecisionToAOD' )
       log.info('TrigDecision writing enabled')