|
|
Go to the documentation of this file.
29 std::vector<std::pair<SiStripDetVOff*, cond::Time_t> >
newPayloads;
35 m_condDb(iConfig.getParameter<
std::
string>(
"conditionDatabase")),
36 m_localCondDbFile(iConfig.getParameter<
std::
string>(
"condDbFile")),
37 m_targetTag(iConfig.getParameter<
std::
string>(
"targetTag")),
38 maxTimeBeforeNewIOV_(iConfig.getUntrackedParameter<
int>(
"maxTimeBeforeNewIOV", 24)) {
51 std::shared_ptr<SiStripDetVOff> lastPayload;
53 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] "
54 <<
"Retrieve last IOV from " <<
m_condDb;
60 <<
"[SiStripDetVOffHandler::" << __func__ <<
"] "
61 <<
"No information can be retrieved from " <<
m_condDb <<
" because the file is empty.\n"
62 <<
"Will assume all HV/LV's are off.";
66 if (!lastPayloadHash.empty()) {
70 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] "
71 <<
" ... last IOV: " << lastIov <<
" , "
72 <<
"last Payload: " << lastPayloadHash;
81 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] "
82 <<
"Finished building " <<
newPayloads.size() <<
" new payloads.";
85 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] "
91 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] "
92 <<
"No HV/LV transition was found from PVSS query.";
93 bool forceNewIOV =
true;
102 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] "
103 <<
" ... No payload transfered.";
106 <<
"[SiStripDetVOffHandler::" << __func__ <<
"] "
107 <<
" ... The last IOV is too old. Will start a new IOV from " <<
newPayloads[0].second <<
"("
109 <<
") with the same payload.";
116 <<
"[SiStripDetVOffHandler::" << __func__ <<
"] "
131 <<
" payloads written to sqlite file.";
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
boost::posix_time::ptime to_boost(Time_t iValue)
bool existsIov(const std::string &tag)
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
SiStripDetVOffHandler SiStripO2ODetVOff
edm::Service< SiStripDetVOffBuilder > modHVBuilder
U second(std::pair< T, U > const &p)
void setLastSiStripDetVOff(SiStripDetVOff *lastPayload, cond::Time_t lastTimeStamp)
Log< level::Info, false > LogInfo
Session createSession(const std::string &connectionString, bool writeCapable=false)
SiStripDetVOffHandler(const edm::ParameterSet &iConfig)
Log< level::Warning, false > LogWarning
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
#define DEFINE_FWK_MODULE(type)
IOVProxy readIov(const std::string &tag)
void setDescription(const std::string &description)
IOVEditor editIov(const std::string &tag)
~SiStripDetVOffHandler() override
unsigned long long Time_t
void setParameters(const edm::ParameterSet &connectionPset)
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())
Transaction & transaction()
void start(bool readOnly=true)
cond::persistency::ConnectionPool m_connectionPool
T getParameter(std::string const &) const
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > newPayloads
std::string m_localCondDbFile
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > getModulesVOff()