Example #1
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError, msg
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError, msg


#         if self.run == None:
#             msg = "No --run specified"
#             raise RuntimeError, msg

        if self.dataset == None:
            msg = "No --dataset specified"
            raise RuntimeError, msg

        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError, msg

        try:
            scenario = getScenario(self.scenario)
        except Exception, ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario, )
            msg += str(ex)
            raise RuntimeError, msg
Example #2
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError, msg
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError, msg
        
#         if self.run == None:
#             msg = "No --run specified"
#             raise RuntimeError, msg
        
        if self.dataset == None:
            msg = "No --dataset specified"
            raise RuntimeError, msg
        
        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError, msg

        
        try:
            scenario = getScenario(self.scenario)
        except Exception, ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError, msg
Example #3
0
 def testA(self):
     """get the scenario"""
     try:
         scenario = getScenario("cosmics")
     except Exception, ex:
         msg = "Failed to get cosmics scenario\n"
         msg += str(ex)
         self.fail(msg)
 def testA(self):
     """get the scenario"""
     try:
         scenario = getScenario("HeavyIonsEra_Run2_HI")
     except Exception as ex:
         msg = "Failed to get HeavyIonsEra_Run2_HI scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #5
0
 def testA(self):
     """get the scenario"""
     try:
         scenario = getScenario("cosmicsRun2")
     except Exception, ex:
         msg = "Failed to get cosmicsRun2 scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #6
0
 def testA(self):
     """get the scenario"""
     try:
         scenario = getScenario("ppEra_Run2_2017")
     except Exception as ex:
         msg = "Failed to get ppEra_Run2_2017 scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #7
0
 def testA(self):
     """get the scenario"""
     try:
         scenario = getScenario("HeavyIonsEra_Run2_HI")
     except Exception as ex:
         msg = "Failed to get HeavyIonsEra_Run2_HI scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #8
0
 def testA(self):
     """get the scenario"""
     try:
         scenario = getScenario("pp")
     except Exception as ex:
         msg = "Failed to get pp scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #9
0
 def testA(self):
     """get the scenario"""
     try:
         scenario = getScenario("ppRun2at50ns")
     except Exception, ex:
         msg = "Failed to get ppRun2at50ns scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #10
0
 def testA(self):
     """get the scenario"""
     try:
         scenario = getScenario("cosmicsEra_Run2_2017")
     except Exception as ex:
         msg = "Failed to get cosmicsEra_Run2_2017 scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #11
0
    def testA(self):
        """test retrieving the Test scenario"""
        try:
            scenario = getScenario("Test")

        except Exception as ex:
            msg = "Failed to get Test scenario:\n"
            msg += str(ex)
            self.fail(msg)
Example #12
0
    def testA(self):
        """test retrieving the Test scenario"""
        try:
            scenario = getScenario("Test")

        except Exception, ex:
            msg = "Failed to get Test scenario:\n"
            msg += str(ex)
            self.fail(msg)
Example #13
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError(msg)
        
#         if self.run == None:
#             msg = "No --run specified"
#             raise RuntimeError, msg
        
        if self.dataset == None:
            msg = "No --dataset specified"
            raise RuntimeError(msg)
        
        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError(msg)

        
        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError(msg)

        print "Retrieved Scenario: %s" % self.scenario
        print "Using Global Tag: %s" % self.globalTag
        print "Dataset: %s" % self.dataset
#         print "Run: %s" % self.run
        
        
        try:
            kwds = {}
            if not self.workflows is None:
                kwds['skims'] = self.workflows
            if not self.alcapromptdataset is None:
                kwds['alcapromptdataset'] = self.alcapromptdataset
            process = scenario.alcaHarvesting(self.globalTag, self.dataset, **kwds)
            
        except Exception as ex:
            msg = "Error creating AlcaHarvesting config:\n"
            msg += str(ex)
            raise RuntimeError(msg)

        process.source.fileNames.append(self.inputLFN)


        psetFile = open("RunAlcaHarvestingCfg.py", "w")
        psetFile.write(process.dumpPython())
        psetFile.close()
        cmsRun = "cmsRun -j FrameworkJobReport.xml RunAlcaHarvestingCfg.py"
        print "Now do:\n%s" % cmsRun
Example #14
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError(msg)


#         if self.run == None:
#             msg = "No --run specified"
#             raise RuntimeError, msg

        if self.dataset == None:
            msg = "No --dataset specified"
            raise RuntimeError(msg)

        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError(msg)

        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario, )
            msg += str(ex)
            raise RuntimeError(msg)

        print "Retrieved Scenario: %s" % self.scenario
        print "Using Global Tag: %s" % self.globalTag
        print "Dataset: %s" % self.dataset
        #         print "Run: %s" % self.run

        try:
            kwds = {}
            if not self.workflows is None:
                kwds['skims'] = self.workflows
            if not self.alcapromptdataset is None:
                kwds['alcapromptdataset'] = self.alcapromptdataset
            process = scenario.alcaHarvesting(self.globalTag, self.dataset,
                                              **kwds)

        except Exception as ex:
            msg = "Error creating AlcaHarvesting config:\n"
            msg += str(ex)
            raise RuntimeError(msg)

        process.source.fileNames.append(self.inputLFN)

        psetFile = open("RunAlcaHarvestingCfg.py", "w")
        psetFile.write(process.dumpPython())
        psetFile.close()
        cmsRun = "cmsRun -j FrameworkJobReport.xml RunAlcaHarvestingCfg.py"
        print "Now do:\n%s" % cmsRun
