CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DQMSummarySourceHandler.cc
Go to the documentation of this file.
6 #include <iostream>
7 #include <string>
8 #include <vector>
9 
10 namespace popcon {
12  : m_name(pset.getUntrackedParameter<std::string>("name", "DQMSummarySourceHandler")),
13  m_since(pset.getUntrackedParameter<unsigned long long>("firstSince", 1)),
14  m_user(pset.getUntrackedParameter<std::string>("OnlineDBUser", "CMS_DQM_SUMMARY")),
15  m_pass(pset.getUntrackedParameter<std::string>("OnlineDBPass", "****")) {
16  m_connectionString = "oracle://cms_omds_lb/CMS_DQM_SUMMARY";
17  }
18 
20 
22  //check what is already inside of the database
23  edm::LogInfo("DQMSummarySourceHandler")
24  << "------- " << m_name << " -> getNewObjects\n"
25  << "got offlineInfo " << tagInfo().name << ", size " << tagInfo().size << ", last object valid since "
26  << tagInfo().lastInterval.since << " token " << tagInfo().lastInterval.payloadId << std::endl;
27  edm::LogInfo("DQMSummarySourceHandler")
28  << " ------ last entry info regarding the payload (if existing): " << logDBEntry().usertext
29  << "; last record with the correct tag (if existing) has been written in the db: " << logDBEntry().destinationDB
30  << std::endl;
31  if (tagInfo().size > 0) {
33  edm::LogInfo("DQMSummarySourceHandler") << "size of last payload " << payload->m_summary.size() << std::endl;
34  }
35  std::cout << "runnumber/first since = " << m_since << std::endl;
36  DQMSummary* dqmSummary = new DQMSummary;
38  *dqmSummary = dqmSummaryReader.readData("SUMMARYCONTENT", m_since);
39  m_to_transfer.push_back(std::make_pair((DQMSummary*)dqmSummary, m_since));
40  edm::LogInfo("DQMSummarySourceHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;
41  }
42 
44 } // namespace popcon
Iov_t lastInterval
Definition: Types.h:73
Time_t since
Definition: Types.h:53
DQMSummary readData(const std::string &table, const long long r_number)
size_t size
Definition: Types.h:74
std::string name
Definition: Types.h:72
std::vector< std::pair< DQMSummary *, Time_t > > m_to_transfer
cond::LogDBEntry_t const & logDBEntry() const
DQMSummarySourceHandler(const edm::ParameterSet &pset)
Hash payloadId
Definition: Types.h:55
std::string destinationDB
Definition: Types.h:88
Log< level::Info, false > LogInfo
std::string id() const override
std::string usertext
Definition: Types.h:90
tuple cout
Definition: gather_cfg.py:144
tuple size
Write out results.
cond::TagInfo_t const & tagInfo() const