CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
KeyListProxy.h
Go to the documentation of this file.
1 #ifndef CondCore_IOVService_KeyListProxy_h
2 #define CondCore_IOVService_KeyListProxy_h
3 
6 #include <vector>
7 #include <string>
8 
9 namespace cond {
10 
11  template<> class PayloadProxy<cond::KeyList> : public PayloadProxy<std::vector<cond::Time_t> > {
12  public:
13  typedef std::vector<cond::Time_t> DataT;
15 
17  bool errorPolicy, const char * source=0) :
18  super(session, errorPolicy) {
19  m_name = source;
20  }
21 
23  const std::string & token, bool errorPolicy, const char * source=0) :
24  super(session, token, errorPolicy) {
25  m_name = source;
26  }
27 
28  virtual ~PayloadProxy(){}
29 
30  // dereference (does not load)
31  const cond::KeyList & operator()() const {
32  return me;
33  }
34 
35  virtual void invalidateCache() {
36  super::invalidateCache();
37  }
38 
39  virtual void loadMore(CondGetter const & getter){
40  me.init(getter.get(m_name));
41  }
42 
43 
44  protected:
45  virtual bool load( DbSession& sess, std::string const & token) {
46  bool ok = super::load(sess, token);
47  me.load(super::operator()());
48  return ok;
49  }
50 
51  private:
52 
54 
56 
57  };
58 }
59 #endif
std::vector< cond::Time_t > DataT
Definition: KeyListProxy.h:13
PayloadProxy(cond::DbSession &session, const std::string &token, bool errorPolicy, const char *source=0)
Definition: KeyListProxy.h:22
const cond::KeyList & operator()() const
Definition: KeyListProxy.h:31
def load
Definition: svgfig.py:546
virtual bool load(DbSession &sess, std::string const &token)
Definition: KeyListProxy.h:45
virtual void loadMore(CondGetter const &getter)
Definition: KeyListProxy.h:39
virtual IOVProxy get(std::string name) const =0
PayloadProxy(cond::DbSession &session, bool errorPolicy, const char *source=0)
Definition: KeyListProxy.h:16
static std::string const source
Definition: EdmProvDump.cc:42
std::string const & token() const
Definition: PayloadProxy.h:63