Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:18

0001 
0002 #include "OnlineDB/SiStripESSources/interface/SiStripGainBuilderFromDb.h"
0003 #include "CondFormats/SiStripObjects/interface/SiStripApvGain.h"
0004 #include "OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h"
0005 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0006 #include "FWCore/ServiceRegistry/interface/Service.h"
0007 #include <vector>
0008 #include <string>
0009 
0010 using namespace std;
0011 using namespace sistrip;
0012 
0013 // -----------------------------------------------------------------------------
0014 /** */
0015 SiStripGainBuilderFromDb::SiStripGainBuilderFromDb(const edm::ParameterSet& pset) : SiStripGainESSource(pset) {
0016   LogTrace(mlESSources_) << "[SiStripGainBuilderFromDb::" << __func__ << "]"
0017                          << " Constructing object...";
0018 }
0019 
0020 // -----------------------------------------------------------------------------
0021 /** */
0022 SiStripGainBuilderFromDb::~SiStripGainBuilderFromDb() {
0023   LogTrace(mlESSources_) << "[SiStripGainBuilderFromDb::" << __func__ << "]"
0024                          << " Destructing object...";
0025 }
0026 
0027 // -----------------------------------------------------------------------------
0028 /** */
0029 SiStripApvGain* SiStripGainBuilderFromDb::makeGain() {
0030   LogTrace(mlESSources_) << "[SiStripGainBuilderFromDb::" << __func__ << "]"
0031                          << " Constructing Gain object...";
0032 
0033   /** Service to access onlineDB and extract pedestal/gain */
0034   edm::Service<SiStripCondObjBuilderFromDb> condObjBuilder_;
0035 
0036   // Create Gain object
0037   SiStripApvGain* gain;
0038   condObjBuilder_->getValue(gain);
0039   return gain;
0040 }