/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWCore/Framework/src/EventSignalsSentry.h
45 строк
1 KB
Eric Cano
Use emit() for framework signals emission instead of operator().
15 дек 2025, 11:58
15 дек 2025, 11:58
84bd5b4
Код
Авторство
О чём код?
#ifndef FWCore_Framework_EventSignalsSentry_h #define FWCore_Framework_EventSignalsSentry_h // -*- C++ -*- // // Package: FWCore/Framework // Class : EventSignalsSentry // /**\class edm::EventSignalsSentry EventSignalsSentry.h "EventSignalsSentry.h" Description: Guarantees that the pre/post module Event signals are sent Usage: <usage> */ // // Original Author: Chris Jones // Created: Mon, 12 May 2014 19:18:21 GMT // // system include files #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h" #include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h" // user include files // forward declarations namespace edm { class EventSignalsSentry { public: EventSignalsSentry(ActivityRegistry* iReg, ModuleCallingContext const* iContext) : m_reg(iReg), m_context(iContext) { iReg->preModuleEventSignal_.emit(*(iContext->getStreamContext()), *iContext); } ~EventSignalsSentry() { m_reg->postModuleEventSignal_.emit(*(m_context->getStreamContext()), *m_context); } private: // ---------- member data -------------------------------- ActivityRegistry* m_reg; // We do not use propagate_const because the registry itself is mutable. ModuleCallingContext const* m_context; }; } // namespace edm #endif