File indexing completed on 2024-04-06 11:58:21
0001 #include <fstream>
0002 #include <memory>
0003
0004 #include "CalibMuon/CSCCalibration/interface/CSCGasGainCorrectionDBConditions.h"
0005 #include "CondFormats/CSCObjects/interface/CSCDBGasGainCorrection.h"
0006 #include "CondFormats/DataRecord/interface/CSCDBGasGainCorrectionRcd.h"
0007
0008 CSCGasGainCorrectionDBConditions::CSCGasGainCorrectionDBConditions(const edm::ParameterSet &iConfig) {
0009
0010
0011 isForMC = iConfig.getUntrackedParameter<bool>("isForMC", true);
0012 dataCorrFileName = iConfig.getUntrackedParameter<std::string>("dataCorrFileName", "empty.txt");
0013
0014 setWhatProduced(this, &CSCGasGainCorrectionDBConditions::produceDBGasGainCorrection);
0015 findingRecord<CSCDBGasGainCorrectionRcd>();
0016
0017 }
0018
0019 CSCGasGainCorrectionDBConditions::~CSCGasGainCorrectionDBConditions() {
0020
0021
0022 }
0023
0024
0025
0026
0027
0028
0029 CSCGasGainCorrectionDBConditions::ReturnType CSCGasGainCorrectionDBConditions::produceDBGasGainCorrection(
0030 const CSCDBGasGainCorrectionRcd &iRecord) {
0031
0032 return CSCGasGainCorrectionDBConditions::ReturnType(prefillDBGasGainCorrection(isForMC, dataCorrFileName));
0033 }
0034
0035 void CSCGasGainCorrectionDBConditions::setIntervalFor(const edm::eventsetup::EventSetupRecordKey &,
0036 const edm::IOVSyncValue &,
0037 edm::ValidityInterval &oValidity) {
0038 oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime());
0039 }