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 class EcalTPGDBApp : public EcalCondDBInterface { 00015 public: 00016 00017 EcalTPGDBApp(string host, string sid, string user, string pass, int port) ; 00018 EcalTPGDBApp(string sid, string user, string pass) ; 00019 00020 inline std::string to_string( char value[]) 00021 { 00022 std::ostringstream streamOut; 00023 streamOut << value; 00024 return streamOut.str(); 00025 } 00026 00027 int writeToConfDB_TPGPedestals(const map<EcalLogicID, FEConfigPedDat> & pedset, int iovId, string tag) ; 00028 int writeToConfDB_TPGLinearCoef(const map<EcalLogicID, FEConfigLinDat> & linset, 00029 const map<EcalLogicID, FEConfigParamDat> & linparamset, int iovId, string tag) ; 00030 int writeToConfDB_TPGLUT(const map<EcalLogicID, FEConfigLUTGroupDat> & lutgroup, const map<EcalLogicID, FEConfigLUTDat> & lutdat, 00031 int iovId, string tag) ; 00032 int writeToConfDB_TPGWeight(const map<EcalLogicID, FEConfigWeightGroupDat> & lutgroup, const map<EcalLogicID, FEConfigWeightDat> & lutdat, 00033 int iovId, string tag) ; 00034 int writeToConfDB_TPGFgr(const map<EcalLogicID, FEConfigFgrGroupDat> & lutgroup, const map<EcalLogicID, FEConfigFgrDat> & lutdat, 00035 int iovId, string tag) ; 00036 int writeToConfDB_TPGSliding(const map<EcalLogicID, FEConfigSlidingDat> & sliset, int iovId, string tag) ; 00037 00038 void readFromConfDB_TPGPedestals(int iconf_req) ; 00039 int readFromCondDB_Pedestals(map<EcalLogicID, MonPedestalsDat> & pedset, int runNb) ; 00040 00041 00042 private: 00043 00044 uint64_t startmicros; 00045 uint64_t endmicros; 00046 run_t startrun; 00047 run_t endrun; 00048 00049 void printTag( const RunTag* tag) const ; 00050 void printIOV( const RunIOV* iov) const ; 00051 00052 }; 00053 00054 #endif 00055