![]() |
![]() |
00001 #include <memory> 00002 #include "boost/shared_ptr.hpp" 00003 #include <fstream> 00004 00005 #include "CondFormats/CSCObjects/interface/CSCChamberTimeCorrections.h" 00006 #include "CondFormats/DataRecord/interface/CSCChamberTimeCorrectionsRcd.h" 00007 #include "OnlineDB/CSCCondDB/interface/CSCChamberTimeCorrectionsValues.h" 00008 #include "OnlineDB/CSCCondDB/interface/CSCCableRead.h" 00009 00010 CSCChamberTimeCorrectionsValues::CSCChamberTimeCorrectionsValues(const edm::ParameterSet& iConfig) 00011 { 00012 //the following line is needed to tell the framework what 00013 // data is being produced 00014 isForMC = iConfig.getUntrackedParameter<bool>("isForMC",true); 00015 ME11offsetMC = 184; 00016 ME11offsetData = 205; 00017 nonME11offsetMC = 174; 00018 nonME11offsetData = 216; 00019 chamberObj = prefill(isForMC, isForMC ? ME11offsetMC : ME11offsetData, isForMC ? nonME11offsetMC : nonME11offsetData); 00020 setWhatProduced(this,&CSCChamberTimeCorrectionsValues::produceChamberTimeCorrections); 00021 findingRecord<CSCChamberTimeCorrectionsRcd>(); 00022 //now do what ever other initialization is needed 00023 } 00024 00025 00026 CSCChamberTimeCorrectionsValues::~CSCChamberTimeCorrectionsValues() 00027 { 00028 00029 // do anything here that needs to be done at desctruction time 00030 // (e.g. close files, deallocate resources etc.) 00031 delete chamberObj; 00032 } 00033 00034 00035 // 00036 // member functions 00037 // 00038 00039 // ------------ method called to produce the data ------------ 00040 CSCChamberTimeCorrectionsValues::ReturnType 00041 CSCChamberTimeCorrectionsValues::produceChamberTimeCorrections(const CSCChamberTimeCorrectionsRcd& iRecord) 00042 { 00043 //need a new object so to not be deleted at exit 00044 CSCChamberTimeCorrections* mydata=new CSCChamberTimeCorrections( *chamberObj ); 00045 return mydata; 00046 00047 } 00048 00049 void CSCChamberTimeCorrectionsValues::setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, 00050 edm::ValidityInterval & oValidity) 00051 { 00052 oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime()); 00053 00054 }