Example #15
0
 def testPromptReco(self):
     """test promptReco method"""
     scenario = getScenario("ppEra_Run2_2017")
     try:
         process = scenario.promptReco("GLOBALTAG::ALL")
         writePSetFile("testPromptReco.py", process)
     except Exception as ex:
         msg = "Failed to create Prompt Reco configuration\n"
         msg += "for ppEra_Run2_2017 Scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #16
0
 def testAlcaSkim(self):
     """ test alcaSkim method"""
     scenario = getScenario("ppEra_Run2_2017")
     try:
         process = scenario.alcaSkim(["MuAlCalIsolatedMu"])
         writePSetFile("testAlcaReco.py", process)
     except Exception as ex:
        msg = "Failed to create Alca Skimming configuration\n"
        msg += "for ppEra_Run2_2017 Scenario\n"
        msg += str(ex)
        self.fail(msg)
Example #17
0
 def testExpressProcessing(self):
     """ test expressProcessing method"""
     scenario = getScenario("ppEra_Run2_2017")
     try:
         process = scenario.expressProcessing("GLOBALTAG::ALL")
         writePSetFile("testExpressProcessing.py", process)
     except Exception as ex:
         msg = "Failed to create Express Processing configuration\n"
         msg += "for ppEra_Run2_2017 Scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #18
0
 def testExpressProcessing(self):
     """ test expressProcessing method"""
     scenario = getScenario("pp")
     try:
         process = scenario.expressProcessing("GLOBALTAG::ALL")
         writePSetFile("testExpressProcessing.py", process)
     except Exception as ex:
         msg = "Failed to create Express Processing configuration\n"
         msg += "for pp Scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #19
0
 def testPromptReco(self):
     """test promptReco method"""
     scenario = getScenario("pp")
     try:
         process = scenario.promptReco("GLOBALTAG::ALL")
         writePSetFile("testPromptReco.py", process)
     except Exception as ex:
         msg = "Failed to create Prompt Reco configuration\n"
         msg += "for pp Scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #20
0
 def testAlcaSkim(self):
     """ test alcaSkim method"""
     scenario = getScenario("pp")
     try:
         process = scenario.alcaSkim(["MuAlCalIsolatedMu"])
         writePSetFile("testAlcaReco.py", process)
     except Exception as ex:
         msg = "Failed to create Alca Skimming configuration\n"
         msg += "for pp Scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #21
0
 def testPromptReco(self):
     """test promptReco method"""
     scenario = getScenario("pp")
     try:
         process = scenario.promptReco("FT_R_42_V10A::All",writeTiers = ['RECO', 'AOD', 'ALCARECO', 'DQM'])
         writePSetFile("testPromptReco.py", process)
     except Exception as ex:
         msg = "Failed to create Prompt Reco configuration\n"
         msg += "for pp Scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #22
0
 def testDQMHarvesting(self):
     """test dqmHarvesting  method"""
     scenario = getScenario("HeavyIonsRun2")
     try:
         process = scenario.dqmHarvesting("dataset", 123456, "GLOBALTAG::ALL")
         writePSetFile("testDQMHarvesting.py", process)
     except Exception, ex:
         msg = "Failed to create DQM Harvesting configuration "
         msg += "for HeavyIonsRun2 scenario:\n"
         msg += str(ex)
         self.fail(msg)
Example #23
0
 def testPromptReco(self):
     """test promptReco method"""
     scenario = getScenario("pp")
     try:
         process = scenario.promptReco("FT_R_42_V10A::All",writeTiers = ['RECO', 'AOD', 'ALCARECO', 'DQM'])
         writePSetFile("testPromptReco.py", process)
     except Exception as ex:
         msg = "Failed to create Prompt Reco configuration\n"
         msg += "for pp Scenario\n"
         msg += str(ex)
         self.fail(msg)
Example #24
0
 def testDQMHarvesting(self):
     """test dqmHarvesting  method"""
     scenario = getScenario("pp")
     try:
         process = scenario.dqmHarvesting("dataset", 123456,
                                          "GLOBALTAG::ALL")
         writePSetFile("testDQMHarvesting.py", process)
     except Exception as ex:
         msg = "Failed to create DQM Harvesting configuration "
         msg += "for pp scenario:\n"
         msg += str(ex)
         self.fail(msg)
Example #25
0
def create_process(args, func_args):

    if args.funcname == "merge":
        if args.useErrorDataset:
            func_args['outputmod_label'] = "MergedError"

        try:
            from Configuration.DataProcessing.Merge import mergeProcess
            process = mergeProcess(**func_args)
        except Exception as ex:
            msg = "Failed to create a merge process."
            print(msg)
            raise ex
    elif args.funcname == "repack":
        try:
            from Configuration.DataProcessing.Repack import repackProcess
            process = repackProcess(**func_args)
        except Exception as ex:
            msg = "Failed to create a repack process."
            print(msg)
            raise ex
    else:
        try:
            from Configuration.DataProcessing.GetScenario import getScenario
            scenario = func_args['scenario']
            scenarioInst = getScenario(scenario)
        except Exception as ex:
            msg = "Failed to retrieve the Scenario named "
            msg += str(scenario)
            msg += "\nWith Error:"
            msg += str(ex)
            print(msg)
            raise ex
        try:
            my_func = getattr(scenarioInst, args.funcname)
            arg_names = my_func.__code__.co_varnames[1:1 + my_func.__code__.
                                                     co_argcount]
            #the last arg should be **args - get the others from the dictionary passed in
            arg_names = arg_names[:-1]
            call_func_args = []
            for name in arg_names:
                call_func_args.append(func_args[name])
                del func_args[name]
            process = my_func(*call_func_args, **func_args)
        except Exception as ex:
            msg = "Failed to load process from Scenario %s (%s)." % (
                scenario, scenarioInst)
            print(msg)
            raise ex

    return process
