30 std::vector< std::pair<SiStripDetVOff*,cond::Time_t> >
newPayloads;
52 std::shared_ptr<SiStripDetVOff> lastPayload;
54 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] " 55 <<
"Retrieve last IOV from " <<
m_condDb;
58 if ( m_condDb.find(
"sqlite")==0 && (!condDbSession.
existsDatabase()) ){
60 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[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 <<
" , " <<
"last Payload: " << lastPayloadHash;
83 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] " 84 <<
"Finished building " <<
newPayloads.size() <<
" new payloads.";
87 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] " 93 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] " 94 <<
"No HV/LV transition was found from PVSS query.";
95 bool forceNewIOV =
true;
104 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] " 105 <<
" ... No payload transfered.";
107 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] " 108 <<
" ... The last IOV is too old. Will start a new IOV from " <<
newPayloads[0].second
115 edm::LogWarning(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] " 129 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] " 130 << newPayloads.size() <<
" payloads written to sqlite file.";
T getParameter(std::string const &) const
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > getModulesVOff()
#define DEFINE_FWK_MODULE(type)
void start(bool readOnly=true)
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::SYNCH_ANY)
void setDescription(const std::string &description)
Transaction & transaction()
void setParameters(const edm::ParameterSet &connectionPset)
U second(std::pair< T, U > const &p)
std::vector< std::pair< SiStripDetVOff *, cond::Time_t > > newPayloads
payload
payload postfix for testing
IOVProxy readIov(const std::string &tag, bool full=false)
unsigned long long Time_t
edm::Service< SiStripDetVOffBuilder > modHVBuilder
Session createSession(const std::string &connectionString, bool writeCapable=false)
cond::persistency::ConnectionPool m_connectionPool
IOVEditor editIov(const std::string &tag)
~SiStripDetVOffHandler() override
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
bool existsIov(const std::string &tag)
void setLastSiStripDetVOff(SiStripDetVOff *lastPayload, cond::Time_t lastTimeStamp)
cond::Hash storePayload(const T &payload, const boost::posix_time::ptime &creationTime=boost::posix_time::microsec_clock::universal_time())
SiStripDetVOffHandler SiStripO2ODetVOff
SiStripDetVOffHandler(const edm::ParameterSet &iConfig)
std::string m_localCondDbFile
void BuildDetVOffObj(const TrackerTopology *trackerTopo)
T const * product() const
boost::posix_time::ptime to_boost(Time_t iValue)
std::shared_ptr< T > fetchPayload(const cond::Hash &payloadHash)