Go to the documentation of this file.00001
00002
00003
00004 #ifndef HcalDbOnline_h
00005 #define HcalDbOnline_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/HcalQIEData.h"
00015 #include "CondFormats/HcalObjects/interface/HcalCalibrationQIEData.h"
00016 #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
00017
00026 namespace oracle {
00027 namespace occi {
00028 class Environment;
00029 class Connection;
00030 class Statement;
00031 }
00032 }
00033
00034 class HcalDbOnline {
00035 public:
00036 typedef unsigned long long IOVTime;
00037 typedef std::pair <IOVTime, IOVTime> IntervalOV;
00038
00039 HcalDbOnline (const std::string& fDb, bool fVerbose = false);
00040 ~HcalDbOnline ();
00041
00042 bool getObject (HcalPedestals* fObject, HcalPedestalWidths* fWidths, const std::string& fTag, IOVTime fTime);
00043 bool getObject (HcalPedestals* fObject, const std::string& fTag, IOVTime fTime);
00044 bool getObject (HcalGains* fObject, HcalGainWidths* fWidths, const std::string& fTag, IOVTime fTime);
00045 bool getObject (HcalGains* fObject, const std::string& fTag, IOVTime fTime);
00046 bool getObject (HcalPedestalWidths* fObject, const std::string& fTag, IOVTime fTime);
00047 bool getObject (HcalGainWidths* fObject, const std::string& fTag, IOVTime fTime);
00048 bool getObject (HcalElectronicsMap* fObject, const std::string& fTag, IOVTime fTime);
00049 bool getObject (HcalQIEData* fObject, const std::string& fTag, IOVTime fTime);
00050 bool getObject (HcalCalibrationQIEData* fObject, const std::string& fTag, IOVTime fTime);
00051
00052 std::vector<std::string> metadataAllTags ();
00053 std::vector<IntervalOV> getIOVs (const std::string& fTag);
00054
00055
00056 private:
00057 oracle::occi::Environment* mEnvironment;
00058 oracle::occi::Connection* mConnect;
00059 oracle::occi::Statement* mStatement;
00060 template <class T> bool getObjectGeneric (T* fObject, const std::string& fTag);
00061 bool mVerbose;
00062 };
00063 #endif