Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4397 from slava77/CMSSW_7_1_X_2014-06-25-1400/pls…
…1CustDevel72X-dataRun2 TLRs for run2 data processing configurations (start from CSC) backport of #4396
- Loading branch information
Showing
6 changed files
with
385 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/usr/bin/env python | ||
""" | ||
_cosmicsRun2_ | ||
Scenario supporting cosmic data taking | ||
""" | ||
|
||
import os | ||
import sys | ||
|
||
from Configuration.DataProcessing.Reco import Reco | ||
from Configuration.DataProcessing.RecoTLR import customiseCosmicDataRun2 | ||
|
||
class cosmicsRun2(Reco): | ||
def __init__(self): | ||
self.recoSeq='' | ||
self.cbSc='cosmics' | ||
""" | ||
_cosmicsRun2_ | ||
Implement configuration building for data processing for cosmic | ||
data taking in Run2 | ||
""" | ||
|
||
|
||
def promptReco(self, globalTag, **args): | ||
""" | ||
_promptReco_ | ||
Cosmic data taking prompt reco | ||
""" | ||
if not 'skims' in args: | ||
args['skims']= ['@allForPromptCosmics'] | ||
process = Reco.promptReco(self,globalTag, **args) | ||
|
||
customiseCosmicDataRun2(process) | ||
return process | ||
|
||
|
||
def expressProcessing(self, globalTag, **args): | ||
""" | ||
_expressProcessing_ | ||
Cosmic data taking express processing | ||
""" | ||
|
||
if not 'skims' in args: | ||
args['skims']= ['@allForExpressCosmics'] | ||
process = Reco.expressProcessing(self,globalTag, **args) | ||
|
||
customiseCosmicDataRun2(process) | ||
return process | ||
|
||
|
||
def alcaHarvesting(self, globalTag, datasetName, **args): | ||
""" | ||
_alcaHarvesting_ | ||
Proton collisions data taking AlCa Harvesting | ||
""" | ||
if not 'skims' in args: | ||
args['skims']=['SiStripQuality'] | ||
|
||
return Reco.alcaHarvesting(self, globalTag, datasetName, **args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/usr/bin/env python | ||
""" | ||
_ppRun2_ | ||
Scenario supporting proton collisions | ||
""" | ||
|
||
import os | ||
import sys | ||
|
||
from Configuration.DataProcessing.Reco import Reco | ||
import FWCore.ParameterSet.Config as cms | ||
from Configuration.DataProcessing.RecoTLR import customisePromptRun2,customiseExpressRun2 | ||
|
||
class ppRun2(Reco): | ||
def __init__(self): | ||
self.recoSeq='' | ||
self.cbSc='pp' | ||
""" | ||
_ppRun2_ | ||
Implement configuration building for data processing for proton | ||
collision data taking for Run2 | ||
""" | ||
|
||
|
||
def promptReco(self, globalTag, **args): | ||
""" | ||
_promptReco_ | ||
Proton collision data taking prompt reco | ||
""" | ||
if not 'skims' in args: | ||
args['skims']=['@allForPrompt'] | ||
process = Reco.promptReco(self,globalTag, **args) | ||
|
||
#add the former top level patches here | ||
customisePromptRun2(process) | ||
|
||
return process | ||
|
||
|
||
def expressProcessing(self, globalTag, **args): | ||
""" | ||
_expressProcessing_ | ||
Proton collision data taking express processing | ||
""" | ||
if not 'skims' in args: | ||
args['skims']=['@allForExpress'] | ||
process = Reco.expressProcessing(self,globalTag, **args) | ||
|
||
customiseExpressRun2(process) | ||
|
||
return process | ||
|
||
|
||
def alcaHarvesting(self, globalTag, datasetName, **args): | ||
""" | ||
_alcaHarvesting_ | ||
Proton collisions data taking AlCa Harvesting | ||
""" | ||
if not 'skims' in args: | ||
args['skims']=['BeamSpotByRun', | ||
'BeamSpotByLumi', | ||
'SiStripQuality'] | ||
|
||
return Reco.alcaHarvesting(self, globalTag, datasetName, **args) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
#!/usr/bin/env python | ||
""" | ||
_cosmicsRun2_ | ||
Test for CosmicsRun2 Scenario implementation | ||
""" | ||
|
||
|
||
import unittest | ||
import FWCore.ParameterSet.Config as cms | ||
from Configuration.DataProcessing.GetScenario import getScenario | ||
|
||
|
||
|
||
def writePSetFile(name, process): | ||
""" | ||
_writePSetFile_ | ||
Util to dump the process to a file | ||
""" | ||
handle = open(name, 'w') | ||
handle.write(process.dumpPython()) | ||
handle.close() | ||
|
||
|
||
class cosmicsRun2ScenarioTest(unittest.TestCase): | ||
""" | ||
unittest for cosmicsRun2 scenario | ||
""" | ||
|
||
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) | ||
|
||
|
||
def testPromptReco(self): | ||
"""test promptReco method""" | ||
scenario = getScenario("cosmicsRun2") | ||
try: | ||
process = scenario.promptReco("GLOBALTAG::ALL") | ||
writePSetFile("testPromptReco.py", process) | ||
except Exception, ex: | ||
msg = "Failed to create Prompt Reco configuration\n" | ||
msg += "for cosmicsRun2 Scenario\n" | ||
msg += str(ex) | ||
self.fail(msg) | ||
|
||
|
||
def testExpressProcessing(self): | ||
""" test expressProcessing method""" | ||
scenario = getScenario("cosmicsRun2") | ||
try: | ||
process = scenario.expressProcessing("GLOBALTAG::ALL") | ||
writePSetFile("testExpressProcessing.py", process) | ||
except Exception, ex: | ||
msg = "Failed to create Express Processing configuration\n" | ||
msg += "for cosmicsRun2 Scenario\n" | ||
msg += str(ex) | ||
self.fail(msg) | ||
|
||
|
||
def testAlcaSkim(self): | ||
""" test alcaSkim method""" | ||
scenario = getScenario("cosmicsRun2") | ||
try: | ||
process = scenario.alcaSkim(["MuAlCalIsolatedMu"]) | ||
writePSetFile("testAlcaReco.py", process) | ||
except Exception, ex: | ||
msg = "Failed to create Alca Skimming configuration\n" | ||
msg += "for cosmicsRun2 Scenario\n" | ||
msg += str(ex) | ||
self.fail(msg) | ||
|
||
|
||
def testDQMHarvesting(self): | ||
"""test dqmHarvesting method""" | ||
scenario = getScenario("cosmicsRun2") | ||
try: | ||
process = scenario.dqmHarvesting("dataset", 123456, | ||
"GLOBALTAG::ALL") | ||
writePSetFile("testDQMHarvesting.py", process) | ||
except Exception, ex: | ||
msg = "Failed to create DQM Harvesting configuration " | ||
msg += "for cosmicsRun2 scenario:\n" | ||
msg += str(ex) | ||
self.fail(msg) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
#!/usr/bin/env python | ||
""" | ||
_ppRun2_ | ||
Test for Collision Scenario implementation | ||
""" | ||
|
||
|
||
import unittest | ||
import FWCore.ParameterSet.Config as cms | ||
from Configuration.DataProcessing.GetScenario import getScenario | ||
|
||
|
||
|
||
def writePSetFile(name, process): | ||
""" | ||
_writePSetFile_ | ||
Util to dump the process to a file | ||
""" | ||
handle = open(name, 'w') | ||
handle.write(process.dumpPython()) | ||
handle.close() | ||
|
||
|
||
class ppRun2ScenarioTest(unittest.TestCase): | ||
""" | ||
unittest for ppRun2 collisions scenario | ||
""" | ||
|
||
def testA(self): | ||
"""get the scenario""" | ||
try: | ||
scenario = getScenario("ppRun2") | ||
except Exception, ex: | ||
msg = "Failed to get ppRun2 scenario\n" | ||
msg += str(ex) | ||
self.fail(msg) | ||
|
||
|
||
def testPromptReco(self): | ||
"""test promptReco method""" | ||
scenario = getScenario("ppRun2") | ||
try: | ||
process = scenario.promptReco("GLOBALTAG::ALL") | ||
writePSetFile("testPromptReco.py", process) | ||
except Exception, ex: | ||
msg = "Failed to create Prompt Reco configuration\n" | ||
msg += "for ppRun2 Scenario\n" | ||
msg += str(ex) | ||
self.fail(msg) | ||
|
||
|
||
def testExpressProcessing(self): | ||
""" test expressProcessing method""" | ||
scenario = getScenario("ppRun2") | ||
try: | ||
process = scenario.expressProcessing("GLOBALTAG::ALL") | ||
writePSetFile("testExpressProcessing.py", process) | ||
except Exception, ex: | ||
msg = "Failed to create Express Processing configuration\n" | ||
msg += "for ppRun2 Scenario\n" | ||
msg += str(ex) | ||
self.fail(msg) | ||
|
||
|
||
def testAlcaSkim(self): | ||
""" test alcaSkim method""" | ||
scenario = getScenario("ppRun2") | ||
try: | ||
process = scenario.alcaSkim(["MuAlCalIsolatedMu"]) | ||
writePSetFile("testAlcaReco.py", process) | ||
except Exception, ex: | ||
msg = "Failed to create Alca Skimming configuration\n" | ||
msg += "for ppRun2 Scenario\n" | ||
msg += str(ex) | ||
self.fail(msg) | ||
|
||
|
||
def testDQMHarvesting(self): | ||
"""test dqmHarvesting method""" | ||
scenario = getScenario("ppRun2") | ||
try: | ||
process = scenario.dqmHarvesting("dataset", 123456, | ||
"GLOBALTAG::ALL") | ||
writePSetFile("testDQMHarvesting.py", process) | ||
except Exception, ex: | ||
msg = "Failed to create DQM Harvesting configuration " | ||
msg += "for ppRun2 scenario:\n" | ||
msg += str(ex) | ||
self.fail(msg) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
Oops, something went wrong.