2 #ifndef POPCON_POPCON_H
3 #define POPCON_POPCON_H
20 #include <boost/bind.hpp>
44 template<
typename Source>
97 template<
typename Container>
99 typename Container::const_iterator it;
100 for (it = payloads.begin(); it != payloads.end(); it++)
101 edm::LogInfo (
"PopCon")<<
"Since " << (*it).time << std::endl;
105 template<
typename Container>
107 if (payloads.empty())
return "Nothing to transfer;";
108 std::ostringstream
s;
110 if ( payloads.size()==1)
111 s <<
"Since " << (*payloads.begin()).
time <<
"; " ;
114 s <<
"first payload Since " << (*payloads.begin()).
time <<
","
115 <<
"last payload Since " << (*payloads.rbegin()).
time <<
";" ;
124 template<
typename Source>
131 Container
const &
payloads = *ret.first;
141 std::for_each(payloads.begin(),payloads.end(),
142 boost::bind(&popcon::PopCon::writeOne<value_type>,
this,
143 boost::bind(&Container::value_type::payload,_1),
154 #endif // POPCON_POPCON_H
cond::LogDBEntry m_logDBEntry
void finalize(Time_t lastTill)
EcalChannelStatus Container
void write(Source const &source)
cond::persistency::Session m_targetSession
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
Container::value_type value_type
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)
std::string m_payload_name
static std::string const source
edm::Service< cond::service::PoolDBOutputService > m_dbService