4 name_(pset.getUntrackedParameter<std::
string>(
"name",
"SiStripDetVOffHandler")),
5 deltaTmin_(pset.getParameter<uint32_t>(
"DeltaTmin")),
6 maxIOVlength_(pset.getParameter<uint32_t>(
"MaxIOVlength")),
7 debug_(pset.getUntrackedParameter<bool>(
"Debug",
false))
11 LogTrace(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] Destructing ...";
16 std::cout <<
"[SiStripDetVOffHandler::getNewObjects]" << std::endl;
18 std::stringstream dbstr;
19 dbstr <<
"\n\n---------------------\n " << name_
20 <<
" - > getNewObjects\n";
24 size_t splitPoint = logDBEntry().usertext.find_last_of(
"@");
25 if( splitPoint != std::string::npos ) {
26 userText = logDBEntry().usertext.substr(splitPoint);
28 dbstr <<
"got offlineInfo" << tagInfo().name <<
", size " << tagInfo().size <<
" " << tagInfo().token
29 <<
" , last object valid since "
30 << tagInfo().lastInterval.first <<
" token "
31 << tagInfo().lastPayloadToken <<
"\n\n UserText " << userTextLog()
33 << logDBEntry().logId <<
"\n"
34 << logDBEntry().destinationDB <<
"\n"
35 << logDBEntry().provenance <<
"\n"
36 << logDBEntry().usertext <<
"\n"
37 << logDBEntry().iovtag <<
"\n"
38 << logDBEntry().iovtimetype <<
"\n"
39 << logDBEntry().payloadIdx <<
"\n"
40 << logDBEntry().payloadClass <<
"\n"
41 << logDBEntry().payloadToken <<
"\n"
42 << logDBEntry().exectime <<
"\n"
43 << logDBEntry().execmessage <<
"\n"
44 <<
"\n\n-- user text " << userText;
46 dbstr <<
" First object for this tag ";
48 dbstr <<
"\n-------------------------\n";
52 std::cout <<
"getNewObjects setForTransfer" << std::endl;
54 std::cout <<
"getNewObjects setForTransfer end" << std::endl;
58 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::setForTransfer]" << std::endl;
61 if (tagInfo().
size ) {
62 Ref payload = lastPayload();
64 modHVBuilder->setLastSiStripDetVOff( lastV, tagInfo().lastInterval.first );
69 modHVBuilder->BuildDetVOffObj();
70 resultVec = modHVBuilder->getModulesVOff(deltaTmin_, maxIOVlength_);
72 if (!resultVec.empty()){
74 unsigned int firstPayload = 0;
77 if (tagInfo().size > 0) {
78 Ref payload = lastPayload();
81 if (*modV == *payload) {
82 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::setForTransfer] Transfer of first element not required!";
83 cout <<
"[SiStripDetVOffHandler::setForTransfer] Transfer of first element not required!" << endl;
87 cout <<
"[SiStripDetVOffHandler::setForTransfer] Transfer of first element required" << endl;
90 edm::LogInfo(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::setForTransfer] No previous payload";
91 cout <<
"[SiStripDetVOffHandler::setForTransfer] No previous payload" << endl;
96 for (
unsigned int i = firstPayload;
i < resultVec.size();
i++) {
97 this->m_to_transfer.push_back(resultVec[
i]);
101 edm::LogError(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::" << __func__ <<
"] "
102 << name_ <<
" : NULL pointer reported by SiStripDetVOffBuilder"
103 <<
"\n Transfer aborted"<< std::endl;
110 std::stringstream ss;
111 ss <<
"@@@ Number of payloads transferred " << resultVec.size() <<
"." << std::endl;
112 std::vector< std::pair<SiStripDetVOff*,cond::Time_t> >::const_iterator it = resultVec.begin();
113 ss <<
"time \t #LV off \t #HV off" << std::endl;
114 for( ; it != resultVec.end(); ++it ) {
116 ss <<
"\t\t " << it->first->getLVoffCounts() <<
"\t\t " << it->first->getHVoffCounts() << std::endl;
120 ss <<
"PayloadNo/Badmodules/NoAdded/NoRemoved: ";
121 std::vector< std::vector<uint32_t> > payloadStats = modHVBuilder->getPayloadStats();
122 for (
unsigned int j = 0;
j < payloadStats.size();
j++) {
123 ss <<
j <<
"/" << payloadStats[
j][0] <<
"/" << payloadStats[
j][1] <<
"/" << payloadStats[
j][2] <<
"\t ";
127 this->m_userTextLog = ss.str();
129 LogTrace(
"SiStripDetVOffHandler") <<
"[SiStripDetVOffHandler::setUserTextLog] " << ss.str();
edm::Ref< Container > Ref
SiStripDetVOffHandler(const edm::ParameterSet &pset)
volatile std::atomic< bool > shutdown_flag false
tuple size
Write out results.
boost::posix_time::ptime to_boost(Time_t iValue)