示例#1
0
    def checkInput(self):

        self.checkFileMetaData()

        log = logging.getLogger("TriggerConfigGetter.py")
        if "ReadPool" in self._environment or "WritePool" in self._environment:
            log.info(
                "Flags are ignored, since 'ReadPool' or  'WritePool' is specified"
            )
            return True

        if rec.readESD() or rec.readAOD(
        ):  # and globalflags.DataSource()=='data':  # need this for MC as well
            protectedInclude("TrigTier0/TriggerConfigCheckMetadata.py")

        if rec.readRDO() and globalflags.InputFormat(
        ) == 'bytestream' and globalflags.DataSource() == 'data':
            protectedInclude("TrigTier0/TriggerConfigCheckHLTpsk.py")

        log.info("The following flags are set:")
        log.info("globalflags.InputFormat             : %s" %
                 globalflags.InputFormat())
        log.info(
            "rec.read.*                          : RDO: %s, ESD: %s, AOD: %s, TAG: %s"
            % (rec.readRDO(), rec.readESD(), rec.readAOD(), rec.readTAG()))
        log.info(
            "rec.doWrite.*                       : ESD: %s, AOD: %s, TAG: %s" %
            (rec.doWriteESD(), rec.doWriteAOD(), rec.doWriteTAG()))
        log.info("globalflags.DataSource              : %s" %
                 globalflags.DataSource())
        log.info("TriggerFlags.configForStartup       : %s" %
                 TriggerFlags.configForStartup())
        log.info("TriggerFlags.dataTakingConditions   : %s" %
                 TriggerFlags.dataTakingConditions())
        log.info("TriggerFlags.configurationSourceList: %s" %
                 TriggerFlags.configurationSourceList())

        count = len(
            [1 for x in [rec.readRDO(
            ), rec.readESD(), rec.readAOD()]
             if x])  #readTAG is only set with another input
        if count == 0:
            log.warning("Don't know what the input format is.")
            return False
        if count >= 2:
            log.warning(
                "More than one input format specified, please set only the appropriate one."
            )
            return False
        return True
示例#2
0
def OutputFileName(suffix=""):
    from RecExConfig.RecFlags import rec
    OutFileName = ""
    if rec.OutputFileNameForRecoStep() == "":
        if rec.readRDO():
            if globalflags.InputFormat() == "bytestream":
                OutFileName = "bs"
            else:
                OutFileName = "rdo"
        elif rec.readESD():
            OutFileName = "esd"
        elif rec.readAOD():
            OutFileName = "aod"
        else:
            OutFileName = "in"

        OutFileName = OutFileName + "to"
        if rec.doWriteBS():
            OutFileName = OutFileName + "bs"
        elif rec.doWriteRDO():
            OutFileName = OutFileName + "rdo"

        if rec.doESD():
            OutFileName = OutFileName + "esd"
        if rec.doAOD():
            OutFileName = OutFileName + "aod"
        if rec.doDPD():
            OutFileName = OutFileName + "dpd"
        if rec.doWriteTAG():
            OutFileName = OutFileName + "tag"

        if suffix != "":
            OutFileName = OutFileName + "_" + suffix
        print("Generated OutFileName", OutFileName)
    else:
        OutFileName = rec.OutputFileNameForRecoStep()
        print("User defined OutFileName", OutFileName)
    return OutFileName
示例#3
0
#FIXME: Subsequent algorithms may alter the event info object (setting Error bits)
if not objKeyStore.isInInput( "xAOD::EventInfo"):
    from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
    topSequence+=xAODMaker__EventInfoCnvAlg()
    pass



###################################################################
#
# functionality : monitor memory and cpu time
#

#
#now write out Transient Event Store content in POOL
if rec.doWriteESD() or rec.doWriteAOD() or rec.doWriteRDO() or rec.doWriteTAG():
    import AthenaPoolCnvSvc.WriteAthenaPool


# Must make sure that no OutStream's have been declared
#FIXME
theApp.OutStream = []




MetaDataStore=svcMgr.MetaDataStore


#Lumiblocks and EventBookkeepers
if rec.doFileMetaData():
示例#4
0
                         or globalflags.DetDescrVersion()[0:3] == "DC2"):
    logRecExCommon_flags.info("TrackRecordFilter alg switched off ")
    recAlgs.doTrackRecordFilter = False

