-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for new PF threshold DB object
- Loading branch information
Showing
21 changed files
with
547 additions
and
65 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
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 @@ | ||
#ifndef CondFormats_DataRecord_EcalPFRecHitThresholdsRcd_h | ||
#define CondFormats_DataRecord_EcalPFRecHitThresholdsRcd_h | ||
|
||
#include "FWCore/Framework/interface/EventSetupRecordImplementation.h" | ||
class EcalPFRecHitThresholdsRcd : public edm::eventsetup::EventSetupRecordImplementation<EcalPFRecHitThresholdsRcd> {}; | ||
#endif |
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,4 @@ | ||
#include "CondFormats/DataRecord/interface/EcalPFRecHitThresholdsRcd.h" | ||
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" | ||
|
||
EVENTSETUP_RECORD_REG(EcalPFRecHitThresholdsRcd); |
15 changes: 15 additions & 0 deletions
15
CondFormats/EcalObjects/interface/EcalPFRecHitThresholds.h
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,15 @@ | ||
#ifndef CondFormats_EcalObjects_EcalPFRecHitThresholds_H | ||
#define CondFormats_EcalObjects_EcalPFRecHitThresholds_H | ||
/** | ||
* Author: Shahram Rahatlou, University of Rome & INFN | ||
* Created: 22 Feb 2006 | ||
* $Id: EcalPFRecHitThresholds.h,v 1.3 2007/09/27 09:42:55 ferriff Exp $ | ||
**/ | ||
#include "CondFormats/EcalObjects/interface/EcalCondObjectContainer.h" | ||
|
||
typedef float EcalPFRecHitThreshold; | ||
typedef EcalFloatCondObjectContainer EcalPFRecHitThresholdsMap; | ||
typedef EcalPFRecHitThresholdsMap EcalPFRecHitThresholds; | ||
|
||
|
||
#endif |
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
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,32 @@ | ||
#ifndef ECALPFRECHITTHRESHOLDSMAKER_H | ||
#define ECALPFRECHITTHRESHOLDSMAKER_H | ||
|
||
#include "FWCore/Framework/interface/EDAnalyzer.h" | ||
#include "CondCore/CondDB/interface/Exception.h" | ||
|
||
#include "FWCore/Framework/interface/IOVSyncValue.h" | ||
|
||
#include <string> | ||
#include <map> | ||
|
||
namespace edm { | ||
class ParameterSet; | ||
class Event; | ||
class EventSetup; | ||
} | ||
|
||
class EcalPFRecHitThresholdsMaker : public edm::EDAnalyzer { | ||
public: | ||
explicit EcalPFRecHitThresholdsMaker(const edm::ParameterSet& iConfig ); | ||
~EcalPFRecHitThresholdsMaker() override; | ||
|
||
void analyze( const edm::Event& evt, const edm::EventSetup& evtSetup) override; | ||
|
||
private: | ||
|
||
std::string m_timetype; | ||
double m_nsigma; | ||
|
||
}; | ||
|
||
#endif |
17 changes: 17 additions & 0 deletions
17
CondTools/Ecal/interface/EcalPFRecHitThresholdsXMLTranslator.h
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 @@ | ||
/** | ||
Translates a EcalPFRecHitThresholds record to XML | ||
and vice versa | ||
\author Stefano ARGIRO | ||
\version $Id: EcalPFRecHitThresholdsXMLTranslator.h,v 1.2 2009/06/30 14:40:11 argiro Exp $ | ||
\date 20 Jun 2008 | ||
*/ | ||
|
||
#ifndef __EcalPFRecHitThresholdsXMLTranslator_h_ | ||
#define __EcalPFRecHitThresholdsXMLTranslator_h_ | ||
|
||
#include "CondTools/Ecal/interface/EcalFloatCondObjectContainerXMLTranslator.h" | ||
|
||
typedef EcalFloatCondObjectContainerXMLTranslator EcalPFRecHitThresholdsXMLTranslator; | ||
|
||
#endif // __EcalPFRecHitThresholdsXMLTranslator_h_ |
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
51 changes: 51 additions & 0 deletions
51
CondTools/Ecal/python/copyEcalPFRecHitThresholdsFromFile_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,51 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("TEST") | ||
process.load("CalibCalorimetry.EcalTrivialCondModules.EcalTrivialCondRetriever_cfi") | ||
process.EcalTrivialConditionRetriever.producedEcalPFRecHitThresholds = cms.untracked.bool(True) | ||
process.EcalTrivialConditionRetriever.EcalPFRecHitThresholdsEB = cms.untracked.double( 0.0) | ||
process.EcalTrivialConditionRetriever.EcalPFRecHitThresholdsEE = cms.untracked.double( 0.0) | ||
process.EcalTrivialConditionRetriever.PFRecHitFile = cms.untracked.string("EB_thresholds_-1.txt") | ||
process.EcalTrivialConditionRetriever.PFRecHitFileEE = cms.untracked.string("EE_thresholds_-1.txt") | ||
|
||
|
||
process.load("CondCore.CondDB.CondDB_cfi") | ||
#process.CondDBCommon.connect = 'oracle://cms_orcon_prod/CMS_COND_31X_ECAL' | ||
#process.CondDBCommon.DBParameters.authenticationPath = '/nfshome0/popcondev/conddb' | ||
process.CondDB.connect = 'sqlite_file:DB.db' | ||
|
||
process.MessageLogger = cms.Service("MessageLogger", | ||
debugModules = cms.untracked.vstring('*'), | ||
destinations = cms.untracked.vstring('cout') | ||
) | ||
|
||
process.source = cms.Source("EmptyIOVSource", | ||
firstValue = cms.uint64(1), | ||
lastValue = cms.uint64(1), | ||
timetype = cms.string('runnumber'), | ||
interval = cms.uint64(1) | ||
) | ||
|
||
process.PoolDBOutputService = cms.Service("PoolDBOutputService", | ||
process.CondDB, | ||
toPut = cms.VPSet( | ||
cms.PSet( | ||
record = cms.string('EcalPFRecHitThresholdsRcd'), | ||
tag = cms.string('EcalPFRecHitThresholds_2018_def_mc') | ||
) | ||
) | ||
) | ||
|
||
process.dbCopy = cms.EDAnalyzer("EcalDBCopy", | ||
timetype = cms.string('runnumber'), | ||
toCopy = cms.VPSet( | ||
cms.PSet( | ||
record = cms.string('EcalPFRecHitThresholdsRcd'), | ||
container = cms.string('EcalPFRecHitThresholds') | ||
) | ||
) | ||
) | ||
|
||
process.prod = cms.EDAnalyzer("EcalTrivialObjectAnalyzer") | ||
|
||
process.p = cms.Path(process.prod*process.dbCopy) |
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,49 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("TEST") | ||
process.load("CalibCalorimetry.EcalTrivialCondModules.EcalTrivialCondRetriever_cfi") | ||
process.EcalTrivialConditionRetriever.producedEcalPFRecHitThresholds = cms.untracked.bool(True) | ||
process.EcalTrivialConditionRetriever.EcalPFRecHitThresholdsEB = cms.untracked.double( 0.0) | ||
process.EcalTrivialConditionRetriever.EcalPFRecHitThresholdsEE = cms.untracked.double( 0.0) | ||
|
||
|
||
process.load("CondCore.CondDB.CondDB_cfi") | ||
#process.CondDBCommon.connect = 'oracle://cms_orcon_prod/CMS_COND_31X_ECAL' | ||
#process.CondDBCommon.DBParameters.authenticationPath = '/nfshome0/popcondev/conddb' | ||
process.CondDB.connect = 'sqlite_file:DB.db' | ||
|
||
process.MessageLogger = cms.Service("MessageLogger", | ||
debugModules = cms.untracked.vstring('*'), | ||
destinations = cms.untracked.vstring('cout') | ||
) | ||
|
||
process.source = cms.Source("EmptyIOVSource", | ||
firstValue = cms.uint64(1), | ||
lastValue = cms.uint64(1), | ||
timetype = cms.string('runnumber'), | ||
interval = cms.uint64(1) | ||
) | ||
|
||
process.PoolDBOutputService = cms.Service("PoolDBOutputService", | ||
process.CondDB, | ||
toPut = cms.VPSet( | ||
cms.PSet( | ||
record = cms.string('EcalPFRecHitThresholdsRcd'), | ||
tag = cms.string('EcalPFRecHitThresholds_2018_mc') | ||
) | ||
) | ||
) | ||
|
||
process.dbCopy = cms.EDAnalyzer("EcalDBCopy", | ||
timetype = cms.string('runnumber'), | ||
toCopy = cms.VPSet( | ||
cms.PSet( | ||
record = cms.string('EcalPFRecHitThresholdsRcd'), | ||
container = cms.string('EcalPFRecHitThresholds') | ||
) | ||
) | ||
) | ||
|
||
process.prod = cms.EDAnalyzer("EcalTrivialObjectAnalyzer") | ||
|
||
process.p = cms.Path(process.prod*process.dbCopy) |
Oops, something went wrong.