#include <UpdaterService.h>
Public Member Functions | |
bool | check (std::string, std::string) |
bool | checkOnce (std::string) |
void | init (const edm::EventID &, const edm::Timestamp &) |
UpdaterService (const edm::ParameterSet &cfg, edm::ActivityRegistry &r) | |
~UpdaterService () | |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Private Member Functions | |
void | theInit () |
Private Attributes | |
std::map< std::string, unsigned int > | theCounts |
const edm::EventID * | theEventId |
Definition at line 16 of file UpdaterService.h.
UpdaterService::UpdaterService | ( | const edm::ParameterSet & | cfg, |
edm::ActivityRegistry & | r | ||
) |
Definition at line 10 of file UpdaterService.cc.
References init(), theInit(), and edm::ActivityRegistry::watchPreProcessEvent().
: theEventId(0) { r.watchPreProcessEvent(this, &UpdaterService::init); theInit(); }
UpdaterService::~UpdaterService | ( | ) |
Definition at line 16 of file UpdaterService.cc.
{ }
bool UpdaterService::check | ( | std::string | , |
std::string | |||
) |
Definition at line 53 of file UpdaterService.cc.
{ return true; }
bool UpdaterService::checkOnce | ( | std::string | tag | ) |
Definition at line 33 of file UpdaterService.cc.
References submit::answer, edm::EventID::event(), i, LogDebug, edm::EventID::run(), GlobalPosition_Frontier_DevDB_cff::tag, theCounts, and theEventId.
{ bool answer = true; std::map<std::string, unsigned int>::iterator i = theCounts.find(tag); if(i != theCounts.end()) { ++i->second; answer = false; } else{ theCounts[tag] = 1; answer = true; } if(theEventId) { LogDebug("UpdaterService") << "checking ONCE on tag: " << tag << "on run: " << theEventId->run() << " event: " << theEventId->event() << ((answer) ? " -> true" : " -> false"); } return answer; }
void UpdaterService::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Definition at line 19 of file UpdaterService.cc.
References edm::ConfigurationDescriptions::add().
{ edm::ParameterSetDescription desc; descriptions.add("UpdaterService", desc); }
void UpdaterService::init | ( | const edm::EventID & | eId, |
const edm::Timestamp & | |||
) |
Definition at line 24 of file UpdaterService.cc.
References theEventId, and theInit().
Referenced by UpdaterService().
{ theInit(); theEventId = &eId; }
void UpdaterService::theInit | ( | ) | [private] |
Definition at line 29 of file UpdaterService.cc.
References theCounts.
Referenced by init(), and UpdaterService().
{ theCounts.clear(); }
std::map< std::string, unsigned int > UpdaterService::theCounts [private] |
Definition at line 31 of file UpdaterService.h.
Referenced by checkOnce(), and theInit().
const edm::EventID* UpdaterService::theEventId [private] |
Definition at line 32 of file UpdaterService.h.
Referenced by checkOnce(), and init().