56 connection.configure();
60 m_session = connection.createSession( connectionString,
true, backType );
68 typedef std::vector< edm::ParameterSet >
Parameters;
70 for(Parameters::iterator itToPut = toPut.begin(); itToPut != toPut.end(); ++itToPut)
88 return this->lookUpRecord(recordName).m_tag;
93 Record& myrecord=this->lookUpRecord(recordName);
100 m_session.transaction().start(
false);
104 if( !m_session.existsDatabase() ) m_session.createDatabase();
122 m_session.transaction().commit();
131 m_currentTime=iEvtid.
run();
133 m_currentTime=iTime.
value();
144 m_currentTime=iLumiid.
value();
168 return m_currentTime;
179 Record& myrecord=this->lookUpRecord(recordName);
180 if(!myrecord.m_isNewTag) {
181 cond::throwException( myrecord.m_tag +
" is not a new tag",
"PoolDBOutputService::createNewIOV");
195 editor.
insert( firstSinceTime, firstPayloadId );
197 myrecord.m_isNewTag=
false;
210 "PoolDBOutputService::createNewIOV");
222 Record& myrecord=this->lookUpRecord(recordName);
223 if(!myrecord.m_isNewTag) {
224 cond::throwException( myrecord.m_tag +
" is not a new tag",
"PoolDBOutputService::createNewIOV");
231 editor.
insert( firstSinceTime, firstPayloadId );
233 myrecord.m_isNewTag=
false;
236 "PoolDBOutputService::createNewIOV");
247 Record& myrecord=this->lookUpRecord(recordName);
248 if( myrecord.m_isNewTag ) {
250 "PoolDBOutputService::appendSinceTime");
260 editor.
insert( time, payloadId );
275 "PoolDBOutputService::appendSinceTime");
282 if (!m_dbstarted) this->initDB(
false );
284 std::map<std::string,Record>::iterator it=m_callbacks.find(recordName);
285 if(it==m_callbacks.end()) {
286 cond::throwException(
"The record \""+recordName +
"\" has not been registered.",
"PoolDBOutputService::lookUpRecord");
288 if( !m_session.existsIov( it->second.m_tag) ){
289 it->second.m_isNewTag=
true;
291 it->second.m_isNewTag=
false;
308 Record & myrecord = lookUpRecord(recordName);
313 "PoolDBOutputService::closeIOV");
const TimeTypeSpecs timeTypeSpecs[]
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void closeIOV(Time_t lastTill, const std::string &recordName, bool withlogging=false)
void initDB(bool forReading=true)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void fillRecord(edm::ParameterSet &pset)
cond::persistency::Session session() const
void watchPostModule(PostModule::slot_type const &iSlot)
void watchPreProcessEvent(PreProcessEvent::slot_type const &iSlot)
boost::uint64_t value() const
std::pair< Time_t, Time_t > ValidityInterval
void setDescription(const std::string &description)
void preBeginLumi(const edm::LuminosityBlockID &, const edm::Timestamp &)
void watchPreModule(PreModule::slot_type const &iSlot)
void setParameters(const edm::ParameterSet &connectionPset)
std::string tag(const std::string &recordName)
cond::ValidityInterval lastInterval
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=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
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)
void postModule(const edm::ModuleDescription &desc)
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
virtual ~PoolDBOutputService()
void throwException(std::string const &message, std::string const &methodName)
void preModule(const edm::ModuleDescription &desc)
void tagInfo(const std::string &recordName, cond::TagInfo_t &result)
std::string lastPayloadToken
cond::Time_t endOfTime() const
static constexpr BackendType DEFAULT_DB
cond::Time_t currentTime() const
void watchPreBeginLumi(PreBeginLumi::slot_type const &iSlot)
void setEndOfValidity(cond::Time_t validity)
cond::TimeType m_timetype
std::map< std::string, Record > m_callbacks
volatile std::atomic< bool > shutdown_flag false
void preEventProcessing(const edm::EventID &evtID, const edm::Timestamp &iTime)
std::string m_timetypestr
TimeValue_t value() const
PoolDBOutputService(const edm::ParameterSet &iConfig, edm::ActivityRegistry &iAR)