CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PayloadProxy.cc
Go to the documentation of this file.
2 
3 namespace cond {
4 
5  namespace persistency {
6 
8  m_iovProxy(),m_session() {
9  }
10 
12 
13  void BasePayloadProxy::setUp( Session dbSession ){
14  m_session = dbSession;
15  invalidateCache();
16  }
17 
19  m_session.transaction().start(true);
20  m_iovProxy = m_session.readIov( tag );
23  }
24 
27  if( !tag.empty() ) loadTag( tag );
28  }
29 
31  if( !m_currentIov.isValidFor( time ) ){
33  m_session.transaction().start(true);
34  auto it = m_iovProxy.find( time );
35  if( it != m_iovProxy.end() ) {
36  m_currentIov = *it;
37  if(load) loadPayload();
38  }
40  }
42  }
43 
45  return m_currentIov.isValid();
46  }
47 
49  return m_iovProxy;
50  }
51 
52  }
53 }
virtual void clear()
Definition: Types.cc:10
std::string tag() const
Definition: IOVProxy.cc:162
void start(bool readOnly=true)
Definition: Session.cc:22
Time_t since
Definition: Types.h:51
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
Transaction & transaction()
Definition: Session.cc:66
IOVProxy readIov(const std::string &tag, bool full=false)
Definition: Session.cc:81
unsigned long long Time_t
Definition: Time.h:16
def load
Definition: svgfig.py:546
Iterator find(cond::Time_t time)
Definition: IOVProxy.cc:258
bool isValidFor(Time_t target) const
Definition: Types.cc:20
ValidityInterval setIntervalFor(Time_t target, bool loadPayload=false)
Definition: PayloadProxy.cc:30
void loadTag(const std::string &tag)
Definition: PayloadProxy.cc:18
void setUp(Session dbSession)
Definition: PayloadProxy.cc:13
bool isValid() const
Definition: Types.cc:16
Iterator end() const
Definition: IOVProxy.cc:236
Time_t till
Definition: Types.h:52