CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

UpdaterService Class Reference

#include <UpdaterService.h>

List of all members.

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::EventIDtheEventId

Detailed Description

Definition at line 16 of file UpdaterService.h.


Constructor & Destructor Documentation

UpdaterService::UpdaterService ( const edm::ParameterSet cfg,
edm::ActivityRegistry r 
)
UpdaterService::~UpdaterService ( )

Definition at line 15 of file UpdaterService.cc.

                               {
}

Member Function Documentation

bool UpdaterService::check ( std::string  tag,
std::string  label 
)

Definition at line 52 of file UpdaterService.cc.

                                                        {
  return true;
}
bool UpdaterService::checkOnce ( std::string  tag)

Definition at line 32 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 18 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 23 of file UpdaterService.cc.

References theEventId, and theInit().

Referenced by UpdaterService().

                                                                   {
  theInit();
  theEventId = &eId;
}
void UpdaterService::theInit ( ) [private]

Definition at line 28 of file UpdaterService.cc.

References theCounts.

Referenced by init(), and UpdaterService().

                            {
  theCounts.clear();  
}

Member Data Documentation

std::map< std::string, unsigned int > UpdaterService::theCounts [private]

Definition at line 31 of file UpdaterService.h.

Referenced by checkOnce(), and theInit().

Definition at line 32 of file UpdaterService.h.

Referenced by checkOnce(), and init().