#include <LockService.h>
Public Member Functions | |
boost::mutex & | getLock () |
LockService (const edm::ParameterSet &, edm::ActivityRegistry &) | |
void | postBeginJob () |
void | postEndJob () |
void | postEventProcessing (const edm::Event &, const edm::EventSetup &) |
void | postModule (const edm::ModuleDescription &) |
void | postSource () |
void | postSourceConstruction (const edm::ModuleDescription &) |
void | preEventProcessing (const edm::EventID &, const edm::Timestamp &) |
void | preModule (const edm::ModuleDescription &) |
void | preSource () |
void | preSourceConstruction (const edm::ModuleDescription &) |
~LockService () | |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Private Types | |
typedef std::vector< std::string > | Labels |
Private Attributes | |
Labels | labels_ |
boost::mutex & | lock_ |
boost::shared_ptr < boost::mutex::scoped_lock > | locker_ |
bool | lockSources_ |
Definition at line 31 of file LockService.h.
typedef std::vector<std::string> edm::rootfix::LockService::Labels [private] |
Definition at line 60 of file LockService.h.
LockService::LockService | ( | const edm::ParameterSet & | iPS, |
edm::ActivityRegistry & | reg | ||
) |
Definition at line 13 of file LockService.cc.
References FDEBUG, postModule(), postSource(), postSourceConstruction(), preModule(), preSource(), preSourceConstruction(), edm::ActivityRegistry::watchPostModule(), edm::ActivityRegistry::watchPostSource(), edm::ActivityRegistry::watchPostSourceConstruction(), edm::ActivityRegistry::watchPreModule(), edm::ActivityRegistry::watchPreSource(), and edm::ActivityRegistry::watchPreSourceConstruction().
: lock_(*getGlobalMutex()), locker_(), labels_(iPS.getUntrackedParameter<Labels>("labels")), lockSources_(iPS.getUntrackedParameter<bool>("lockSources")) { reg.watchPreSourceConstruction(this,&LockService::preSourceConstruction); reg.watchPostSourceConstruction(this,&LockService::postSourceConstruction); // reg.watchPostBeginJob(this,&LockService::postBeginJob); // reg.watchPostEndJob(this,&LockService::postEndJob); // reg.watchPreProcessEvent(this,&LockService::preEventProcessing); // reg.watchPostProcessEvent(this,&LockService::postEventProcessing); reg.watchPreSource(this,&LockService::preSource); reg.watchPostSource(this,&LockService::postSource); reg.watchPreModule(this,&LockService::preModule); reg.watchPostModule(this,&LockService::postModule); FDEBUG(4) << "In LockServices" << std::endl; }
LockService::~LockService | ( | ) |
Definition at line 36 of file LockService.cc.
{ }
void LockService::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Definition at line 39 of file LockService.cc.
References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::addUntracked().
{ edm::ParameterSetDescription desc; std::vector<std::string> defaultVector; desc.addUntracked<std::vector<std::string> >("labels",defaultVector); desc.addUntracked<bool>("lockSources",true); descriptions.add("LockService", desc); }
boost::mutex& edm::rootfix::LockService::getLock | ( | ) | [inline] |
void LockService::postBeginJob | ( | ) |
Definition at line 61 of file LockService.cc.
{ }
void LockService::postEndJob | ( | ) |
Definition at line 64 of file LockService.cc.
{ }
void LockService::postEventProcessing | ( | const edm::Event & | , |
const edm::EventSetup & | |||
) |
Definition at line 70 of file LockService.cc.
{ }
void LockService::postModule | ( | const edm::ModuleDescription & | ) |
Definition at line 93 of file LockService.cc.
References FDEBUG, and locker_.
Referenced by LockService().
void LockService::postSource | ( | ) |
Definition at line 80 of file LockService.cc.
References FDEBUG, and locker_.
Referenced by LockService().
void LockService::postSourceConstruction | ( | const edm::ModuleDescription & | ) |
Definition at line 56 of file LockService.cc.
References FDEBUG, and locker_.
Referenced by LockService().
void LockService::preEventProcessing | ( | const edm::EventID & | , |
const edm::Timestamp & | |||
) |
Definition at line 67 of file LockService.cc.
{ }
void LockService::preModule | ( | const edm::ModuleDescription & | desc | ) |
Definition at line 85 of file LockService.cc.
References FDEBUG, spr::find(), labels_, lock_, locker_, and edm::ModuleDescription::moduleLabel().
Referenced by LockService().
void LockService::preSource | ( | ) |
Definition at line 73 of file LockService.cc.
References FDEBUG, lock_, locker_, and lockSources_.
Referenced by LockService().
{ if(lockSources_) { FDEBUG(4) << "made a new locked in LockService" << std::endl; locker_.reset(new boost::mutex::scoped_lock(lock_)); } }
void LockService::preSourceConstruction | ( | const edm::ModuleDescription & | desc | ) |
Definition at line 47 of file LockService.cc.
References FDEBUG, spr::find(), labels_, lock_, locker_, and edm::ModuleDescription::moduleLabel().
Referenced by LockService().
Labels edm::rootfix::LockService::labels_ [private] |
Definition at line 61 of file LockService.h.
Referenced by preModule(), and preSourceConstruction().
boost::mutex& edm::rootfix::LockService::lock_ [private] |
Definition at line 58 of file LockService.h.
Referenced by getLock(), preModule(), preSource(), and preSourceConstruction().
boost::shared_ptr<boost::mutex::scoped_lock> edm::rootfix::LockService::locker_ [private] |
Definition at line 59 of file LockService.h.
Referenced by postModule(), postSource(), postSourceConstruction(), preModule(), preSource(), and preSourceConstruction().
bool edm::rootfix::LockService::lockSources_ [private] |
Definition at line 62 of file LockService.h.
Referenced by preSource().