1 #ifndef PopConSourceHandler_H 2 #define PopConSourceHandler_H 7 #include <boost/bind.hpp> 52 Ref() : m_dbsession(){}
54 m_dbsession(dbsession){
55 m_d = m_dbsession.fetchPayload<
T>(
hash );
61 m_dbsession(ref.m_dbsession), m_d(ref.m_d) {
86 std::shared_ptr<T>
m_d;
103 return Ref(m_session,tagInfo().lastPayloadToken);
112 m_session = dbSession;
113 m_tagInfo = &tagInfo;
114 m_logDBEntry = &logDBEntry;
121 const_cast<self*
>(
this)->
initialize(session, tagInfo, logDBEntry);
122 return std::pair<Container const *, std::string const>(&(
const_cast<self*
>(
this)->returnData()), userTextLog());
127 if (!m_to_transfer.empty()) convertFromOld();
136 virtual void getNewObjects()=0;
142 std::sort(m_triplets.begin(),m_triplets.end(),
143 boost::bind(std::less<cond::Time_t>(),
157 std::for_each( m_to_transfer.begin(), m_to_transfer.end(),
160 boost::bind(&self::dummySummary,
this, _1),
173 m_triplets.push_back(t);
174 return m_triplets.size();
cond::persistency::Session & dbSession() const
static AlgebraicMatrix initialize()
T const & operator*() const
cond::persistency::Session m_dbsession
std::string m_userTextLog
std::string const & userTextLog() const
edm::Ref< Container > Ref
Ref & operator=(const Ref &ref)
cond::LogDBEntry_t const * m_logDBEntry
std::vector< Triplet > Container
OldContainer m_to_transfer
virtual ~PopConSourceHandler()
U second(std::pair< T, U > const &p)
payload
payload postfix for testing
Container::value_type value_type
unsigned long long Time_t
std::pair< Container const *, std::string const > operator()(const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
cond::LogDBEntry_t const & logDBEntry() const
void initialize(const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
Summary * dummySummary(typename OldContainer::value_type const &) const
Container const & returnData()
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
T const * operator->() const
Ref(cond::persistency::Session &dbsession, const std::string &hash)
cond::TagInfo_t const * m_tagInfo
cond::persistency::Session m_session
std::vector< std::pair< T *, cond::Time_t > > OldContainer
int add(value_type *payload, Summary *summary, Time_t time)
cond::TagInfo_t const & tagInfo() const