|
|
Go to the documentation of this file. 1 #ifndef PopConBTransitionSourceHandler_H
2 #define PopConBTransitionSourceHandler_H
19 .getUntrackedParameter<double>(
"currentThreshold", 18000.)),
28 <<
"PopConBTransitionSourceHandler:" << __func__ <<
"]: "
29 <<
"Initialising Connection Pool" << std::endl;
46 <<
"PopConBTransitionSourceHandler::" << __func__ <<
"]: "
47 <<
"Loading tag for RunInfo " <<
m_tagForRunInfo <<
" and IOV valid for run number: " <<
m_run << std::endl;
50 LogDebug(
"PopConBTransitionSourceHandler")
52 <<
", IOV valid for run number " <<
m_run <<
" starting from: " << currentIov.
since
53 <<
", with corresponding payload hash: " << currentIov.
payloadId << std::endl;
55 double current_default = -1;
56 double avg_current = current_default;
58 LogDebug(
"PopConBTransitionSourceHandler")
59 <<
"Comparing value of magnet current: " << avg_current <<
" A for run: " <<
m_run
66 <<
"PopConBTransitionSourceHandler::" << __func__ <<
"]: "
67 <<
"The magnet was " << (isBOn ?
"ON" :
"OFF") <<
" during run " <<
m_run << std::endl;
78 <<
"PopConBTransitionSourceHandler::" << __func__ <<
"]: "
80 <<
" and IOV valid for run number: " <<
m_run << std::endl;
83 LogDebug(
"PopConBTransitionSourceHandler")
85 <<
" with size: " << iov.
loadedSize() <<
", IOV valid for run number " <<
m_run
86 <<
" starting from: " << currentIov.
since <<
", with corresponding payload hash: " << currentIov.
payloadId
89 if (currentIov.
payloadId != this->tagInfo().lastInterval.payloadId) {
90 std::ostringstream
ss;
91 ss <<
"Adding iov with since " <<
m_run <<
" pointing to hash " << currentIov.
payloadId
92 <<
" corresponding to the calibrations for magnetic field " << (isBOn ?
"ON" :
"OFF");
95 <<
"PopConBTransitionSourceHandler::" << __func__ <<
"]: " <<
ss.str() << std::endl;
98 editor = session.
editIov(destTag);
101 editor.
setDescription(
"Tag created by PopConBTransitionSourceHandler");
109 <<
"PopConBTransitionSourceHandler::" << __func__ <<
"]: "
110 <<
"The payload with hash " << currentIov.
payloadId
111 <<
" corresponding to the calibrations for magnetic field " << (isBOn ?
"ON" :
"OFF")
112 <<
" is still valid for run " <<
m_run <<
" in the destination tag " << destTag <<
".\nNo transfer needed."
122 <<
"PopConBTransitionSourceHandler::" << __func__ <<
"]: "
133 <<
"PopConBTransitionSourceHandler::" << __func__ <<
"]: "
136 <<
" the run proposed for insertion " <<
m_run <<
". No transfer needed." << std::endl;
142 <<
"PopConBTransitionSourceHandler::" << __func__ <<
"]: "
143 <<
"END." << std::endl;
160 #endif //PopConBTransitionSourceHandler_H
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
bool existsIov(const std::string &tag)
cond::persistency::Session & dbSession() const
cond::Iov_t getInterval(cond::Time_t time)
virtual void getObjectsForBTransition(bool isBOn)
std::string m_connectionString
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
~PopConBTransitionSourceHandler() override
IOVProxy readIov(const std::string &tag)
void setDescription(const std::string &description)
edm::ParameterSet m_connectionPset
IOVEditor editIov(const std::string &tag)
cond::TagInfo_t const & tagInfo() const
void setParameters(const edm::ParameterSet &connectionPset)
Transaction & transaction()
std::string id() const final
std::string m_tagForRunInfo
PopConBTransitionSourceHandler(edm::ParameterSet const &pset)
cond::persistency::ConnectionPool m_connection
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
double m_currentThreshold
void getNewObjects() final
cond::Tag_t tagInfo() const
std::string m_userTextLog