CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
cond::DataProxyWrapperBase Class Referenceabstract

#include <DataProxy.h>

Inheritance diagram for cond::DataProxyWrapperBase:
DataProxyWrapper< RecordT, DataT, Initializer > DataProxyWrapper< DTKeyedConfigListRcd, cond::persistency::KeyList > DataProxyWrapper< ExDwarfListRcd, cond::persistency::KeyList > ProxyDTKeyedConfigListRcd ProxyExDwarfListRcd

Public Types

typedef std::pair< std::string,
std::string > 
Args
 
typedef std::shared_ptr
< edm::eventsetup::DataProxy
edmProxyP
 
typedef std::shared_ptr
< cond::persistency::BasePayloadProxy
ProxyP
 

Public Member Functions

void addInfo (std::string const &il, std::string const &cs, std::string const &tag)
 
std::string const & connString () const
 
Iov_t const & currentIov () const
 
 DataProxyWrapperBase ()
 
virtual edmProxyP edmProxy (unsigned int iovIndex) const =0
 
virtual void initConcurrentIOVs (unsigned int nConcurrentIOVs)=0
 
persistency::IOVProxyiovProxy ()
 
persistency::IOVProxy const & iovProxy () const
 
std::string const & label () const
 
virtual void lateInit (persistency::Session &session, const std::string &tag, const boost::posix_time::ptime &snapshotTime, std::string const &il, std::string const &cs, edm::SerialTaskQueue *queue, std::mutex *mutex)=0
 
void loadTag (std::string const &tag)
 
void loadTag (std::string const &tag, boost::posix_time::ptime const &snapshotTime)
 
virtual ProxyP proxy (unsigned int iovIndex) const =0
 
void reload ()
 
std::shared_ptr< std::vector
< Iov_t > > const & 
requests () const
 
persistency::Sessionsession ()
 
persistency::Session const & session () const
 
ValidityInterval setIntervalFor (Time_t target, Time_t defaultIovSize)
 
void setSession (persistency::Session const &v)
 
std::string const & tag () const
 
TimeType timeType () const
 
virtual edm::eventsetup::TypeTag type () const =0
 
virtual ~DataProxyWrapperBase ()
 

Private Attributes

std::string m_connString
 
Iov_t m_currentIov
 
persistency::IOVProxy m_iovProxy
 
std::string m_label
 
std::shared_ptr< std::vector
< Iov_t > > 
m_requests
 
persistency::Session m_session
 
std::string m_tag
 

Detailed Description

Definition at line 64 of file DataProxy.h.

Member Typedef Documentation

typedef std::pair<std::string, std::string> cond::DataProxyWrapperBase::Args

Definition at line 70 of file DataProxy.h.

Definition at line 67 of file DataProxy.h.

Definition at line 66 of file DataProxy.h.

Constructor & Destructor Documentation

cond::DataProxyWrapperBase::DataProxyWrapperBase ( )

Definition at line 19 of file ProxyFactory.cc.

19 {}
cond::DataProxyWrapperBase::~DataProxyWrapperBase ( )
virtual

Definition at line 21 of file ProxyFactory.cc.

21 {}

Member Function Documentation

void cond::DataProxyWrapperBase::addInfo ( std::string const &  il,
std::string const &  cs,
std::string const &  tag 
)

Definition at line 23 of file ProxyFactory.cc.

References fwrapper::cs, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by DataProxyWrapper< ExDwarfListRcd, cond::persistency::KeyList >::lateInit().

23  {
24  m_label = il;
25  m_connString = cs;
26  m_tag = tag;
27 }
unique_ptr< ClusterSequence > cs
std::string const & tag() const
Definition: DataProxy.h:94
std::string const& cond::DataProxyWrapperBase::connString ( ) const
inline

Definition at line 93 of file DataProxy.h.

References m_connString.

93 { return m_connString; }
Iov_t const& cond::DataProxyWrapperBase::currentIov ( ) const
inline
virtual edmProxyP cond::DataProxyWrapperBase::edmProxy ( unsigned int  iovIndex) const
pure virtual
virtual void cond::DataProxyWrapperBase::initConcurrentIOVs ( unsigned int  nConcurrentIOVs)
pure virtual
persistency::IOVProxy& cond::DataProxyWrapperBase::iovProxy ( )
inline

Definition at line 95 of file DataProxy.h.

References m_iovProxy.

95 { return m_iovProxy; }
persistency::IOVProxy m_iovProxy
Definition: DataProxy.h:115
persistency::IOVProxy const& cond::DataProxyWrapperBase::iovProxy ( ) const
inline

Definition at line 96 of file DataProxy.h.

References m_iovProxy.

96 { return m_iovProxy; }
persistency::IOVProxy m_iovProxy
Definition: DataProxy.h:115
std::string const& cond::DataProxyWrapperBase::label ( ) const
inline

Definition at line 92 of file DataProxy.h.

References m_label.

92 { return m_label; }
virtual void cond::DataProxyWrapperBase::lateInit ( persistency::Session session,
const std::string &  tag,
const boost::posix_time::ptime &  snapshotTime,
std::string const &  il,
std::string const &  cs,
edm::SerialTaskQueue queue,
std::mutex mutex 
)
pure virtual
void cond::DataProxyWrapperBase::loadTag ( std::string const &  tag)

Definition at line 29 of file ProxyFactory.cc.

Referenced by DataProxyWrapper< ExDwarfListRcd, cond::persistency::KeyList >::lateInit().

