CMS 3D CMS Logo

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=nullptr ) :
19  super( source ),
20  m_keyList() {
21  if( source ) m_name = source;
22  }
23 
24  ~PayloadProxy() override{}
25 
26  // dereference (does not load)
27  const KeyList & operator()() const {
28  return m_keyList;
29  }
30 
31  void invalidateCache() override {
32  super::invalidateCache();
33  }
34 
35  void loadMore(CondGetter const & getter) override{
36  m_keyList.init(getter.get(m_name));
37  }
38 
39 
40  protected:
41  void loadPayload() override {
42  super::loadPayload();
43  m_keyList.load(super::operator()());
44  }
45 
46  private:
47 
50 
51  };
52  }
53 
54 }
55 #endif
virtual IOVProxy get(std::string name) const =0
void loadMore(CondGetter const &getter) override
Definition: KeyListProxy.h:35
Definition: plugin.cc:24
static std::string const source
Definition: EdmProvDump.cc:43