Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-13 23:27:03

0001 #ifndef FWCore_Framework_OccurrenceTraits_h
0002 #define FWCore_Framework_OccurrenceTraits_h
0003 
0004 /*----------------------------------------------------------------------
0005 
0006 OccurrenceTraits:
0007 
0008 ----------------------------------------------------------------------*/
0009 
0010 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
0011 #include "DataFormats/Provenance/interface/ModuleDescription.h"
0012 #include "FWCore/Framework/interface/BranchActionType.h"
0013 #include "FWCore/Framework/interface/EventPrincipal.h"
0014 #include "FWCore/Framework/interface/LuminosityBlockPrincipal.h"
0015 #include "FWCore/Framework/interface/ProcessBlockPrincipal.h"
0016 #include "FWCore/Utilities/interface/RunIndex.h"
0017 #include "FWCore/Framework/interface/RunPrincipal.h"
0018 #include "FWCore/Framework/interface/TransitionInfoTypes.h"
0019 #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h"
0020 #include "FWCore/ServiceRegistry/interface/GlobalContext.h"
0021 #include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h"
0022 #include "FWCore/ServiceRegistry/interface/ParentContext.h"
0023 #include "FWCore/ServiceRegistry/interface/PathContext.h"
0024 #include "FWCore/ServiceRegistry/interface/StreamContext.h"
0025 #include "FWCore/Utilities/interface/LuminosityBlockIndex.h"
0026 #include "FWCore/Utilities/interface/Transition.h"
0027 
0028 #include <string>
0029 
0030 namespace edm {
0031 
0032   class ProcessContext;
0033 
0034   template <typename T, BranchActionType B>
0035   class OccurrenceTraits;
0036 
0037   template <>
0038   class OccurrenceTraits<EventPrincipal, BranchActionStreamBegin> {
0039   public:
0040     using MyPrincipal = EventPrincipal;
0041     using TransitionInfoType = EventTransitionInfo;
0042     using Context = StreamContext;
0043     static BranchType constexpr branchType_ = InEvent;
0044     static bool constexpr begin_ = true;
0045     static bool constexpr isEvent_ = true;
0046     static Transition constexpr transition_ = Transition::Event;
0047 
0048     static void setStreamContext(StreamContext& streamContext, MyPrincipal const& principal) {
0049       streamContext.setTransition(StreamContext::Transition::kEvent);
0050       streamContext.setEventID(principal.id());
0051       streamContext.setTimestamp(principal.time());
0052     }
0053 
0054     static void preScheduleSignal(ActivityRegistry* a, StreamContext const* streamContext) {
0055       a->preEventSignal_(*streamContext);
0056     }
0057     static void postScheduleSignal(ActivityRegistry* a, StreamContext const* streamContext) {
0058       a->postEventSignal_(*streamContext);
0059     }
0060     static void prePathSignal(ActivityRegistry* a, PathContext const* pathContext) {
0061       a->prePathEventSignal_(*pathContext->streamContext(), *pathContext);
0062     }
0063     static void postPathSignal(ActivityRegistry* a, HLTPathStatus const& status, PathContext const* pathContext) {
0064       a->postPathEventSignal_(*pathContext->streamContext(), *pathContext, status);
0065     }
0066 
0067     static const char* transitionName() { return "Event"; }
0068   };
0069 
0070   template <>
0071   class OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin> {
0072   public:
0073     using MyPrincipal = RunPrincipal;
0074     using TransitionInfoType = RunTransitionInfo;
0075     using Context = GlobalContext;
0076     static BranchType constexpr branchType_ = InRun;
0077     static bool constexpr begin_ = true;
0078     static bool constexpr isEvent_ = false;
0079     static Transition constexpr transition_ = Transition::BeginRun;
0080 
0081     static GlobalContext makeGlobalContext(MyPrincipal const& principal, ProcessContext const* processContext) {
0082       return GlobalContext(GlobalContext::Transition::kBeginRun,
0083                            LuminosityBlockID(principal.run(), 0),
0084                            principal.index(),
0085                            LuminosityBlockIndex::invalidLuminosityBlockIndex(),
0086                            principal.beginTime(),
0087                            processContext);
0088     }
0089 
0090     static void preScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0091       a->preGlobalBeginRunSignal_(*globalContext);
0092     }
0093     static void postScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0094       a->postGlobalBeginRunSignal_(*globalContext);
0095     }
0096     static void prePathSignal(ActivityRegistry*, PathContext const*) {}
0097     static void postPathSignal(ActivityRegistry*, HLTPathStatus const&, PathContext const*) {}
0098     static void preModuleSignal(ActivityRegistry* a,
0099                                 GlobalContext const* globalContext,
0100                                 ModuleCallingContext const* moduleCallingContext) {
0101       a->preModuleGlobalBeginRunSignal_(*globalContext, *moduleCallingContext);
0102     }
0103     static void postModuleSignal(ActivityRegistry* a,
0104                                  GlobalContext const* globalContext,
0105                                  ModuleCallingContext const* moduleCallingContext) {
0106       a->postModuleGlobalBeginRunSignal_(*globalContext, *moduleCallingContext);
0107     }
0108     static const char* transitionName() { return "global begin Run"; }
0109   };
0110 
0111   template <>
0112   class OccurrenceTraits<RunPrincipal, BranchActionStreamBegin> {
0113   public:
0114     using MyPrincipal = RunPrincipal;
0115     using TransitionInfoType = RunTransitionInfo;
0116     using Context = StreamContext;
0117     static BranchType constexpr branchType_ = InRun;
0118     static bool constexpr begin_ = true;
0119     static bool constexpr isEvent_ = false;
0120     static Transition constexpr transition_ = Transition::BeginRun;
0121 
0122     static void setStreamContext(StreamContext& streamContext, MyPrincipal const& principal) {
0123       streamContext.setTransition(StreamContext::Transition::kBeginRun);
0124       streamContext.setEventID(EventID(principal.run(), 0, 0));
0125       streamContext.setRunIndex(principal.index());
0126       streamContext.setLuminosityBlockIndex(LuminosityBlockIndex::invalidLuminosityBlockIndex());
0127       streamContext.setTimestamp(principal.beginTime());
0128     }
0129 
0130     static void preScheduleSignal(ActivityRegistry* a, StreamContext const* streamContext) {
0131       a->preStreamBeginRunSignal_(*streamContext);
0132     }
0133     static void postScheduleSignal(ActivityRegistry* a, StreamContext const* streamContext) {
0134       a->postStreamBeginRunSignal_(*streamContext);
0135     }
0136     static void prePathSignal(ActivityRegistry*, PathContext const*) {}
0137     static void postPathSignal(ActivityRegistry*, HLTPathStatus const&, PathContext const*) {}
0138     static void preModuleSignal(ActivityRegistry* a,
0139                                 StreamContext const* streamContext,
0140                                 ModuleCallingContext const* moduleCallingContext) {
0141       a->preModuleStreamBeginRunSignal_(*streamContext, *moduleCallingContext);
0142     }
0143     static void postModuleSignal(ActivityRegistry* a,
0144                                  StreamContext const* streamContext,
0145                                  ModuleCallingContext const* moduleCallingContext) {
0146       a->postModuleStreamBeginRunSignal_(*streamContext, *moduleCallingContext);
0147     }
0148     static const char* transitionName() { return "stream begin Run"; }
0149   };
0150 
0151   template <>
0152   class OccurrenceTraits<RunPrincipal, BranchActionStreamEnd> {
0153   public:
0154     using MyPrincipal = RunPrincipal;
0155     using TransitionInfoType = RunTransitionInfo;
0156     using Context = StreamContext;
0157     static BranchType constexpr branchType_ = InRun;
0158     static bool constexpr begin_ = false;
0159     static bool constexpr isEvent_ = false;
0160     static Transition constexpr transition_ = Transition::EndRun;
0161 
0162     static void setStreamContext(StreamContext& streamContext, MyPrincipal const& principal) {
0163       streamContext.setTransition(StreamContext::Transition::kEndRun);
0164       streamContext.setEventID(EventID(principal.run(), 0, 0));
0165       streamContext.setRunIndex(principal.index());
0166       streamContext.setLuminosityBlockIndex(LuminosityBlockIndex::invalidLuminosityBlockIndex());
0167       streamContext.setTimestamp(principal.endTime());
0168     }
0169 
0170     static void preScheduleSignal(ActivityRegistry* a, StreamContext const* streamContext) {
0171       a->preStreamEndRunSignal_(*streamContext);
0172     }
0173     static void postScheduleSignal(ActivityRegistry* a, StreamContext const* streamContext) {
0174       a->postStreamEndRunSignal_(*streamContext);
0175     }
0176     static void prePathSignal(ActivityRegistry*, PathContext const*) {}
0177     static void postPathSignal(ActivityRegistry*, HLTPathStatus const&, PathContext const*) {}
0178     static void preModuleSignal(ActivityRegistry* a,
0179                                 StreamContext const* streamContext,
0180                                 ModuleCallingContext const* moduleCallingContext) {
0181       a->preModuleStreamEndRunSignal_(*streamContext, *moduleCallingContext);
0182     }
0183     static void postModuleSignal(ActivityRegistry* a,
0184                                  StreamContext const* streamContext,
0185                                  ModuleCallingContext const* moduleCallingContext) {
0186       a->postModuleStreamEndRunSignal_(*streamContext, *moduleCallingContext);
0187     }
0188     static const char* transitionName() { return "stream end Run"; }
0189   };
0190 
0191   template <>
0192   class OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd> {
0193   public:
0194     using MyPrincipal = RunPrincipal;
0195     using TransitionInfoType = RunTransitionInfo;
0196     using Context = GlobalContext;
0197     static BranchType constexpr branchType_ = InRun;
0198     static bool constexpr begin_ = false;
0199     static bool constexpr isEvent_ = false;
0200     static Transition constexpr transition_ = Transition::EndRun;
0201 
0202     static GlobalContext makeGlobalContext(MyPrincipal const& principal, ProcessContext const* processContext) {
0203       return GlobalContext(GlobalContext::Transition::kEndRun,
0204                            LuminosityBlockID(principal.run(), 0),
0205                            principal.index(),
0206                            LuminosityBlockIndex::invalidLuminosityBlockIndex(),
0207                            principal.endTime(),
0208                            processContext);
0209     }
0210 
0211     static void preScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0212       a->preGlobalEndRunSignal_(*globalContext);
0213     }
0214     static void postScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0215       a->postGlobalEndRunSignal_(*globalContext);
0216     }
0217     static void prePathSignal(ActivityRegistry*, PathContext const*) {}
0218     static void postPathSignal(ActivityRegistry*, HLTPathStatus const&, PathContext const*) {}
0219     static void preModuleSignal(ActivityRegistry* a,
0220                                 GlobalContext const* globalContext,
0221                                 ModuleCallingContext const* moduleCallingContext) {
0222       a->preModuleGlobalEndRunSignal_(*globalContext, *moduleCallingContext);
0223     }
0224     static void postModuleSignal(ActivityRegistry* a,
0225                                  GlobalContext const* globalContext,
0226                                  ModuleCallingContext const* moduleCallingContext) {
0227       a->postModuleGlobalEndRunSignal_(*globalContext, *moduleCallingContext);
0228     }
0229     static const char* transitionName() { return "global end Run"; }
0230   };
0231 
0232   template <>
0233   class OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin> {
0234   public:
0235     using MyPrincipal = LuminosityBlockPrincipal;
0236     using TransitionInfoType = LumiTransitionInfo;
0237     using Context = GlobalContext;
0238     static BranchType constexpr branchType_ = InLumi;
0239     static bool constexpr begin_ = true;
0240     static bool constexpr isEvent_ = false;
0241     static Transition constexpr transition_ = Transition::BeginLuminosityBlock;
0242 
0243     static GlobalContext makeGlobalContext(MyPrincipal const& principal, ProcessContext const* processContext) {
0244       return GlobalContext(GlobalContext::Transition::kBeginLuminosityBlock,
0245                            principal.id(),
0246                            principal.runPrincipal().index(),
0247                            principal.index(),
0248                            principal.beginTime(),
0249                            processContext);
0250     }
0251 
0252     static void preScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0253       a->preGlobalBeginLumiSignal_(*globalContext);
0254     }
0255     static void postScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0256       a->postGlobalBeginLumiSignal_(*globalContext);
0257     }
0258     static void prePathSignal(ActivityRegistry*, PathContext const*) {}
0259     static void postPathSignal(ActivityRegistry*, HLTPathStatus const&, PathContext const*) {}
0260     static void preModuleSignal(ActivityRegistry* a,
0261                                 GlobalContext const* globalContext,
0262                                 ModuleCallingContext const* moduleCallingContext) {
0263       a->preModuleGlobalBeginLumiSignal_(*globalContext, *moduleCallingContext);
0264     }
0265     static void postModuleSignal(ActivityRegistry* a,
0266                                  GlobalContext const* globalContext,
0267                                  ModuleCallingContext const* moduleCallingContext) {
0268       a->postModuleGlobalBeginLumiSignal_(*globalContext, *moduleCallingContext);
0269     }
0270     static const char* transitionName() { return "global begin LuminosityBlock"; }
0271   };
0272 
0273   template <>
0274   class OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin> {
0275   public:
0276     using MyPrincipal = LuminosityBlockPrincipal;
0277     using TransitionInfoType = LumiTransitionInfo;
0278     using Context = StreamContext;
0279     static BranchType constexpr branchType_ = InLumi;
0280     static bool constexpr begin_ = true;
0281     static bool constexpr isEvent_ = false;
0282     static Transition constexpr transition_ = Transition::BeginLuminosityBlock;
0283 
0284     static void setStreamContext(StreamContext& streamContext, MyPrincipal const& principal) {
0285       streamContext.setTransition(StreamContext::Transition::kBeginLuminosityBlock);
0286       streamContext.setEventID(EventID(principal.run(), principal.luminosityBlock(), 0));
0287       streamContext.setRunIndex(principal.runPrincipal().index());
0288       streamContext.setLuminosityBlockIndex(principal.index());
0289       streamContext.setTimestamp(principal.beginTime());
0290     }
0291 
0292     static void preScheduleSignal(ActivityRegistry* a, StreamContext const* streamContext) {
0293       a->preStreamBeginLumiSignal_(*streamContext);
0294     }
0295     static void postScheduleSignal(ActivityRegistry* a, StreamContext const* streamContext) {
0296       a->postStreamBeginLumiSignal_(*streamContext);
0297     }
0298     static void prePathSignal(ActivityRegistry*, PathContext const*) {}
0299     static void postPathSignal(ActivityRegistry*, HLTPathStatus const&, PathContext const*) {}
0300     static void preModuleSignal(ActivityRegistry* a,
0301                                 StreamContext const* streamContext,
0302                                 ModuleCallingContext const* moduleCallingContext) {
0303       a->preModuleStreamBeginLumiSignal_(*streamContext, *moduleCallingContext);
0304     }
0305     static void postModuleSignal(ActivityRegistry* a,
0306                                  StreamContext const* streamContext,
0307                                  ModuleCallingContext const* moduleCallingContext) {
0308       a->postModuleStreamBeginLumiSignal_(*streamContext, *moduleCallingContext);
0309     }
0310     static const char* transitionName() { return "stream begin LuminosityBlock"; }
0311   };
0312 
0313   template <>
0314   class OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd> {
0315   public:
0316     using MyPrincipal = LuminosityBlockPrincipal;
0317     using TransitionInfoType = LumiTransitionInfo;
0318     using Context = StreamContext;
0319     static BranchType constexpr branchType_ = InLumi;
0320     static bool constexpr begin_ = false;
0321     static bool constexpr isEvent_ = false;
0322     static Transition constexpr transition_ = Transition::EndLuminosityBlock;
0323 
0324     static StreamContext const* context(StreamContext const* s, GlobalContext const*) { return s; }
0325 
0326     static void setStreamContext(StreamContext& streamContext, MyPrincipal const& principal) {
0327       streamContext.setTransition(StreamContext::Transition::kEndLuminosityBlock);
0328       streamContext.setEventID(EventID(principal.run(), principal.luminosityBlock(), 0));
0329       streamContext.setRunIndex(principal.runPrincipal().index());
0330       streamContext.setLuminosityBlockIndex(principal.index());
0331       streamContext.setTimestamp(principal.endTime());
0332     }
0333 
0334     static void preScheduleSignal(ActivityRegistry* a, StreamContext const* streamContext) {
0335       a->preStreamEndLumiSignal_(*streamContext);
0336     }
0337     static void postScheduleSignal(ActivityRegistry* a, StreamContext const* streamContext) {
0338       a->postStreamEndLumiSignal_(*streamContext);
0339     }
0340     static void prePathSignal(ActivityRegistry*, PathContext const*) {}
0341     static void postPathSignal(ActivityRegistry*, HLTPathStatus const&, PathContext const*) {}
0342     static void preModuleSignal(ActivityRegistry* a,
0343                                 StreamContext const* streamContext,
0344                                 ModuleCallingContext const* moduleCallingContext) {
0345       a->preModuleStreamEndLumiSignal_(*streamContext, *moduleCallingContext);
0346     }
0347     static void postModuleSignal(ActivityRegistry* a,
0348                                  StreamContext const* streamContext,
0349                                  ModuleCallingContext const* moduleCallingContext) {
0350       a->postModuleStreamEndLumiSignal_(*streamContext, *moduleCallingContext);
0351     }
0352     static const char* transitionName() { return "end stream LuminosityBlock"; }
0353   };
0354 
0355   template <>
0356   class OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd> {
0357   public:
0358     using MyPrincipal = LuminosityBlockPrincipal;
0359     using TransitionInfoType = LumiTransitionInfo;
0360     using Context = GlobalContext;
0361     static BranchType constexpr branchType_ = InLumi;
0362     static bool constexpr begin_ = false;
0363     static bool constexpr isEvent_ = false;
0364     static Transition constexpr transition_ = Transition::EndLuminosityBlock;
0365 
0366     static GlobalContext makeGlobalContext(MyPrincipal const& principal, ProcessContext const* processContext) {
0367       return GlobalContext(GlobalContext::Transition::kEndLuminosityBlock,
0368                            principal.id(),
0369                            principal.runPrincipal().index(),
0370                            principal.index(),
0371                            principal.beginTime(),
0372                            processContext);
0373     }
0374 
0375     static void preScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0376       a->preGlobalEndLumiSignal_(*globalContext);
0377     }
0378     static void postScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0379       a->postGlobalEndLumiSignal_(*globalContext);
0380     }
0381     static void prePathSignal(ActivityRegistry*, PathContext const*) {}
0382     static void postPathSignal(ActivityRegistry*, HLTPathStatus const&, PathContext const*) {}
0383     static void preModuleSignal(ActivityRegistry* a,
0384                                 GlobalContext const* globalContext,
0385                                 ModuleCallingContext const* moduleCallingContext) {
0386       a->preModuleGlobalEndLumiSignal_(*globalContext, *moduleCallingContext);
0387     }
0388     static void postModuleSignal(ActivityRegistry* a,
0389                                  GlobalContext const* globalContext,
0390                                  ModuleCallingContext const* moduleCallingContext) {
0391       a->postModuleGlobalEndLumiSignal_(*globalContext, *moduleCallingContext);
0392     }
0393     static const char* transitionName() { return "end global LuminosityBlock"; }
0394   };
0395 
0396   template <>
0397   class OccurrenceTraits<ProcessBlockPrincipal, BranchActionGlobalBegin> {
0398   public:
0399     using MyPrincipal = ProcessBlockPrincipal;
0400     using TransitionInfoType = ProcessBlockTransitionInfo;
0401     using Context = GlobalContext;
0402     static bool constexpr isEvent_ = false;
0403     static Transition constexpr transition_ = Transition::BeginProcessBlock;
0404 
0405     static GlobalContext makeGlobalContext(MyPrincipal const& principal, ProcessContext const* processContext) {
0406       return GlobalContext(GlobalContext::Transition::kBeginProcessBlock,
0407                            LuminosityBlockID(),
0408                            RunIndex::invalidRunIndex(),
0409                            LuminosityBlockIndex::invalidLuminosityBlockIndex(),
0410                            Timestamp::invalidTimestamp(),
0411                            processContext);
0412     }
0413 
0414     static void preScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0415       a->preBeginProcessBlockSignal_(*globalContext);
0416     }
0417     static void postScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0418       a->postBeginProcessBlockSignal_(*globalContext);
0419     }
0420     static void preModuleSignal(ActivityRegistry* a,
0421                                 GlobalContext const* globalContext,
0422                                 ModuleCallingContext const* moduleCallingContext) {
0423       a->preModuleBeginProcessBlockSignal_(*globalContext, *moduleCallingContext);
0424     }
0425     static void postModuleSignal(ActivityRegistry* a,
0426                                  GlobalContext const* globalContext,
0427                                  ModuleCallingContext const* moduleCallingContext) {
0428       a->postModuleBeginProcessBlockSignal_(*globalContext, *moduleCallingContext);
0429     }
0430     static const char* transitionName() { return "begin ProcessBlock"; }
0431   };
0432 
0433   template <>
0434   class OccurrenceTraits<ProcessBlockPrincipal, BranchActionProcessBlockInput> {
0435   public:
0436     using MyPrincipal = ProcessBlockPrincipal;
0437     using TransitionInfoType = ProcessBlockTransitionInfo;
0438     using Context = GlobalContext;
0439     static bool constexpr isEvent_ = false;
0440     static Transition constexpr transition_ = Transition::AccessInputProcessBlock;
0441 
0442     static GlobalContext makeGlobalContext(MyPrincipal const& principal, ProcessContext const* processContext) {
0443       return GlobalContext(GlobalContext::Transition::kAccessInputProcessBlock,
0444                            LuminosityBlockID(),
0445                            RunIndex::invalidRunIndex(),
0446                            LuminosityBlockIndex::invalidLuminosityBlockIndex(),
0447                            Timestamp::invalidTimestamp(),
0448                            processContext);
0449     }
0450 
0451     static void preScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0452       a->preAccessInputProcessBlockSignal_(*globalContext);
0453     }
0454     static void postScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0455       a->postAccessInputProcessBlockSignal_(*globalContext);
0456     }
0457     static void preModuleSignal(ActivityRegistry* a,
0458                                 GlobalContext const* globalContext,
0459                                 ModuleCallingContext const* moduleCallingContext) {
0460       a->preModuleAccessInputProcessBlockSignal_(*globalContext, *moduleCallingContext);
0461     }
0462     static void postModuleSignal(ActivityRegistry* a,
0463                                  GlobalContext const* globalContext,
0464                                  ModuleCallingContext const* moduleCallingContext) {
0465       a->postModuleAccessInputProcessBlockSignal_(*globalContext, *moduleCallingContext);
0466     }
0467     static const char* transitionName() { return "access input ProcessBlock"; }
0468   };
0469 
0470   template <>
0471   class OccurrenceTraits<ProcessBlockPrincipal, BranchActionGlobalEnd> {
0472   public:
0473     using MyPrincipal = ProcessBlockPrincipal;
0474     using TransitionInfoType = ProcessBlockTransitionInfo;
0475     using Context = GlobalContext;
0476     static bool constexpr isEvent_ = false;
0477     static Transition constexpr transition_ = Transition::EndProcessBlock;
0478 
0479     static GlobalContext makeGlobalContext(MyPrincipal const& principal, ProcessContext const* processContext) {
0480       return GlobalContext(GlobalContext::Transition::kEndProcessBlock,
0481                            LuminosityBlockID(),
0482                            RunIndex::invalidRunIndex(),
0483                            LuminosityBlockIndex::invalidLuminosityBlockIndex(),
0484                            Timestamp::invalidTimestamp(),
0485                            processContext);
0486     }
0487 
0488     static void preScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0489       a->preEndProcessBlockSignal_(*globalContext);
0490     }
0491     static void postScheduleSignal(ActivityRegistry* a, GlobalContext const* globalContext) {
0492       a->postEndProcessBlockSignal_(*globalContext);
0493     }
0494     static void preModuleSignal(ActivityRegistry* a,
0495                                 GlobalContext const* globalContext,
0496                                 ModuleCallingContext const* moduleCallingContext) {
0497       a->preModuleEndProcessBlockSignal_(*globalContext, *moduleCallingContext);
0498     }
0499     static void postModuleSignal(ActivityRegistry* a,
0500                                  GlobalContext const* globalContext,
0501                                  ModuleCallingContext const* moduleCallingContext) {
0502       a->postModuleEndProcessBlockSignal_(*globalContext, *moduleCallingContext);
0503     }
0504     static const char* transitionName() { return "end ProcessBlock"; }
0505   };
0506 
0507 }  // namespace edm
0508 #endif