Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:49

0001 #include <memory>
0002 
0003 #include <fstream>
0004 
0005 #include "CondFormats/CSCObjects/interface/CSCChamberTimeCorrections.h"
0006 #include "CondFormats/DataRecord/interface/CSCChamberTimeCorrectionsRcd.h"
0007 #include "OnlineDB/CSCCondDB/interface/CSCChamberTimeCorrectionsValues.h"
0008 #include "OnlineDB/CSCCondDB/interface/CSCCableRead.h"
0009 
0010 CSCChamberTimeCorrectionsValues::CSCChamberTimeCorrectionsValues(const edm::ParameterSet& iConfig) {
0011   //the following line is needed to tell the framework what
0012   // data is being produced
0013   isForMC = iConfig.getUntrackedParameter<bool>("isForMC", true);
0014   ME11offsetMC = 184;
0015   ME11offsetData = 205;
0016   nonME11offsetMC = 174;
0017   nonME11offsetData = 216;
0018   setWhatProduced(this, &CSCChamberTimeCorrectionsValues::produceChamberTimeCorrections);
0019   findingRecord<CSCChamberTimeCorrectionsRcd>();
0020   //now do what ever other initialization is needed
0021 }
0022 
0023 CSCChamberTimeCorrectionsValues::~CSCChamberTimeCorrectionsValues() {
0024   // do anything here that needs to be done at desctruction time
0025   // (e.g. close files, deallocate resources etc.)
0026 }
0027 
0028 //
0029 // member functions
0030 //
0031 
0032 // ------------ method called to produce the data  ------------
0033 CSCChamberTimeCorrectionsValues::ReturnType CSCChamberTimeCorrectionsValues::produceChamberTimeCorrections(
0034     const CSCChamberTimeCorrectionsRcd& iRecord) {
0035   //need a new object so to not be deleted at exit
0036   return ReturnType(
0037       prefill(isForMC, isForMC ? ME11offsetMC : ME11offsetData, isForMC ? nonME11offsetMC : nonME11offsetData));
0038 }
0039 
0040 void CSCChamberTimeCorrectionsValues::setIntervalFor(const edm::eventsetup::EventSetupRecordKey&,
0041                                                      const edm::IOVSyncValue&,
0042                                                      edm::ValidityInterval& oValidity) {
0043   oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime());
0044 }