Example #26
0
    def createProcess(self, scenario, funcName, funcArgs):
        """
        _createProcess_

        Create a Configuration.DataProcessing PSet.

        """
        if funcName == "merge":

            baggage = self.job.getBaggage()
            if getattr(baggage, "useErrorDataset", False):
                funcArgs["outputmod_label"] = "MergedError"

            try:
                from Configuration.DataProcessing.Merge import mergeProcess

                self.process = mergeProcess(**funcArgs)
            except Exception as ex:
                msg = "Failed to create a merge process."
                print(msg)
                raise ex
        elif funcName == "repack":
            try:
                from Configuration.DataProcessing.Repack import repackProcess

                self.process = repackProcess(**funcArgs)
            except Exception as ex:
                msg = "Failed to create a repack process."
                print(msg)
                raise ex
        else:
            try:
                from Configuration.DataProcessing.GetScenario import getScenario

                scenarioInst = getScenario(scenario)
            except Exception as ex:
                msg = "Failed to retrieve the Scenario named "
                msg += str(scenario)
                msg += "\nWith Error:"
                msg += str(ex)
                print(msg)
                raise ex
            try:
                self.process = getattr(scenarioInst, funcName)(**funcArgs)
            except Exception as ex:
                msg = "Failed to load process from Scenario %s (%s)." % (scenario, scenarioInst)
                print(msg)
                raise ex

        return
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError, msg
        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError, msg

        try:
            scenario = getScenario(self.scenario)
        except Exception, ex:
            msg = "Error getting Scenario implementation for %s\n" % (self.scenario,)
            msg += str(ex)
            raise RuntimeError, msg
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError, msg
        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError, msg

        try:
            scenario = getScenario(self.scenario)
        except Exception, ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario, )
            msg += str(ex)
            raise RuntimeError, msg
Example #29
0
    def createProcess(self, scenario, funcName, funcArgs):
        """
        _createProcess_

        Create a Configuration.DataProcessing PSet.

        """
        if funcName == "merge":

            baggage = self.job.getBaggage()
            if getattr(baggage, "useErrorDataset", False):
                funcArgs['outputmod_label'] = "MergedError"

            try:
                from Configuration.DataProcessing.Merge import mergeProcess
                self.process = mergeProcess(**funcArgs)
            except Exception as ex:
                msg = "Failed to create a merge process."
                print(msg)
                raise ex
        elif funcName == "repack":
            try:
                from Configuration.DataProcessing.Repack import repackProcess
                self.process = repackProcess(**funcArgs)
            except Exception as ex:
                msg = "Failed to create a repack process."
                print(msg)
                raise ex
        else:
            try:
                from Configuration.DataProcessing.GetScenario import getScenario
                scenarioInst = getScenario(scenario)
            except Exception as ex:
                msg = "Failed to retrieve the Scenario named "
                msg += str(scenario)
                msg += "\nWith Error:"
                msg += str(ex)
                print(msg)
                raise ex
            try:
                self.process = getattr(scenarioInst, funcName)(**funcArgs)
            except Exception as ex:
                msg = "Failed to load process from Scenario %s (%s)." % (
                    scenario, scenarioInst)
                print(msg)
                raise ex

        return
Example #30
0
    def __call__(self):
        if self.globalTag == None:
            msg = "No --globaltag specified"
            raise RuntimeError, msg
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError, msg

        #try:
        scenario = getScenario(self.scenario)
        #except Exception, ex:
        #    msg = "Error getting Scenario implementation for %s\n" % (
        #        self.scenario,)
        #    msg += str(ex)
        #    raise RuntimeError, msg

        print "Retrieved Scenario: %s" % self.scenario
        print "Using Global Tag: %s" % self.globalTag

        dataTiers = ["DQM"]

        # get config with specified output
        process = scenario.promptReco(globalTag=self.globalTag,
                                      writeTiers=dataTiers)

        #except NotImplementedError, ex:
        #print "This scenario does not support DataScouting:\n"
        #return
        #except Exception, ex:
        #msg = "Error creating Prompt Reco config:\n"
        #msg += str(ex)
        #raise RuntimeError, msg

        process.source.fileNames.append(self.inputLFN)

        import FWCore.ParameterSet.Config as cms

        process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(10))

        psetFile = open("RunDataScoutingCfg.py", "w")
        psetFile.write(process.dumpPython())
        psetFile.close()
        cmsRun = "cmsRun -e RunDataScoutingCfg.py"
        print "Now do:\n%s" % cmsRun
Example #31
0
    def __call__(self):
        if self.globalTag == None:
            msg = "No --globaltag specified"
            raise RuntimeError, msg
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError, msg

        #try:
        scenario = getScenario(self.scenario)
        #except Exception, ex:
        #    msg = "Error getting Scenario implementation for %s\n" % (
        #        self.scenario,)
        #    msg += str(ex)
        #    raise RuntimeError, msg

        print "Retrieved Scenario: %s" % self.scenario
        print "Using Global Tag: %s" % self.globalTag

        dataTiers = ["DQM"]

        # get config with specified output
        process = scenario.promptReco(globalTag = self.globalTag, writeTiers = dataTiers)

        #except NotImplementedError, ex:
            #print "This scenario does not support DataScouting:\n"
            #return
        #except Exception, ex:
            #msg = "Error creating Prompt Reco config:\n"
            #msg += str(ex)
            #raise RuntimeError, msg

        process.source.fileNames.append(self.inputLFN)

        import FWCore.ParameterSet.Config as cms

        process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )

        psetFile = open("RunDataScoutingCfg.py", "w")
        psetFile.write(process.dumpPython())
        psetFile.close()
        cmsRun = "cmsRun -e RunDataScoutingCfg.py"
        print "Now do:\n%s" % cmsRun
