56 connection.configure();
58 m_session = connection.createSession( connectionString,
true );
60 typedef std::vector< edm::ParameterSet >
Parameters;
61 Parameters
toPut=iConfig.getParameter<Parameters>(
"toPut");
62 for(Parameters::iterator itToPut = toPut.begin(); itToPut != toPut.end(); ++itToPut)
106 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
108 scope.
start(
false );
165 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
192 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
196 if(!myrecord.m_isNewTag) {
197 cond::throwException( myrecord.m_tag +
" is not a new tag",
"PoolDBOutputService::createNewIOV");
205 editor.
insert( firstSinceTime, firstPayloadId );
208 myrecord.m_isNewTag=
false;
211 "PoolDBOutputService::createNewIOV");
222 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
225 if(!myrecord.m_isNewTag) {
226 cond::throwException( myrecord.m_tag +
" is not a new tag",
"PoolDBOutputService::createNewIOV");
235 editor.
insert( firstSinceTime, firstPayloadId );
238 myrecord.m_isNewTag=
false;
241 "PoolDBOutputService::createNewIOV");
251 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
254 if( myrecord.m_isNewTag ) {
256 "PoolDBOutputService::appendSinceTime");
262 editor.
insert( time, payloadId );
268 "PoolDBOutputService::appendSinceTime");
275 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
278 std::map<std::string,Record>::iterator it=
m_callbacks.find(recordName);
280 cond::throwException(
"The record \""+recordName +
"\" has not been registered.",
"PoolDBOutputService::lookUpRecord");
283 it->second.m_isNewTag=
true;
285 it->second.m_isNewTag=
false;
293 std::map<std::string,cond::UserLogInfo>::iterator it=
m_logheaders.find(recordName);
294 if(it==
m_logheaders.end())
throw cond::Exception(
"Log db was not set for record " + recordName +
" from PoolDBOutputService::lookUpUserLogInfo");
301 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
308 "PoolDBOutputService::closeIOV");
312 editor.
flush(
"Tag closed.");
329 std::lock_guard<std::recursive_mutex>
lock(
m_mutex);
static thread_local int s_streamIndex
const TimeTypeSpecs timeTypeSpecs[]
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
boost::uint64_t value() const
Base exception class for the object to relational access.
void closeIOV(Time_t lastTill, const std::string &recordName, bool withlogging=false)
void preEventProcessing(edm::StreamContext const &)
void fillRecord(edm::ParameterSet &pset)
std::map< std::string, cond::UserLogInfo > m_logheaders
cond::persistency::Session session() const
LuminosityBlockID const & luminosityBlockID() const
std::vector< cond::Time_t > m_currentTimes
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
std::pair< Time_t, Time_t > ValidityInterval
void initDB(bool dummy=false)
void setDescription(const std::string &description)
void preGlobalBeginLumi(edm::GlobalContext const &)
Transaction & transaction()
void throwException(const std::string &message, const std::string &methodName)
void setParameters(const edm::ParameterSet &connectionPset)
std::string tag(const std::string &recordName)
unsigned int maxNumberOfStreams() const
cond::ValidityInterval lastInterval
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
IOVProxy readIov(const std::string &tag, bool full=false)
unsigned long long Time_t
vector< ParameterSet > Parameters
TimeType timeTypeFromName(const std::string &name)
bool isNewTagRequest(const std::string &recordName)
Record & lookUpRecord(const std::string &recordName)
cond::Time_t beginOfTime() const
void start(bool readOnly=true)
cond::persistency::Session m_session
cond::TimeType m_timetype
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
void setLogHeaderForRecord(const std::string &recordName, const std::string &provenance, const std::string &usertext)
StreamID const & streamID() const
IOVEditor editIov(const std::string &tag)
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
unsigned int value() const
virtual ~PoolDBOutputService()
void tagInfo(const std::string &recordName, cond::TagInfo_t &result)
std::string lastPayloadToken
cond::Time_t endOfTime() const
bool existsIov(const std::string &tag)
void preGlobalBeginRun(edm::GlobalContext const &)
std::recursive_mutex m_mutex
cond::Time_t currentTime() const
void postModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
void setEndOfValidity(cond::Time_t validity)
cond::TimeType m_timetype
std::map< std::string, Record > m_callbacks
IOVEditor createIovForPayload(const Hash &payloadHash, const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
void preModuleEvent(edm::StreamContext const &, edm::ModuleCallingContext const &)
std::string payloadType() const
std::string m_timetypestr
cond::UserLogInfo & lookUpUserLogInfo(const std::string &recordName)
TimeValue_t value() const
PoolDBOutputService(const edm::ParameterSet &iConfig, edm::ActivityRegistry &iAR)
Timestamp const & timestamp() const