2 #ifndef POPCON_POPCON_H
3 #define POPCON_POPCON_H
19 #include <boost/bind.hpp>
43 template<
typename Source>
95 template<
typename Container>
97 typename Container::const_iterator it;
98 for (it = payloads.begin(); it != payloads.end(); it++)
99 edm::LogInfo (
"PopCon")<<
"Since " << (*it).time << std::endl;
103 template<
typename Container>
105 if (payloads.empty())
return std::string(
"Nothing to transfer;");
106 std::ostringstream
s;
108 if ( payloads.size()==1)
109 s <<
"Since " << (*payloads.begin()).time <<
"; " ;
112 s <<
"first payload Since " << (*payloads.begin()).time <<
", "
113 <<
"last payload Since " << (*payloads.rbegin()).time <<
"; " ;
122 template<
typename Source>
129 Container
const &
payloads = *ret.first;
132 std::ostringstream
s;
139 std::for_each(payloads.begin(),payloads.end(),
140 boost::bind(&popcon::PopCon::writeOne<value_type>,
this,
141 boost::bind(&Container::value_type::payload,_1),
142 boost::bind(&Container::value_type::time,_1)
152 #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)
cond::persistency::Session initialize()
const std::string displayIovHelper(Container const &payloads)
static const char *const s_version
edm::AssociationVector< reco::JetRefBaseProd, Values > Container
std::string m_payload_name
static std::string const source
edm::Service< cond::service::PoolDBOutputService > m_dbService