Example #32
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError, msg
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError, msg

        if len(self.skims) == 0:
            msg = "No --skims provided, need at least one"
            raise RuntimeError, msg

        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError, msg

        try:
            scenario = getScenario(self.scenario)
        except Exception, ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario, )
            msg += str(ex)
            raise RuntimeError, msg
Example #33
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError, msg
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError, msg

        if len(self.skims) == 0:
            msg = "No --skims provided, need at least one"
            raise RuntimeError, msg

        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError, msg

        try:
            scenario = getScenario(self.scenario)
        except Exception, ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError, msg
Example #34
0
            except Exception, ex:
                msg = "Failed to create a merge process."
                print msg
                return None
        elif funcName == "repack":
            try:
                from Configuration.DataProcessing.Repack import repackProcess
                self.process = repackProcess(**funcArgs)
            except Exception, ex:
                msg = "Failed to create a repack process."
                print msg
                return None
        else:
            try:
                from Configuration.DataProcessing.GetScenario import getScenario
                scenarioInst = getScenario(scenario)
                self.process = getattr(scenarioInst, funcName)(**funcArgs)
            except Exception, ex:
                msg = "Failed to retrieve the Scenario named "
                msg += str(scenario)
                msg += "\nWith Error:"
                msg += str(ex)
                print msg
                return None

        return

    def loadPSet(self):
        """
        _loadPSet_
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError(msg)


        
        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError(msg)

        print("Retrieved Scenario: %s" % self.scenario)
        print("Using Global Tag: %s" % self.globalTag)

        dataTiers = []
        if self.writeRaw:
            dataTiers.append("RAW")
            print("Configuring to Write out Raw...")
        if self.writeReco:
            dataTiers.append("RECO")
            print("Configuring to Write out Reco...")
        if self.writeFevt:
            dataTiers.append("FEVT")
            print("Configuring to Write out Fevt...")
        if self.writeAlca:
            dataTiers.append("ALCARECO")
            print("Configuring to Write out Alca...")
        if self.writeDqm:
            dataTiers.append("DQM")
            print("Configuring to Write out Dqm...")



        try:
            kwds = {}
            if self.inputLFN != None:
                kwds['inputSource'] = 'EDM'
                
            if self.noOutput:
                # get config without any output
                kwds['writeTiers'] = []

            elif len(dataTiers) > 0:
                # get config with specified output
                kwds['writeTiers'] = dataTiers

            if self.preFilter:
                kwds['preFilter'] = self.preFilter


            # if none of the above use default output data tiers

            process = scenario.visualizationProcessing(self.globalTag, **kwds)

        except NotImplementedError as ex:
            print("This scenario does not support Visualization Processing:\n")
            return
        except Exception as ex:
            msg = "Error creating Visualization Processing config:\n"
            msg += str(ex)
            raise RuntimeError(msg)

        if self.inputLFN != None:
            process.source.fileNames = [self.inputLFN]

        import FWCore.ParameterSet.Config as cms

        process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )

        pklFile = open("RunVisualizationProcessingCfg.pkl", "wb")
        psetFile = open("RunVisualizationProcessingCfg.py", "w")
        try:
            pickle.dump(process, pklFile, protocol=0)
            psetFile.write("import FWCore.ParameterSet.Config as cms\n")
            psetFile.write("import pickle\n")
            psetFile.write("handle = open('RunVisualizationProcessingCfg.pkl','rb')\n")
            psetFile.write("process = pickle.load(handle)\n")
            psetFile.write("handle.close()\n")
            psetFile.close()
        except Exception as ex:
            print("Error writing out PSet:")
            print(traceback.format_exc())
            raise ex
        finally:
            psetFile.close()
            pklFile.close()

        cmsRun = "cmsRun -e RunVisualizationProcessingCfg.py"
        print("Now do:\n%s" % cmsRun)
Example #36
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError(msg)
        
        if self.run == None:
            msg = "No --run specified"
            raise RuntimeError(msg)
        
        if self.dataset == None:
            msg = "No --dataset specified"
            raise RuntimeError(msg)
        

        
        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError(msg)

        print "Retrieved Scenario: %s" % self.scenario
        print "Using Global Tag: %s" % self.globalTag
        print "Dataset: %s" % self.dataset
        print "Run: %s" % self.run
        
        
        try:
            kwds = {}
            if not self.dqmio is None:
                kwds['newDQMIO'] = self.dqmio

            process = scenario.dqmHarvesting(self.dataset, self.run,
                                             self.globalTag, **kwds)
            
        except Exception as ex:
            msg = "Error creating Harvesting config:\n"
            msg += str(ex)
            raise RuntimeError(msg)

        process.source.fileNames.append(self.inputLFN)


        pklFile = open("RunDQMHarvestingCfg.pkl", "w")
        psetFile = open("RunDQMHarvestingCfg.py", "w")
        try:
            pickle.dump(process, pklFile)
            psetFile.write("import FWCore.ParameterSet.Config as cms\n")
            psetFile.write("import pickle\n")
            psetFile.write("handle = open('RunDQMHarvestingCfg.pkl')\n")
            psetFile.write("process = pickle.load(handle)\n")
            psetFile.write("handle.close()\n")
            psetFile.close()
        except Exception as ex:
            print("Error writing out PSet:")
            print(traceback.format_exc())
            raise ex
        finally:
            psetFile.close()
            pklFile.close()

        cmsRun = "cmsRun -j FrameworkJobReport.xml RunDQMHarvestingCfg.py"
        print "Now do:\n%s" % cmsRun
Example #37
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError(msg)
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError(msg)
        
        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError(msg)

        print "Retrieved Scenario: %s" % self.scenario
        print "Using Global Tag: %s" % self.globalTag

        dataTiers = []
        if self.writeRAW:
            dataTiers.append("RAW")
            print "Configuring to Write out RAW"
        if self.writeRECO:
            dataTiers.append("RECO")
            print "Configuring to Write out RECO"
        if self.writeFEVT:
            dataTiers.append("FEVT")
            print "Configuring to Write out FEVT"
        if self.writeDQM:
            dataTiers.append("DQM")
            print "Configuring to Write out DQM"
        if self.writeDQMIO:
            dataTiers.append("DQMIO")
            print "Configuring to Write out DQMIO"
        if self.alcaRecos:
            dataTiers.append("ALCARECO")
            print "Configuring to Write out ALCARECO"


        try:
            kwds = {}

            if self.noOutput:
                kwds['outputs'] = []
            else:
                outputs = []
                for dataTier in dataTiers:
                    outputs.append({ 'dataTier' : dataTier,
                                     'eventContent' : dataTier,
                                     'moduleLabel' : "write_%s" % dataTier })
                kwds['outputs'] = outputs

                if self.alcaRecos:
                    kwds['skims'] = self.alcaRecos


            process = scenario.expressProcessing(self.globalTag, **kwds)

        except NotImplementedError as ex:
            print "This scenario does not support Express Processing:\n"
            return
        except Exception as ex:
            msg = "Error creating Express Processing config:\n"
            msg += traceback.format_exc()
            raise RuntimeError(msg)

        process.source.fileNames = [self.inputLFN]

        import FWCore.ParameterSet.Config as cms

        process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )

        psetFile = open("RunExpressProcessingCfg.py", "w")
        psetFile.write(process.dumpPython())
        psetFile.close()
        cmsRun = "cmsRun -e RunExpressProcessingCfg.py"
        print "Now do:\n%s" % cmsRun
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError(msg)


        
        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError(msg)

        print("Retrieved Scenario: %s" % self.scenario)
        print("Using Global Tag: %s" % self.globalTag)

        dataTiers = []
        if self.writeRaw:
            dataTiers.append("RAW")
            print("Configuring to Write out Raw...")
        if self.writeReco:
            dataTiers.append("RECO")
            print("Configuring to Write out Reco...")
        if self.writeFevt:
            dataTiers.append("FEVT")
            print("Configuring to Write out Fevt...")
        if self.writeAlca:
            dataTiers.append("ALCARECO")
            print("Configuring to Write out Alca...")
        if self.writeDqm:
            dataTiers.append("DQM")
            print("Configuring to Write out Dqm...")



        try:
            kwds = {}
            if self.inputLFN != None:
                kwds['inputSource'] = 'EDM'
                
            if self.noOutput:
                # get config without any output
                kwds['writeTiers'] = []

            elif len(dataTiers) > 0:
                # get config with specified output
                kwds['writeTiers'] = dataTiers

            if self.preFilter:
                kwds['preFilter'] = self.preFilter


            # if none of the above use default output data tiers

            process = scenario.visualizationProcessing(self.globalTag, **kwds)

        except NotImplementedError as ex:
            print("This scenario does not support Visualization Processing:\n")
            return
        except Exception as ex:
            msg = "Error creating Visualization Processing config:\n"
            msg += str(ex)
            raise RuntimeError(msg)

        if self.inputLFN != None:
            process.source.fileNames = [self.inputLFN]

        import FWCore.ParameterSet.Config as cms

        process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )

        pklFile = open("RunVisualizationProcessingCfg.pkl", "w")
        psetFile = open("RunVisualizationProcessingCfg.py", "w")
        try:
            pickle.dump(process, pklFile)
            psetFile.write("import FWCore.ParameterSet.Config as cms\n")
            psetFile.write("import pickle\n")
            psetFile.write("handle = open('RunVisualizationProcessingCfg.pkl')\n")
            psetFile.write("process = pickle.load(handle)\n")
            psetFile.write("handle.close()\n")
            psetFile.close()
        except Exception as ex:
            print("Error writing out PSet:")
            print(traceback.format_exc())
            raise ex
        finally:
            psetFile.close()
            pklFile.close()

        cmsRun = "cmsRun -e RunVisualizationProcessingCfg.py"
        print("Now do:\n%s" % cmsRun)
Example #39
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError(msg)

        if len(self.skims) == 0:
            msg = "No --skims provided, need at least one"
            raise RuntimeError(msg)

        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError(msg)

        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError(msg)

        print "Retrieved Scenario: %s" % self.scenario
        print "Creating ALCA skimming config with skims:"
        for skim in self.skims:
            print " => %s" % skim
            
        try:
            process = scenario.alcaSkim(self.skims, globaltag = self.globalTag)
        except NotImplementedError as ex:
            print "This scenario does not support Alca Skimming:\n"
            return
        except Exception as ex:
            msg = "Error creating Alca Skimming config:\n"
            msg += str(ex)
            raise RuntimeError(msg)

        process.source.fileNames.append(self.inputLFN)

        import FWCore.ParameterSet.Config as cms

        process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )

        pklFile = open("RunAlcaSkimmingCfg.pkl", "w")
        psetFile = open("RunAlcaSkimmingCfg.py", "w")
        try:
            pickle.dump(process, pklFile)
            psetFile.write("import FWCore.ParameterSet.Config as cms\n")
            psetFile.write("import pickle\n")
            psetFile.write("handle = open('RunAlcaSkimmingCfg.pkl')\n")
            psetFile.write("process = pickle.load(handle)\n")
            psetFile.write("handle.close()\n")
            psetFile.close()
        except Exception as ex:
            print("Error writing out PSet:")
            print(traceback.format_exc())
            raise ex
        finally:
            psetFile.close()
            pklFile.close()

        cmsRun = "cmsRun -e RunAlcaSkimmingCfg.py"
        print "Now do:\n%s" % cmsRun
Example #40
0
    'cosmic_run': 'cosmicsRun2',
    'cosmic_run_stage1': 'cosmicsRun2',
    'hi_run': 'HeavyIons'
}

if not runType.getRunTypeName() in scenarios.keys():
    msg = "Error getting the scenario out of the 'runkey', no mapping for: %s\n" % runType.getRunTypeName(
    )
    raise RuntimeError, msg

scenarioName = scenarios[runType.getRunTypeName()]

print "Using scenario:", scenarioName

try:
    scenario = getScenario(scenarioName)
except Exception, ex:
    msg = "Error getting Scenario implementation for %s\n" % (scenarioName, )
    msg += str(ex)
    raise RuntimeError, msg

kwds = {}
# example of how to add a filer IN FRONT of all the paths, eg for HLT selection
#kwds['preFilter'] = 'DQM/Integration/python/config/visualizationPreFilter.hltfilter'

process = scenario.visualizationProcessing(globalTag='DUMMY',
                                           writeTiers=['FEVT'],
                                           **kwds)

process.source = source
process.source.inputFileTransitionsEachEvent = cms.untracked.bool(True)
        Import the method to create the PSet

        """
        harvestingModule = "Configuration.DataProcessing.GetScenario"
        try:
            msg = "Attempting Import of: %s" % harvestingModule
            print msg
            from Configuration.DataProcessing.GetScenario import getScenario
        except Exception, ex:
            msg = "Unable to import %s\n" % harvestingModule
            msg += "%s\n" % str(ex)
            raise RuntimeError, msg

        try:
            scenario = getScenario(self.scenario)
        except Exception, ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError, msg

        print "Retrieved Scenario: %s" % self.scenario
        print "Using Global Tag: %s" % self.globalTag
        print "Dataset: %s" % self.inputDataset.name()
        print "Run: %s" % self.runNumber

        try:
            process = scenario.dqmHarvesting(self.inputDataset.name(),
                                             self.runNumber,
                                             self.globalTag)
