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_CondDB_KeyListProxy_h
2 #define CondCore_CondDB_KeyListProxy_h
3 
6 #include <vector>
7 #include <string>
8 
9 namespace cond {
10 
11  namespace persistency {
12  template<> class PayloadProxy<cond::persistency::KeyList> : public PayloadProxy<std::vector<cond::Time_t> > {
13  public:
14  typedef std::vector<cond::Time_t> DataT;
16 
17 
18  explicit PayloadProxy( const char * source=0 ) :
19  super( source ),
20  m_keyList() {
21  if( source ) m_name = source;
22  }
23 
24  virtual ~PayloadProxy(){}
25 
26  // dereference (does not load)
27  const KeyList & operator()() const {
28  return m_keyList;
29  }
30 
31  virtual void invalidateCache() {
32  super::invalidateCache();
33  }
34 
35  virtual void loadMore(CondGetter const & getter){
36  m_keyList.init(getter.get(m_name));
37  }
38 
39 
40  protected:
41  virtual void loadPayload() {
42  super::loadPayload();
43  m_keyList.load(super::operator()());
44  }
45 
46  private:
47 
50 
51  };
52  }
53 
54 }
55 #endif
virtual void loadMore(CondGetter const &getter)
Definition: KeyListProxy.h:35
virtual IOVProxy get(std::string name) const =0
static std::string const source
Definition: EdmProvDump.cc:42