Exemplo n.º 1
0
    def configureReco(self):
        from AthenaCommon.DetFlags import DetFlags
        DetFlags.Muon_setOn()
        DetFlags.Calo_setOff()

        recAlgsFlags.doMuonIDStandAlone = False
        recAlgsFlags.doMuonIDCombined = False

        # add some more flags available for standalone running
        import MuonRecExample.MuonRecStandaloneFlags

        # configure flags so that only Muon Standalone reco is run
        import MuonRecExample.MuonRecStandaloneOnlySetup

        muonRecFlags.useAlignmentCorrections = mualign.useOpticalAlignment()

        # cosmics setup
        #if align.dataType()=='cosmic' or align.dataType()=='simCosmic':

        ##### no more flags after this line #####
        print "align.dataType()=", align.dataType()
        if align.dataType() == 'data' or align.dataType() == 'cosmic':
            muonRecTopOptions = "MuonAlignGenTools/MuonDataRec_myTopOptions.py"
        else:
            muonRecTopOptions = "MuonRecExample/MuonRec_topOptions.py"
        try:
            include(muonRecTopOptions)

        ###### put any user finetuning before this line #####
        except:
            # always write config so far for debugging
            from AthenaCommon.ConfigurationShelve import saveToAscii
            saveToAscii("config.txt")
            # but still exit with error
            raise
Exemplo n.º 2
0
        topSequence += AthenaMonManager("PhysValMonManager")

        from AthenaCommon.AppMgr import ServiceMgr
        from GaudiSvc.GaudiSvcConf import THistSvc
        ServiceMgr += THistSvc()
        svcMgr.THistSvc.Output += [
            "MuonMonExample DATAFILE='MuonMonExample.root' OPT='RECREATE'"
        ]

        monMan = topSequence.PhysValMonManager
        monMan.ManualDataTypeSetup = True
        monMan.DataType = "monteCarlo"
        monMan.Environment = "altprod"
        monMan.ManualRunLBSetup = True
        monMan.Run = 1
        monMan.LumiBlock = 1

        monMan.FileKey = "MuonMonExample"
        monMan.AthenaMonTools += [tool1]

    ###### put any user finetuning before this line #####
except Exception as occurrederror:
    print 'ERROR:   Exception in try-block of MuonCombinedRec_myTopOptions.py'
    print(occurrederror)
    print 'WARNING: not crashing, but going on and ignoring any further line in the jobOptions after the line causing this exception!'

from AthenaCommon.ConfigurationShelve import saveToAscii
saveToAscii("config.txt")
from MuonRecExample.MuonRecUtils import dumpDetFlags
dumpDetFlags("config.txt")
Exemplo n.º 3
0
    # dump all known python properties of algorithms and services (including tools)
    from RecExConfig.RecoFunctions import OutputFileName
    OutFileName = OutputFileName(rec.OutputSuffix())

    if rec.doDumpProperties():
        AthenaCommon.Configurable.log.setLevel(INFO)

        jobproperties.print_JobProperties('tree&value')

        print topSequence
        print ServiceMgr

        try:
            # dump in a separate ascii file
            from AthenaCommon.ConfigurationShelve import saveToAscii
            saveToAscii(OutFileName + '_config.txt')
        except Exception:
            treatException("Could not saveToAscii configuration!")

        try:
            from AthenaCommon.ConfigurationShelve import saveToPickle
            saveToPickle('OutFileName_config.pkl')
        except Exception:
            print "WARNING could not saveToPickle configuration! Continue"
            # treatException ("Could not saveToPickle configuration!")
        # dump objKeyStore content in a readable way
        objKeyStore.writeInputFile('OKS_InputFile_' + OutFileName + '.py')
        objKeyStore.writeStreamRDO('OKS_streamRDO_' + OutFileName + '.py')
        objKeyStore.writeStreamESD('OKS_streamESD_' + OutFileName + '.py')
        objKeyStore.writeStreamAOD('OKS_streamAOD_' + OutFileName + '.py')
        objKeyStore.writeStreamTAG('OKS_streamTAG_' + OutFileName + '.py')