CMS 3D CMS Logo

SiStripCondObjBuilderFromDb.h

Go to the documentation of this file.
00001 // Last commit: $Id: SiStripCondObjBuilderFromDb.h,v 1.3 2008/05/26 13:37:25 giordano Exp $
00002 // Latest tag:  $Name: V03-00-03 $
00003 // Location:    $Source: /cvs_server/repositories/CMSSW/CMSSW/OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h,v $
00004 
00005 #ifndef OnlineDB_SiStripESSources_SiStripCondObjBuilderFromDb_H
00006 #define OnlineDB_SiStripESSources_SiStripCondObjBuilderFromDb_H
00007 
00008 #include "FWCore/ServiceRegistry/interface/Service.h"
00009 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
00010 #include "OnlineDB/SiStripConfigDb/interface/SiStripConfigDb.h"
00011 #include "OnlineDB/SiStripConfigDb/interface/SiStripDbParams.h"
00012 #include "CondFormats/SiStripObjects/interface/SiStripBadStrip.h"
00013 
00014 #include "boost/cstdint.hpp"
00015 #include <vector>
00016 #include <string>
00017 
00018 class SiStripFecCabling;
00019 class SiStripDetCabling;
00020 class SiStripPedestals;
00021 class SiStripNoises;
00022 class SiStripQuality;
00023 class SiStripThreshold;
00024 class DcuDetIdMap;
00025 
00026 class SiStripCondObjBuilderFromDb {
00027   
00028  public:
00029 
00030   SiStripCondObjBuilderFromDb();
00031   SiStripCondObjBuilderFromDb(const edm::ParameterSet&,
00032                               const edm::ActivityRegistry&);
00033   virtual ~SiStripCondObjBuilderFromDb();
00034   
00036   inline const SiStripDbParams& dbParams() const {return db_->dbParams();} 
00037 
00040   void buildCondObj();
00041   void buildStripRelatedObjects( SiStripConfigDb* const db,
00042                                  const SiStripDetCabling& det_cabling);
00043 
00044   SiStripFedCabling*  getFedCabling() {checkUpdate(); return fed_cabling_;}
00045   SiStripPedestals *  getPedestals()  {checkUpdate(); return pedestals_;}  
00046   SiStripNoises    *  getNoises()     {checkUpdate(); return noises_;}  
00047   SiStripThreshold *  getThreshold()  {checkUpdate(); return threshold_;}  
00048   SiStripQuality   *  getQuality()    {checkUpdate(); return quality_;}  
00049 
00050   void getValue(SiStripFedCabling* & val){ val = getFedCabling();}
00051   void getValue(SiStripPedestals * & val){ val = getPedestals(); }  
00052   void getValue(SiStripNoises    * & val){ val = getNoises();    }  
00053   void getValue(SiStripThreshold * & val){ val = getThreshold(); }  
00054   void getValue(SiStripQuality   * & val){ val = getQuality();   }  
00055   void getValue(SiStripBadStrip  * & val){ val = new SiStripBadStrip(* (const SiStripBadStrip*) getQuality());   }  
00056   
00057 
00058  protected:
00059   
00060   void checkUpdate();
00061   
00063   // Build and retrieve SiStripConfigDb object using service
00064   edm::Service<SiStripConfigDb> db_;
00065   
00067   SiStripDbParams dbParams_;
00068 
00069   SiStripFedCabling  *fed_cabling_;
00070   SiStripPedestals   *pedestals_;  
00071   SiStripNoises      *noises_;  
00072   SiStripThreshold   *threshold_;  
00073   SiStripQuality     *quality_;  
00074   
00075 };
00076 
00077 #endif // OnlineDB_SiStripESSources_SiStripCondObjBuilderFromDb_H
00078 

Generated on Tue Jun 9 17:40:53 2009 for CMSSW by  doxygen 1.5.4