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 #3135 from cerminar/pclForCosmics_from700
Pcl for cosmics: specialize PromptCalibProd streams for running only cosmic friendly workflows
- Loading branch information
Showing
9 changed files
with
216 additions
and
9 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStrip_Output_cff.py
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,17 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
|
||
|
||
|
||
OutALCARECOPromptCalibProdSiStrip_noDrop = cms.PSet( | ||
SelectEvents = cms.untracked.PSet( | ||
SelectEvents = cms.vstring('pathALCARECOPromptCalibProdSiStrip') | ||
), | ||
outputCommands = cms.untracked.vstring( | ||
'keep *_MEtoEDMConvertSiStrip_*_*') | ||
) | ||
|
||
import copy | ||
|
||
OutALCARECOPromptCalibProdSiStrip=copy.deepcopy(OutALCARECOPromptCalibProdSiStrip_noDrop) | ||
OutALCARECOPromptCalibProdSiStrip.outputCommands.insert(0, "drop *") |
6 changes: 6 additions & 0 deletions
6
Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStrip_cff.py
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,6 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
|
||
seqALCARECOPromptCalibProdSiStrip = cms.Sequence() | ||
|
||
|
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,6 @@ | ||
<use name="DQMServices/Core"/> | ||
<use name="FWCore/Framework"/> | ||
<use name="boost"/> | ||
<library file="DQMRootFileReader.cc" name="CalibrationTkAlCaRecoProducersDQMRootFileReader"> | ||
<flags EDM_PLUGIN="1"/> | ||
</library> |
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,99 @@ | ||
// -*- C++ -*- | ||
// | ||
// Class: DQMRootFileReader | ||
// | ||
/**\class DQMRootFileReader | ||
Description: Simple example showing how to read MonitorElements from a DQM plain ROOT file | ||
Implementation: | ||
<Notes on implementation> | ||
*/ | ||
// | ||
// | ||
// | ||
|
||
|
||
// system include files | ||
#include <string> | ||
#include <vector> | ||
#include <iostream> | ||
|
||
// user include files | ||
#include "FWCore/Framework/interface/EDAnalyzer.h" | ||
|
||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
|
||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
#include "DQMServices/Core/interface/DQMStore.h" | ||
#include "FWCore/ServiceRegistry/interface/Service.h" | ||
|
||
|
||
using std::cout; | ||
using std::endl; | ||
|
||
// | ||
// class declaration | ||
// | ||
class DQMRootFileReader : public edm::EDAnalyzer { | ||
public: | ||
explicit DQMRootFileReader( const edm::ParameterSet& ); | ||
~DQMRootFileReader(); | ||
|
||
virtual void analyze( const edm::Event&, const edm::EventSetup& ); | ||
|
||
virtual void endJob(void); | ||
|
||
private: | ||
// ----------member data --------------------------- | ||
|
||
// back-end interface | ||
DQMStore * dbe; | ||
std::string filename; | ||
}; | ||
|
||
// | ||
// constructors and destructor | ||
// | ||
DQMRootFileReader::DQMRootFileReader(const edm::ParameterSet& iConfig ) { | ||
// get hold of back-end interface | ||
dbe = edm::Service<DQMStore>().operator->(); | ||
|
||
filename = iConfig.getUntrackedParameter<std::string>("RootFileName", "test_playback.root"); | ||
} | ||
|
||
|
||
|
||
DQMRootFileReader::~DQMRootFileReader() { | ||
// do anything here that needs to be done at desctruction time | ||
// (e.g. close files, deallocate resources etc.) | ||
|
||
} | ||
|
||
|
||
void DQMRootFileReader::endJob(void) | ||
{ | ||
cout << "Dumping DQMStore dir structure:" << endl; | ||
dbe->showDirStructure(); | ||
// dbe->save("test.root"); | ||
} | ||
|
||
|
||
// | ||
// member functions | ||
// | ||
|
||
// ------------ method called to produce the data ------------ | ||
void DQMRootFileReader::analyze(const edm::Event& iEvent, | ||
const edm::EventSetup& iSetup ) | ||
{ | ||
// NOTE: this is here just because we need it after the beginRun of MEtoEDMCoverter which calls a Reset on all MEs. | ||
dbe->open(filename, false, "","",DQMStore::OpenRunDirs::StripRunDirs); | ||
dbe->showDirStructure(); | ||
|
||
} | ||
|
||
// define this as a plug-in | ||
DEFINE_FWK_MODULE(DQMRootFileReader); | ||
|
62 changes: 62 additions & 0 deletions
62
Calibration/TkAlCaRecoProducers/test/convertSiStripRootDQMFileToEDM_cfg.py
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,62 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
""" This python cfg converts a plain DQM root file in a EDM file that can be used to run the SiStrip bad channel calibration as done @ Tier0""" | ||
|
||
|
||
|
||
process = cms.Process("CONV") | ||
|
||
#process.load("DQMServices.Core.test.MessageLogger_cfi") | ||
process.load('Configuration.EventContent.EventContent_cff') | ||
process.load("DQMServices.Core.DQM_cfg") | ||
#process.DQMStore.collateHistograms = cms.untracked.bool(True) | ||
|
||
|
||
|
||
process.fileReader = cms.EDAnalyzer("DQMRootFileReader", | ||
RootFileName = cms.untracked.string | ||
('/build/cerminar/debugpcl/CMSSW_5_3_16/src/Calibration/TkAlCaRecoProducers/test/DQM_V0001_R000160819__StreamExpress__Run2011A-Express-v1__DQM.root') | ||
) | ||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(1) | ||
) | ||
|
||
|
||
runNumber = int(process.fileReader.RootFileName.value().split('/')[-1].split('_')[2].lstrip("R")) | ||
print "Run number extracted from file name:",runNumber | ||
|
||
process.source = cms.Source("EmptySource", | ||
firstRun = cms.untracked.uint32(runNumber), | ||
) | ||
|
||
|
||
|
||
|
||
process.ALCARECOStreamSiStripPCLHistos = cms.OutputModule("PoolOutputModule", | ||
outputCommands = cms.untracked.vstring('drop *', | ||
'keep *_MEtoEDMConvertSiStrip_*_*'), | ||
fileName = cms.untracked.string('SiStripPCLHistos.root'), | ||
dataset = cms.untracked.PSet( | ||
filterName = cms.untracked.string(''), | ||
dataTier = cms.untracked.string('ALCARECO') | ||
), | ||
eventAutoFlushCompressedSize = cms.untracked.int32(5242880) | ||
) | ||
|
||
process.MEtoEDMConvertSiStrip = cms.EDProducer("MEtoEDMConverter", | ||
deleteAfterCopy = cms.untracked.bool(False), | ||
Verbosity = cms.untracked.int32(0), | ||
Frequency = cms.untracked.int32(50), | ||
Name = cms.untracked.string('MEtoEDMConverter'), | ||
MEPathToSave = cms.untracked.string('AlCaReco/SiStrip') | ||
) | ||
|
||
|
||
|
||
process.path = cms.Path(process.fileReader) | ||
process.ALCARECOStreamSiStripPCLHistosOutPath = cms.EndPath(process.ALCARECOStreamSiStripPCLHistos) | ||
process.endjob_step = cms.EndPath(process.MEtoEDMConvertSiStrip) | ||
|
||
|
||
process.schedule = cms.Schedule(process.path, process.endjob_step, process.ALCARECOStreamSiStripPCLHistosOutPath) |
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
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