CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
UpdaterService.cc
Go to the documentation of this file.
6 
7 #include <iostream>
8 
10  theEventId(0) {
12  theInit();
13 }
14 
16 }
17 
20  descriptions.add("UpdaterService", desc);
21 }
22 
24  theInit();
25  theEventId = &eId;
26 }
27 
29  theCounts.clear();
30 }
31 
32 bool UpdaterService::checkOnce(std::string tag){
33  bool answer=true;
34 
35  std::map<std::string, unsigned int>::iterator i=theCounts.find(tag);
36  if (i!=theCounts.end()){
37  i->second++;
38  answer=false;
39  }
40  else{
41  theCounts[tag]=1;
42  answer=true;
43  }
44 
45  if (theEventId){ LogDebug("UpdaterService")<<"checking ONCE on tag: "<<tag
46  <<"on run: "<<theEventId->run()<<" event: "<<theEventId->event()
47  <<((answer)?" -> true":" -> false");
48  }
49  return answer;
50 }
51 
52 bool UpdaterService::check(std::string tag, std::string label){
53  return true;
54 }
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:42
EventNumber_t event() const
Definition: EventID.h:44
answer
Definition: submit.py:44
int i
Definition: DBlmapReader.cc:9
UpdaterService(const edm::ParameterSet &cfg, edm::ActivityRegistry &r)
const std::string & label
Definition: MVAComputer.cc:186
void watchPreProcessEvent(PreProcessEvent::slot_type const &iSlot)
const edm::EventID * theEventId
bool checkOnce(std::string)
void init(const edm::EventID &, const edm::Timestamp &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::map< std::string, unsigned int > theCounts
bool check(std::string, std::string)