# AOD Flags
if rec.doWriteAOD() and not rec.doAOD() and not rec.readAOD():
    logRecExCommon_flags.warning(
        "doAOD False and doWriteAOD True and readAOD False. Most likely meaninglesss !! "
    )

if rec.doWriteTAGCOM() and not rec.Commissioning():
    logRecExCommon_flags.info("Not commissioning, switching of doWriteTAGCOM ")
    rec.doWriteTAGCOM = False

# If no AOD objects made, then do not write out a TAG
if not rec.doAOD() and not rec.readAOD() and rec.doWriteTAG():
    logRecExCommon_flags.warning(
        "no AOD objects available, cannot write out tag, switching rec.doWriteTAG=False"
    )
    rec.doWriteTAG = False

if rec.readTAG():
    logRecExCommon_flags.warning("readingTAG switching rec.doWriteTAG=False")
    rec.doWriteTAG = False

# if want to write tag : at least switch on trigger configuration
doTriggerConfigOnly = False
if rec.doWriteTAG() and not recAlgs.doTrigger() and not (
        'EventTagFlags' in dir()
        and not EventTagFlags.doTrigger()) and rec.doTrigger():
    try:
示例#5
0
#do not save AOD cells
rec.doAODCaloCells =False

# turning off some monitoring
if rec.doMonitoring() :
    # 20.10.2015 failing (pp containers), turn off
    from AthenaMonitoring.DQMonFlags import DQMonFlags
    DQMonFlags.doMissingEtMon.set_Value_and_Lock(False)
    DQMonFlags.doTauMon.set_Value_and_Lock(False)
    # 20.01.2015 failing (pp containers), turn off
    from TrigHLTMonitoring.HLTMonFlags import HLTMonFlags
    HLTMonFlags.doTau.set_Value_and_Lock(False)

#turn off some EventTags
from RecExConfig.RecFlags import rec
if rec.doWriteTAG() :
    include ("EventTagAlgs/EventTagFlags.py")
    EventTagFlags.set_AnalysisOff()
    EventTagFlags.set_TauJetOff()
    EventTagFlags.set_MissingETOff()
示例#6
0
      recAlgs.doTrackRecordFilter=False




# AOD Flags
if rec.doWriteAOD() and not rec.doAOD() and not rec.readAOD():
   logRecExCommon_flags.warning("doAOD False and doWriteAOD True and readAOD False. Most likely meaninglesss !! ")


if rec.doWriteTAGCOM() and not rec.Commissioning():
   logRecExCommon_flags.info("Not commissioning, switching of doWriteTAGCOM ")
   rec.doWriteTAGCOM=False

# If no AOD objects made, then do not write out a TAG
if not rec.doAOD() and not rec.readAOD() and rec.doWriteTAG():
    logRecExCommon_flags.warning("no AOD objects available, cannot write out tag, switching rec.doWriteTAG=False")
    rec.doWriteTAG=False


if  rec.readTAG():
    logRecExCommon_flags.warning("readingTAG switching rec.doWriteTAG=False")
    rec.doWriteTAG=False
 


# if want to write tag : at least switch on trigger configuration
doTriggerConfigOnly=False
if rec.doWriteTAG() and not recAlgs.doTrigger() and not ('EventTagFlags' in dir() and not EventTagFlags.doTrigger()) and rec.doTrigger():
   try:
      from TriggerJobOpts.TriggerFlags import TriggerFlags
示例#7
0
doEgamma = recAlgs.doEgamma()
#
recAlgs.doConversion = True
doConversion = recAlgs.doConversion()
#
rec.doAOD = False
doAOD = rec.doAOD()
#
rec.doWriteAOD = False
doWriteAOD = rec.doWriteAOD()
#
rec.doWriteESD = False
doWriteESD = rec.doWriteESD()
#
rec.doWriteTAG = False
doWriteTAG = rec.doWriteTAG()
# number of event to process
#from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
#athenaCommonFlags.EvtMax= 2000
EvtMax = 2000

include("RecExCommon/RecExCommon_flags.py")

DetFlags.Muon_setOff()

include("RecExCommon/RecExCommon_topOptions.py")

CBNT_MuonParticle = Algorithm("CBNT_MuonParticle")
CBNT_MuonParticle.Enable = False
CBNT_AodTrigger = Algorithm("CBNT_AodTrigger")
CBNT_AodTrigger.Enable = False