#include "CondCore/DBCommon/interface/Exception.h"
#include "CondCore/Utilities/interface/CondPyInterface.h"
#include "CondCore/IOVService/interface/IOVProxy.h"
#include "CondCore/DBCommon/interface/LogDBEntry.h"
#include "CondFormats/Common/interface/TimeConversions.h"
#include "CondCore/DBCommon/interface/ClassID.h"
#include "FWCore/PluginManager/interface/PluginManager.h"
#include "FWCore/PluginManager/interface/standard.h"
#include "CondCore/TagCollection/interface/TagCollectionRetriever.h"
#include <boost/python.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include "CondCore/Utilities/interface/PayLoadInspector.h"
#include <set>
#include <vector>
#include <string>
#include <iostream>
Go to the source code of this file.
Functions | |
BOOST_PYTHON_MODULE (pluginCondDBPyInterface) |
BOOST_PYTHON_MODULE | ( | pluginCondDBPyInterface | ) |
Definition at line 146 of file CondPyWrappers.cc.
References cond::CondDB::allTags(), cond::IOVRange::back(), begin, cond::IOVProxy::begin(), cond::IOVRange::begin(), cond::CondDB::closeSession(), cond::IOVProxy::comment(), cond::CondDB::commitTransaction(), def, cond::LogDBEntry::destinationDB, cond::IOVRange::end(), end, cond::IOVProxy::end(), cond::LogDBEntry::execmessage, cond::LogDBEntry::exectime, cond::IOVProxy::firstSince(), cond::IOVRange::front(), cond::RDBMS::getDB(), cond::RDBMS::getReadOnlyDB(), cond::RDBMS::globalTag(), cond::hash, cond::IOVProxy::head(), cond::CondDB::iov(), cond::LogDBEntry::iovtag, cond::LogDBEntry::iovtimetype, cond::CondDB::iovToken(), cond::CondDB::iovWithLib(), cond::TagMetadata::labelname, cond::CondDB::lastLogEntry(), cond::CondDB::lastLogEntryOK(), cond::IOVProxy::lastTill(), cond::LogDBEntry::logId, cond::lumiid, cond::TagMetadata::objectname, cond::CondDB::payLoad(), cond::LogDBEntry::payloadClass, cond::LogDBEntry::payloadIdx, cond::LogDBEntry::payloadToken, cond::TagMetadata::pfn, cond::LogDBEntry::provenance, cond::IOVProxy::range(), cond::IOVProxy::rangeHead(), cond::IOVProxy::rangeTail(), cond::TagMetadata::recordname, cond::IOVProxy::revision(), cond::runnumber, cond::RDBMS::setLogger(), cond::IOVElementProxy::since(), findQualityFiles::size, cond::IOVRange::size(), cond::IOVProxy::size(), cond::CondDB::startReadOnlyTransaction(), cond::CondDB::startTransaction(), cond::TagMetadata::tag, cond::IOVProxy::tail(), cond::IOVElementProxy::till(), cond::timestamp, cond::IOVProxy::timestamp(), cond::IOVProxy::timetype(), cond::IOVElementProxy::token(), cond::IOVProxy::token(), cond::userid, cond::LogDBEntry::usertext, and relativeConstraints::value.
{ def("append2VS",&append2VS); def("unpackTime",&unpackTime); class_<cond::LogDBEntry>("LogDBEntry") .def("getState",getLogState) .def_readonly("logId", &cond::LogDBEntry::logId) .def_readonly("destinationDB", &cond::LogDBEntry::destinationDB) .def_readonly("provenance", &cond::LogDBEntry::provenance) .def_readonly("usertext", &cond::LogDBEntry::usertext) .def_readonly("iovtag", &cond::LogDBEntry::iovtag) .def_readonly("iovtimetype", &cond::LogDBEntry::iovtimetype) .def_readonly("payloadIdx", &cond::LogDBEntry::payloadIdx) .def_readonly("payloadClass", &cond::LogDBEntry::payloadClass) .def_readonly("payloadToken", &cond::LogDBEntry::payloadToken) .def_readonly("exectime", &cond::LogDBEntry::exectime) .def_readonly("execmessage", &cond::LogDBEntry::execmessage) ; class_<cond::TagMetadata>("TagEntry") .def("getState",getTagState) .def_readonly("tag", &cond::TagMetadata::tag) .def_readonly("pfn", &cond::TagMetadata::pfn) .def_readonly("record", &cond::TagMetadata::recordname) .def_readonly("label", &cond::TagMetadata::labelname) .def_readonly("object", &cond::TagMetadata::objectname) ; class_<cond::GlobalTag >("GlobalTag", init<>()) .def("size", &cond::GlobalTag::size) .add_property("elements", boost::python::range( &cond::GlobalTag::begin, &cond::GlobalTag::end)) ; class_<std::vector<std::string> >("VString") .def(vector_indexing_suite<std::vector<std::string> >()) ; class_<std::vector<float> >("VFloat") .def(vector_indexing_suite<std::vector<float> >()) ; class_<std::vector<int> >("VInt") .def(vector_indexing_suite<std::vector<int> >()) ; enum_<cond::TimeType>("timetype") .value("runnumber",cond::runnumber) .value("timestamp",cond::timestamp) .value("lumiid",cond::lumiid) .value("hash",cond::hash) .value("userid",cond::userid) ; class_<cond::IOVElementProxy>("IOVElement", init<>()) .def(init<cond::Time_t, cond::Time_t, std::string>()) .def("since", &cond::IOVElementProxy::since) .def("till", &cond::IOVElementProxy::till) .def("payloadToken", &cond::IOVElementProxy::token, return_value_policy<copy_const_reference>()) ; class_<cond::IOVRange>("IOVRange", init<>()) .def("front", &cond::IOVRange::front) .def("back", &cond::IOVRange::back) .def("size", &cond::IOVRange::size) .add_property("elements", boost::python::range(&cond::IOVRange::begin, &cond::IOVRange::end)) ; class_<cond::IOVProxy>("IOV", init<>()) .def("token", &cond::IOVProxy::token, return_value_policy<copy_const_reference>()) .def("head", &cond::IOVProxy::head) .def("tail", &cond::IOVProxy::tail) .def("range", &cond::IOVProxy::range) .def("rangeHead", &cond::IOVProxy::rangeHead) .def("rangeTail", &cond::IOVProxy::rangeTail) .def("size", &cond::IOVProxy::size) .def("timetype", &cond::IOVProxy::timetype) .def("firstSince", &cond::IOVProxy::firstSince) .def("lastTill", &cond::IOVProxy::lastTill) .def("payloadClasses", payloadContainers) .def("comment", &cond::IOVProxy::comment) .def("revision",&cond::IOVProxy::revision) .def("timestamp",&cond::IOVProxy::timestamp) .add_property("elements", boost::python::range(&cond::IOVProxy::begin, &cond::IOVProxy::end)) ; class_<cond::FWIncantation>("FWIncantation", init<>()); class_<cond::CondDB>("CondDB", init<>()) .def("allTags", &cond::CondDB::allTags) .def("iov", &cond::CondDB::iov) .def("iovToken", &cond::CondDB::iovToken) .def("iovWithLib", &cond::CondDB::iovWithLib) .def("payLoad", &cond::CondDB::payLoad) .def("payloadModules",payloadModules) .def("lastLogEntry", &cond::CondDB::lastLogEntry) .def("lastLogEntryOK", &cond::CondDB::lastLogEntryOK) .def("startTransaction", &cond::CondDB::startTransaction) .def("startReadOnlyTransaction", &cond::CondDB::startReadOnlyTransaction) .def("commitTransaction", &cond::CondDB::commitTransaction) .def("closeSession", &cond::CondDB::closeSession) ; class_<cond::RDBMS>("RDBMS", init<>()) .def(init<std::string>()) .def(init<std::string, bool>()) .def(init<std::string, std::string>()) .def("setLogger",&cond::RDBMS::setLogger) .def("getDB", &cond::RDBMS::getDB) .def("getReadOnlyDB", &cond::RDBMS::getReadOnlyDB) .def("globalTag", &cond::RDBMS::globalTag, return_value_policy<copy_const_reference>()) ; // register_exception_translator<edm::Exception>(exceptionTranslator); register_exception_translator<std::exception>(exceptionTranslator); }