CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCChipSpeedCorrectionDBConditions.cc
Go to the documentation of this file.
1 #include <memory>
2 #include "boost/shared_ptr.hpp"
3 #include <fstream>
4 
8 
9 
11 {
12  //the following line is needed to tell the framework what
13  // data is being produced
14  isForMC = iConfig.getUntrackedParameter<bool>("isForMC",true);
15  dataCorrFileName= iConfig.getUntrackedParameter<std::string>("dataCorrFileName","empty.txt");
16  dataOffset=170.;
17  cndbChipCorr = prefillDBChipSpeedCorrection(isForMC,dataCorrFileName,dataOffset);
18  // added by Zhen (changed since 1_2_0)
20  findingRecord<CSCDBChipSpeedCorrectionRcd>();
21  //now do what ever other initialization is needed
22 
23 }
24 
25 
27 {
28 
29  // do anything here that needs to be done at desctruction time
30  // (e.g. close files, deallocate resources etc.)
31  delete cndbChipCorr;
32 }
33 
34 
35 //
36 // member functions
37 //
38 
39 // ------------ method called to produce the data ------------
42 {
43  //need a new object so to not be deleted at exit
45  return mydata;
46 
47 }
48 
50  edm::ValidityInterval & oValidity)
51 {
53 
54 }
T getUntrackedParameter(std::string const &, T const &) const
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
ReturnType produceDBChipSpeedCorrection(const CSCDBChipSpeedCorrectionRcd &)
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
static const IOVSyncValue & beginOfTime()
static CSCDBChipSpeedCorrection * prefillDBChipSpeedCorrection(bool isForMC, std::string dataCorrFileName, float dataOffse)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)