00001
00002
00003
00004
00005
00006
00007 #ifndef HcalDbOmds_h
00008 #define HcalDbOmds_h
00009
00010 #include <iostream>
00011
00012 #include "xgi/Utils.h"
00013 #include "toolbox/string.h"
00014 #include "OnlineDB/Oracle/interface/Oracle.h"
00015
00016 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00017 #include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"
00018 #include "CondFormats/HcalObjects/interface/AllObjects.h"
00019
00020
00045 namespace HcalDbOmds {
00046 bool getObject (oracle::occi::Connection * connection,
00047 const std::string & fTag,
00048 const std::string & fVersion,
00049 const int fSubversion,
00050 const int fIOVBegin,
00051 const std::string & fQuery,
00052 HcalPedestals* fObject);
00053 bool dumpObject (std::ostream& fOutput, const HcalPedestals& fObject);
00054 bool getObject (oracle::occi::Connection * connection,
00055 const std::string & fTag,
00056 const std::string & fVersion,
00057 const int fSubversion,
00058 const int fIOVBegin,
00059 const std::string & fQuery,
00060 HcalPedestalWidths* fObject);
00061 bool dumpObject (std::ostream& fOutput, const HcalPedestalWidths& fObject);
00062 bool getObject (oracle::occi::Connection * connection,
00063 const std::string & fTag,
00064 const std::string & fVersion,
00065 const int fSubversion,
00066 const int fIOVBegin,
00067 const std::string & fQuery,
00068 HcalGains* fObject);
00069 bool dumpObject (std::ostream& fOutput, const HcalGains& fObject);
00070 bool getObject (oracle::occi::Connection * connection,
00071 const std::string & fTag,
00072 const std::string & fVersion,
00073 const int fSubversion,
00074 const int fIOVBegin,
00075 const std::string & fQuery,
00076 HcalGainWidths* fObject);
00077 bool dumpObject (std::ostream& fOutput, const HcalGainWidths& fObject);
00078 bool getObject (oracle::occi::Connection * connection,
00079 const std::string & fTag,
00080 const std::string & fVersion,
00081 const int fSubversion,
00082 const int fIOVBegin,
00083 const std::string & fQuery,
00084 HcalQIEData* fObject);
00085 bool dumpObject (std::ostream& fOutput, const HcalQIEData& fObject);
00086 bool getObject (oracle::occi::Connection * connection,
00087 const std::string & fTag,
00088 const std::string & fVersion,
00089 const int fSubversion,
00090 const int fIOVBegin,
00091 const std::string & fQuery,
00092 HcalCalibrationQIEData* fObject);
00093 bool dumpObject (std::ostream& fOutput, const HcalCalibrationQIEData& fObject);
00094 bool getObject (oracle::occi::Connection * connection,
00095 const std::string & fTag,
00096 const std::string & fVersion,
00097 const int fSubversion,
00098 const int fIOVBegin,
00099 const std::string & fQuery,
00100 HcalElectronicsMap* fObject);
00101 bool dumpObject (std::ostream& fOutput, const HcalElectronicsMap& fObject);
00102 bool getObject (oracle::occi::Connection * connection,
00103 const std::string & fTag,
00104 const std::string & fVersion,
00105 const int fSubversion,
00106 const int fIOVBegin,
00107 const std::string & fQuery,
00108 HcalChannelQuality* fObject);
00109 bool dumpObject (std::ostream& fOutput, const HcalChannelQuality& fObject);
00110 bool getObject (oracle::occi::Connection * connection,
00111 const std::string & fTag,
00112 const std::string & fVersion,
00113 const int fSubversion,
00114 const int fIOVBegin,
00115 const std::string & fQuery,
00116 HcalRespCorrs* fObject);
00117 bool dumpObject (std::ostream& fOutput, const HcalRespCorrs& fObject);
00118 bool getObject (oracle::occi::Connection * connection,
00119 const std::string & fTag,
00120 const std::string & fVersion,
00121 const int fSubversion,
00122 const int fIOVBegin,
00123 const std::string & fQuery,
00124 HcalZSThresholds* fObject);
00125 bool dumpObject (std::ostream& fOutput, const HcalZSThresholds& fObject);
00126 bool getObject (oracle::occi::Connection * connection,
00127 const std::string & fTag,
00128 const std::string & fVersion,
00129 const int fSubversion,
00130 const int fIOVBegin,
00131 const std::string & fQuery,
00132 HcalL1TriggerObjects* fObject);
00133 bool dumpObject (std::ostream& fOutput, const HcalL1TriggerObjects& fObject);
00134 bool getObject (oracle::occi::Connection * connection,
00135 const std::string & fTag,
00136 const std::string & fVersion,
00137 const int fSubversion,
00138 const int fIOVBegin,
00139 const std::string & fQuery,
00140 HcalValidationCorrs* fObject);
00141 bool dumpObject (std::ostream& fOutput, const HcalValidationCorrs& fObject);
00142 bool getObject (oracle::occi::Connection * connection,
00143 const std::string & fTag,
00144 const std::string & fVersion,
00145 const int fSubversion,
00146 const int fIOVBegin,
00147 const std::string & fQuery,
00148 HcalLutMetadata* fObject);
00149 bool dumpObject (std::ostream& fOutput, const HcalLutMetadata& fObject);
00150 bool getObject (oracle::occi::Connection * connection,
00151 const std::string & fTag,
00152 const std::string & fVersion,
00153 const int fSubversion,
00154 const int fIOVBegin,
00155 const std::string & fQuery,
00156 HcalDcsValues* fObject);
00157 bool dumpObject (std::ostream& fOutput, const HcalDcsValues& fObject);
00158
00159 HcalSubdetector get_subdetector( std::string _det );
00160 HcalZDCDetId::Section get_zdc_section( std::string _section );
00161
00162
00163
00164
00165
00166
00167 DetId getId(oracle::occi::ResultSet * rs);
00168
00169
00170
00171 HcalOtherSubdetector getSubDetFromDpName(std::string _dpname);
00172 int getSideRingFromDpName(std::string _dpname);
00173 unsigned int getSliceFromDpName(std::string _dpname);
00174 unsigned int getSubChannelFromDpName(std::string _dpname);
00175 HcalDcsDetId::DcsType getDcsTypeFromDpName(std::string _dpname);
00176 HcalOtherSubdetector getSubDetFromString(std::string subdet);
00177 HcalDcsDetId::DcsType getDcsTypeFromString(std::string type);
00178
00179 template<class T>
00180 bool from_string(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&));
00181
00182 }
00183 #endif