2 #ifndef POPCON_POPCON_H
3 #define POPCON_POPCON_H
20 #include <boost/bind.hpp>
44 template<
typename Source>
89 template<
typename Container>
91 typename Container::const_iterator it;
92 for (it = payloads.begin(); it != payloads.end(); it++)
93 edm::LogInfo (
"PopCon")<<
"Since " << (*it).time << std::endl;
97 template<
typename Container>
99 if (payloads.empty())
return "Nothing to transfer;";
100 std::ostringstream
s;
102 if ( payloads.size()==1)
103 s <<
"Since " << (*payloads.begin()).
time <<
"; " ;
106 s <<
"first payload Since " << (*payloads.begin()).
time <<
","
107 <<
"last payload Since " << (*payloads.rbegin()).
time <<
";" ;
116 template<
typename Source>
124 Container
const &
payloads = *ret.first;
134 std::for_each(payloads.begin(),payloads.end(),
135 boost::bind(&popcon::PopCon::writeOne<value_type>,
this,
136 boost::bind(&Container::value_type::payload,_1),
147 #endif // POPCON_POPCON_H
cond::LogDBEntry_t m_logDBEntry
void finalize(Time_t lastTill)
EcalChannelStatus Container
cond::persistency::Session session() const
void write(Source const &source)
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)
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
const std::string displayIovHelper(Container const &payloads)
std::string m_payload_name
static std::string const source
edm::Service< cond::service::PoolDBOutputService > m_dbService