1 #ifndef PopConBTransitionSourceHandler_H 2 #define PopConBTransitionSourceHandler_H 17 m_run( pset.getParameter<
edm::
ParameterSet>(
"ESTransition" ).getParameter<unsigned long long>(
"runNumber" ) ),
25 edm::LogInfo(
"PopConESTransitionSourceHandler" ) <<
"[" <<
"PopConESTransitionSourceHandler:" << __func__ <<
"]: " 26 <<
"Initialising Connection Pool" << std::endl;
37 bool isLowGain =
true;
41 edm::LogInfo(
"PopConESTransitionSourceHandler" ) <<
"[" <<
"PopConESTransitionSourceHandler::" << __func__ <<
"]: " 43 <<
" and IOV valid for run number: " <<
m_run << std::endl;
48 <<
", IOV valid for run number " <<
m_run <<
" starting from: " << currentIov.
since 49 <<
", with corresponding payload hash: " << currentIov.
payloadId << std::endl;
73 edm::LogInfo(
"PopConESTransitionSourceHandler" ) <<
"[" <<
"PopConESTransitionSourceHandler::" << __func__ <<
"]: " 74 <<
"Loading tag for ES " << ( isLowGain ?
"LowGain" :
"HighGain" ) <<
": " 76 <<
" and IOV valid for run number: " <<
m_run << std::endl;
81 <<
", IOV valid for run number " <<
m_run <<
" starting from: " << currentIov.
since 82 <<
", with corresponding payload hash: " << currentIov.
payloadId 85 if( currentIov.
payloadId != this->tagInfo().lastPayloadToken ) {
86 std::ostringstream ss;
87 ss <<
"Adding iov with since "<<
m_run<<
" pointing to hash " << currentIov.
payloadId 88 <<
" corresponding to the ES Gain " 89 << ( isLowGain ?
"LOW" :
"HIGH" );
90 edm::LogInfo(
"PopConESTransitionSourceHandler" ) <<
"[" <<
"PopConESTransitionSourceHandler::" << __func__ <<
"]: " 91 << ss.str() << std::endl;
94 editor = session.
editIov( destTag );
97 editor.
setDescription(
"Tag created by PopConESTransitionSourceHandler" );
103 edm::LogInfo(
"PopConESTransitionSourceHandler" ) <<
"[" <<
"PopConESTransitionSourceHandler::" << __func__ <<
"]: " 104 <<
"The payload with hash " << currentIov.
payloadId 105 <<
" corresponding to ES Gain" 106 << ( isLowGain ?
"LOW" :
"HIGH" )
107 <<
" is still valid for run " <<
m_run 108 <<
" in the destination tag " << destTag
109 <<
".\nNo transfer needed." <<std::endl;
116 edm::LogInfo(
"PopConESTransitionSourceHandler" ) <<
"[" <<
"PopConESTransitionSourceHandler::" << __func__ <<
"]: " 117 <<
"Destination Tag Info: name " << this->
tagInfo().
name 126 edm::LogInfo(
"PopConESTransitionSourceHandler" ) <<
"[" <<
"PopConESTransitionSourceHandler::" << __func__ <<
"]: " 129 <<
" the run proposed for insertion " <<
m_run 130 <<
". No transfer needed." << std::endl;
135 edm::LogInfo(
"PopConESTransitionSourceHandler" ) <<
"[" <<
"PopConESTransitionSourceHandler::" << __func__ <<
"]: " 136 <<
"END." << std::endl;
154 #endif //PopConESTransitionSourceHandler_H
cond::persistency::Session & dbSession() const
std::string id() const final
std::string m_userTextLog
~PopConESTransitionSourceHandler() override
void getNewObjects() final
virtual void getObjectsForESTransition(bool isLowGain)
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
std::string m_connectionString
void setDescription(const std::string &description)
std::string m_tagForLowGain
Transaction & transaction()
void setParameters(const edm::ParameterSet &connectionPset)
edm::ParameterSet m_connectionPset
cond::ValidityInterval lastInterval
std::string m_tagForHighGain
IOVProxy readIov(const std::string &tag, bool full=false)
cond::TimeType timeType() const
Iterator find(cond::Time_t time)
cond::persistency::ConnectionPool m_connection
IOVEditor editIov(const std::string &tag)
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
std::string lastPayloadToken
bool existsIov(const std::string &tag)
double m_currentThreshold
PopConESTransitionSourceHandler(edm::ParameterSet const &pset)
std::string m_tagForRunInfo
cond::TagInfo_t const & tagInfo() const