CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBApp.h

Go to the documentation of this file.
00001 #ifndef ECALTPGDBAPP_H
00002 #define ECALTPGDBAPP_H
00003 
00004 #include <iostream>
00005 #include <string>
00006 #include <sstream>
00007 
00008 #include "OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h"
00009 #include "OnlineDB/EcalCondDB/interface/RunDat.h"
00010 #include "OnlineDB/EcalCondDB/interface/RunList.h"
00011 #include "OnlineDB/EcalCondDB/interface/all_monitoring_types.h"
00012 #include "OnlineDB/EcalCondDB/interface/all_fe_config_types.h"
00013 
00014 //#include "OnlineDB/EcalCondDB/interface/FEConfigSpikeDat.h"
00015 
00016 class EcalTPGDBApp : public EcalCondDBInterface {
00017  public:
00018   
00019   EcalTPGDBApp(std::string host, std::string sid, std::string user, std::string pass, int port) ;
00020   EcalTPGDBApp(std::string sid, std::string user, std::string pass) ;
00021   
00022   inline std::string to_string( char value[])
00023     {
00024       std::ostringstream streamOut;
00025       streamOut << value;
00026       return streamOut.str();    
00027     }
00028   
00029   int  writeToConfDB_TPGPedestals(const  std::map<EcalLogicID, FEConfigPedDat> & pedset, int iovId, std::string tag) ;
00030   int  writeToConfDB_TPGLinearCoef(const  std::map<EcalLogicID, FEConfigLinDat> & linset, 
00031                                    const  std::map<EcalLogicID, FEConfigLinParamDat> & linparamset, int iovId, std::string tag) ; 
00032   int  writeToConfDB_TPGLUT(const  std::map<EcalLogicID, FEConfigLUTGroupDat> & lutgroup, const  std::map<EcalLogicID, FEConfigLUTDat> & lutdat, 
00033                              const  std::map<EcalLogicID, FEConfigLUTParamDat> & lutparamset, int iovId, std::string tag) ;
00034   int  writeToConfDB_TPGWeight(const  std::map<EcalLogicID, FEConfigWeightGroupDat> & lutgroup, const  std::map<EcalLogicID, FEConfigWeightDat> & lutdat, 
00035                             int iovId, std::string tag) ;
00036   int  writeToConfDB_TPGFgr(const  std::map<EcalLogicID, FEConfigFgrGroupDat> & lutgroup, const  std::map<EcalLogicID, FEConfigFgrDat> & lutdat, 
00037                             const  std::map<EcalLogicID, FEConfigFgrParamDat> & fgrparamset,
00038                             const  std::map<EcalLogicID, FEConfigFgrEETowerDat> & dataset3,  
00039                             const  std::map<EcalLogicID, FEConfigFgrEEStripDat> & dataset4,
00040                             int iovId, std::string tag) ;
00041   int  writeToConfDB_Spike(const  std::map<EcalLogicID, FEConfigSpikeDat> & spikegroupset, std::string tag);
00042   int  writeToConfDB_Delay(const  std::map<EcalLogicID, FEConfigTimingDat> & delaygroupset, std::string tag); // modif here 31/1/2011
00043 
00044   int writeToConfDB_TPGSliding(const  std::map<EcalLogicID, FEConfigSlidingDat> & sliset, int iovId, std::string tag) ;
00045   
00046   void readFromConfDB_TPGPedestals(int iconf_req) ;
00047   int readFromCondDB_Pedestals(std::map<EcalLogicID, MonPedestalsDat> & pedset, int runNb) ;
00048   int writeToConfDB_TPGMain(int ped, int lin, int lut, int fgr, int sli, int wei, int spi, int tim, int bxt, int btt, int bst, std::string tag, int ver) ;
00049 
00050   
00051  private:
00052   
00053   uint64_t startmicros;
00054   uint64_t endmicros;
00055   run_t startrun;
00056   run_t endrun;
00057   
00058   void printTag( const RunTag* tag) const ;
00059   void printIOV( const RunIOV* iov) const ;
00060   
00061 };
00062 
00063 #endif
00064