Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:02

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     class ESRecordsToProductResolverIndices;
0110   }  // namespace eventsetup
0111   namespace service {
0112     class SystemBounds;
0113   }
0114 
0115   namespace signalslot {
0116     void throwObsoleteSignalException();
0117 
0118     template <class T>
0119     class ObsoleteSignal {
0120     public:
0121       typedef std::function<T> slot_type;
0122 
0123       ObsoleteSignal() = default;
0124 
0125       template <typename U>
0126       void connect(U /*  iFunc */) {
0127         throwObsoleteSignalException();
0128       }
0129 
0130       template <typename U>
0131       void connect_front(U /*  iFunc*/) {
0132         throwObsoleteSignalException();
0133       }
0134     };
0135   }  // namespace signalslot
0136   class ActivityRegistry {
0137   public:
0138     ActivityRegistry() {}
0139     ActivityRegistry(ActivityRegistry const&) = delete;             // Disallow copying and moving
0140     ActivityRegistry& operator=(ActivityRegistry const&) = delete;  // Disallow copying and moving
0141 
0142     // ---------- signals ------------------------------------
0143     typedef signalslot::Signal<void(service::SystemBounds const&)> Preallocate;
0144     ///signal is emitted before beginJob
0145     Preallocate preallocateSignal_;
0146     void watchPreallocate(Preallocate::slot_type const& iSlot) { preallocateSignal_.connect(iSlot); }
0147     AR_WATCH_USING_METHOD_1(watchPreallocate)
0148 
0149     typedef signalslot::Signal<void(eventsetup::ESRecordsToProductResolverIndices const&, ProcessContext const&)>
0150         EventSetupConfiguration;
0151     ///signal is emitted before beginJob
0152     EventSetupConfiguration eventSetupConfigurationSignal_;
0153     void watchEventSetupConfiguration(EventSetupConfiguration::slot_type const& iSlot) {
0154       eventSetupConfigurationSignal_.connect(iSlot);
0155     }
0156     AR_WATCH_USING_METHOD_2(watchEventSetupConfiguration)
0157 
0158     typedef signalslot::Signal<void(PathsAndConsumesOfModulesBase const&, ProcessContext const&)> PreBeginJob;
0159     ///signal is emitted before all modules have gotten their beginJob called
0160     PreBeginJob preBeginJobSignal_;
0161     ///convenience function for attaching to signal
0162     void watchPreBeginJob(PreBeginJob::slot_type const& iSlot) { preBeginJobSignal_.connect(iSlot); }
0163     AR_WATCH_USING_METHOD_2(watchPreBeginJob)
0164 
0165     typedef signalslot::Signal<void()> PostBeginJob;
0166     ///signal is emitted after all modules have gotten their beginJob called
0167     PostBeginJob postBeginJobSignal_;
0168     ///convenience function for attaching to signal
0169     void watchPostBeginJob(PostBeginJob::slot_type const& iSlot) { postBeginJobSignal_.connect(iSlot); }
0170     AR_WATCH_USING_METHOD_0(watchPostBeginJob)
0171 
0172     typedef signalslot::Signal<void()> PreEndJob;
0173     ///signal is emitted before any modules have gotten their endJob called
0174     PreEndJob preEndJobSignal_;
0175     void watchPreEndJob(PreEndJob::slot_type const& iSlot) { preEndJobSignal_.connect_front(iSlot); }
0176     AR_WATCH_USING_METHOD_0(watchPreEndJob)
0177 
0178     typedef signalslot::Signal<void()> PostEndJob;
0179     ///signal is emitted after all modules have gotten their endJob called
0180     PostEndJob postEndJobSignal_;
0181     void watchPostEndJob(PostEndJob::slot_type const& iSlot) { postEndJobSignal_.connect_front(iSlot); }
0182     AR_WATCH_USING_METHOD_0(watchPostEndJob)
0183 
0184     typedef signalslot::Signal<void()> JobFailure;
0185     /// signal is emitted if event processing or end-of-job
0186     /// processing fails with an uncaught exception.
0187     JobFailure jobFailureSignal_;
0188     ///convenience function for attaching to signal
0189     void watchJobFailure(JobFailure::slot_type const& iSlot) { jobFailureSignal_.connect_front(iSlot); }
0190     AR_WATCH_USING_METHOD_0(watchJobFailure)
0191 
0192     /// signal is emitted before the source is requested to find the next transition
0193     typedef signalslot::Signal<void()> PreSourceNextTransition;
0194     PreSourceNextTransition preSourceNextTransitionSignal_;
0195     void watchPreSourceNextTransition(PreSourceNextTransition::slot_type const& iSlot) {
0196       preSourceNextTransitionSignal_.connect(iSlot);
0197     }
0198     AR_WATCH_USING_METHOD_0(watchPreSourceNextTransition)
0199 
0200     /// signal is emitted after the source has returned the next transition
0201     typedef signalslot::Signal<void()> PostSourceNextTransition;
0202     PostSourceNextTransition postSourceNextTransitionSignal_;
0203     void watchPostSourceNextTransition(PostSourceNextTransition::slot_type const& iSlot) {
0204       postSourceNextTransitionSignal_.connect_front(iSlot);
0205     }
0206     AR_WATCH_USING_METHOD_0(watchPostSourceNextTransition)
0207 
0208     /// signal is emitted before the source starts creating an Event
0209     typedef signalslot::Signal<void(StreamID)> PreSourceEvent;
0210     PreSourceEvent preSourceSignal_;
0211     void watchPreSourceEvent(PreSourceEvent::slot_type const& iSlot) { preSourceSignal_.connect(iSlot); }
0212     AR_WATCH_USING_METHOD_1(watchPreSourceEvent)
0213 
0214     /// signal is emitted after the source starts creating an Event
0215     typedef signalslot::Signal<void(StreamID)> PostSourceEvent;
0216     PostSourceEvent postSourceSignal_;
0217     void watchPostSourceEvent(PostSourceEvent::slot_type const& iSlot) { postSourceSignal_.connect_front(iSlot); }
0218     AR_WATCH_USING_METHOD_1(watchPostSourceEvent)
0219 
0220     /// signal is emitted before the source starts creating a Lumi
0221     typedef signalslot::Signal<void(LuminosityBlockIndex)> PreSourceLumi;
0222     PreSourceLumi preSourceLumiSignal_;
0223     void watchPreSourceLumi(PreSourceLumi::slot_type const& iSlot) { preSourceLumiSignal_.connect(iSlot); }
0224     AR_WATCH_USING_METHOD_1(watchPreSourceLumi)
0225 
0226     /// signal is emitted after the source starts creating a Lumi
0227     typedef signalslot::Signal<void(LuminosityBlockIndex)> PostSourceLumi;
0228     PostSourceLumi postSourceLumiSignal_;
0229     void watchPostSourceLumi(PostSourceLumi::slot_type const& iSlot) { postSourceLumiSignal_.connect_front(iSlot); }
0230     AR_WATCH_USING_METHOD_1(watchPostSourceLumi)
0231 
0232     /// signal is emitted before the source starts creating a Run
0233     typedef signalslot::Signal<void(RunIndex)> PreSourceRun;
0234     PreSourceRun preSourceRunSignal_;
0235     void watchPreSourceRun(PreSourceRun::slot_type const& iSlot) { preSourceRunSignal_.connect(iSlot); }
0236     AR_WATCH_USING_METHOD_1(watchPreSourceRun)
0237 
0238     /// signal is emitted after the source starts creating a Run
0239     typedef signalslot::Signal<void(RunIndex)> PostSourceRun;
0240     PostSourceRun postSourceRunSignal_;
0241     void watchPostSourceRun(PostSourceRun::slot_type const& iSlot) { postSourceRunSignal_.connect_front(iSlot); }
0242     AR_WATCH_USING_METHOD_1(watchPostSourceRun)
0243 
0244     /// signal is emitted before the source starts creating a ProcessBlock
0245     typedef signalslot::Signal<void()> PreSourceProcessBlock;
0246     PreSourceProcessBlock preSourceProcessBlockSignal_;
0247     void watchPreSourceProcessBlock(PreSourceProcessBlock::slot_type const& iSlot) {
0248       preSourceProcessBlockSignal_.connect(iSlot);
0249     }
0250     AR_WATCH_USING_METHOD_0(watchPreSourceProcessBlock)
0251 
0252     /// signal is emitted after the source starts creating a ProcessBlock
0253     typedef signalslot::Signal<void(std::string const&)> PostSourceProcessBlock;
0254     PostSourceProcessBlock postSourceProcessBlockSignal_;
0255     void watchPostSourceProcessBlock(PostSourceProcessBlock::slot_type const& iSlot) {
0256       postSourceProcessBlockSignal_.connect_front(iSlot);
0257     }
0258     AR_WATCH_USING_METHOD_1(watchPostSourceProcessBlock)
0259 
0260     /// signal is emitted before the source opens a file
0261     typedef signalslot::Signal<void(std::string const&)> PreOpenFile;
0262     PreOpenFile preOpenFileSignal_;
0263     void watchPreOpenFile(PreOpenFile::slot_type const& iSlot) { preOpenFileSignal_.connect(iSlot); }
0264     AR_WATCH_USING_METHOD_1(watchPreOpenFile)
0265 
0266     /// signal is emitted after the source opens a file
0267     //   Note this is only done for a primary file, not a secondary one.
0268     typedef signalslot::Signal<void(std::string const&)> PostOpenFile;
0269     PostOpenFile postOpenFileSignal_;
0270     void watchPostOpenFile(PostOpenFile::slot_type const& iSlot) { postOpenFileSignal_.connect_front(iSlot); }
0271     AR_WATCH_USING_METHOD_1(watchPostOpenFile)
0272 
0273     /// signal is emitted before the source closes a file
0274     //   First argument is the LFN of the file which is being closed.
0275     typedef signalslot::Signal<void(std::string const&)> PreCloseFile;
0276     PreCloseFile preCloseFileSignal_;
0277     void watchPreCloseFile(PreCloseFile::slot_type const& iSlot) { preCloseFileSignal_.connect(iSlot); }
0278     AR_WATCH_USING_METHOD_1(watchPreCloseFile)
0279 
0280     /// signal is emitted after the source closes a file
0281     typedef signalslot::Signal<void(std::string const&)> PostCloseFile;
0282     PostCloseFile postCloseFileSignal_;
0283     void watchPostCloseFile(PostCloseFile::slot_type const& iSlot) { postCloseFileSignal_.connect_front(iSlot); }
0284     AR_WATCH_USING_METHOD_1(watchPostCloseFile)
0285 
0286     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleBeginStream;
0287     PreModuleBeginStream preModuleBeginStreamSignal_;
0288     void watchPreModuleBeginStream(PreModuleBeginStream::slot_type const& iSlot) {
0289       preModuleBeginStreamSignal_.connect(iSlot);
0290     }
0291     AR_WATCH_USING_METHOD_2(watchPreModuleBeginStream)
0292 
0293     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleBeginStream;
0294     PostModuleBeginStream postModuleBeginStreamSignal_;
0295     void watchPostModuleBeginStream(PostModuleBeginStream::slot_type const& iSlot) {
0296       postModuleBeginStreamSignal_.connect_front(iSlot);
0297     }
0298     AR_WATCH_USING_METHOD_2(watchPostModuleBeginStream)
0299 
0300     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleEndStream;
0301     PreModuleEndStream preModuleEndStreamSignal_;
0302     void watchPreModuleEndStream(PreModuleEndStream::slot_type const& iSlot) {
0303       preModuleEndStreamSignal_.connect(iSlot);
0304     }
0305     AR_WATCH_USING_METHOD_2(watchPreModuleEndStream)
0306 
0307     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleEndStream;
0308     PostModuleEndStream postModuleEndStreamSignal_;
0309     void watchPostModuleEndStream(PostModuleEndStream::slot_type const& iSlot) {
0310       postModuleEndStreamSignal_.connect_front(iSlot);
0311     }
0312     AR_WATCH_USING_METHOD_2(watchPostModuleEndStream)
0313 
0314     typedef signalslot::Signal<void(GlobalContext const&)> PreBeginProcessBlock;
0315     PreBeginProcessBlock preBeginProcessBlockSignal_;
0316     void watchPreBeginProcessBlock(PreBeginProcessBlock::slot_type const& iSlot) {
0317       preBeginProcessBlockSignal_.connect(iSlot);
0318     }
0319     AR_WATCH_USING_METHOD_1(watchPreBeginProcessBlock)
0320 
0321     typedef signalslot::Signal<void(GlobalContext const&)> PostBeginProcessBlock;
0322     PostBeginProcessBlock postBeginProcessBlockSignal_;
0323     void watchPostBeginProcessBlock(PostBeginProcessBlock::slot_type const& iSlot) {
0324       postBeginProcessBlockSignal_.connect_front(iSlot);
0325     }
0326     AR_WATCH_USING_METHOD_1(watchPostBeginProcessBlock)
0327 
0328     typedef signalslot::Signal<void(GlobalContext const&)> PreAccessInputProcessBlock;
0329     PreAccessInputProcessBlock preAccessInputProcessBlockSignal_;
0330     void watchPreAccessInputProcessBlock(PreAccessInputProcessBlock::slot_type const& iSlot) {
0331       preAccessInputProcessBlockSignal_.connect(iSlot);
0332     }
0333     AR_WATCH_USING_METHOD_1(watchPreAccessInputProcessBlock)
0334 
0335     typedef signalslot::Signal<void(GlobalContext const&)> PostAccessInputProcessBlock;
0336     PostAccessInputProcessBlock postAccessInputProcessBlockSignal_;
0337     void watchPostAccessInputProcessBlock(PostAccessInputProcessBlock::slot_type const& iSlot) {
0338       postAccessInputProcessBlockSignal_.connect_front(iSlot);
0339     }
0340     AR_WATCH_USING_METHOD_1(watchPostAccessInputProcessBlock)
0341 
0342     typedef signalslot::Signal<void(GlobalContext const&)> PreEndProcessBlock;
0343     PreEndProcessBlock preEndProcessBlockSignal_;
0344     void watchPreEndProcessBlock(PreEndProcessBlock::slot_type const& iSlot) {
0345       preEndProcessBlockSignal_.connect(iSlot);
0346     }
0347     AR_WATCH_USING_METHOD_1(watchPreEndProcessBlock)
0348 
0349     typedef signalslot::Signal<void(GlobalContext const&)> PostEndProcessBlock;
0350     PostEndProcessBlock postEndProcessBlockSignal_;
0351     void watchPostEndProcessBlock(PostEndProcessBlock::slot_type const& iSlot) {
0352       postEndProcessBlockSignal_.connect_front(iSlot);
0353     }
0354     AR_WATCH_USING_METHOD_1(watchPostEndProcessBlock)
0355 
0356     typedef signalslot::Signal<void()> BeginProcessing;
0357     /// signal is emitted just before the transitions from the Source will begin to be processed
0358     BeginProcessing beginProcessingSignal_;
0359     void watchBeginProcessing(BeginProcessing::slot_type const& iSlot) { beginProcessingSignal_.connect(iSlot); }
0360     AR_WATCH_USING_METHOD_0(watchBeginProcessing)
0361 
0362     typedef signalslot::Signal<void()> EndProcessing;
0363     /// signal is emitted after all work has been done processing all source transitions
0364     EndProcessing endProcessingSignal_;
0365     void watchEndProcessing(EndProcessing::slot_type const& iSlot) { endProcessingSignal_.connect(iSlot); }
0366     AR_WATCH_USING_METHOD_0(watchEndProcessing)
0367 
0368     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalBeginRun;
0369     /// signal is emitted after the Run has been created by the InputSource but before any modules have seen the Run
0370     PreGlobalBeginRun preGlobalBeginRunSignal_;
0371     void watchPreGlobalBeginRun(PreGlobalBeginRun::slot_type const& iSlot) { preGlobalBeginRunSignal_.connect(iSlot); }
0372     AR_WATCH_USING_METHOD_1(watchPreGlobalBeginRun)
0373 
0374     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalBeginRun;
0375     PostGlobalBeginRun postGlobalBeginRunSignal_;
0376     void watchPostGlobalBeginRun(PostGlobalBeginRun::slot_type const& iSlot) {
0377       postGlobalBeginRunSignal_.connect_front(iSlot);
0378     }
0379     AR_WATCH_USING_METHOD_1(watchPostGlobalBeginRun)
0380 
0381     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalEndRun;
0382     PreGlobalEndRun preGlobalEndRunSignal_;
0383     void watchPreGlobalEndRun(PreGlobalEndRun::slot_type const& iSlot) { preGlobalEndRunSignal_.connect(iSlot); }
0384     AR_WATCH_USING_METHOD_1(watchPreGlobalEndRun)
0385 
0386     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalEndRun;
0387     PostGlobalEndRun postGlobalEndRunSignal_;
0388     void watchPostGlobalEndRun(PostGlobalEndRun::slot_type const& iSlot) {
0389       postGlobalEndRunSignal_.connect_front(iSlot);
0390     }
0391     AR_WATCH_USING_METHOD_1(watchPostGlobalEndRun)
0392 
0393     typedef signalslot::Signal<void(GlobalContext const&)> PreWriteProcessBlock;
0394     PreWriteProcessBlock preWriteProcessBlockSignal_;
0395     void watchPreWriteProcessBlock(PreWriteProcessBlock::slot_type const& iSlot) {
0396       preWriteProcessBlockSignal_.connect(iSlot);
0397     }
0398     AR_WATCH_USING_METHOD_1(watchPreWriteProcessBlock)
0399 
0400     typedef signalslot::Signal<void(GlobalContext const&)> PostWriteProcessBlock;
0401     PostWriteProcessBlock postWriteProcessBlockSignal_;
0402     void watchPostWriteProcessBlock(PostWriteProcessBlock::slot_type const& iSlot) {
0403       postWriteProcessBlockSignal_.connect_front(iSlot);
0404     }
0405     AR_WATCH_USING_METHOD_1(watchPostWriteProcessBlock)
0406 
0407     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalWriteRun;
0408     PreGlobalWriteRun preGlobalWriteRunSignal_;
0409     void watchPreGlobalWriteRun(PreGlobalWriteRun::slot_type const& iSlot) { preGlobalWriteRunSignal_.connect(iSlot); }
0410     AR_WATCH_USING_METHOD_1(watchPreGlobalWriteRun)
0411 
0412     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalWriteRun;
0413     PostGlobalWriteRun postGlobalWriteRunSignal_;
0414     void watchPostGlobalWriteRun(PostGlobalWriteRun::slot_type const& iSlot) {
0415       postGlobalWriteRunSignal_.connect_front(iSlot);
0416     }
0417     AR_WATCH_USING_METHOD_1(watchPostGlobalWriteRun)
0418 
0419     typedef signalslot::Signal<void(StreamContext const&)> PreStreamBeginRun;
0420     PreStreamBeginRun preStreamBeginRunSignal_;
0421     void watchPreStreamBeginRun(PreStreamBeginRun::slot_type const& iSlot) { preStreamBeginRunSignal_.connect(iSlot); }
0422     AR_WATCH_USING_METHOD_1(watchPreStreamBeginRun)
0423 
0424     typedef signalslot::Signal<void(StreamContext const&)> PostStreamBeginRun;
0425     PostStreamBeginRun postStreamBeginRunSignal_;
0426     void watchPostStreamBeginRun(PostStreamBeginRun::slot_type const& iSlot) {
0427       postStreamBeginRunSignal_.connect_front(iSlot);
0428     }
0429     AR_WATCH_USING_METHOD_1(watchPostStreamBeginRun)
0430 
0431     typedef signalslot::Signal<void(StreamContext const&)> PreStreamEndRun;
0432     PreStreamEndRun preStreamEndRunSignal_;
0433     void watchPreStreamEndRun(PreStreamEndRun::slot_type const& iSlot) { preStreamEndRunSignal_.connect(iSlot); }
0434     AR_WATCH_USING_METHOD_1(watchPreStreamEndRun)
0435 
0436     typedef signalslot::Signal<void(StreamContext const&)> PostStreamEndRun;
0437     PostStreamEndRun postStreamEndRunSignal_;
0438     void watchPostStreamEndRun(PostStreamEndRun::slot_type const& iSlot) {
0439       postStreamEndRunSignal_.connect_front(iSlot);
0440     }
0441     AR_WATCH_USING_METHOD_1(watchPostStreamEndRun)
0442 
0443     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalBeginLumi;
0444     PreGlobalBeginLumi preGlobalBeginLumiSignal_;
0445     void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const& iSlot) {
0446       preGlobalBeginLumiSignal_.connect(iSlot);
0447     }
0448     AR_WATCH_USING_METHOD_1(watchPreGlobalBeginLumi)
0449 
0450     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalBeginLumi;
0451     PostGlobalBeginLumi postGlobalBeginLumiSignal_;
0452     void watchPostGlobalBeginLumi(PostGlobalBeginLumi::slot_type const& iSlot) {
0453       postGlobalBeginLumiSignal_.connect_front(iSlot);
0454     }
0455     AR_WATCH_USING_METHOD_1(watchPostGlobalBeginLumi)
0456 
0457     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalEndLumi;
0458     PreGlobalEndLumi preGlobalEndLumiSignal_;
0459     void watchPreGlobalEndLumi(PreGlobalEndLumi::slot_type const& iSlot) { preGlobalEndLumiSignal_.connect(iSlot); }
0460     AR_WATCH_USING_METHOD_1(watchPreGlobalEndLumi)
0461 
0462     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalEndLumi;
0463     PostGlobalEndLumi postGlobalEndLumiSignal_;
0464     void watchPostGlobalEndLumi(PostGlobalEndLumi::slot_type const& iSlot) {
0465       postGlobalEndLumiSignal_.connect_front(iSlot);
0466     }
0467     AR_WATCH_USING_METHOD_1(watchPostGlobalEndLumi)
0468 
0469     typedef signalslot::Signal<void(GlobalContext const&)> PreGlobalWriteLumi;
0470     PreGlobalEndLumi preGlobalWriteLumiSignal_;
0471     void watchPreGlobalWriteLumi(PreGlobalWriteLumi::slot_type const& iSlot) {
0472       preGlobalWriteLumiSignal_.connect(iSlot);
0473     }
0474     AR_WATCH_USING_METHOD_1(watchPreGlobalWriteLumi)
0475 
0476     typedef signalslot::Signal<void(GlobalContext const&)> PostGlobalWriteLumi;
0477     PostGlobalEndLumi postGlobalWriteLumiSignal_;
0478     void watchPostGlobalWriteLumi(PostGlobalEndLumi::slot_type const& iSlot) {
0479       postGlobalWriteLumiSignal_.connect_front(iSlot);
0480     }
0481     AR_WATCH_USING_METHOD_1(watchPostGlobalWriteLumi)
0482 
0483     typedef signalslot::Signal<void(StreamContext const&)> PreStreamBeginLumi;
0484     PreStreamBeginLumi preStreamBeginLumiSignal_;
0485     void watchPreStreamBeginLumi(PreStreamBeginLumi::slot_type const& iSlot) {
0486       preStreamBeginLumiSignal_.connect(iSlot);
0487     }
0488     AR_WATCH_USING_METHOD_1(watchPreStreamBeginLumi)
0489 
0490     typedef signalslot::Signal<void(StreamContext const&)> PostStreamBeginLumi;
0491     PostStreamBeginLumi postStreamBeginLumiSignal_;
0492     void watchPostStreamBeginLumi(PostStreamBeginLumi::slot_type const& iSlot) {
0493       postStreamBeginLumiSignal_.connect_front(iSlot);
0494     }
0495     AR_WATCH_USING_METHOD_1(watchPostStreamBeginLumi)
0496 
0497     typedef signalslot::Signal<void(StreamContext const&)> PreStreamEndLumi;
0498     PreStreamEndLumi preStreamEndLumiSignal_;
0499     void watchPreStreamEndLumi(PreStreamEndLumi::slot_type const& iSlot) { preStreamEndLumiSignal_.connect(iSlot); }
0500     AR_WATCH_USING_METHOD_1(watchPreStreamEndLumi)
0501 
0502     typedef signalslot::Signal<void(StreamContext const&)> PostStreamEndLumi;
0503     PostStreamEndLumi postStreamEndLumiSignal_;
0504     void watchPostStreamEndLumi(PostStreamEndLumi::slot_type const& iSlot) {
0505       postStreamEndLumiSignal_.connect_front(iSlot);
0506     }
0507     AR_WATCH_USING_METHOD_1(watchPostStreamEndLumi)
0508 
0509     typedef signalslot::Signal<void(StreamContext const&)> PreEvent;
0510     /// signal is emitted after the Event has been created by the InputSource but before any modules have seen the Event
0511     PreEvent preEventSignal_;
0512     void watchPreEvent(PreEvent::slot_type const& iSlot) { preEventSignal_.connect(iSlot); }
0513     AR_WATCH_USING_METHOD_1(watchPreEvent)
0514 
0515     typedef signalslot::Signal<void(StreamContext const&)> PostEvent;
0516     /// signal is emitted after all modules have finished processing the Event
0517     PostEvent postEventSignal_;
0518     void watchPostEvent(PostEvent::slot_type const& iSlot) { postEventSignal_.connect_front(iSlot); }
0519     AR_WATCH_USING_METHOD_1(watchPostEvent)
0520 
0521     typedef signalslot::Signal<void(StreamContext const&)> PreClearEvent;
0522     /// signal is emitted before the data products in the Event are cleared
0523     PreClearEvent preClearEventSignal_;
0524     void watchPreClearEvent(PreClearEvent::slot_type const& iSlot) { preClearEventSignal_.connect(iSlot); }
0525     AR_WATCH_USING_METHOD_1(watchPreClearEvent)
0526 
0527     typedef signalslot::Signal<void(StreamContext const&)> PostClearEvent;
0528     /// signal is emitted after all data products in the Event have been cleared
0529     PostClearEvent postClearEventSignal_;
0530     void watchPostClearEvent(PostClearEvent::slot_type const& iSlot) { postClearEventSignal_.connect_front(iSlot); }
0531     AR_WATCH_USING_METHOD_1(watchPostClearEvent)
0532 
0533     /// signal is emitted before starting to process a Path for an event
0534     typedef signalslot::Signal<void(StreamContext const&, PathContext const&)> PrePathEvent;
0535     PrePathEvent prePathEventSignal_;
0536     void watchPrePathEvent(PrePathEvent::slot_type const& iSlot) { prePathEventSignal_.connect(iSlot); }
0537     AR_WATCH_USING_METHOD_2(watchPrePathEvent)
0538 
0539     /// signal is emitted after all modules have finished for the Path for an event
0540     typedef signalslot::Signal<void(StreamContext const&, PathContext const&, HLTPathStatus const&)> PostPathEvent;
0541     PostPathEvent postPathEventSignal_;
0542     void watchPostPathEvent(PostPathEvent::slot_type const& iSlot) { postPathEventSignal_.connect_front(iSlot); }
0543     AR_WATCH_USING_METHOD_3(watchPostPathEvent)
0544 
0545     /// signal is emitted when began processing a stream transition and
0546     ///  then we began terminating the application
0547     typedef signalslot::Signal<void(StreamContext const&, TerminationOrigin)> PreStreamEarlyTermination;
0548     PreStreamEarlyTermination preStreamEarlyTerminationSignal_;
0549     void watchPreStreamEarlyTermination(PreStreamEarlyTermination::slot_type const& iSlot) {
0550       preStreamEarlyTerminationSignal_.connect(iSlot);
0551     }
0552     AR_WATCH_USING_METHOD_2(watchPreStreamEarlyTermination)
0553 
0554     /// signal is emitted if a began processing a global transition and
0555     ///  then we began terminating the application
0556     typedef signalslot::Signal<void(GlobalContext const&, TerminationOrigin)> PreGlobalEarlyTermination;
0557     PreGlobalEarlyTermination preGlobalEarlyTerminationSignal_;
0558     void watchPreGlobalEarlyTermination(PreGlobalEarlyTermination::slot_type const& iSlot) {
0559       preGlobalEarlyTerminationSignal_.connect(iSlot);
0560     }
0561     AR_WATCH_USING_METHOD_2(watchPreGlobalEarlyTermination)
0562 
0563     /// signal is emitted if while communicating with a source we began terminating
0564     ///  the application
0565     typedef signalslot::Signal<void(TerminationOrigin)> PreSourceEarlyTermination;
0566     PreSourceEarlyTermination preSourceEarlyTerminationSignal_;
0567     void watchPreSourceEarlyTermination(PreSourceEarlyTermination::slot_type const& iSlot) {
0568       preSourceEarlyTerminationSignal_.connect(iSlot);
0569     }
0570     AR_WATCH_USING_METHOD_1(watchPreSourceEarlyTermination)
0571 
0572     /// signal is emitted after the ESModule is registered with EventSetupProvider
0573     using PostESModuleRegistration = signalslot::Signal<void(eventsetup::ComponentDescription const&)>;
0574     PostESModuleRegistration postESModuleRegistrationSignal_;
0575     void watchPostESModuleRegistration(PostESModuleRegistration::slot_type const& iSlot) {
0576       postESModuleRegistrationSignal_.connect(iSlot);
0577     }
0578     AR_WATCH_USING_METHOD_1(watchPostESModuleRegistration)
0579 
0580     /// signal is emitted when a new IOV may be needed so we queue a task to do that
0581     using ESSyncIOVQueuing = signalslot::Signal<void(IOVSyncValue const&)>;
0582     ESSyncIOVQueuing esSyncIOVQueuingSignal_;
0583     void watchESSyncIOVQueuing(ESSyncIOVQueuing::slot_type const& iSlot) { esSyncIOVQueuingSignal_.connect(iSlot); }
0584     AR_WATCH_USING_METHOD_1(watchESSyncIOVQueuing)
0585 
0586     /// signal is emitted just before a new IOV is synchronized
0587     using PreESSyncIOV = signalslot::Signal<void(IOVSyncValue const&)>;
0588     PreESSyncIOV preESSyncIOVSignal_;
0589     void watchPreESSyncIOV(PreESSyncIOV::slot_type const& iSlot) { preESSyncIOVSignal_.connect(iSlot); }
0590     AR_WATCH_USING_METHOD_1(watchPreESSyncIOV)
0591 
0592     /// signal is emitted just after a new IOV is synchronized
0593     using PostESSyncIOV = signalslot::Signal<void(IOVSyncValue const&)>;
0594     PostESSyncIOV postESSyncIOVSignal_;
0595     void watchPostESSyncIOV(PostESSyncIOV::slot_type const& iSlot) { postESSyncIOVSignal_.connect(iSlot); }
0596     AR_WATCH_USING_METHOD_1(watchPostESSyncIOV)
0597 
0598     /// signal is emitted before the esmodule starts processing and before prefetching has started
0599     typedef signalslot::Signal<void(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&)>
0600         PreESModulePrefetching;
0601     PreESModulePrefetching preESModulePrefetchingSignal_;
0602     void watchPreESModulePrefetching(PreESModulePrefetching::slot_type const& iSlot) {
0603       preESModulePrefetchingSignal_.connect(iSlot);
0604     }
0605     AR_WATCH_USING_METHOD_2(watchPreESModulePrefetching)
0606 
0607     /// signal is emitted before the esmodule starts processing  and after prefetching has finished
0608     typedef signalslot::Signal<void(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&)>
0609         PostESModulePrefetching;
0610     PostESModulePrefetching postESModulePrefetchingSignal_;
0611     void watchPostESModulePrefetching(PostESModulePrefetching::slot_type const& iSlot) {
0612       postESModulePrefetchingSignal_.connect_front(iSlot);
0613     }
0614     AR_WATCH_USING_METHOD_2(watchPostESModulePrefetching)
0615 
0616     /// signal is emitted before the esmodule starts processing
0617     typedef signalslot::Signal<void(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&)> PreESModule;
0618     PreESModule preESModuleSignal_;
0619     void watchPreESModule(PreESModule::slot_type const& iSlot) { preESModuleSignal_.connect(iSlot); }
0620     AR_WATCH_USING_METHOD_2(watchPreESModule)
0621 
0622     /// signal is emitted after the esmodule finished processing
0623     typedef signalslot::Signal<void(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&)> PostESModule;
0624     PostESModule postESModuleSignal_;
0625     void watchPostESModule(PostESModule::slot_type const& iSlot) { postESModuleSignal_.connect_front(iSlot); }
0626     AR_WATCH_USING_METHOD_2(watchPostESModule)
0627 
0628     /// signal is emitted before an esmodule starts running its acquire method
0629     typedef signalslot::Signal<void(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&)>
0630         PreESModuleAcquire;
0631     PreESModuleAcquire preESModuleAcquireSignal_;
0632     void watchPreESModuleAcquire(PreESModuleAcquire::slot_type const& iSlot) {
0633       preESModuleAcquireSignal_.connect(iSlot);
0634     }
0635     AR_WATCH_USING_METHOD_2(watchPreESModuleAcquire)
0636 
0637     /// signal is emitted after an esmodule finishes running its acquire method
0638     typedef signalslot::Signal<void(eventsetup::EventSetupRecordKey const&, ESModuleCallingContext const&)>
0639         PostESModuleAcquire;
0640     PostESModuleAcquire postESModuleAcquireSignal_;
0641     void watchPostESModuleAcquire(PostESModuleAcquire::slot_type const& iSlot) {
0642       postESModuleAcquireSignal_.connect_front(iSlot);
0643     }
0644     AR_WATCH_USING_METHOD_2(watchPostESModuleAcquire)
0645 
0646     /* Note M:
0647        Concerning use of address of module descriptor
0648        during functions called before/after module or source construction:
0649            Unlike the case in the Run, Lumi, and Event loops,
0650            the Module descriptor (often passed by pointer or reference
0651            as an argument named desc) in the construction phase is NOT
0652            at some permanent fixed address during the construction phase.  
0653            Therefore, any optimization of caching the module name keying 
0654            off of address of the descriptor will NOT be valid during 
0655                such functions.  mf / cj 9/11/09
0656     */
0657 
0658     /// signal is emitted before the module is constructed
0659     typedef signalslot::Signal<void(ModuleDescription const&)> PreModuleConstruction;
0660     PreModuleConstruction preModuleConstructionSignal_;
0661     void watchPreModuleConstruction(PreModuleConstruction::slot_type const& iSlot) {
0662       preModuleConstructionSignal_.connect(iSlot);
0663     }
0664     // WARNING - ModuleDescription is not in fixed place.  See note M above.
0665     AR_WATCH_USING_METHOD_1(watchPreModuleConstruction)
0666 
0667     /// signal is emitted after the module was construction
0668     typedef signalslot::Signal<void(ModuleDescription const&)> PostModuleConstruction;
0669     PostModuleConstruction postModuleConstructionSignal_;
0670     void watchPostModuleConstruction(PostModuleConstruction::slot_type const& iSlot) {
0671       postModuleConstructionSignal_.connect_front(iSlot);
0672     }
0673     // WARNING - ModuleDescription is not in fixed place.  See note M above.
0674     AR_WATCH_USING_METHOD_1(watchPostModuleConstruction)
0675 
0676     /// signal is emitted before the module is destructed, only for modules deleted before beginJob
0677     typedef signalslot::Signal<void(ModuleDescription const&)> PreModuleDestruction;
0678     PreModuleDestruction preModuleDestructionSignal_;
0679     void watchPreModuleDestruction(PreModuleDestruction::slot_type const& iSlot) {
0680       preModuleDestructionSignal_.connect(iSlot);
0681     }
0682     // note: ModuleDescription IS in the fixed place. See note M above.
0683     AR_WATCH_USING_METHOD_1(watchPreModuleDestruction)
0684 
0685     /// signal is emitted after the module is destructed, only for modules deleted before beginJob
0686     typedef signalslot::Signal<void(ModuleDescription const&)> PostModuleDestruction;
0687     PostModuleDestruction postModuleDestructionSignal_;
0688     void watchPostModuleDestruction(PostModuleDestruction::slot_type const& iSlot) {
0689       postModuleDestructionSignal_.connect_front(iSlot);
0690     }
0691     // WARNING - ModuleDescription is not in fixed place.  See note M above.
0692     AR_WATCH_USING_METHOD_1(watchPostModuleDestruction)
0693 
0694     /// signal is emitted before the module does beginJob
0695     typedef signalslot::Signal<void(ModuleDescription const&)> PreModuleBeginJob;
0696     PreModuleBeginJob preModuleBeginJobSignal_;
0697     void watchPreModuleBeginJob(PreModuleBeginJob::slot_type const& iSlot) { preModuleBeginJobSignal_.connect(iSlot); }
0698     AR_WATCH_USING_METHOD_1(watchPreModuleBeginJob)
0699 
0700     /// signal is emitted after the module had done beginJob
0701     typedef signalslot::Signal<void(ModuleDescription const&)> PostModuleBeginJob;
0702     PostModuleBeginJob postModuleBeginJobSignal_;
0703     void watchPostModuleBeginJob(PostModuleBeginJob::slot_type const& iSlot) {
0704       postModuleBeginJobSignal_.connect_front(iSlot);
0705     }
0706     AR_WATCH_USING_METHOD_1(watchPostModuleBeginJob)
0707 
0708     /// signal is emitted before the module does endJob
0709     typedef signalslot::Signal<void(ModuleDescription const&)> PreModuleEndJob;
0710     PreModuleEndJob preModuleEndJobSignal_;
0711     void watchPreModuleEndJob(PreModuleEndJob::slot_type const& iSlot) { preModuleEndJobSignal_.connect(iSlot); }
0712     AR_WATCH_USING_METHOD_1(watchPreModuleEndJob)
0713 
0714     /// signal is emitted after the module had done endJob
0715     typedef signalslot::Signal<void(ModuleDescription const&)> PostModuleEndJob;
0716     PostModuleEndJob postModuleEndJobSignal_;
0717     void watchPostModuleEndJob(PostModuleEndJob::slot_type const& iSlot) {
0718       postModuleEndJobSignal_.connect_front(iSlot);
0719     }
0720     AR_WATCH_USING_METHOD_1(watchPostModuleEndJob)
0721 
0722     /// signal is emitted before the module starts processing the Event and before prefetching has started
0723     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleEventPrefetching;
0724     PreModuleEventPrefetching preModuleEventPrefetchingSignal_;
0725     void watchPreModuleEventPrefetching(PreModuleEventPrefetching::slot_type const& iSlot) {
0726       preModuleEventPrefetchingSignal_.connect(iSlot);
0727     }
0728     AR_WATCH_USING_METHOD_2(watchPreModuleEventPrefetching)
0729 
0730     /// signal is emitted before the module starts processing the Event and after prefetching has finished
0731     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleEventPrefetching;
0732     PostModuleEventPrefetching postModuleEventPrefetchingSignal_;
0733     void watchPostModuleEventPrefetching(PostModuleEventPrefetching::slot_type const& iSlot) {
0734       postModuleEventPrefetchingSignal_.connect_front(iSlot);
0735     }
0736     AR_WATCH_USING_METHOD_2(watchPostModuleEventPrefetching)
0737 
0738     /// signal is emitted before the module starts processing the Event
0739     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleEvent;
0740     PreModuleEvent preModuleEventSignal_;
0741     void watchPreModuleEvent(PreModuleEvent::slot_type const& iSlot) { preModuleEventSignal_.connect(iSlot); }
0742     AR_WATCH_USING_METHOD_2(watchPreModuleEvent)
0743 
0744     /// signal is emitted after the module finished processing the Event
0745     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleEvent;
0746     PostModuleEvent postModuleEventSignal_;
0747     void watchPostModuleEvent(PostModuleEvent::slot_type const& iSlot) { postModuleEventSignal_.connect_front(iSlot); }
0748     AR_WATCH_USING_METHOD_2(watchPostModuleEvent)
0749 
0750     /// signal is emitted before the module starts the acquire method for the Event
0751     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleEventAcquire;
0752     PreModuleEventAcquire preModuleEventAcquireSignal_;
0753     void watchPreModuleEventAcquire(PreModuleEventAcquire::slot_type const& iSlot) {
0754       preModuleEventAcquireSignal_.connect(iSlot);
0755     }
0756     AR_WATCH_USING_METHOD_2(watchPreModuleEventAcquire)
0757 
0758     /// signal is emitted after the module finishes the acquire method for the Event
0759     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleEventAcquire;
0760     PostModuleEventAcquire postModuleEventAcquireSignal_;
0761     void watchPostModuleEventAcquire(PostModuleEventAcquire::slot_type const& iSlot) {
0762       postModuleEventAcquireSignal_.connect_front(iSlot);
0763     }
0764     AR_WATCH_USING_METHOD_2(watchPostModuleEventAcquire)
0765 
0766     /// signal is emitted before the module starts a transform during the Event and before prefetching for the transform has started
0767     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleTransformPrefetching;
0768     PreModuleTransformPrefetching preModuleTransformPrefetchingSignal_;
0769     void watchPreModuleTransformPrefetching(PreModuleTransformPrefetching::slot_type const& iSlot) {
0770       preModuleTransformPrefetchingSignal_.connect(iSlot);
0771     }
0772     AR_WATCH_USING_METHOD_2(watchPreModuleTransformPrefetching)
0773 
0774     /// signal is emitted before the module starts a transform during the Event and after prefetching for the transform has finished
0775     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleTransformPrefetching;
0776     PostModuleTransformPrefetching postModuleTransformPrefetchingSignal_;
0777     void watchPostModuleTransformPrefetching(PostModuleTransformPrefetching::slot_type const& iSlot) {
0778       postModuleTransformPrefetchingSignal_.connect_front(iSlot);
0779     }
0780     AR_WATCH_USING_METHOD_2(watchPostModuleTransformPrefetching)
0781 
0782     /// signal is emitted before the module starts a transform during the Event
0783     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleTransform;
0784     PreModuleTransform preModuleTransformSignal_;
0785     void watchPreModuleTransform(PreModuleTransform::slot_type const& iSlot) {
0786       preModuleTransformSignal_.connect(iSlot);
0787     }
0788     AR_WATCH_USING_METHOD_2(watchPreModuleTransform)
0789 
0790     /// signal is emitted after the module finished a transform during  the Event
0791     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleTransform;
0792     PostModuleTransform postModuleTransformSignal_;
0793     void watchPostModuleTransform(PostModuleTransform::slot_type const& iSlot) {
0794       postModuleTransformSignal_.connect_front(iSlot);
0795     }
0796     AR_WATCH_USING_METHOD_2(watchPostModuleTransform)
0797 
0798     /// signal is emitted before the module starts the acquire method for a transform during the Event
0799     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleTransformAcquiring;
0800     PreModuleTransformAcquiring preModuleTransformAcquiringSignal_;
0801     void watchPreModuleTransformAcquiring(PreModuleTransformAcquiring::slot_type const& iSlot) {
0802       preModuleTransformAcquiringSignal_.connect(iSlot);
0803     }
0804     AR_WATCH_USING_METHOD_2(watchPreModuleTransformAcquiring)
0805 
0806     /// signal is emitted after the module finishes the acquire method for a transform during the Event
0807     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleTransformAcquiring;
0808     PostModuleTransformAcquiring postModuleTransformAcquiringSignal_;
0809     void watchPostModuleTransformAcquiring(PostModuleTransformAcquiring::slot_type const& iSlot) {
0810       postModuleTransformAcquiringSignal_.connect_front(iSlot);
0811     }
0812     AR_WATCH_USING_METHOD_2(watchPostModuleTransformAcquiring)
0813 
0814     /// signal is emitted after the module starts processing the Event and before a delayed get has started
0815     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleEventDelayedGet;
0816     PreModuleEventDelayedGet preModuleEventDelayedGetSignal_;
0817     void watchPreModuleEventDelayedGet(PreModuleEventDelayedGet::slot_type const& iSlot) {
0818       preModuleEventDelayedGetSignal_.connect(iSlot);
0819     }
0820     AR_WATCH_USING_METHOD_2(watchPreModuleEventDelayedGet)
0821 
0822     /// signal is emitted after the module starts processing the Event and after a delayed get has finished
0823     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleEventDelayedGet;
0824     PostModuleEventDelayedGet postModuleEventDelayedGetSignal_;
0825     void watchPostModuleEventDelayedGet(PostModuleEventDelayedGet::slot_type const& iSlot) {
0826       postModuleEventDelayedGetSignal_.connect_front(iSlot);
0827     }
0828     AR_WATCH_USING_METHOD_2(watchPostModuleEventDelayedGet)
0829 
0830     /// signal is emitted after the module starts processing the Event, after a delayed get has started, and before a source read
0831     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreEventReadFromSource;
0832     PreEventReadFromSource preEventReadFromSourceSignal_;
0833     void watchPreEventReadFromSource(PreEventReadFromSource::slot_type const& iSlot) {
0834       preEventReadFromSourceSignal_.connect(iSlot);
0835     }
0836     AR_WATCH_USING_METHOD_2(watchPreEventReadFromSource)
0837 
0838     /// signal is emitted after the module starts processing the Event, after a delayed get has started, and after a source read
0839     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostEventReadFromSource;
0840     PostEventReadFromSource postEventReadFromSourceSignal_;
0841     void watchPostEventReadFromSource(PostEventReadFromSource::slot_type const& iSlot) {
0842       postEventReadFromSourceSignal_.connect_front(iSlot);
0843     }
0844     AR_WATCH_USING_METHOD_2(watchPostEventReadFromSource)
0845 
0846     /// signal is emitted before the module starts processing a non-Event stream transition and before prefetching has started
0847     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleStreamPrefetching;
0848     PreModuleStreamPrefetching preModuleStreamPrefetchingSignal_;
0849     void watchPreModuleStreamPrefetching(PreModuleStreamPrefetching::slot_type const& iSlot) {
0850       preModuleStreamPrefetchingSignal_.connect(iSlot);
0851     }
0852     AR_WATCH_USING_METHOD_2(watchPreModuleStreamPrefetching)
0853 
0854     /// signal is emitted before the module starts processing a non-Event stream transition and after prefetching has finished
0855     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleStreamPrefetching;
0856     PostModuleStreamPrefetching postModuleStreamPrefetchingSignal_;
0857     void watchPostModuleStreamPrefetching(PostModuleStreamPrefetching::slot_type const& iSlot) {
0858       postModuleStreamPrefetchingSignal_.connect_front(iSlot);
0859     }
0860     AR_WATCH_USING_METHOD_2(watchPostModuleStreamPrefetching)
0861 
0862     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleStreamBeginRun;
0863     PreModuleStreamBeginRun preModuleStreamBeginRunSignal_;
0864     void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const& iSlot) {
0865       preModuleStreamBeginRunSignal_.connect(iSlot);
0866     }
0867     AR_WATCH_USING_METHOD_2(watchPreModuleStreamBeginRun)
0868 
0869     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleStreamBeginRun;
0870     PostModuleStreamBeginRun postModuleStreamBeginRunSignal_;
0871     void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const& iSlot) {
0872       postModuleStreamBeginRunSignal_.connect_front(iSlot);
0873     }
0874     AR_WATCH_USING_METHOD_2(watchPostModuleStreamBeginRun)
0875 
0876     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleStreamEndRun;
0877     PreModuleStreamEndRun preModuleStreamEndRunSignal_;
0878     void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const& iSlot) {
0879       preModuleStreamEndRunSignal_.connect(iSlot);
0880     }
0881     AR_WATCH_USING_METHOD_2(watchPreModuleStreamEndRun)
0882 
0883     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleStreamEndRun;
0884     PostModuleStreamEndRun postModuleStreamEndRunSignal_;
0885     void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const& iSlot) {
0886       postModuleStreamEndRunSignal_.connect_front(iSlot);
0887     }
0888     AR_WATCH_USING_METHOD_2(watchPostModuleStreamEndRun)
0889 
0890     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleStreamBeginLumi;
0891     PreModuleStreamBeginLumi preModuleStreamBeginLumiSignal_;
0892     void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const& iSlot) {
0893       preModuleStreamBeginLumiSignal_.connect(iSlot);
0894     }
0895     AR_WATCH_USING_METHOD_2(watchPreModuleStreamBeginLumi)
0896 
0897     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleStreamBeginLumi;
0898     PostModuleStreamBeginLumi postModuleStreamBeginLumiSignal_;
0899     void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const& iSlot) {
0900       postModuleStreamBeginLumiSignal_.connect_front(iSlot);
0901     }
0902     AR_WATCH_USING_METHOD_2(watchPostModuleStreamBeginLumi)
0903 
0904     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PreModuleStreamEndLumi;
0905     PreModuleStreamEndLumi preModuleStreamEndLumiSignal_;
0906     void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const& iSlot) {
0907       preModuleStreamEndLumiSignal_.connect(iSlot);
0908     }
0909     AR_WATCH_USING_METHOD_2(watchPreModuleStreamEndLumi)
0910 
0911     typedef signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> PostModuleStreamEndLumi;
0912     PostModuleStreamEndLumi postModuleStreamEndLumiSignal_;
0913     void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const& iSlot) {
0914       postModuleStreamEndLumiSignal_.connect_front(iSlot);
0915     }
0916     AR_WATCH_USING_METHOD_2(watchPostModuleStreamEndLumi)
0917 
0918     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleBeginProcessBlock;
0919     PreModuleBeginProcessBlock preModuleBeginProcessBlockSignal_;
0920     void watchPreModuleBeginProcessBlock(PreModuleBeginProcessBlock::slot_type const& iSlot) {
0921       preModuleBeginProcessBlockSignal_.connect(iSlot);
0922     }
0923     AR_WATCH_USING_METHOD_2(watchPreModuleBeginProcessBlock)
0924 
0925     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleBeginProcessBlock;
0926     PostModuleBeginProcessBlock postModuleBeginProcessBlockSignal_;
0927     void watchPostModuleBeginProcessBlock(PostModuleBeginProcessBlock::slot_type const& iSlot) {
0928       postModuleBeginProcessBlockSignal_.connect_front(iSlot);
0929     }
0930     AR_WATCH_USING_METHOD_2(watchPostModuleBeginProcessBlock)
0931 
0932     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleAccessInputProcessBlock;
0933     PreModuleAccessInputProcessBlock preModuleAccessInputProcessBlockSignal_;
0934     void watchPreModuleAccessInputProcessBlock(PreModuleAccessInputProcessBlock::slot_type const& iSlot) {
0935       preModuleAccessInputProcessBlockSignal_.connect(iSlot);
0936     }
0937     AR_WATCH_USING_METHOD_2(watchPreModuleAccessInputProcessBlock)
0938 
0939     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)>
0940         PostModuleAccessInputProcessBlock;
0941     PostModuleAccessInputProcessBlock postModuleAccessInputProcessBlockSignal_;
0942     void watchPostModuleAccessInputProcessBlock(PostModuleAccessInputProcessBlock::slot_type const& iSlot) {
0943       postModuleAccessInputProcessBlockSignal_.connect_front(iSlot);
0944     }
0945     AR_WATCH_USING_METHOD_2(watchPostModuleAccessInputProcessBlock)
0946 
0947     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleEndProcessBlock;
0948     PreModuleEndProcessBlock preModuleEndProcessBlockSignal_;
0949     void watchPreModuleEndProcessBlock(PreModuleEndProcessBlock::slot_type const& iSlot) {
0950       preModuleEndProcessBlockSignal_.connect(iSlot);
0951     }
0952     AR_WATCH_USING_METHOD_2(watchPreModuleEndProcessBlock)
0953 
0954     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleEndProcessBlock;
0955     PostModuleEndProcessBlock postModuleEndProcessBlockSignal_;
0956     void watchPostModuleEndProcessBlock(PostModuleEndProcessBlock::slot_type const& iSlot) {
0957       postModuleEndProcessBlockSignal_.connect_front(iSlot);
0958     }
0959     AR_WATCH_USING_METHOD_2(watchPostModuleEndProcessBlock)
0960 
0961     /// signal is emitted before the module starts processing a global transition and before prefetching has started
0962     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleGlobalPrefetching;
0963     PreModuleGlobalPrefetching preModuleGlobalPrefetchingSignal_;
0964     void watchPreModuleGlobalPrefetching(PreModuleGlobalPrefetching::slot_type const& iSlot) {
0965       preModuleGlobalPrefetchingSignal_.connect(iSlot);
0966     }
0967     AR_WATCH_USING_METHOD_2(watchPreModuleGlobalPrefetching)
0968 
0969     /// signal is emitted before the module starts processing a global transition and after prefetching has finished
0970     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleGlobalPrefetching;
0971     PostModuleGlobalPrefetching postModuleGlobalPrefetchingSignal_;
0972     void watchPostModuleGlobalPrefetching(PostModuleGlobalPrefetching::slot_type const& iSlot) {
0973       postModuleGlobalPrefetchingSignal_.connect_front(iSlot);
0974     }
0975     AR_WATCH_USING_METHOD_2(watchPostModuleGlobalPrefetching)
0976 
0977     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleGlobalBeginRun;
0978     PreModuleGlobalBeginRun preModuleGlobalBeginRunSignal_;
0979     void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const& iSlot) {
0980       preModuleGlobalBeginRunSignal_.connect(iSlot);
0981     }
0982     AR_WATCH_USING_METHOD_2(watchPreModuleGlobalBeginRun)
0983 
0984     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleGlobalBeginRun;
0985     PostModuleGlobalBeginRun postModuleGlobalBeginRunSignal_;
0986     void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const& iSlot) {
0987       postModuleGlobalBeginRunSignal_.connect_front(iSlot);
0988     }
0989     AR_WATCH_USING_METHOD_2(watchPostModuleGlobalBeginRun)
0990 
0991     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleGlobalEndRun;
0992     PreModuleGlobalEndRun preModuleGlobalEndRunSignal_;
0993     void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const& iSlot) {
0994       preModuleGlobalEndRunSignal_.connect(iSlot);
0995     }
0996     AR_WATCH_USING_METHOD_2(watchPreModuleGlobalEndRun)
0997 
0998     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleGlobalEndRun;
0999     PostModuleGlobalEndRun postModuleGlobalEndRunSignal_;
1000     void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const& iSlot) {
1001       postModuleGlobalEndRunSignal_.connect_front(iSlot);
1002     }
1003     AR_WATCH_USING_METHOD_2(watchPostModuleGlobalEndRun)
1004 
1005     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleGlobalBeginLumi;
1006     PreModuleGlobalBeginLumi preModuleGlobalBeginLumiSignal_;
1007     void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const& iSlot) {
1008       preModuleGlobalBeginLumiSignal_.connect(iSlot);
1009     }
1010     AR_WATCH_USING_METHOD_2(watchPreModuleGlobalBeginLumi)
1011 
1012     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleGlobalBeginLumi;
1013     PostModuleGlobalBeginLumi postModuleGlobalBeginLumiSignal_;
1014     void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const& iSlot) {
1015       postModuleGlobalBeginLumiSignal_.connect_front(iSlot);
1016     }
1017     AR_WATCH_USING_METHOD_2(watchPostModuleGlobalBeginLumi)
1018 
1019     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleGlobalEndLumi;
1020     PreModuleGlobalEndLumi preModuleGlobalEndLumiSignal_;
1021     void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const& iSlot) {
1022       preModuleGlobalEndLumiSignal_.connect(iSlot);
1023     }
1024     AR_WATCH_USING_METHOD_2(watchPreModuleGlobalEndLumi)
1025 
1026     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleGlobalEndLumi;
1027     PostModuleGlobalEndLumi postModuleGlobalEndLumiSignal_;
1028     void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const& iSlot) {
1029       postModuleGlobalEndLumiSignal_.connect_front(iSlot);
1030     }
1031     AR_WATCH_USING_METHOD_2(watchPostModuleGlobalEndLumi)
1032 
1033     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleWriteProcessBlock;
1034     PreModuleWriteProcessBlock preModuleWriteProcessBlockSignal_;
1035     void watchPreModuleWriteProcessBlock(PreModuleWriteProcessBlock::slot_type const& iSlot) {
1036       preModuleWriteProcessBlockSignal_.connect(iSlot);
1037     }
1038     AR_WATCH_USING_METHOD_2(watchPreModuleWriteProcessBlock)
1039 
1040     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleWriteProcessBlock;
1041     PostModuleWriteProcessBlock postModuleWriteProcessBlockSignal_;
1042     void watchPostModuleWriteProcessBlock(PostModuleWriteProcessBlock::slot_type const& iSlot) {
1043       postModuleWriteProcessBlockSignal_.connect_front(iSlot);
1044     }
1045     AR_WATCH_USING_METHOD_2(watchPostModuleWriteProcessBlock)
1046 
1047     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleWriteRun;
1048     PreModuleWriteRun preModuleWriteRunSignal_;
1049     void watchPreModuleWriteRun(PreModuleWriteRun::slot_type const& iSlot) { preModuleWriteRunSignal_.connect(iSlot); }
1050     AR_WATCH_USING_METHOD_2(watchPreModuleWriteRun)
1051 
1052     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleWriteRun;
1053     PostModuleWriteRun postModuleWriteRunSignal_;
1054     void watchPostModuleWriteRun(PostModuleWriteRun::slot_type const& iSlot) {
1055       postModuleWriteRunSignal_.connect_front(iSlot);
1056     }
1057     AR_WATCH_USING_METHOD_2(watchPostModuleWriteRun)
1058 
1059     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PreModuleWriteLumi;
1060     PreModuleWriteLumi preModuleWriteLumiSignal_;
1061     void watchPreModuleWriteLumi(PreModuleWriteLumi::slot_type const& iSlot) {
1062       preModuleWriteLumiSignal_.connect(iSlot);
1063     }
1064     AR_WATCH_USING_METHOD_2(watchPreModuleWriteLumi)
1065 
1066     typedef signalslot::Signal<void(GlobalContext const&, ModuleCallingContext const&)> PostModuleWriteLumi;
1067     PostModuleWriteLumi postModuleWriteLumiSignal_;
1068     void watchPostModuleWriteLumi(PostModuleWriteLumi::slot_type const& iSlot) {
1069       postModuleWriteLumiSignal_.connect_front(iSlot);
1070     }
1071     AR_WATCH_USING_METHOD_2(watchPostModuleWriteLumi)
1072 
1073     /// signal is emitted before the source is constructed
1074     typedef signalslot::Signal<void(ModuleDescription const&)> PreSourceConstruction;
1075     PreSourceConstruction preSourceConstructionSignal_;
1076     void watchPreSourceConstruction(PreSourceConstruction::slot_type const& iSlot) {
1077       preSourceConstructionSignal_.connect(iSlot);
1078     }
1079     // WARNING - ModuleDescription is not in fixed place.  See note M above.
1080     AR_WATCH_USING_METHOD_1(watchPreSourceConstruction)
1081 
1082     /// signal is emitted after the source was construction
1083     typedef signalslot::Signal<void(ModuleDescription const&)> PostSourceConstruction;
1084     PostSourceConstruction postSourceConstructionSignal_;
1085     void watchPostSourceConstruction(PostSourceConstruction::slot_type const& iSlot) {
1086       postSourceConstructionSignal_.connect_front(iSlot);
1087     }
1088     // WARNING - ModuleDescription is not in fixed place.  See note M above.
1089     AR_WATCH_USING_METHOD_1(watchPostSourceConstruction)
1090 
1091     // ---------- member functions ---------------------------
1092 
1093     ///forwards our signals to slots connected to iOther
1094     void connect(ActivityRegistry& iOther);
1095 
1096     ///forwards our subprocess independent signals to slots connected to iOther
1097     ///forwards iOther's subprocess dependent signals to slots connected to this
1098     void connectToSubProcess(ActivityRegistry& iOther);
1099 
1100     ///copy the slots from iOther and connect them directly to our own
1101     /// this allows us to 'forward' signals more efficiently,
1102     /// BUT if iOther gains new slots after this call, we will not see them
1103     /// This is also careful to keep the order of the slots proper
1104     /// for services.
1105     void copySlotsFrom(ActivityRegistry& iOther);
1106 
1107   private:
1108     // forwards subprocess independent signals to slots connected to iOther
1109     void connectGlobals(ActivityRegistry& iOther);
1110 
1111     // forwards subprocess dependent signals to slots connected to iOther
1112     void connectLocals(ActivityRegistry& iOther);
1113   };
1114 }  // namespace edm
1115 #undef AR_WATCH_USING_METHOD
1116 #endif