Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-14 22:55:55

0001 #ifndef FWCore_ServiceRegistry_ActivityRegistry_h
0002 #define FWCore_ServiceRegistry_ActivityRegistry_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     ServiceRegistry
0006 // Class  :     ActivityRegistry
0007 //
0008 /**\class ActivityRegistry ActivityRegistry.h FWCore/ServiceRegistry/interface/ActivityRegistry.h
0009 
0010  Description: Registry holding the signals that Services can subscribe to
0011 
0012  Usage:
0013     Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application.
0014 
0015 There are unit tests for the signals that use the Tracer
0016 to print out the transitions as they occur and then
0017 compare to a reference file. One test does this for
0018 a SubProcess test and the other for a test using
0019 unscheduled execution. The tests are in FWCore/Integration/test:
0020   run_SubProcess.sh
0021   testSubProcess_cfg.py
0022   run_TestGetBy.sh
0023   testGetBy1_cfg.py
0024   testGetBy2_cfg.py
0025 
0026 There are four little details you should remember when adding new signals
0027 to this file that go beyond the obvious cut and paste type of edits.
0028   1. The number at the end of the AR_WATCH_USING_METHOD_X macro definition
0029   is the number of function arguments. It will not compile if you use the
0030   wrong number there.
0031   2. Use connect or connect_front depending on whether the callback function
0032   should be called for different services in the order the Services were
0033   constructed or in reverse order. Begin signals are usually forward and
0034   End signals in reverse, but if the service does not depend on other services
0035   and vice versa this does not matter.
0036   3. The signal needs to be added to either connectGlobals or connectLocals
0037   in the ActivityRegistry.cc file, depending on whether a signal is seen
0038   by children or parents when there are SubProcesses. For example, source
0039   signals are only generated in the top level process and should be seen
0040   by all child SubProcesses so they are in connectGlobals. Most signals
0041   however belong in connectLocals. It does not really matter in jobs
0042   without at least one SubProcess.
0043   4. Each signal also needs to be added in copySlotsFrom in
0044   ActivityRegistry.cc. Whether it uses copySlotsToFrom or
0045   copySlotsToFromReverse depends on the same ordering issue as the connect
0046   or connect_front choice in item 2 above.
0047 */
0048 //
0049 // Original Author:  Chris Jones
0050 //         Created:  Mon Sep  5 19:53:09 EDT 2005
0051 //
0052 
0053 // system include files
0054 #include <functional>
0055 #include <string>
0056 
0057 // user include files
0058 #include "FWCore/ServiceRegistry/interface/TerminationOrigin.h"
0059 #include "FWCore/Utilities/interface/LuminosityBlockIndex.h"
0060 #include "FWCore/Utilities/interface/RunIndex.h"
0061 #include "FWCore/Utilities/interface/Signal.h"
0062 #include "FWCore/Utilities/interface/StreamID.h"
0063 
0064 #define AR_WATCH_USING_METHOD_0(method)               \
0065   template <class TClass, class TMethod>              \
0066   void method(TClass* iObject, TMethod iMethod) {     \
0067     method(std::bind(std::mem_fn(iMethod), iObject)); \
0068   }
0069 #define AR_WATCH_USING_METHOD_1(method)                                      \
0070   template <class TClass, class TMethod>                                     \
0071   void method(TClass* iObject, TMethod iMethod) {                            \
0072     method(std::bind(std::mem_fn(iMethod), iObject, std::placeholders::_1)); \
0073   }
0074 #define AR_WATCH_USING_METHOD_2(method)                                                             \
0075   template <class TClass, class TMethod>                                                            \
0076   void method(TClass* iObject, TMethod iMethod) {                                                   \
0077     method(std::bind(std::mem_fn(iMethod), iObject, std::placeholders::_1, std::placeholders::_2)); \
0078   }
0079 #define AR_WATCH_USING_METHOD_3(method)                                                                       \
0080   template <class TClass, class TMethod>                                                                      \
0081   void method(TClass* iObject, TMethod iMethod) {                                                             \
0082     method(std::bind(                                                                                         \
0083         std::mem_fn(iMethod), iObject, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); \
0084   }
0085 // forward declarations
0086 namespace edm {
0087   class EventID;
0088   class LuminosityBlockID;
0089   class RunID;
0090   class Timestamp;
0091   class ModuleDescription;
0092   class Event;
0093   class LuminosityBlock;
0094   class Run;
0095   class EventSetup;
0096   class IOVSyncValue;
0097   class HLTPathStatus;
0098   class GlobalContext;
0099   class StreamContext;
0100   class PathContext;
0101   class ProcessContext;
0102   class ModuleCallingContext;
0103   class PathsAndConsumesOfModulesBase;
0104   class ESModuleCallingContext;
0105   namespace eventsetup {
0106     struct ComponentDescription;
0107     class DataKey;
0108     class EventSetupRecordKey;
0109   }  // namespace eventsetup
0110   namespace service {
0111     class SystemBounds;
0112   }
0113 
0114   namespace signalslot {
0115     void throwObsoleteSignalException();
0116 
0117     template <class T>
0118     class ObsoleteSignal {
0119     public:
0120       typedef std::function<T> slot_type;
0121 
0122       ObsoleteSignal() = default;
0123 
0124       template <typename U>
0125       void connect(U /*  iFunc */) {
0126         throwObsoleteSignalException();
0127       }
0128 
0129       template <typename U>
0130       void connect_front(U /*  iFunc*/) {
0131         throwObsoleteSignalException();
0132       }
0133     };
0134   }  // namespace signalslot
0135   class ActivityRegistry {
0136   public:
0137     ActivityRegistry() {}
0138     ActivityRegistry(ActivityRegistry const&) = delete;             // Disallow copying and moving
0139     ActivityRegistry& operator=(ActivityRegistry const&) = delete;  // Disallow copying and moving
0140 
0141     // ---------- signals ------------------------------------
0142     typedef signalslot::Signal<void(service::SystemBounds const&)> Preallocate;
0143     ///signal is emitted before beginJob
0144     Preallocate preallocateSignal_;
0145     void watchPreallocate(Preallocate::slot_type const& iSlot) { preallocateSignal_.connect(iSlot); }
0146     AR_WATCH_USING_METHOD_1(watchPreallocate)
0147 
0148     typedef signalslot::Signal<void(PathsAndConsumesOfModulesBase const&, ProcessContext const&)> PreBeginJob;
0149     ///signal is emitted before all modules have gotten their beginJob called
0150     PreBeginJob preBeginJobSignal_;
0151     ///convenience function for attaching to signal
0152     void watchPreBeginJob(PreBeginJob::slot_type const& iSlot) { preBeginJobSignal_.connect(iSlot); }
0153     AR_WATCH_USING_METHOD_2(watchPreBeginJob)
0154 
0155     typedef signalslot::Signal<void()> PostBeginJob;
0156     ///signal is emitted after all modules have gotten their beginJob called
0157     PostBeginJob postBeginJobSignal_;
0158     ///convenience function for attaching to signal
0159     void watchPostBeginJob(PostBeginJob::slot_type const& iSlot) { postBeginJobSignal_.connect(iSlot); }
0160     AR_WATCH_USING_METHOD_0(watchPostBeginJob)
0161 
0162     typedef signalslot::Signal<void()> PreEndJob;
0163     ///signal is emitted before any modules have gotten their endJob called
0164     PreEndJob preEndJobSignal_;
0165     void watchPreEndJob(PreEndJob::slot_type const& iSlot) { preEndJobSignal_.connect_front(iSlot); }
0166     AR_WATCH_USING_METHOD_0(watchPreEndJob)
0167 
0168     typedef signalslot::Signal<void()> PostEndJob;
0169     ///signal is emitted after all modules have gotten their endJob called
0170     PostEndJob postEndJobSignal_;
0171     void watchPostEndJob(PostEndJob::slot_type const& iSlot) { postEndJobSignal_.connect_front(iSlot); }
0172     AR_WATCH_USING_METHOD_0(watchPostEndJob)
0173 
0174     typedef signalslot::Signal<void()> JobFailure;
0175     /// signal is emitted if event processing or end-of-job
0176     /// processing fails with an uncaught exception.
0177     JobFailure jobFailureSignal_;
0178     ///convenience function for attaching to signal
0179     void watchJobFailure(JobFailure::slot_type const& iSlot) { jobFailureSignal_.connect_front(iSlot); }
0180     AR_WATCH_USING_METHOD_0(watchJobFailure)
0181 
0182     /// signal is emitted before the source starts creating an Event
0183     typedef signalslot::Signal<void(StreamID)> PreSourceEvent;
0184     PreSourceEvent preSourceSignal_;
0185     void watchPreSourceEvent(PreSourceEvent::slot_type const& iSlot) { preSourceSignal_.connect(iSlot); }
0186     AR_WATCH_USING_METHOD_1(watchPreSourceEvent)
0187 
0188     /// signal is emitted after the source starts creating an Event
0189     typedef signalslot::Signal<void(StreamID)> PostSourceEvent;
0190     PostSourceEvent postSourceSignal_;
0191     void watchPostSourceEvent(PostSourceEvent::slot_type const& iSlot) { postSourceSignal_.connect_front(iSlot); }
0192     AR_WATCH_USING_METHOD_1(watchPostSourceEvent)
0193 
0194     /// signal is emitted before the source starts creating a Lumi
0195     typedef signalslot::Signal<void(LuminosityBlockIndex)> PreSourceLumi;
0196     PreSourceLumi preSourceLumiSignal_;
0197     void watchPreSourceLumi(PreSourceLumi::slot_type const& iSlot) { preSourceLumiSignal_.connect(iSlot); }
0198     AR_WATCH_USING_METHOD_1(watchPreSourceLumi)
0199 
0200     /// signal is emitted after the source starts creating a Lumi
0201     typedef signalslot::Signal<void(LuminosityBlockIndex)> PostSourceLumi;
0202     PostSourceLumi postSourceLumiSignal_;
0203     void watchPostSourceLumi(PostSourceLumi::slot_type const& iSlot) { postSourceLumiSignal_.connect_front(iSlot); }
0204     AR_WATCH_USING_METHOD_1(watchPostSourceLumi)
0205 
0206     /// signal is emitted before the source starts creating a Run
0207     typedef signalslot::Signal<void(RunIndex)> PreSourceRun;
0208     PreSourceRun preSourceRunSignal_;
0209     void watchPreSourceRun(PreSourceRun::slot_type const& iSlot) { preSourceRunSignal_.connect(iSlot); }
0210     AR_WATCH_USING_METHOD_1(watchPreSourceRun)
0211 
0212     /// signal is emitted after the source starts creating a Run
0213     typedef signalslot::Signal<void(RunIndex)> PostSourceRun;
0214     PostSourceRun postSourceRunSignal_;
0215     void watchPostSourceRun(PostSourceRun::slot_type const& iSlot) { postSourceRunSignal_.connect_front(iSlot); }
0216     AR_WATCH_USING_METHOD_1(watchPostSourceRun)
0217 
0218     /// signal is emitted before the source starts creating a ProcessBlock
0219     typedef signalslot::Signal<void()> PreSourceProcessBlock;
0220     PreSourceProcessBlock preSourceProcessBlockSignal_;
0221     void watchPreSourceProcessBlock(PreSourceProcessBlock::slot_type const& iSlot) {
0222       preSourceProcessBlockSignal_.connect(iSlot);
0223     }
0224     AR_WATCH_USING_METHOD_0(watchPreSourceProcessBlock)
0225 
0226     /// signal is emitted after the source starts creating a ProcessBlock
0227     typedef signalslot::Signal<void(std::string const&)> PostSourceProcessBlock;
0228     PostSourceProcessBlock postSourceProcessBlockSignal_;
0229     void watchPostSourceProcessBlock(PostSourceProcessBlock::slot_type const& iSlot) {
0230       postSourceProcessBlockSignal_.connect_front(iSlot);
0231     }
0232     AR_WATCH_USING_METHOD_1(watchPostSourceProcessBlock)
0233 
0234     /// signal is emitted before the source opens a file
0235     typedef signalslot::Signal<void(std::string const&)> PreOpenFile;
0236     PreOpenFile preOpenFileSignal_;
0237     void watchPreOpenFile(PreOpenFile::slot_type const& iSlot) { preOpenFileSignal_.connect(iSlot); }
0238     AR_WATCH_USING_METHOD_1(watchPreOpenFile)
0239 
0240     /// signal is emitted after the source opens a file
0241     //   Note this is only done for a primary file, not a secondary one.
0242     typedef signalslot::Signal<void(std::string const&)> PostOpenFile;
0243     PostOpenFile postOpenFileSignal_;
0244     void watchPostOpenFile(PostOpenFile::slot_type const& iSlot) { postOpenFileSignal_.connect_front(iSlot); }
0245     AR_WATCH_USING_METHOD_1(watchPostOpenFile)
0246 
0247     /// signal is emitted before the source closes a file
0248     //   First argument is the LFN of the file which is being closed.
0249     typedef signalslot::Signal<void(std::string const&)> PreCloseFile;
0250     PreCloseFile preCloseFileSignal_;
0251     void watchPreCloseFile(PreCloseFile::slot_type const& iSlot) { preCloseFileSignal_.connect(iSlot); }
0252     AR_WATCH_USING_METHOD_1(watchPreCloseFile)
0253 
0254     /// signal is emitted after the source closes a file
0255     typedef signalslot::Signal<void(std::string const&)> PostCloseFile;
0256     PostCloseFile postCloseFileSignal_;
0257     void watchPostCloseFile(PostCloseFile::slot_type const& iSlot) { postCloseFileSignal_.connect_front(iSlot); }
0258     AR_WATCH_USING_METHOD_1(watchPostCloseFile)
0259 
0260     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleBeginStream;
0261     PreModuleBeginStream preModuleBeginStreamSignal_;
0262     void watchPreModuleBeginStream(PreModuleBeginStream::slot_type const& iSlot) {
0263       preModuleBeginStreamSignal_.connect(iSlot);
0264     }
0265     AR_WATCH_USING_METHOD_2(watchPreModuleBeginStream)
0266 
0267     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleBeginStream;
0268     PostModuleBeginStream postModuleBeginStreamSignal_;
0269     void watchPostModuleBeginStream(PostModuleBeginStream::slot_type const& iSlot) {
0270       postModuleBeginStreamSignal_.connect_front(iSlot);
0271     }
0272     AR_WATCH_USING_METHOD_2(watchPostModuleBeginStream)
0273 
0274     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleEndStream;
0275     PreModuleEndStream preModuleEndStreamSignal_;
0276     void watchPreModuleEndStream(PreModuleEndStream::slot_type const& iSlot) {
0277       preModuleEndStreamSignal_.connect(iSlot);
0278     }
0279     AR_WATCH_USING_METHOD_2(watchPreModuleEndStream)
0280 
0281     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleEndStream;
0282     PostModuleEndStream postModuleEndStreamSignal_;
0283     void watchPostModuleEndStream(PostModuleEndStream::slot_type const& iSlot) {
0284       postModuleEndStreamSignal_.connect_front(iSlot);
0285     }
0286     AR_WATCH_USING_METHOD_2(watchPostModuleEndStream)
0287 
0288     typedef signalslot::Signal<void(GlobalContext const&)> PreBeginProcessBlock;
0289     PreBeginProcessBlock preBeginProcessBlockSignal_;
0290     void watchPreBeginProcessBlock(PreBeginProcessBlock::slot_type const& iSlot) {
0291       preBeginProcessBlockSignal_.connect(iSlot);
0292     }
0293     AR_WATCH_USING_METHOD_1(watchPreBeginProcessBlock)
0294 
0295     typedef signalslot::Signal<void(GlobalContext const&)> PostBeginProcessBlock;
0296     PostBeginProcessBlock postBeginProcessBlockSignal_;
0297     void watchPostBeginProcessBlock(PostBeginProcessBlock::slot_type const& iSlot) {
0298       postBeginProcessBlockSignal_.connect_front(iSlot);
0299     }
0300     AR_WATCH_USING_METHOD_1(watchPostBeginProcessBlock)
0301 
0302     typedef signalslot::Signal<void(GlobalContext const&)> PreAccessInputProcessBlock;
0303     PreAccessInputProcessBlock preAccessInputProcessBlockSignal_;
0304     void watchPreAccessInputProcessBlock(PreAccessInputProcessBlock::slot_type const& iSlot) {
0305       preAccessInputProcessBlockSignal_.connect(iSlot);
0306     }
0307     AR_WATCH_USING_METHOD_1(watchPreAccessInputProcessBlock)
0308 
0309     typedef signalslot::Signal<void(GlobalContext const&)> PostAccessInputProcessBlock;
0310     PostAccessInputProcessBlock postAccessInputProcessBlockSignal_;
0311     void watchPostAccessInputProcessBlock(PostAccessInputProcessBlock::slot_type const& iSlot) {
0312       postAccessInputProcessBlockSignal_.connect_front(iSlot);
0313     }
0314     AR_WATCH_USING_METHOD_1(watchPostAccessInputProcessBlock)
0315 
0316     typedef signalslot::Signal<void(GlobalContext const&)> PreEndProcessBlock;
0317     PreEndProcessBlock preEndProcessBlockSignal_;
0318     void watchPreEndProcessBlock(PreEndProcessBlock::slot_type const& iSlot) {
0319       preEndProcessBlockSignal_.connect(iSlot);
0320     }
0321     AR_WATCH_USING_METHOD_1(watchPreEndProcessBlock)
0322 
0323     typedef signalslot::Signal<void(GlobalContext const&)> PostEndProcessBlock;
0324     PostEndProcessBlock postEndProcessBlockSignal_;
0325     void watchPostEndProcessBlock(PostEndProcessBlock::slot_type const& iSlot) {
0326       postEndProcessBlockSignal_.connect_front(iSlot);
0327     }
0328     AR_WATCH_USING_METHOD_1(watchPostEndProcessBlock)
0329 
0330     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalBeginRun;
0331     /// signal is emitted after the Run has been created by the InputSource but before any modules have seen the Run
0332     PreGlobalBeginRun preGlobalBeginRunSignal_;
0333     void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const& iSlot) { preGlobalBeginRunSignal_.connect(iSlot); }
0334     AR_WATCH_USING_METHOD_1(watchPreGlobalBeginRun)
0335 
0336     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalBeginRun;
0337     PostGlobalBeginRun postGlobalBeginRunSignal_;
0338     void watchPostGlobalBeginRun(PostGlobalBeginRun::slot_type const& iSlot) {
0339       postGlobalBeginRunSignal_.connect_front(iSlot);
0340     }
0341     AR_WATCH_USING_METHOD_1(watchPostGlobalBeginRun)
0342 
0343     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalEndRun;
0344     PreGlobalEndRun preGlobalEndRunSignal_;
0345     void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const& iSlot) { preGlobalEndRunSignal_.connect(iSlot); }
0346     AR_WATCH_USING_METHOD_1(watchPreGlobalEndRun)
0347 
0348     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalEndRun;
0349     PostGlobalEndRun postGlobalEndRunSignal_;
0350     void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const& iSlot) {
0351       postGlobalEndRunSignal_.connect_front(iSlot);
0352     }
0353     AR_WATCH_USING_METHOD_1(watchPostGlobalEndRun)
0354 
0355     typedef signalslot::Signal<void(GlobalContext const&)> PreWriteProcessBlock;
0356     PreWriteProcessBlock preWriteProcessBlockSignal_;
0357     void watchPreWriteProcessBlock(PreWriteProcessBlock::slot_type const& iSlot) {
0358       preWriteProcessBlockSignal_.connect(iSlot);
0359     }
0360     AR_WATCH_USING_METHOD_1(watchPreWriteProcessBlock)
0361 
0362     typedef signalslot::Signal<void(GlobalContext const&)> PostWriteProcessBlock;
0363     PostWriteProcessBlock postWriteProcessBlockSignal_;
0364     void watchPostWriteProcessBlock(PostWriteProcessBlock::slot_type const& iSlot) {
0365       postWriteProcessBlockSignal_.connect_front(iSlot);
0366     }
0367     AR_WATCH_USING_METHOD_1(watchPostWriteProcessBlock)
0368 
0369     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalWriteRun;
0370     PreGlobalWriteRun preGlobalWriteRunSignal_;
0371     void watchPreGlobalWriteRun(PreGlobalWriteRun::slot_type const& iSlot) { preGlobalWriteRunSignal_.connect(iSlot); }
0372     AR_WATCH_USING_METHOD_1(watchPreGlobalWriteRun)
0373 
0374     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalWriteRun;
0375     PostGlobalWriteRun postGlobalWriteRunSignal_;
0376     void watchPostGlobalWriteRun(PostGlobalWriteRun::slot_type const& iSlot) {
0377       postGlobalWriteRunSignal_.connect_front(iSlot);
0378     }
0379     AR_WATCH_USING_METHOD_1(watchPostGlobalWriteRun)
0380 
0381     typedef signalslot::Signal<void(StreamContext const&)> PreStreamBeginRun;
0382     PreStreamBeginRun preStreamBeginRunSignal_;
0383     void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const& iSlot) { preStreamBeginRunSignal_.connect(iSlot); }
0384     AR_WATCH_USING_METHOD_1(watchPreStreamBeginRun)
0385 
0386     typedef signalslot::Signal<void(StreamContext const&)> PostStreamBeginRun;
0387     PostStreamBeginRun postStreamBeginRunSignal_;
0388     void watchPostStreamBeginRun(PostStreamBeginRun::slot_type const& iSlot) {
0389       postStreamBeginRunSignal_.connect_front(iSlot);
0390     }
0391     AR_WATCH_USING_METHOD_1(watchPostStreamBeginRun)
0392 
0393     typedef signalslot::Signal<void(StreamContext const&)> PreStreamEndRun;
0394     PreStreamEndRun preStreamEndRunSignal_;
0395     void watchPreStreamEndRun(PreStreamEndRun::slot_type const& iSlot) { preStreamEndRunSignal_.connect(iSlot); }
0396     AR_WATCH_USING_METHOD_1(watchPreStreamEndRun)
0397 
0398     typedef signalslot::Signal<void(StreamContext const&)> PostStreamEndRun;
0399     PostStreamEndRun postStreamEndRunSignal_;
0400     void watchPostStreamEndRun(PostStreamEndRun::slot_type const& iSlot) {
0401       postStreamEndRunSignal_.connect_front(iSlot);
0402     }
0403     AR_WATCH_USING_METHOD_1(watchPostStreamEndRun)
0404 
0405     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalBeginLumi;
0406     PreGlobalBeginLumi preGlobalBeginLumiSignal_;
0407     void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const& iSlot) {
0408       preGlobalBeginLumiSignal_.connect(iSlot);
0409     }
0410     AR_WATCH_USING_METHOD_1(watchPreGlobalBeginLumi)
0411 
0412     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalBeginLumi;
0413     PostGlobalBeginLumi postGlobalBeginLumiSignal_;
0414     void watchPostGlobalBeginLumi(PostGlobalBeginLumi::slot_type const& iSlot) {
0415       postGlobalBeginLumiSignal_.connect_front(iSlot);
0416     }
0417     AR_WATCH_USING_METHOD_1(watchPostGlobalBeginLumi)
0418 
0419     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalEndLumi;
0420     PreGlobalEndLumi preGlobalEndLumiSignal_;
0421     void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const& iSlot) { preGlobalEndLumiSignal_.connect(iSlot); }
0422     AR_WATCH_USING_METHOD_1(watchPreGlobalEndLumi)
0423 
0424     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalEndLumi;
0425     PostGlobalEndLumi postGlobalEndLumiSignal_;
0426     void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const& iSlot) {
0427       postGlobalEndLumiSignal_.connect_front(iSlot);
0428     }
0429     AR_WATCH_USING_METHOD_1(watchPostGlobalEndLumi)
0430 
0431     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalWriteLumi;
0432     PreGlobalEndLumi preGlobalWriteLumiSignal_;
0433     void watchPreGlobalWriteLumi(PreGlobalWriteLumi::slot_type const& iSlot) {
0434       preGlobalWriteLumiSignal_.connect(iSlot);
0435     }
0436     AR_WATCH_USING_METHOD_1(watchPreGlobalWriteLumi)
0437 
0438     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalWriteLumi;
0439     PostGlobalEndLumi postGlobalWriteLumiSignal_;
0440     void watchPostGlobalWriteLumi(PostGlobalEndLumi::slot_type const& iSlot) {
0441       postGlobalWriteLumiSignal_.connect_front(iSlot);
0442     }
0443     AR_WATCH_USING_METHOD_1(watchPostGlobalWriteLumi)
0444 
0445     typedef signalslot::Signal<void(StreamContext const&)> PreStreamBeginLumi;
0446     PreStreamBeginLumi preStreamBeginLumiSignal_;
0447     void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const& iSlot) {
0448       preStreamBeginLumiSignal_.connect(iSlot);
0449     }
0450     AR_WATCH_USING_METHOD_1(watchPreStreamBeginLumi)
0451 
0452     typedef signalslot::Signal<void(StreamContext const&)> PostStreamBeginLumi;
0453     PostStreamBeginLumi postStreamBeginLumiSignal_;
0454     void watchPostStreamBeginLumi(PostStreamBeginLumi::slot_type const& iSlot) {
0455       postStreamBeginLumiSignal_.connect_front(iSlot);
0456     }
0457     AR_WATCH_USING_METHOD_1(watchPostStreamBeginLumi)
0458 
0459     typedef signalslot::Signal<void(StreamContext const&)> PreStreamEndLumi;
0460     PreStreamEndLumi preStreamEndLumiSignal_;
0461     void watchPreStreamEndLumi(PreStreamEndLumi::slot_type const& iSlot) { preStreamEndLumiSignal_.connect(iSlot); }
0462     AR_WATCH_USING_METHOD_1(watchPreStreamEndLumi)
0463 
0464     typedef signalslot::Signal<void(StreamContext const&)> PostStreamEndLumi;
0465     PostStreamEndLumi postStreamEndLumiSignal_;
0466     void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const& iSlot) {
0467       postStreamEndLumiSignal_.connect_front(iSlot);
0468     }
0469     AR_WATCH_USING_METHOD_1(watchPostStreamEndLumi)
0470 
0471     typedef signalslot::Signal<void(StreamContext const&)> PreEvent;
0472     /// signal is emitted after the Event has been created by the InputSource but before any modules have seen the Event
0473     PreEvent preEventSignal_;
0474     void watchPreEvent(PreEvent::slot_type const& iSlot) { preEventSignal_.connect(iSlot); }
0475     AR_WATCH_USING_METHOD_1(watchPreEvent)
0476 
0477     typedef signalslot::Signal<void(StreamContext const&)> PostEvent;
0478     /// signal is emitted after all modules have finished processing the Event
0479     PostEvent postEventSignal_;
0480     void watchPostEvent(PostEvent::slot_type const& iSlot) { postEventSignal_.connect_front(iSlot); }
0481     AR_WATCH_USING_METHOD_1(watchPostEvent)
0482 
0483     /// signal is emitted before starting to process a Path for an event
0484     typedef signalslot::Signal<void(StreamContext const&, PathContext const&)> PrePathEvent;
0485     PrePathEvent prePathEventSignal_;
0486     void watchPrePathEvent(PrePathEvent::slot_type const& iSlot) { prePathEventSignal_.connect(iSlot); }
0487     AR_WATCH_USING_METHOD_2(watchPrePathEvent)
0488 
0489     /// signal is emitted after all modules have finished for the Path for an event
0490     typedef signalslot::Signal<void(StreamContext const&, PathContext const&, HLTPathStatus const&)> PostPathEvent;
0491     PostPathEvent postPathEventSignal_;
0492     void watchPostPathEvent(PostPathEvent::slot_type const& iSlot) { postPathEventSignal_.connect_front(iSlot); }
0493     AR_WATCH_USING_METHOD_3(watchPostPathEvent)
0494 
0495     /// signal is emitted when began processing a stream transition and
0496     ///  then we began terminating the application
0497     typedef signalslot::Signal<void(StreamContext const&, TerminationOrigin)> PreStreamEarlyTermination;
0498     PreStreamEarlyTermination preStreamEarlyTerminationSignal_;
0499     void watchPreStreamEarlyTermination(PreStreamEarlyTermination::slot_type const& iSlot) {
0500       preStreamEarlyTerminationSignal_.connect(iSlot);
0501     }
0502     AR_WATCH_USING_METHOD_2(watchPreStreamEarlyTermination)
0503 
0504     /// signal is emitted if a began processing a global transition and
0505     ///  then we began terminating the application
0506     typedef signalslot::Signal<void(GlobalContext const&, TerminationOrigin)> PreGlobalEarlyTermination;
0507     PreGlobalEarlyTermination preGlobalEarlyTerminationSignal_;
0508     void watchPreGlobalEarlyTermination(PreGlobalEarlyTermination::slot_type const& iSlot) {
0509       preGlobalEarlyTerminationSignal_.connect(iSlot);
0510     }
0511     AR_WATCH_USING_METHOD_2(watchPreGlobalEarlyTermination)
0512 
0513     /// signal is emitted if while communicating with a source we began terminating
0514     ///  the application
0515     typedef signalslot::Signal<void(TerminationOrigin)> PreSourceEarlyTermination;
0516     PreSourceEarlyTermination preSourceEarlyTerminationSignal_;
0517     void watchPreSourceEarlyTermination(PreSourceEarlyTermination::slot_type const& iSlot) {
0518       preSourceEarlyTerminationSignal_.connect(iSlot);
0519     }
0520     AR_WATCH_USING_METHOD_1(watchPreSourceEarlyTermination)
0521 
0522     /// signal is emitted after the ESModule is registered with EventSetupProvider
0523     using PostESModuleRegistration = signalslot::Signal<void(eventsetup::ComponentDescription const&)>;
0524     PostESModuleRegistration postESModuleRegistrationSignal_;
0525     void watchPostESModuleRegistration(PostESModuleRegistration::slot_type const& iSlot) {
0526       postESModuleRegistrationSignal_.connect(iSlot);
0527     }
0528     AR_WATCH_USING_METHOD_1(watchPostESModuleRegistration)
0529 
0530     /// signal is emitted when a new IOV may be needed so we queue a task to do that
0531     using ESSyncIOVQueuing = signalslot::Signal<void(IOVSyncValue const&)>;
0532     ESSyncIOVQueuing esSyncIOVQueuingSignal_;
0533     void watchESSyncIOVQueuing(ESSyncIOVQueuing::slot_type const& iSlot) { esSyncIOVQueuingSignal_.connect(iSlot); }
0534     AR_WATCH_USING_METHOD_1(watchESSyncIOVQueuing)
0535 
0536     /// signal is emitted just before a new IOV is synchronized
0537     using PreESSyncIOV = signalslot::Signal<void(IOVSyncValue const&)>;
0538     PreESSyncIOV preESSyncIOVSignal_;
0539     void watchPreESSyncIOV(PreESSyncIOV::slot_type const& iSlot) { preESSyncIOVSignal_.connect(iSlot); }
0540     AR_WATCH_USING_METHOD_1(watchPreESSyncIOV)
0541 
0542     /// signal is emitted just after a new IOV is synchronized
0543     using PostESSyncIOV = signalslot::Signal<void(IOVSyncValue const&)>;
0544     PostESSyncIOV postESSyncIOVSignal_;
0545     void watchPostESSyncIOV(PostESSyncIOV::slot_type const& iSlot) { postESSyncIOVSignal_.connect(iSlot); }
0546     AR_WATCH_USING_METHOD_1(watchPostESSyncIOV)
0547 
0548     /// signal is emitted before the esmodule starts processing and before prefetching has started
0549     typedef signalslot::Signal<void(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&)>
0550         PreESModulePrefetching;
0551     PreESModulePrefetching preESModulePrefetchingSignal_;
0552     void watchPreESModulePrefetching(PreESModulePrefetching::slot_type const& iSlot) {
0553       preESModulePrefetchingSignal_.connect(iSlot);
0554     }
0555     AR_WATCH_USING_METHOD_2(watchPreESModulePrefetching)
0556 
0557     /// signal is emitted before the esmodule starts processing  and after prefetching has finished
0558     typedef signalslot::Signal<void(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&)>
0559         PostESModulePrefetching;
0560     PostESModulePrefetching postESModulePrefetchingSignal_;
0561     void watchPostESModulePrefetching(PostESModulePrefetching::slot_type const& iSlot) {
0562       postESModulePrefetchingSignal_.connect_front(iSlot);
0563     }
0564     AR_WATCH_USING_METHOD_2(watchPostESModulePrefetching)
0565 
0566     /// signal is emitted before the esmodule starts processing
0567     typedef signalslot::Signal<void(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&)> PreESModule;
0568     PreESModule preESModuleSignal_;
0569     void watchPreESModule(PreESModule::slot_type const& iSlot) { preESModuleSignal_.connect(iSlot); }
0570     AR_WATCH_USING_METHOD_2(watchPreESModule)
0571 
0572     /// signal is emitted after the esmodule finished processing
0573     typedef signalslot::Signal<void(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&)> PostESModule;
0574     PostESModule postESModuleSignal_;
0575     void watchPostESModule(PostESModule::slot_type const& iSlot) { postESModuleSignal_.connect_front(iSlot); }
0576     AR_WATCH_USING_METHOD_2(watchPostESModule)
0577 
0578     /* Note M:
0579        Concerning use of address of module descriptor
0580        during functions called before/after module or source construction:
0581            Unlike the case in the Run, Lumi, and Event loops,
0582            the Module descriptor (often passed by pointer or reference
0583            as an argument named desc) in the construction phase is NOT
0584            at some permanent fixed address during the construction phase.  
0585            Therefore, any optimization of caching the module name keying 
0586            off of address of the descriptor will NOT be valid during 
0587                such functions.  mf / cj 9/11/09
0588     */
0589 
0590     /// signal is emitted before the module is constructed
0591     typedef signalslot::Signal<void(ModuleDescription const&)> PreModuleConstruction;
0592     PreModuleConstruction preModuleConstructionSignal_;
0593     void watchPreModuleConstruction(PreModuleConstruction::slot_type const& iSlot) {
0594       preModuleConstructionSignal_.connect(iSlot);
0595     }
0596     // WARNING - ModuleDescription is not in fixed place.  See note M above.
0597     AR_WATCH_USING_METHOD_1(watchPreModuleConstruction)
0598 
0599     /// signal is emitted after the module was construction
0600     typedef signalslot::Signal<void(ModuleDescription const&)> PostModuleConstruction;
0601     PostModuleConstruction postModuleConstructionSignal_;
0602     void watchPostModuleConstruction(PostModuleConstruction::slot_type const& iSlot) {
0603       postModuleConstructionSignal_.connect_front(iSlot);
0604     }
0605     // WARNING - ModuleDescription is not in fixed place.  See note M above.
0606     AR_WATCH_USING_METHOD_1(watchPostModuleConstruction)
0607 
0608     /// signal is emitted before the module is destructed, only for modules deleted before beginJob
0609     typedef signalslot::Signal<void(ModuleDescription const&)> PreModuleDestruction;
0610     PreModuleDestruction preModuleDestructionSignal_;
0611     void watchPreModuleDestruction(PreModuleDestruction::slot_type const& iSlot) {
0612       preModuleDestructionSignal_.connect(iSlot);
0613     }
0614     // note: ModuleDescription IS in the fixed place. See note M above.
0615     AR_WATCH_USING_METHOD_1(watchPreModuleDestruction)
0616 
0617     /// signal is emitted after the module is destructed, only for modules deleted before beginJob
0618     typedef signalslot::Signal<void(ModuleDescription const&)> PostModuleDestruction;
0619     PostModuleDestruction postModuleDestructionSignal_;
0620     void watchPostModuleDestruction(PostModuleDestruction::slot_type const& iSlot) {
0621       postModuleDestructionSignal_.connect_front(iSlot);
0622     }
0623     // WARNING - ModuleDescription is not in fixed place.  See note M above.
0624     AR_WATCH_USING_METHOD_1(watchPostModuleDestruction)
0625 
0626     /// signal is emitted before the module does beginJob
0627     typedef signalslot::Signal<void(ModuleDescription const&)> PreModuleBeginJob;
0628     PreModuleBeginJob preModuleBeginJobSignal_;
0629     void watchPreModuleBeginJob(PreModuleBeginJob::slot_type const& iSlot) { preModuleBeginJobSignal_.connect(iSlot); }
0630     AR_WATCH_USING_METHOD_1(watchPreModuleBeginJob)
0631 
0632     /// signal is emitted after the module had done beginJob
0633     typedef signalslot::Signal<void(ModuleDescription const&)> PostModuleBeginJob;
0634     PostModuleBeginJob postModuleBeginJobSignal_;
0635     void watchPostModuleBeginJob(PostModuleBeginJob::slot_type const& iSlot) {
0636       postModuleBeginJobSignal_.connect_front(iSlot);
0637     }
0638     AR_WATCH_USING_METHOD_1(watchPostModuleBeginJob)
0639 
0640     /// signal is emitted before the module does endJob
0641     typedef signalslot::Signal<void(ModuleDescription const&)> PreModuleEndJob;
0642     PreModuleEndJob preModuleEndJobSignal_;
0643     void watchPreModuleEndJob(PreModuleEndJob::slot_type const& iSlot) { preModuleEndJobSignal_.connect(iSlot); }
0644     AR_WATCH_USING_METHOD_1(watchPreModuleEndJob)
0645 
0646     /// signal is emitted after the module had done endJob
0647     typedef signalslot::Signal<void(ModuleDescription const&)> PostModuleEndJob;
0648     PostModuleEndJob postModuleEndJobSignal_;
0649     void watchPostModuleEndJob(PostModuleEndJob::slot_type const& iSlot) {
0650       postModuleEndJobSignal_.connect_front(iSlot);
0651     }
0652     AR_WATCH_USING_METHOD_1(watchPostModuleEndJob)
0653 
0654     /// signal is emitted before the module starts processing the Event and before prefetching has started
0655     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleEventPrefetching;
0656     PreModuleEventPrefetching preModuleEventPrefetchingSignal_;
0657     void watchPreModuleEventPrefetching(PreModuleEventPrefetching::slot_type const& iSlot) {
0658       preModuleEventPrefetchingSignal_.connect(iSlot);
0659     }
0660     AR_WATCH_USING_METHOD_2(watchPreModuleEventPrefetching)
0661 
0662     /// signal is emitted before the module starts processing the Event and after prefetching has finished
0663     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleEventPrefetching;
0664     PostModuleEventPrefetching postModuleEventPrefetchingSignal_;
0665     void watchPostModuleEventPrefetching(PostModuleEventPrefetching::slot_type const& iSlot) {
0666       postModuleEventPrefetchingSignal_.connect_front(iSlot);
0667     }
0668     AR_WATCH_USING_METHOD_2(watchPostModuleEventPrefetching)
0669 
0670     /// signal is emitted before the module starts processing the Event
0671     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleEvent;
0672     PreModuleEvent preModuleEventSignal_;
0673     void watchPreModuleEvent(PreModuleEvent::slot_type const& iSlot) { preModuleEventSignal_.connect(iSlot); }
0674     AR_WATCH_USING_METHOD_2(watchPreModuleEvent)
0675 
0676     /// signal is emitted after the module finished processing the Event
0677     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleEvent;
0678     PostModuleEvent postModuleEventSignal_;
0679     void watchPostModuleEvent(PostModuleEvent::slot_type const& iSlot) { postModuleEventSignal_.connect_front(iSlot); }
0680     AR_WATCH_USING_METHOD_2(watchPostModuleEvent)
0681 
0682     /// signal is emitted before the module starts the acquire method for the Event
0683     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleEventAcquire;
0684     PreModuleEventAcquire preModuleEventAcquireSignal_;
0685     void watchPreModuleEventAcquire(PreModuleEventAcquire::slot_type const& iSlot) {
0686       preModuleEventAcquireSignal_.connect(iSlot);
0687     }
0688     AR_WATCH_USING_METHOD_2(watchPreModuleEventAcquire)
0689 
0690     /// signal is emitted after the module finishes the acquire method for the Event
0691     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleEventAcquire;
0692     PostModuleEventAcquire postModuleEventAcquireSignal_;
0693     void watchPostModuleEventAcquire(PostModuleEventAcquire::slot_type const& iSlot) {
0694       postModuleEventAcquireSignal_.connect_front(iSlot);
0695     }
0696     AR_WATCH_USING_METHOD_2(watchPostModuleEventAcquire)
0697 
0698     /// signal is emitted after the module starts processing the Event and before a delayed get has started
0699     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleEventDelayedGet;
0700     PreModuleEventDelayedGet preModuleEventDelayedGetSignal_;
0701     void watchPreModuleEventDelayedGet(PreModuleEventDelayedGet::slot_type const& iSlot) {
0702       preModuleEventDelayedGetSignal_.connect(iSlot);
0703     }
0704     AR_WATCH_USING_METHOD_2(watchPreModuleEventDelayedGet)
0705 
0706     /// signal is emitted after the module starts processing the Event and after a delayed get has finished
0707     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleEventDelayedGet;
0708     PostModuleEventDelayedGet postModuleEventDelayedGetSignal_;
0709     void watchPostModuleEventDelayedGet(PostModuleEventDelayedGet::slot_type const& iSlot) {
0710       postModuleEventDelayedGetSignal_.connect_front(iSlot);
0711     }
0712     AR_WATCH_USING_METHOD_2(watchPostModuleEventDelayedGet)
0713 
0714     /// signal is emitted after the module starts processing the Event, after a delayed get has started, and before a source read
0715     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreEventReadFromSource;
0716     PreEventReadFromSource preEventReadFromSourceSignal_;
0717     void watchPreEventReadFromSource(PreEventReadFromSource::slot_type const& iSlot) {
0718       preEventReadFromSourceSignal_.connect(iSlot);
0719     }
0720     AR_WATCH_USING_METHOD_2(watchPreEventReadFromSource)
0721 
0722     /// signal is emitted after the module starts processing the Event, after a delayed get has started, and after a source read
0723     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostEventReadFromSource;
0724     PostEventReadFromSource postEventReadFromSourceSignal_;
0725     void watchPostEventReadFromSource(PostEventReadFromSource::slot_type const& iSlot) {
0726       postEventReadFromSourceSignal_.connect_front(iSlot);
0727     }
0728     AR_WATCH_USING_METHOD_2(watchPostEventReadFromSource)
0729 
0730     /// signal is emitted before the module starts processing a non-Event stream transition and before prefetching has started
0731     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleStreamPrefetching;
0732     PreModuleStreamPrefetching preModuleStreamPrefetchingSignal_;
0733     void watchPreModuleStreamPrefetching(PreModuleStreamPrefetching::slot_type const& iSlot) {
0734       preModuleStreamPrefetchingSignal_.connect(iSlot);
0735     }
0736     AR_WATCH_USING_METHOD_2(watchPreModuleStreamPrefetching)
0737 
0738     /// signal is emitted before the module starts processing a non-Event stream transition and after prefetching has finished
0739     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleStreamPrefetching;
0740     PostModuleStreamPrefetching postModuleStreamPrefetchingSignal_;
0741     void watchPostModuleStreamPrefetching(PostModuleStreamPrefetching::slot_type const& iSlot) {
0742       postModuleStreamPrefetchingSignal_.connect_front(iSlot);
0743     }
0744     AR_WATCH_USING_METHOD_2(watchPostModuleStreamPrefetching)
0745 
0746     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleStreamBeginRun;
0747     PreModuleStreamBeginRun preModuleStreamBeginRunSignal_;
0748     void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const& iSlot) {
0749       preModuleStreamBeginRunSignal_.connect(iSlot);
0750     }
0751     AR_WATCH_USING_METHOD_2(watchPreModuleStreamBeginRun)
0752 
0753     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleStreamBeginRun;
0754     PostModuleStreamBeginRun postModuleStreamBeginRunSignal_;
0755     void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const& iSlot) {
0756       postModuleStreamBeginRunSignal_.connect_front(iSlot);
0757     }
0758     AR_WATCH_USING_METHOD_2(watchPostModuleStreamBeginRun)
0759 
0760     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleStreamEndRun;
0761     PreModuleStreamEndRun preModuleStreamEndRunSignal_;
0762     void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const& iSlot) {
0763       preModuleStreamEndRunSignal_.connect(iSlot);
0764     }
0765     AR_WATCH_USING_METHOD_2(watchPreModuleStreamEndRun)
0766 
0767     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleStreamEndRun;
0768     PostModuleStreamEndRun postModuleStreamEndRunSignal_;
0769     void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const& iSlot) {
0770       postModuleStreamEndRunSignal_.connect_front(iSlot);
0771     }
0772     AR_WATCH_USING_METHOD_2(watchPostModuleStreamEndRun)
0773 
0774     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleStreamBeginLumi;
0775     PreModuleStreamBeginLumi preModuleStreamBeginLumiSignal_;
0776     void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const& iSlot) {
0777       preModuleStreamBeginLumiSignal_.connect(iSlot);
0778     }
0779     AR_WATCH_USING_METHOD_2(watchPreModuleStreamBeginLumi)
0780 
0781     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleStreamBeginLumi;
0782     PostModuleStreamBeginLumi postModuleStreamBeginLumiSignal_;
0783     void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const& iSlot) {
0784       postModuleStreamBeginLumiSignal_.connect_front(iSlot);
0785     }
0786     AR_WATCH_USING_METHOD_2(watchPostModuleStreamBeginLumi)
0787 
0788     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleStreamEndLumi;
0789     PreModuleStreamEndLumi preModuleStreamEndLumiSignal_;
0790     void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const& iSlot) {
0791       preModuleStreamEndLumiSignal_.connect(iSlot);
0792     }
0793     AR_WATCH_USING_METHOD_2(watchPreModuleStreamEndLumi)
0794 
0795     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleStreamEndLumi;
0796     PostModuleStreamEndLumi postModuleStreamEndLumiSignal_;
0797     void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const& iSlot) {
0798       postModuleStreamEndLumiSignal_.connect_front(iSlot);
0799     }
0800     AR_WATCH_USING_METHOD_2(watchPostModuleStreamEndLumi)
0801 
0802     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleBeginProcessBlock;
0803     PreModuleBeginProcessBlock preModuleBeginProcessBlockSignal_;
0804     void watchPreModuleBeginProcessBlock(PreModuleBeginProcessBlock::slot_type const& iSlot) {
0805       preModuleBeginProcessBlockSignal_.connect(iSlot);
0806     }
0807     AR_WATCH_USING_METHOD_2(watchPreModuleBeginProcessBlock)
0808 
0809     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleBeginProcessBlock;
0810     PostModuleBeginProcessBlock postModuleBeginProcessBlockSignal_;
0811     void watchPostModuleBeginProcessBlock(PostModuleBeginProcessBlock::slot_type const& iSlot) {
0812       postModuleBeginProcessBlockSignal_.connect_front(iSlot);
0813     }
0814     AR_WATCH_USING_METHOD_2(watchPostModuleBeginProcessBlock)
0815 
0816     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleAccessInputProcessBlock;
0817     PreModuleAccessInputProcessBlock preModuleAccessInputProcessBlockSignal_;
0818     void watchPreModuleAccessInputProcessBlock(PreModuleAccessInputProcessBlock::slot_type const& iSlot) {
0819       preModuleAccessInputProcessBlockSignal_.connect(iSlot);
0820     }
0821     AR_WATCH_USING_METHOD_2(watchPreModuleAccessInputProcessBlock)
0822 
0823     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)>
0824         PostModuleAccessInputProcessBlock;
0825     PostModuleAccessInputProcessBlock postModuleAccessInputProcessBlockSignal_;
0826     void watchPostModuleAccessInputProcessBlock(PostModuleAccessInputProcessBlock::slot_type const& iSlot) {
0827       postModuleAccessInputProcessBlockSignal_.connect_front(iSlot);
0828     }
0829     AR_WATCH_USING_METHOD_2(watchPostModuleAccessInputProcessBlock)
0830 
0831     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleEndProcessBlock;
0832     PreModuleEndProcessBlock preModuleEndProcessBlockSignal_;
0833     void watchPreModuleEndProcessBlock(PreModuleEndProcessBlock::slot_type const& iSlot) {
0834       preModuleEndProcessBlockSignal_.connect(iSlot);
0835     }
0836     AR_WATCH_USING_METHOD_2(watchPreModuleEndProcessBlock)
0837 
0838     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleEndProcessBlock;
0839     PostModuleEndProcessBlock postModuleEndProcessBlockSignal_;
0840     void watchPostModuleEndProcessBlock(PostModuleEndProcessBlock::slot_type const& iSlot) {
0841       postModuleEndProcessBlockSignal_.connect_front(iSlot);
0842     }
0843     AR_WATCH_USING_METHOD_2(watchPostModuleEndProcessBlock)
0844 
0845     /// signal is emitted before the module starts processing a global transition and before prefetching has started
0846     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleGlobalPrefetching;
0847     PreModuleGlobalPrefetching preModuleGlobalPrefetchingSignal_;
0848     void watchPreModuleGlobalPrefetching(PreModuleGlobalPrefetching::slot_type const& iSlot) {
0849       preModuleGlobalPrefetchingSignal_.connect(iSlot);
0850     }
0851     AR_WATCH_USING_METHOD_2(watchPreModuleGlobalPrefetching)
0852 
0853     /// signal is emitted before the module starts processing a global transition and after prefetching has finished
0854     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleGlobalPrefetching;
0855     PostModuleGlobalPrefetching postModuleGlobalPrefetchingSignal_;
0856     void watchPostModuleGlobalPrefetching(PostModuleGlobalPrefetching::slot_type const& iSlot) {
0857       postModuleGlobalPrefetchingSignal_.connect_front(iSlot);
0858     }
0859     AR_WATCH_USING_METHOD_2(watchPostModuleGlobalPrefetching)
0860 
0861     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleGlobalBeginRun;
0862     PreModuleGlobalBeginRun preModuleGlobalBeginRunSignal_;
0863     void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const& iSlot) {
0864       preModuleGlobalBeginRunSignal_.connect(iSlot);
0865     }
0866     AR_WATCH_USING_METHOD_2(watchPreModuleGlobalBeginRun)
0867 
0868     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleGlobalBeginRun;
0869     PostModuleGlobalBeginRun postModuleGlobalBeginRunSignal_;
0870     void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const& iSlot) {
0871       postModuleGlobalBeginRunSignal_.connect_front(iSlot);
0872     }
0873     AR_WATCH_USING_METHOD_2(watchPostModuleGlobalBeginRun)
0874 
0875     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleGlobalEndRun;
0876     PreModuleGlobalEndRun preModuleGlobalEndRunSignal_;
0877     void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const& iSlot) {
0878       preModuleGlobalEndRunSignal_.connect(iSlot);
0879     }
0880     AR_WATCH_USING_METHOD_2(watchPreModuleGlobalEndRun)
0881 
0882     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleGlobalEndRun;
0883     PostModuleGlobalEndRun postModuleGlobalEndRunSignal_;
0884     void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const& iSlot) {
0885       postModuleGlobalEndRunSignal_.connect_front(iSlot);
0886     }
0887     AR_WATCH_USING_METHOD_2(watchPostModuleGlobalEndRun)
0888 
0889     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleGlobalBeginLumi;
0890     PreModuleGlobalBeginLumi preModuleGlobalBeginLumiSignal_;
0891     void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const& iSlot) {
0892       preModuleGlobalBeginLumiSignal_.connect(iSlot);
0893     }
0894     AR_WATCH_USING_METHOD_2(watchPreModuleGlobalBeginLumi)
0895 
0896     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleGlobalBeginLumi;
0897     PostModuleGlobalBeginLumi postModuleGlobalBeginLumiSignal_;
0898     void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const& iSlot) {
0899       postModuleGlobalBeginLumiSignal_.connect_front(iSlot);
0900     }
0901     AR_WATCH_USING_METHOD_2(watchPostModuleGlobalBeginLumi)
0902 
0903     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleGlobalEndLumi;
0904     PreModuleGlobalEndLumi preModuleGlobalEndLumiSignal_;
0905     void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const& iSlot) {
0906       preModuleGlobalEndLumiSignal_.connect(iSlot);
0907     }
0908     AR_WATCH_USING_METHOD_2(watchPreModuleGlobalEndLumi)
0909 
0910     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleGlobalEndLumi;
0911     PostModuleGlobalEndLumi postModuleGlobalEndLumiSignal_;
0912     void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const& iSlot) {
0913       postModuleGlobalEndLumiSignal_.connect_front(iSlot);
0914     }
0915     AR_WATCH_USING_METHOD_2(watchPostModuleGlobalEndLumi)
0916 
0917     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleWriteProcessBlock;
0918     PreModuleWriteProcessBlock preModuleWriteProcessBlockSignal_;
0919     void watchPreModuleWriteProcessBlock(PreModuleWriteProcessBlock::slot_type const& iSlot) {
0920       preModuleWriteProcessBlockSignal_.connect(iSlot);
0921     }
0922     AR_WATCH_USING_METHOD_2(watchPreModuleWriteProcessBlock)
0923 
0924     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleWriteProcessBlock;
0925     PostModuleWriteProcessBlock postModuleWriteProcessBlockSignal_;
0926     void watchPostModuleWriteProcessBlock(PostModuleWriteProcessBlock::slot_type const& iSlot) {
0927       postModuleWriteProcessBlockSignal_.connect_front(iSlot);
0928     }
0929     AR_WATCH_USING_METHOD_2(watchPostModuleWriteProcessBlock)
0930 
0931     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleWriteRun;
0932     PreModuleWriteRun preModuleWriteRunSignal_;
0933     void watchPreModuleWriteRun(PreModuleWriteRun::slot_type const& iSlot) { preModuleWriteRunSignal_.connect(iSlot); }
0934     AR_WATCH_USING_METHOD_2(watchPreModuleWriteRun)
0935 
0936     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleWriteRun;
0937     PostModuleWriteRun postModuleWriteRunSignal_;
0938     void watchPostModuleWriteRun(PostModuleWriteRun::slot_type const& iSlot) {
0939       postModuleWriteRunSignal_.connect_front(iSlot);
0940     }
0941     AR_WATCH_USING_METHOD_2(watchPostModuleWriteRun)
0942 
0943     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleWriteLumi;
0944     PreModuleWriteLumi preModuleWriteLumiSignal_;
0945     void watchPreModuleWriteLumi(PreModuleWriteLumi::slot_type const& iSlot) {
0946       preModuleWriteLumiSignal_.connect(iSlot);
0947     }
0948     AR_WATCH_USING_METHOD_2(watchPreModuleWriteLumi)
0949 
0950     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleWriteLumi;
0951     PostModuleWriteLumi postModuleWriteLumiSignal_;
0952     void watchPostModuleWriteLumi(PostModuleWriteLumi::slot_type const& iSlot) {
0953       postModuleWriteLumiSignal_.connect_front(iSlot);
0954     }
0955     AR_WATCH_USING_METHOD_2(watchPostModuleWriteLumi)
0956 
0957     /// signal is emitted before the source is constructed
0958     typedef signalslot::Signal<void(ModuleDescription const&)> PreSourceConstruction;
0959     PreSourceConstruction preSourceConstructionSignal_;
0960     void watchPreSourceConstruction(PreSourceConstruction::slot_type const& iSlot) {
0961       preSourceConstructionSignal_.connect(iSlot);
0962     }
0963     // WARNING - ModuleDescription is not in fixed place.  See note M above.
0964     AR_WATCH_USING_METHOD_1(watchPreSourceConstruction)
0965 
0966     /// signal is emitted after the source was construction
0967     typedef signalslot::Signal<void(ModuleDescription const&)> PostSourceConstruction;
0968     PostSourceConstruction postSourceConstructionSignal_;
0969     void watchPostSourceConstruction(PostSourceConstruction::slot_type const& iSlot) {
0970       postSourceConstructionSignal_.connect_front(iSlot);
0971     }
0972     // WARNING - ModuleDescription is not in fixed place.  See note M above.
0973     AR_WATCH_USING_METHOD_1(watchPostSourceConstruction)
0974 
0975     //DEPRECATED
0976     typedef signalslot::Signal<void(
0977         eventsetup::ComponentDescription const*, eventsetup::EventSetupRecordKey const&, eventsetup::DataKey const&)>
0978         PreLockEventSetupGet;
0979     ///signal is emitted before lock taken in EventSetup DataProxy::get function
0980     PreLockEventSetupGet preLockEventSetupGetSignal_;
0981     void watchPreLockEventSetupGet(PreLockEventSetupGet::slot_type const& iSlot) {
0982       preLockEventSetupGetSignal_.connect(iSlot);
0983     }
0984     AR_WATCH_USING_METHOD_3(watchPreLockEventSetupGet)
0985 
0986     //DEPRECATED
0987     typedef signalslot::Signal<void(
0988         eventsetup::ComponentDescription const*, eventsetup::EventSetupRecordKey const&, eventsetup::DataKey const&)>
0989         PostLockEventSetupGet;
0990     ///signal is emitted after lock taken in EventSetup DataProxy::get function
0991     PostLockEventSetupGet postLockEventSetupGetSignal_;
0992     void watchPostLockEventSetupGet(PostLockEventSetupGet::slot_type const& iSlot) {
0993       postLockEventSetupGetSignal_.connect_front(iSlot);
0994     }
0995     AR_WATCH_USING_METHOD_3(watchPostLockEventSetupGet)
0996 
0997     //DEPRECATED
0998     typedef signalslot::Signal<void(
0999         eventsetup::ComponentDescription const*, eventsetup::EventSetupRecordKey const&, eventsetup::DataKey const&)>
1000         PostEventSetupGet;
1001     ///signal is emitted after getImpl has returned in the EventSetup DataProxy::get function
1002     PostEventSetupGet postEventSetupGetSignal_;
1003     void watchPostEventSetupGet(PostEventSetupGet::slot_type const& iSlot) {
1004       postEventSetupGetSignal_.connect_front(iSlot);
1005     }
1006     AR_WATCH_USING_METHOD_3(watchPostEventSetupGet)
1007 
1008     // ---------- member functions ---------------------------
1009 
1010     ///forwards our signals to slots connected to iOther
1011     void connect(ActivityRegistry& iOther);
1012 
1013     ///forwards our subprocess independent signals to slots connected to iOther
1014     ///forwards iOther's subprocess dependent signals to slots connected to this
1015     void connectToSubProcess(ActivityRegistry& iOther);
1016 
1017     ///copy the slots from iOther and connect them directly to our own
1018     /// this allows us to 'forward' signals more efficiently,
1019     /// BUT if iOther gains new slots after this call, we will not see them
1020     /// This is also careful to keep the order of the slots proper
1021     /// for services.
1022     void copySlotsFrom(ActivityRegistry& iOther);
1023 
1024   private:
1025     // forwards subprocess independent signals to slots connected to iOther
1026     void connectGlobals(ActivityRegistry& iOther);
1027 
1028     // forwards subprocess dependent signals to slots connected to iOther
1029     void connectLocals(ActivityRegistry& iOther);
1030   };
1031 }  // namespace edm
1032 #undef AR_WATCH_USING_METHOD
1033 #endif