CMS 3D CMS Logo

PayloadInspector.cc
Go to the documentation of this file.
3 
4 #include <sstream>
5 #include <iostream>
6 
7 namespace cond {
8 
9  namespace payloadInspector {
10 
12 
14  std::string ret("");
15  auto im = m.find( key );
16  if( im != m.end() ) ret = im->second;
17  return ret;
18  }
19 
20  constexpr const char* const ModuleVersion::label;
21 
23  m_plotAnnotations(),m_data(""){
24  }
25 
28  }
29 
32  }
33 
36  }
37 
38  bool PlotBase::isSingleIov() const {
40  }
41 
43  return m_data;
44  }
45 
46  bool PlotBase::process( const std::string& connectionString, const std::string& tag, const std::string& timeType, cond::Time_t begin, cond::Time_t end ){
47  init();
50  m_dbSession = connection.createSession( connectionString );
52  std::vector<std::tuple<cond::Time_t,cond::Hash> > iovs;
53  m_dbSession.getIovRange( tag, begin, end, iovs );
54  m_data = processData( iovs );
56  // fixme...
57  return true;
58  }
59 
61  }
62 
63  std::string PlotBase::processData( const std::vector<std::tuple<cond::Time_t,cond::Hash> >& ){
64  return "";
65  }
66 
69  }
70 
72  return m_tagTimeType;
73  }
74 
76  return m_dbSession;
77  }
78 
79  }
80 
81 }
void start(bool readOnly=true)
Definition: Session.cc:22
std::map< std::string, std::string > m
cond::TimeType tagTimeType() const
Transaction & transaction()
Definition: Session.cc:66
cond::persistency::Session dbSession()
bool process(const std::string &connectionString, const std::string &tag, const std::string &timeType, cond::Time_t begin, cond::Time_t end)
#define constexpr
TimeType
Definition: Time.h:21
unsigned long long Time_t
Definition: Time.h:16
TimeType timeTypeFromName(const std::string &name)
Definition: Time.cc:24
std::string get(const std::string &key) const
Session createSession(const std::string &connectionString, bool writeCapable=false)
#define end
Definition: vmac.h:37
static const char *const PAYLOAD_TYPE_K
virtual std::string processData(const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs)
Definition: plugin.cc:24
#define begin
Definition: vmac.h:30
cond::persistency::Session m_dbSession
bool getIovRange(const std::string &tag, cond::Time_t begin, cond::Time_t end, std::vector< std::tuple< cond::Time_t, cond::Hash > > &range)
Definition: Session.cc:108