# this is needed to map the names of the run-types chosen by DQM to the scenarios, ideally we could converge to the same names
#scenarios = {'pp_run': 'ppEra_Run2_2016','cosmic_run':'cosmicsEra_Run2_2016','hi_run':'HeavyIons'}
#scenarios = {'pp_run': 'ppEra_Run2_2016','pp_run_stage1': 'ppEra_Run2_2016','cosmic_run':'cosmicsEra_Run2_2016','cosmic_run_stage1':'cosmicsEra_Run2_2016','hi_run':'HeavyIonsEra_Run2_HI'}
scenarios = {'pp_run': 'ppEra_Run2_2018','cosmic_run':'cosmicsEra_Run2_2018','hi_run':'HeavyIonsEra_Run2_HI'}

if not runType.getRunTypeName() in scenarios.keys():
    msg = "Error getting the scenario out of the 'runkey', no mapping for: %s\n"%runType.getRunTypeName()
    raise RuntimeError(msg)

scenarioName = scenarios[runType.getRunTypeName()]

print "Using scenario:",scenarioName

try:
    scenario = getScenario(scenarioName)
except Exception as ex:
    msg = "Error getting Scenario implementation for %s\n" % (
        scenarioName,)
    msg += str(ex)
    raise RuntimeError(msg)


