CMS 3D CMS Logo

PayloadInspector.cc
Go to the documentation of this file.
5 
6 #include <sstream>
7 #include <iostream>
8 
9 namespace cond {
10 
11  namespace payloadInspector {
12 
14 
16  std::string ret("");
17  auto im = m.find( key );
18  if( im != m.end() ) ret = im->second;
19  return ret;
20  }
21 
22  constexpr const char* const ModuleVersion::label;
23 
25  m_plotAnnotations(),m_data(""){
26  }
27 
30  }
31 
34  }
35 
38  }
39 
40  bool PlotBase::isSingleIov() const {
42  }
43 
45  return m_data;
46  }
47 
48  bool PlotBase::process( const std::string& connectionString, const std::string& tag, const std::string& timeType, cond::Time_t begin, cond::Time_t end ){
49  init();
50 
51  std::vector<edm::ParameterSet> psets;
52  edm::ParameterSet pSet;
53  pSet.addParameter("@service_type",std::string("SiteLocalConfigService"));
54  psets.push_back(pSet);
55  static const edm::ServiceToken services(edm::ServiceRegistry::createSet(psets));
56  static const edm::ServiceRegistry::Operate operate(services);
57 
60  m_dbSession = connection.createSession( connectionString );
62  std::vector<std::tuple<cond::Time_t,cond::Hash> > iovs;
63  m_dbSession.getIovRange( tag, begin, end, iovs );
64  m_data = processData( iovs );
66  // fixme...
67  return true;
68  }
69 
71  }
72 
73  std::string PlotBase::processData( const std::vector<std::tuple<cond::Time_t,cond::Hash> >& ){
74  return "";
75  }
76 
79  }
80 
82  return m_tagTimeType;
83  }
84 
86  return m_dbSession;
87  }
88 
89  }
90 
91 }
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
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:143
Session createSession(const std::string &connectionString, bool writeCapable=false)
#define end
Definition: vmac.h:39
static ServiceToken createSet(std::vector< ParameterSet > &)
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:32
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
def operate(timelog, memlog, json_f, num)