Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the DQMService to see the new fwk signals #4111

Merged
merged 1 commit into from Jun 6, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 2 additions & 35 deletions DQMServices/Core/src/DQMService.cc
Expand Up @@ -25,32 +25,6 @@ DQMScope::DQMScope(void)
DQMScope::~DQMScope(void)
{ s_mutex.unlock(); }

/// Restrict access to the DQM core.
static void
restrictDQMAccess(void)
{ s_mutex.lock(); }

static void
restrictDQMAccessM(const edm::ModuleDescription &)
{ restrictDQMAccess(); }

static void
restrictDQMAccessS(edm::StreamID)
{ restrictDQMAccess(); }

/// Release access to the DQM core.
static void
releaseDQMAccess(void)
{ s_mutex.unlock(); }

static void
releaseDQMAccessM(const edm::ModuleDescription &)
{ releaseDQMAccess(); }

static void
releaseDQMAccessS(edm::StreamID)
{ releaseDQMAccess(); }

// -------------------------------------------------------------------
DQMService::DQMService(const edm::ParameterSet &pset, edm::ActivityRegistry &ar)
: store_(&*edm::Service<DQMStore>()),
Expand All @@ -59,14 +33,7 @@ DQMService::DQMService(const edm::ParameterSet &pset, edm::ActivityRegistry &ar)
lastFlush_(0),
publishFrequency_(5.0)
{
ar.watchPreSourceConstruction(&restrictDQMAccessM);
ar.watchPostSourceConstruction(&releaseDQMAccessM);
ar.watchPreSourceEvent(&restrictDQMAccessS);
ar.watchPostSourceEvent(&releaseDQMAccessS);
ar.watchPreModule(&restrictDQMAccessM);
ar.watchPostModule(&releaseDQMAccessM);
ar.watchPostProcessEvent(this, &DQMService::flush);
ar.watchPostEndJob(this, &DQMService::shutdown);
ar.watchPostEvent(this, &DQMService::flush);

std::string host = pset.getUntrackedParameter<std::string>("collectorHost", "");
int port = pset.getUntrackedParameter<int>("collectorPort", 9090);
Expand Down Expand Up @@ -210,7 +177,7 @@ void DQMService::flushStandalone()

}
void
DQMService::flush(const edm::Event &, const edm::EventSetup &)
DQMService::flush(edm::StreamContext const & sc)
{
// Call a function independent to the framework
flushStandalone();
Expand Down
2 changes: 1 addition & 1 deletion DQMServices/Core/src/DQMService.h
Expand Up @@ -17,7 +17,7 @@ class DQMService
~DQMService(void);

public:
void flush(const edm::Event &, const edm::EventSetup &);
void flush(edm::StreamContext const & sc);
private:
void shutdown(void);

Expand Down