Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CdbUrlSavev1.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CdbUrlSavev1.cc
1 #include "CdbUrlSavev1.h"
2 
3 #include <phool/phool.h>
4 
5 #include <iostream>
6 
7 class PHObject;
8 
9 PHObject *
11 {
12  std::cout << "CdbUrlSavev1::CloneMe() is not implemented in daugther class" << std::endl;
13  return nullptr;
14 }
15 
17 {
18  std::cout << PHWHERE << "ERROR Reset() not implemented by daughter class" << std::endl;
19  return;
20 }
21 
22 void CdbUrlSavev1::identify(std::ostream &os) const
23 {
24  os << "identify yourself: CdbUrlSavev1 Object" << std::endl;
25  for (auto &iter : m_CdbUrlVector)
26  {
27  os << "domain: " << std::get<0>(iter)
28  << ", url: " << std::get<1>(iter)
29  << ", timestamp: " << std::get<2>(iter) << std::endl;
30  }
31  return;
32 }
33 
35 {
36  if (!m_CdbUrlVector.empty())
37  {
38  return 1;
39  }
40  return 0;
41 }
42 
43 std::vector<std::tuple<std::string, std::string, uint64_t>>::const_iterator CdbUrlSavev1::begin() const
44 {
45  return m_CdbUrlVector.begin();
46 }
47 
48 std::vector<std::tuple<std::string, std::string, uint64_t>>::const_iterator CdbUrlSavev1::end() const
49 {
50  return m_CdbUrlVector.end();
51 }
52 
53 void CdbUrlSavev1::AddUrl(const std::string &domain, const std::string &url, const uint64_t timestamp)
54 {
55  m_CdbUrlVector.emplace_back(domain, url, timestamp);
56 }
57 
58 void CdbUrlSavev1::AddUrl(const std::tuple<std::string, std::string, uint64_t> &tup)
59 {
60  m_CdbUrlVector.push_back(tup);
61 }