# A hack necessary to prevert scenario.visualizationProcessing
# from overriding the connect string
from DQM.Integration.config.FrontierCondition_GT_autoExpress_cfi import GlobalTag
kwds = {
   'globalTag': GlobalTag.globaltag.value(),
   'globalTagConnect': GlobalTag.connect.value()
}
Example #43
0
            except Exception, ex:
                msg = "Failed to create a merge process."
                print msg
                return None
        elif funcName == "repack":
            try:
                from Configuration.DataProcessing.Repack import repackProcess
                self.process = repackProcess(**funcArgs)
            except Exception, ex:
                msg = "Failed to create a repack process."
                print msg
                return None
        else:
            try:
                from Configuration.DataProcessing.GetScenario import getScenario
                scenarioInst = getScenario(scenario)
                self.process = getattr(scenarioInst, funcName)(**funcArgs)
            except Exception, ex:
                msg = "Failed to retrieve the Scenario named "
                msg += str(scenario)
                msg += "\nWith Error:"
                msg += str(ex)
                print msg
                return None

        return


    def loadPSet(self):
        """
        _loadPSet_
Example #44
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError(msg)
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError(msg)
        
        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError(msg)

        print("Retrieved Scenario: %s" % self.scenario)
        print("Using Global Tag: %s" % self.globalTag)

        dataTiers = []
        if self.writeRAW:
            dataTiers.append("RAW")
            print("Configuring to Write out RAW")
        if self.writeRECO:
            dataTiers.append("RECO")
            print("Configuring to Write out RECO")
        if self.writeFEVT:
            dataTiers.append("FEVT")
            print("Configuring to Write out FEVT")
        if self.writeDQM:
            dataTiers.append("DQM")
            print("Configuring to Write out DQM")
        if self.writeDQMIO:
            dataTiers.append("DQMIO")
            print("Configuring to Write out DQMIO")
        if self.alcaRecos:
            dataTiers.append("ALCARECO")
            print("Configuring to Write out ALCARECO")

        try:
            kwds = {}

            if self.noOutput:
                kwds['outputs'] = []
            else:
                outputs = []
                for dataTier in dataTiers:
                    outputs.append({ 'dataTier' : dataTier,
                                     'eventContent' : dataTier,
                                     'moduleLabel' : "write_%s" % dataTier })
                kwds['outputs'] = outputs

                if self.alcaRecos:
                    kwds['skims'] = self.alcaRecos


            if self.nThreads:
                kwds['nThreads'] = self.nThreads

            process = scenario.expressProcessing(self.globalTag, **kwds)

        except NotImplementedError as ex:
            print("This scenario does not support Express Processing:\n")
            return
        except Exception as ex:
            msg = "Error creating Express Processing config:\n"
            msg += traceback.format_exc()
            raise RuntimeError(msg)

        process.source.fileNames = [self.inputLFN]

        import FWCore.ParameterSet.Config as cms

        process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )

        pklFile = open("RunExpressProcessingCfg.pkl", "wb")
        psetFile = open("RunExpressProcessingCfg.py", "w")
        try:
            pickle.dump(process, pklFile, protocol=0)
            psetFile.write("import FWCore.ParameterSet.Config as cms\n")
            psetFile.write("import pickle\n")
            psetFile.write("handle = open('RunExpressProcessingCfg.pkl','rb')\n")
            psetFile.write("process = pickle.load(handle)\n")
            psetFile.write("handle.close()\n")
            psetFile.close()
        except Exception as ex:
            print("Error writing out PSet:")
            print(traceback.format_exc())
            raise ex
        finally:
            psetFile.close()
            pklFile.close()

        cmsRun = "cmsRun -e RunExpressProcessingCfg.py"
        print("Now do:\n%s" % cmsRun)
Example #45
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError(msg)
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError(msg)

        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError(msg)

        print "Retrieved Scenario: %s" % self.scenario
        print "Using Global Tag: %s" % self.globalTag

        dataTiers = []
        if self.writeRECO:
            dataTiers.append("RECO")
            print "Configuring to Write out RECO"
        if self.writeAOD:
            dataTiers.append("AOD")
            print "Configuring to Write out AOD"
        if self.writeMINIAOD:
            dataTiers.append("MINIAOD")
            print "Configuring to Write out MiniAOD"
	if self.writeDQM:
            dataTiers.append("DQM")
            print "Configuring to Write out DQM"
	if self.writeDQMIO:
            dataTiers.append("DQMIO")
            print "Configuring to Write out DQMIO"
        if self.alcaRecos:
            dataTiers.append("ALCARECO")
            print "Configuring to Write out ALCARECO"

        try:
            kwds = {}

            if self.noOutput:
                kwds['outputs'] = []
            else:
                outputs = []
                for dataTier in dataTiers:
                    outputs.append({ 'dataTier' : dataTier,
                                     'eventContent' : dataTier,
                                     'moduleLabel' : "write_%s" % dataTier })
                kwds['outputs'] = outputs

                if self.alcaRecos:
                    kwds['skims'] = self.alcaRecos
                if self.PhysicsSkims:
                    kwds['PhysicsSkims'] = self.PhysicsSkims

                if self.dqmSeq:
                    kwds['dqmSeq'] = self.dqmSeq

                if self.setRepacked:
                    kwds['repacked'] = self.isRepacked

            process = scenario.promptReco(self.globalTag, **kwds)

        except NotImplementedError as ex:
            print "This scenario does not support Prompt Reco:\n"
            return
        except Exception as ex:
            msg = "Error creating Prompt Reco config:\n"
            msg += traceback.format_exc()
            raise RuntimeError(msg)

        process.source.fileNames.append(self.inputLFN)

        import FWCore.ParameterSet.Config as cms

        process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )

        pklFile = open("RunPromptRecoCfg.pkl", "w")
        psetFile = open("RunPromptRecoCfg.py", "w")
        try:
            pickle.dump(process, pklFile)
            psetFile.write("import FWCore.ParameterSet.Config as cms\n")
            psetFile.write("import pickle\n")
            psetFile.write("handle = open('RunPromptRecoCfg.pkl')\n")
            psetFile.write("process = pickle.load(handle)\n")
            psetFile.write("handle.close()\n")
            psetFile.close()
        except Exception as ex:
            print("Error writing out PSet:")
            print(traceback.format_exc())
            raise ex
        finally:
            psetFile.close()
            pklFile.close()

        cmsRun = "cmsRun -e RunPromptRecoCfg.py"
        print "Now do:\n%s" % cmsRun
Example #46
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError(msg)

        if len(self.skims) == 0:
            msg = "No --skims provided, need at least one"
            raise RuntimeError(msg)

        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError(msg)

        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario,)
            msg += str(ex)
            raise RuntimeError(msg)

        print("Retrieved Scenario: %s" % self.scenario)
        print("Creating ALCA skimming config with skims:")
        for skim in self.skims:
            print(" => %s" % skim)
            
        try:
            process = scenario.alcaSkim(self.skims, globaltag = self.globalTag)
        except NotImplementedError as ex:
            print("This scenario does not support Alca Skimming:\n")
            return
        except Exception as ex:
            msg = "Error creating Alca Skimming config:\n"
            msg += str(ex)
            raise RuntimeError(msg)

        process.source.fileNames.append(self.inputLFN)

        import FWCore.ParameterSet.Config as cms

        process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )

        pklFile = open("RunAlcaSkimmingCfg.pkl", "wb")
        psetFile = open("RunAlcaSkimmingCfg.py", "w")
        try:
            pickle.dump(process, pklFile, protocol=0)
            psetFile.write("import FWCore.ParameterSet.Config as cms\n")
            psetFile.write("import pickle\n")
            psetFile.write("handle = open('RunAlcaSkimmingCfg.pkl','rb')\n")
            psetFile.write("process = pickle.load(handle)\n")
            psetFile.write("handle.close()\n")
            psetFile.close()
        except Exception as ex:
            print("Error writing out PSet:")
            print(traceback.format_exc())
            raise ex
        finally:
            psetFile.close()
            pklFile.close()

        cmsRun = "cmsRun -e RunAlcaSkimmingCfg.py"
        print("Now do:\n%s" % cmsRun)
Example #47
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError(msg)

        if self.run == None:
            msg = "No --run specified"
            raise RuntimeError(msg)

        if self.dataset == None:
            msg = "No --dataset specified"
            raise RuntimeError(msg)

        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario, )
            msg += str(ex)
            raise RuntimeError(msg)

        print("Retrieved Scenario: %s" % self.scenario)
        print("Using Global Tag: %s" % self.globalTag)
        print("Dataset: %s" % self.dataset)
        print("Run: %s" % self.run)

        try:
            kwds = {}
            if not self.dqmio is None:
                kwds['newDQMIO'] = self.dqmio

            process = scenario.dqmHarvesting(self.dataset, self.run,
                                             self.globalTag, **kwds)

        except Exception as ex:
            msg = "Error creating Harvesting config:\n"
            msg += str(ex)
            raise RuntimeError(msg)

        process.source.fileNames.append(self.inputLFN)

        pklFile = open("RunDQMHarvestingCfg.pkl", "w")
        psetFile = open("RunDQMHarvestingCfg.py", "w")
        try:
            pickle.dump(process, pklFile)
            psetFile.write("import FWCore.ParameterSet.Config as cms\n")
            psetFile.write("import pickle\n")
            psetFile.write("handle = open('RunDQMHarvestingCfg.pkl')\n")
            psetFile.write("process = pickle.load(handle)\n")
            psetFile.write("handle.close()\n")
            psetFile.close()
        except Exception as ex:
            print("Error writing out PSet:")
            print(traceback.format_exc())
            raise ex
        finally:
            psetFile.close()
            pklFile.close()

        cmsRun = "cmsRun -j FrameworkJobReport.xml RunDQMHarvestingCfg.py"
        print("Now do:\n%s" % cmsRun)
Example #48
0
    def __call__(self):
        if self.scenario == None:
            msg = "No --scenario specified"
            raise RuntimeError(msg)
        if self.globalTag == None:
            msg = "No --global-tag specified"
            raise RuntimeError(msg)
        if self.inputLFN == None:
            msg = "No --lfn specified"
            raise RuntimeError(msg)

        try:
            scenario = getScenario(self.scenario)
        except Exception as ex:
            msg = "Error getting Scenario implementation for %s\n" % (
                self.scenario, )
            msg += str(ex)
            raise RuntimeError(msg)

        print "Retrieved Scenario: %s" % self.scenario
        print "Using Global Tag: %s" % self.globalTag

        dataTiers = []
        if self.writeRAW:
            dataTiers.append("RAW")
            print "Configuring to Write out RAW"
        if self.writeRECO:
            dataTiers.append("RECO")
            print "Configuring to Write out RECO"
        if self.writeFEVT:
            dataTiers.append("FEVT")
            print "Configuring to Write out FEVT"
        if self.writeDQM:
            dataTiers.append("DQM")
            print "Configuring to Write out DQM"
        if self.writeDQMIO:
            dataTiers.append("DQMIO")
            print "Configuring to Write out DQMIO"
        if self.alcaRecos:
            dataTiers.append("ALCARECO")
            print "Configuring to Write out ALCARECO"

        try:
            kwds = {}

            if self.noOutput:
                kwds['outputs'] = []
            else:
                outputs = []
                for dataTier in dataTiers:
                    outputs.append({
                        'dataTier': dataTier,
                        'eventContent': dataTier,
                        'moduleLabel': "write_%s" % dataTier
                    })
                kwds['outputs'] = outputs

                if self.alcaRecos:
                    kwds['skims'] = self.alcaRecos

            process = scenario.expressProcessing(self.globalTag, **kwds)

        except NotImplementedError as ex:
            print "This scenario does not support Express Processing:\n"
            return
        except Exception as ex:
            msg = "Error creating Express Processing config:\n"
            msg += str(ex)
            raise RuntimeError(msg)

        process.source.fileNames = [self.inputLFN]

        import FWCore.ParameterSet.Config as cms

        process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(10))

        psetFile = open("RunExpressProcessingCfg.py", "w")
        psetFile.write(process.dumpPython())
        psetFile.close()
        cmsRun = "cmsRun -e RunExpressProcessingCfg.py"
        print "Now do:\n%s" % cmsRun