Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 
0002 #ifndef OnlineDB_SiStripESSources_SiStripPedestalsBuilderFromDb_H
0003 #define OnlineDB_SiStripESSources_SiStripPedestalsBuilderFromDb_H
0004 
0005 #include "CalibTracker/SiStripESProducers/interface/SiStripPedestalsESSource.h"
0006 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
0007 #include "OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h"
0008 #include "FWCore/ServiceRegistry/interface/Service.h"
0009 #include "OnlineDB/SiStripConfigDb/interface/SiStripDbParams.h"
0010 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0011 #include <vector>
0012 #include <string>
0013 
0014 class SiStripPedestalsBuilderFromDb : public SiStripPedestalsESSource {
0015 public:
0016   SiStripPedestalsBuilderFromDb(const edm::ParameterSet&);
0017   ~SiStripPedestalsBuilderFromDb() override;
0018 
0019   /** Builds pedestals using info from configuration database. */
0020   SiStripPedestals* makePedestals() override;
0021 
0022 protected:
0023   /** Virtual method that is called by makePedestals() to allow
0024       pedestals to be written to the conditions database. */
0025   virtual void writePedestalsToCondDb(const SiStripPedestals&) { ; }
0026 
0027   /** Container for DB connection parameters. */
0028   SiStripDbParams dbParams_;
0029 
0030   /** Service to access onlineDB and extract pedestal/noise */
0031   edm::Service<SiStripCondObjBuilderFromDb> condObjBuilder;
0032 };
0033 
0034 #endif  // OnlineDB_SiStripESSources_SiStripPedestalsBuilderFromDb_H