CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

DataProxyWrapper< RecordT, DataT > Class Template Reference

#include <DataProxy.h>

Inheritance diagram for DataProxyWrapper< RecordT, DataT >:
cond::DataProxyWrapperBase

List of all members.

Public Types

typedef boost::shared_ptr
< PayProxy
DataP
typedef ::DataProxy< RecordT,
DataT > 
DataProxy
typedef cond::PayloadProxy< DataT > PayProxy

Public Member Functions

 DataProxyWrapper (cond::DbSession &session, const std::string &iovtoken, std::string const &ilabel, const char *source=0)
 DataProxyWrapper (const char *source=0)
virtual edmProxyP edmProxy () const
virtual void lateInit (cond::DbSession &session, const std::string &tag, std::string const &il, std::string const &cs)
virtual void lateInit (cond::DbSession &session, const std::string &iovtoken, std::string const &il, std::string const &cs, std::string const &tag)
virtual ProxyP proxy () const
virtual edm::eventsetup::TypeTag type () const

Private Attributes

edmProxyP m_edmProxy
boost::shared_ptr
< cond::PayloadProxy< DataT > > 
m_proxy
std::string m_source
edm::eventsetup::TypeTag m_type

Detailed Description

template<class RecordT, class DataT>
class DataProxyWrapper< RecordT, DataT >

Definition at line 98 of file DataProxy.h.


Member Typedef Documentation

template<class RecordT , class DataT >
typedef boost::shared_ptr<PayProxy> DataProxyWrapper< RecordT, DataT >::DataP

Definition at line 102 of file DataProxy.h.

template<class RecordT , class DataT >
typedef ::DataProxy<RecordT,DataT> DataProxyWrapper< RecordT, DataT >::DataProxy

Definition at line 100 of file DataProxy.h.

template<class RecordT , class DataT >
typedef cond::PayloadProxy<DataT> DataProxyWrapper< RecordT, DataT >::PayProxy

Definition at line 101 of file DataProxy.h.


Constructor & Destructor Documentation

template<class RecordT , class DataT >
DataProxyWrapper< RecordT, DataT >::DataProxyWrapper ( cond::DbSession session,
const std::string &  iovtoken,
std::string const &  ilabel,
const char *  source = 0 
) [inline]

Definition at line 105 of file DataProxy.h.

References DataProxyWrapper< RecordT, DataT >::m_type.

                                                                                                :
    cond::DataProxyWrapperBase(ilabel),
    m_proxy(new PayProxy(session,iovtoken,true, source)), //errorPolicy set to true: PayloadProxy should catch and re-throw ORA exceptions
    m_edmProxy(new DataProxy(m_proxy)){
    //NOTE: We do this so that the type 'DataT' will get registered
    // when the plugin is dynamically loaded
    m_type = edm::eventsetup::DataKey::makeTypeTag<DataT>();
  }
template<class RecordT , class DataT >
DataProxyWrapper< RecordT, DataT >::DataProxyWrapper ( const char *  source = 0) [inline, explicit]

Definition at line 116 of file DataProxy.h.

References DataProxyWrapper< RecordT, DataT >::m_type.

                                                   : m_source (source ? source : "") {
    //NOTE: We do this so that the type 'DataT' will get registered
    // when the plugin is dynamically loaded
    m_type = edm::eventsetup::DataKey::makeTypeTag<DataT>();
  }

Member Function Documentation

template<class RecordT , class DataT >
virtual edmProxyP DataProxyWrapper< RecordT, DataT >::edmProxy ( ) const [inline, virtual]

Implements cond::DataProxyWrapperBase.

Definition at line 146 of file DataProxy.h.

References DataProxyWrapper< RecordT, DataT >::m_edmProxy.

{ return m_edmProxy;}
template<class RecordT , class DataT >
virtual void DataProxyWrapper< RecordT, DataT >::lateInit ( cond::DbSession session,
const std::string &  iovtoken,
std::string const &  il,
std::string const &  cs,
std::string const &  tag 
) [inline, virtual]

Implements cond::DataProxyWrapperBase.

Definition at line 134 of file DataProxy.h.

References cond::DataProxyWrapperBase::addInfo(), DataProxyWrapper< RecordT, DataT >::m_edmProxy, DataProxyWrapper< RecordT, DataT >::m_proxy, and DataProxyWrapper< RecordT, DataT >::m_source.

                                                                                           {
    m_proxy.reset(new PayProxy(session,iovtoken,true, //errorPolicy set to true: PayloadProxy should catch and re-throw ORA exceptions
                               m_source.empty() ?  (const char *)(0) : m_source.c_str() 
                               )
                  );
    m_edmProxy.reset(new DataProxy(m_proxy));
    addInfo(il, cs, tag);
  }
template<class RecordT , class DataT >
virtual void DataProxyWrapper< RecordT, DataT >::lateInit ( cond::DbSession session,
const std::string &  tag,
std::string const &  il,
std::string const &  cs 
) [inline, virtual]

Implements cond::DataProxyWrapperBase.

Definition at line 123 of file DataProxy.h.

References cond::DataProxyWrapperBase::addInfo(), DataProxyWrapper< RecordT, DataT >::m_edmProxy, DataProxyWrapper< RecordT, DataT >::m_proxy, and DataProxyWrapper< RecordT, DataT >::m_source.

                                                                    {
    m_proxy.reset(new PayProxy(session,true, //errorPolicy set to true: PayloadProxy should catch and re-throw ORA exceptions
                               m_source.empty() ?  (const char *)(0) : m_source.c_str() 
                               )
                  );
    m_proxy->loadTag( tag);
    m_edmProxy.reset(new DataProxy(m_proxy));
    addInfo(il, cs, tag);
  }
template<class RecordT , class DataT >
virtual ProxyP DataProxyWrapper< RecordT, DataT >::proxy ( ) const [inline, virtual]

Implements cond::DataProxyWrapperBase.

Definition at line 145 of file DataProxy.h.

References DataProxyWrapper< RecordT, DataT >::m_proxy.

{ return m_proxy;}
template<class RecordT , class DataT >
virtual edm::eventsetup::TypeTag DataProxyWrapper< RecordT, DataT >::type ( ) const [inline, virtual]

Implements cond::DataProxyWrapperBase.

Definition at line 144 of file DataProxy.h.

References DataProxyWrapper< RecordT, DataT >::m_type.

{ return m_type;}

Member Data Documentation

template<class RecordT , class DataT >
edmProxyP DataProxyWrapper< RecordT, DataT >::m_edmProxy [private]
template<class RecordT , class DataT >
boost::shared_ptr<cond::PayloadProxy<DataT> > DataProxyWrapper< RecordT, DataT >::m_proxy [private]
template<class RecordT , class DataT >
std::string DataProxyWrapper< RecordT, DataT >::m_source [private]

Definition at line 149 of file DataProxy.h.

Referenced by DataProxyWrapper< RecordT, DataT >::lateInit().

template<class RecordT , class DataT >
edm::eventsetup::TypeTag DataProxyWrapper< RecordT, DataT >::m_type [private]