2 #ifndef POPCON_POPCON_H
3 #define POPCON_POPCON_H
24 #include <boost/bind.hpp>
52 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>
132 Container
const & payloads = *ret.first;
143 std::for_each(payloads.begin(),payloads.end(),
144 boost::bind(&popcon::PopCon::writeOne<value_type>,
this,
145 boost::bind(&Container::value_type::payload,_1),
157 #endif // POPCON_POPCON_H
cond::LogDBEntry m_logDBEntry
void finalize(Time_t lastTill)
EcalChannelStatus Container
void writeOne(T *payload, Summary *summary, Time_t time)
void write(Source const &source)
unsigned long long Time_t
cond::DbSession session() const
void displayHelper(Container const &payloads)
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
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
const std::string displayIovHelper(Container const &payloads)
std::string m_payload_name
edm::Service< cond::service::PoolDBOutputService > m_dbService