1 #ifndef DQMOffline_CalibTracker_SiStripDQMPopConSourceHandler_H 2 #define DQMOffline_CalibTracker_SiStripDQMPopConSourceHandler_H 25 m_since{
pset.getUntrackedParameter<uint32_t>(
"since", 5)},
70 <<
"[SiStripPopConDbObjHandler::getNewObjects] for PopCon application " << m_name;
74 ss <<
"\n\n------- " << m_name <<
" - > getNewObjects\n";
77 ss <<
"\ngot offlineInfo" << this->
tagInfo().name <<
"\n size " << this->
tagInfo().size
78 <<
"\n last object valid since " << this->
tagInfo().lastInterval.since <<
"\n token " 79 << this->
tagInfo().lastInterval.payloadId <<
"\n UserText " << this->userTextLog() <<
"\n LogDBEntry \n" 80 << this->logDBEntry().logId <<
"\n" 81 << this->logDBEntry().destinationDB <<
"\n" 82 << this->logDBEntry().provenance <<
"\n" 83 << this->logDBEntry().usertext <<
"\n" 84 << this->logDBEntry().iovtag <<
"\n" 85 << this->logDBEntry().iovtimetype <<
"\n" 86 << this->logDBEntry().payloadIdx <<
"\n" 87 << this->logDBEntry().payloadClass <<
"\n" 88 << this->logDBEntry().payloadToken <<
"\n" 89 << this->logDBEntry().exectime <<
"\n" 90 << this->logDBEntry().execmessage <<
"\n";
91 if (!this->logDBEntry().usertext.empty())
92 ss <<
"\n-- user text " << this->logDBEntry().usertext.substr(this->logDBEntry().usertext.find_last_of(
'@'));
94 ss <<
" First object for this tag ";
99 if (isTransferNeeded())
103 <<
"[SiStripPopConDbObjHandler::getNewObjects] for PopCon application " << m_name <<
" Done\n--------------\n";
106 template <
typename T>
108 edm::LogInfo(
"SiStripPopConDbObjHandler") <<
"[SiStripPopConDbObjHandler::isTransferNeeded] checking for transfer ";
110 if (m_iovSequence && (m_since <= this->
tagInfo().lastInterval.since)) {
112 <<
"[SiStripPopConDbObjHandler::isTransferNeeded] \nthe current starting iov " << m_since
113 <<
"\nis not compatible with the last iov (" << this->
tagInfo().lastInterval.since <<
") open for the object " 114 << this->logDBEntry().payloadClass <<
" \nin the db " << this->logDBEntry().destinationDB
115 <<
" \n NO TRANSFER NEEDED";
122 if (!this->logDBEntry().usertext.empty())
123 ss_logdb = this->logDBEntry().usertext.substr(this->logDBEntry().usertext.find_last_of(
'@') + 2);
126 if ((!m_iovSequence) || checkForCompatibility(ss_logdb)) {
127 this->m_userTextLog =
"@ " +
ss;
130 <<
"[SiStripPopConDbObjHandler::isTransferNeeded] \nthe selected conditions will be uploaded: " <<
ss 131 <<
"\n Current MetaData - " <<
ss <<
"\n Last Uploaded MetaData- " << ss_logdb <<
"\n Fine";
134 }
else if (m_iovSequence) {
136 <<
"[SiStripPopConDbObjHandler::isTransferNeeded] \nthe current MetaData conditions " <<
ss 137 <<
"\nare not compatible with the MetaData Conditions of the last iov (" << this->
tagInfo().lastInterval.since
138 <<
") open for the object " << this->logDBEntry().payloadClass <<
" \nin the db " 139 << this->logDBEntry().destinationDB <<
" \nConditions: " << ss_logdb <<
"\n NO TRANSFER NEEDED";
146 template <
typename T>
149 <<
"[SiStripPopConDbObjHandler::setForTransfer] " << m_name <<
" getting data to be transferred ";
153 else if (m_debugMode)
154 m_since = this->
tagInfo().lastInterval.since + 1;
156 T*
obj = this->getObj();
158 edm::LogInfo(
"SiStripPopConDbObjHandler") <<
"setting since = " << m_since;
159 this->m_to_transfer.push_back(std::make_pair(
obj, m_since));
162 <<
"[SiStripPopConDbObjHandler::setForTransfer] " << m_name <<
" : NULL pointer of obj " <<
typeid(
T).
name()
163 <<
" reported by SiStripCondObjBuilderFromDb\n Transfer aborted";
169 std::cout <<
"SiStripPedestalsDQMService::getMetaDataString" << std::endl;
170 std::stringstream
ss;
171 ss <<
"Run " << m_runNumber << std::endl;
175 #endif // DQMOffline_CalibTracker_SiStripDQMPopConSourceHandler_H
virtual void initES(const edm::EventSetup &)
SiStripDQMPopConSourceHandler(const edm::ParameterSet &pset)
Log< level::Error, false > LogError
std::string id() const override
dqm::legacy::DQMStore DQMStore
void getNewObjects() override
~SiStripDQMPopConSourceHandler() override
Log< level::Info, false > LogInfo
virtual void dqmEndJob(DQMStore::IBooker &booker, DQMStore::IGetter &getter)
virtual T * getObj() const =0
uint32_t getRunNumber() const
virtual bool checkForCompatibility(const std::string &otherMetaData) const
virtual std::string getMetaDataString() const
unsigned long long m_since