CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/OnlineDB/SiStripESSources/src/SiStripGainBuilderFromDb.cc

Go to the documentation of this file.
00001 // Last commit: $Id: SiStripGainBuilderFromDb.cc,v 1.1 2008/09/22 18:06:51 bainbrid Exp $
00002 // Latest tag:  $Name: V05-00-02-05 $
00003 // Location:    $Source: /cvs/CMSSW/CMSSW/OnlineDB/SiStripESSources/src/SiStripGainBuilderFromDb.cc,v $
00004 
00005 #include "OnlineDB/SiStripESSources/interface/SiStripGainBuilderFromDb.h"
00006 #include "CondFormats/SiStripObjects/interface/SiStripApvGain.h"
00007 #include "OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h"
00008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00009 #include "FWCore/ServiceRegistry/interface/Service.h"
00010 #include <vector>
00011 #include <string>
00012 
00013 using namespace std;
00014 using namespace sistrip;
00015 
00016 // -----------------------------------------------------------------------------
00018 SiStripGainBuilderFromDb::SiStripGainBuilderFromDb( const edm::ParameterSet& pset ) 
00019   : SiStripGainESSource( pset )
00020 {
00021   LogTrace(mlESSources_) 
00022     << "[SiStripGainBuilderFromDb::" << __func__ << "]"
00023     << " Constructing object...";
00024 }
00025 
00026 // -----------------------------------------------------------------------------
00028 SiStripGainBuilderFromDb::~SiStripGainBuilderFromDb() {
00029   LogTrace(mlESSources_)
00030     << "[SiStripGainBuilderFromDb::" << __func__ << "]"
00031     << " Destructing object...";
00032 }
00033 
00034 // -----------------------------------------------------------------------------
00036 SiStripApvGain* SiStripGainBuilderFromDb::makeGain() {
00037   LogTrace(mlESSources_) 
00038     << "[SiStripGainBuilderFromDb::" << __func__ << "]"
00039     << " Constructing Gain object...";
00040 
00042   edm::Service<SiStripCondObjBuilderFromDb> condObjBuilder_;
00043   
00044   // Create Gain object 
00045   SiStripApvGain* gain;
00046   condObjBuilder_->getValue(gain);
00047   return gain;
00048   
00049 }
00050