16 #include <boost/python.hpp>
17 #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
26 using namespace boost::python;
74 std::vector<std::string> v_classes;
83 std::vector<std::string> v_modules;
84 std::set<std::string>::const_iterator sBegin = iov.
payloadClasses().begin();
85 std::set<std::string>::const_iterator sEnd = iov.
payloadClasses().end();
86 for(std::set<std::string>::const_iterator
s = sBegin;
s != sEnd; ++
s) {
88 v_modules.push_back(cInfo->resource());
100 PyErr_SetString(PyExc_RuntimeError, e.what());
107 return boost::python::make_tuple(
125 return boost::python::make_tuple(
135 void append2VS(std::vector<std::string> &
v,
std::string s) {
141 return boost::python::make_tuple(l.first,l.second);
148 def(
"append2VS",&append2VS);
150 def(
"unpackTime",&unpackTime);
152 class_<cond::LogDBEntry>(
"LogDBEntry")
153 .
def(
"getState",getLogState)
167 class_<cond::TagMetadata>(
"TagEntry")
168 .
def(
"getState",getTagState)
176 class_<cond::GlobalTag >(
"GlobalTag", init<>())
181 class_<std::vector<std::string> >(
"VString")
182 .
def(vector_indexing_suite<std::vector<std::string> >())
185 class_<std::vector<float> >(
"VFloat")
186 .
def(vector_indexing_suite<std::vector<float> >())
189 class_<std::vector<int> >(
"VInt")
190 .
def(vector_indexing_suite<std::vector<int> >())
193 enum_<cond::TimeType>(
"timetype")
201 class_<cond::IOVElementProxy>(
"IOVElement", init<>())
202 .def(init<cond::Time_t, cond::Time_t, std::string>())
208 class_<cond::IOVRange>(
"IOVRange", init<>())
215 class_<cond::IOVProxy>(
"IOV", init<>())
226 .def(
"payloadClasses", payloadContainers)
233 class_<cond::FWIncantation>(
"FWIncantation", init<>());
235 class_<cond::CondDB>(
"CondDB", init<>())
241 .def(
"payloadModules",payloadModules)
251 class_<cond::RDBMS>(
"RDBMS", init<>())
252 .def(init<std::string>())
253 .def(init<std::string, bool>())
254 .def(init<std::string, std::string>())
262 register_exception_translator<std::exception>(exceptionTranslator);
std::string const pythonIDCategory("CondPythonID")
CondDB getDB(std::string const &db)
IOVProxy iov(std::string const &tag) const
IOVRange range(cond::Time_t since, cond::Time_t till) const
cond::LogDBEntry lastLogEntryOK(std::string const &tag) const
GlobalTag const & globalTag(std::string const &connstr, std::string const &gname, std::string const &prefix, std::string const &postfix) const
IOVProxy iovWithLib(std::string const &tag) const
const_iterator begin() const
void commitTransaction() const
void startTransaction() const
std::set< std::string > const & payloadClasses() const
const_iterator begin() const
IOVRange head(int n) const
cond::Time_t till() const
std::string destinationDB
std::string allTags() const
const_iterator end() const
cond::LogDBEntry lastLogEntry(std::string const &tag) const
IOVElementProxy front() const
IOVRange tail(int n) const
IOVElementProxy payLoad(std::string const &token) const
unsigned long long Time_t
cond::Time_t lastTill() const
std::string const & token() const
IOVRange rangeHead(cond::Time_t since, cond::Time_t till, int n) const
std::string iovToken(std::string const &tag) const
void closeSession() const
const_iterator end() const
cond::Time_t timestamp() const
IOVRange rangeTail(cond::Time_t since, cond::Time_t till, int n) const
cond::Time_t since() const
cond::Time_t firstSince() const
std::pair< unsigned int, unsigned int > UnpackedTime
BOOST_PYTHON_MODULE(pluginEcalPyUtils)
TimeType timetype() const
void startReadOnlyTransaction() const
CondDB getReadOnlyDB(std::string const &db)
const std::string & token()
tuple size
Write out results.
std::string comment() const
T get(const Candidate &c)
void setLogger(std::string const &connstr)
IOVElementProxy back() const
cond::UnpackedTime unpack(cond::Time_t iValue)