00001
00002
00003
00004 #ifndef HcalDbPoolOCCI_h
00005 #define HcalDbPoolOCCI_h
00006
00007 #include <memory>
00008
00009 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00010 #include "CondFormats/HcalObjects/interface/HcalPedestals.h"
00011 #include "CondFormats/HcalObjects/interface/HcalPedestalWidths.h"
00012 #include "CondFormats/HcalObjects/interface/HcalGains.h"
00013 #include "CondFormats/HcalObjects/interface/HcalGainWidths.h"
00014 #include "CondFormats/HcalObjects/interface/HcalQIECoder.h"
00015 #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
00016
00025 namespace oracle {
00026 namespace occi {
00027 class Environment;
00028 class Connection;
00029 class Statement;
00030 }
00031 }
00032
00033 class HcalDbPoolOCCI {
00034 public:
00035 HcalDbPoolOCCI (const std::string& fDb);
00036 ~HcalDbPoolOCCI ();
00037
00038 bool getObject (HcalPedestals* fObject, const std::string& fTag, unsigned long fRun);
00039 bool getObject (HcalGains* fObject, const std::string& fTag, unsigned long fRun);
00040 bool getObject (HcalElectronicsMap* fObject, const std::string& fTag, unsigned long fRun);
00041 private:
00042 oracle::occi::Environment* mEnvironment;
00043 oracle::occi::Connection* mConnect;
00044 oracle::occi::Statement* mStatement;
00045 std::string getMetadataToken (const std::string& fTag);
00046 std::string getDataToken (const std::string& fIov, unsigned long fRun);
00047 template <class T, class S> bool getObjectGeneric (T* fObject, S* fCondObject, const std::string& fTag, unsigned long fRun);
00048
00049 };
00050 #endif