CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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") << "------- " << m_name << " -> getNewObjects\n"
24  << "got offlineInfo " << tagInfo().name
25  << ", size " << tagInfo().size
26  << ", last object valid since "
27  << tagInfo().lastInterval.first << " token "
28  << tagInfo().lastPayloadToken << std::endl;
29  edm::LogInfo("DQMSummarySourceHandler") << " ------ last entry info regarding the payload (if existing): "
30  << logDBEntry().usertext
31  << "; last record with the correct tag (if existing) has been written in the db: "
32  << logDBEntry().destinationDB << std::endl;
33  if (tagInfo().size > 0) {
34  Ref payload = lastPayload();
35  edm::LogInfo("DQMSummarySourceHandler") << "size of last payload "
36  << payload->m_summary.size() << std::endl;
37  }
38  std::cout << "runnumber/first since = " << m_since << std::endl;
39  DQMSummary * dqmSummary = new DQMSummary;
41  *dqmSummary = dqmSummaryReader.readData("SUMMARYCONTENT", m_since);
42  m_to_transfer.push_back(std::make_pair((DQMSummary*)dqmSummary,m_since));
43  edm::LogInfo("DQMSummarySourceHandler") << "------- "
44  << m_name << " - > getNewObjects"
45  << std::endl;
46  }
47 
49 }
std::string usertext
Definition: LogDBEntry.h:20
DQMSummary readData(const std::string &table, const long long r_number)
std::string destinationDB
Definition: LogDBEntry.h:18
std::string lastPayloadToken
Definition: TagInfo.h:12
std::string name
Definition: TagInfo.h:9
cond::LogDBEntry const & logDBEntry() const
DQMSummarySourceHandler(const edm::ParameterSet &pset)
size_t size
Definition: TagInfo.h:13
cond::ValidityInterval lastInterval
Definition: TagInfo.h:11
tuple cout
Definition: gather_cfg.py:121
tuple size
Write out results.