29  {
30  m_session.transaction().start(true);
34  m_requests = std::make_shared<std::vector<cond::Iov_t>>();
35 }
virtual void clear()
Definition: Types.cc:10
persistency::IOVProxy m_iovProxy
Definition: DataProxy.h:115
void start(bool readOnly=true)
Definition: Session.cc:18
Transaction & transaction()
Definition: Session.cc:52
persistency::Session m_session
Definition: DataProxy.h:117
std::shared_ptr< std::vector< Iov_t > > m_requests
Definition: DataProxy.h:118
IOVProxy readIov(const std::string &tag)
Definition: Session.cc:63
std::string const & tag() const
Definition: DataProxy.h:94
void cond::DataProxyWrapperBase::loadTag ( std::string const &  tag,
boost::posix_time::ptime const &  snapshotTime 
)

Definition at line 37 of file ProxyFactory.cc.

37  {
38  m_session.transaction().start(true);
39  m_iovProxy = m_session.readIov(tag, snapshotTime);
42  m_requests = std::make_shared<std::vector<cond::Iov_t>>();
43 }
virtual void clear()
Definition: Types.cc:10
persistency::IOVProxy m_iovProxy
Definition: DataProxy.h:115
void start(bool readOnly=true)
Definition: Session.cc:18
Transaction & transaction()
Definition: Session.cc:52
persistency::Session m_session
Definition: DataProxy.h:117
std::shared_ptr< std::vector< Iov_t > > m_requests
Definition: DataProxy.h:118
IOVProxy readIov(const std::string &tag)
Definition: Session.cc:63
std::string const & tag() const
Definition: DataProxy.h:94
virtual ProxyP cond::DataProxyWrapperBase::proxy ( unsigned int  iovIndex) const
pure virtual
void cond::DataProxyWrapperBase::reload ( )

Definition at line 45 of file ProxyFactory.cc.

References AlCaHLTBitMon_QueryRunRegistry::string, and GlobalPosition_Frontier_DevDB_cff::tag.

45  {
47  if (!tag.empty())
48  loadTag(tag);
49 }
persistency::IOVProxy m_iovProxy
Definition: DataProxy.h:115
std::string name
Definition: Types.h:61
void loadTag(std::string const &tag)
Definition: ProxyFactory.cc:29
std::string const & tag() const
Definition: DataProxy.h:94
cond::Tag_t tagInfo() const
Definition: IOVProxy.cc:253
std::shared_ptr<std::vector<Iov_t> > const& cond::DataProxyWrapperBase::requests ( ) const
inline
persistency::Session& cond::DataProxyWrapperBase::session ( )
inline
persistency::Session const& cond::DataProxyWrapperBase::session ( ) const
inline

Definition at line 99 of file DataProxy.h.

References m_session.

99 { return m_session; }
persistency::Session m_session
Definition: DataProxy.h:117
cond::ValidityInterval cond::DataProxyWrapperBase::setIntervalFor ( Time_t  target,
Time_t  defaultIovSize 
)

Definition at line 51 of file ProxyFactory.cc.

51  {
52  if (!m_currentIov.isValidFor(time)) {
54  m_session.transaction().start(true);
55  m_currentIov = m_iovProxy.getInterval(time, defaultIovSize);
57  }
59 }
virtual void clear()
Definition: Types.cc:10
persistency::IOVProxy m_iovProxy
Definition: DataProxy.h:115
void start(bool readOnly=true)
Definition: Session.cc:18
Time_t since
Definition: Types.h:53
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
Transaction & transaction()
Definition: Session.cc:52
persistency::Session m_session
Definition: DataProxy.h:117
bool isValidFor(Time_t target) const
Definition: Types.cc:18
cond::Iov_t getInterval(cond::Time_t time)
Definition: IOVProxy.cc:327
Time_t till
Definition: Types.h:54
void cond::DataProxyWrapperBase::setSession ( persistency::Session const &  v)
inline
std::string const& cond::DataProxyWrapperBase::tag ( ) const
inline

Definition at line 94 of file DataProxy.h.

References m_tag.

Referenced by DTTtrigWorkflow.DTttrigWorkflow::prepare_timeboxes_correction().

94 { return m_tag; }
TimeType cond::DataProxyWrapperBase::timeType ( ) const
inline

Definition at line 109 of file DataProxy.h.

References m_iovProxy, cond::persistency::IOVProxy::tagInfo(), and cond::Tag_t::timeType.

109 { return m_iovProxy.tagInfo().timeType; }
persistency::IOVProxy m_iovProxy
Definition: DataProxy.h:115
TimeType timeType
Definition: Types.h:63
cond::Tag_t tagInfo() const
Definition: IOVProxy.cc:253
virtual edm::eventsetup::TypeTag cond::DataProxyWrapperBase::type ( ) const
pure virtual

Member Data Documentation

std::string cond::DataProxyWrapperBase::m_connString
private

Definition at line 113 of file DataProxy.h.

Referenced by connString().

Iov_t cond::DataProxyWrapperBase::m_currentIov
private

Definition at line 116 of file DataProxy.h.

Referenced by currentIov().

persistency::IOVProxy cond::DataProxyWrapperBase::m_iovProxy
private

Definition at line 115 of file DataProxy.h.

Referenced by iovProxy(), and timeType().

std::string cond::DataProxyWrapperBase::m_label
private

Definition at line 112 of file DataProxy.h.

Referenced by label().

std::shared_ptr<std::vector<Iov_t> > cond::DataProxyWrapperBase::m_requests
private

Definition at line 118 of file DataProxy.h.

Referenced by requests().

persistency::Session cond::DataProxyWrapperBase::m_session
private

Definition at line 117 of file DataProxy.h.

Referenced by session(), and setSession().

std::string cond::DataProxyWrapperBase::m_tag
private

Definition at line 114 of file DataProxy.h.

Referenced by tag().