2 #ifndef POPCON_POPCON_H
3 #define POPCON_POPCON_H
19 #include <boost/bind.hpp>
43 template<
typename Source>
96 template<
typename Container>
98 typename Container::const_iterator it;
99 for (it = payloads.begin(); it != payloads.end(); it++)
100 edm::LogInfo (
"PopCon")<<
"Since " << (*it).time << std::endl;
104 template<
typename Container>
106 if (payloads.empty())
return "Nothing to transfer;";
107 std::ostringstream
s;
109 if ( payloads.size()==1)
110 s <<
"Since " << (*payloads.begin()).time <<
"; " ;
113 s <<
"first payload Since " << (*payloads.begin()).time <<
","
114 <<
"last payload Since " << (*payloads.rbegin()).time <<
";" ;
123 template<
typename Source>
130 Container
const &
payloads = *ret.first;
140 std::for_each(payloads.begin(),payloads.end(),
141 boost::bind(&popcon::PopCon::writeOne<value_type>,
this,
142 boost::bind(&Container::value_type::payload,_1),
143 boost::bind(&Container::value_type::time,_1)
153 #endif // POPCON_POPCON_H
tuple ret
prodAgent to be discontinued
cond::LogDBEntry_t m_logDBEntry
void finalize(Time_t lastTill)
void write(Source const &source)
cond::persistency::Session m_targetSession
Container::value_type value_type
unsigned long long Time_t
void writeOne(T *payload, Time_t time)
void displayHelper(Container const &payloads)
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
std::string m_targetConnectionString
cond::TagInfo_t m_tagInfo
PopCon(const edm::ParameterSet &pset)
void setLogHeaderForRecord(const std::string &recordName, const std::string &provenance, const std::string &usertext)
bool m_IsDestDbCheckedInQueryLog
cond::persistency::Session initialize()
const std::string displayIovHelper(Container const &payloads)
edm::AssociationVector< reco::JetRefBaseProd, Values > Container
std::string m_payload_name
static std::string const source
edm::Service< cond::service::PoolDBOutputService > m_dbService