MFStatusUpdater.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_MFStatusUpdater_h
2 #define art_Framework_Core_MFStatusUpdater_h
3 // vim: set sw=2 expandtab :
4 
6 
7 #define MFSU_0_ARG_UPDATER_DECL(cb) \
8  decltype(ActivityRegistry::s##cb)::result_type updateStatusTo##cb()
9 
10 #define MFSU_0_ARG_UPDATER_DEFN(cb) \
11  decltype(ActivityRegistry::s##cb)::result_type \
12  MFStatusUpdater::updateStatusTo##cb()
13 
14 #define MFSU_1_ARG_UPDATER_DECL(cb) \
15  decltype(ActivityRegistry::s##cb)::result_type updateStatusTo##cb( \
16  decltype(ActivityRegistry::s##cb)::slot_argument_type<0>)
17 
18 #define MFSU_1_ARG_UPDATER_DEFN(cb) \
19  decltype(ActivityRegistry::s##cb)::result_type \
20  MFStatusUpdater::updateStatusTo##cb(decltype( \
21  ActivityRegistry::s##cb)::slot_argument_type<0> arg1 [[maybe_unused]])
22 
23 #define MFSU_2_ARG_UPDATER_DECL(cb) \
24  decltype(ActivityRegistry::s##cb)::result_type updateStatusTo##cb( \
25  decltype(ActivityRegistry::s##cb)::slot_argument_type<0>, \
26  decltype(ActivityRegistry::s##cb)::slot_argument_type<1>)
27 
28 #define MFSU_2_ARG_UPDATER_DEFN(cb) \
29  decltype(ActivityRegistry::s##cb)::result_type \
30  MFStatusUpdater::updateStatusTo##cb( \
31  decltype(ActivityRegistry::s##cb)::slot_argument_type<0> arg1 \
32  [[maybe_unused]], \
33  decltype(ActivityRegistry::s##cb)::slot_argument_type<1> arg2 \
34  [[maybe_unused]])
35 
36 namespace art {
37 
39  public:
40  ~MFStatusUpdater() noexcept;
42  MFStatusUpdater(MFStatusUpdater const&) = delete;
43  MFStatusUpdater(MFStatusUpdater&&) = delete;
44  MFStatusUpdater& operator=(MFStatusUpdater const&) = delete;
46 
47  private:
48  MFSU_1_ARG_UPDATER_DECL(PreModuleConstruction);
49  MFSU_1_ARG_UPDATER_DECL(PostModuleConstruction);
50 
51  MFSU_1_ARG_UPDATER_DECL(PostSourceConstruction);
52 
53  MFSU_0_ARG_UPDATER_DECL(PreOpenFile);
54  MFSU_1_ARG_UPDATER_DECL(PostOpenFile);
55  MFSU_0_ARG_UPDATER_DECL(PreCloseFile);
56  MFSU_0_ARG_UPDATER_DECL(PostCloseFile);
57 
58  MFSU_1_ARG_UPDATER_DECL(PreModuleBeginJob);
59  MFSU_1_ARG_UPDATER_DECL(PostModuleBeginJob);
60  // FIXME: Throws error! Remove!!!
61  MFSU_2_ARG_UPDATER_DECL(PostBeginJobWorkers);
62  MFSU_0_ARG_UPDATER_DECL(PostBeginJob);
63 
64  MFSU_0_ARG_UPDATER_DECL(PreSourceRun);
65  MFSU_1_ARG_UPDATER_DECL(PostSourceRun);
66 
67  MFSU_1_ARG_UPDATER_DECL(PreBeginRun);
68  MFSU_1_ARG_UPDATER_DECL(PrePathBeginRun);
69  MFSU_1_ARG_UPDATER_DECL(PreModuleBeginRun);
70 
71  MFSU_1_ARG_UPDATER_DECL(PostModuleBeginRun);
72  MFSU_2_ARG_UPDATER_DECL(PostPathBeginRun);
73  MFSU_1_ARG_UPDATER_DECL(PostBeginRun);
74 
75  MFSU_0_ARG_UPDATER_DECL(PreSourceSubRun);
76  MFSU_1_ARG_UPDATER_DECL(PostSourceSubRun);
77 
78  MFSU_1_ARG_UPDATER_DECL(PreBeginSubRun);
79  MFSU_1_ARG_UPDATER_DECL(PrePathBeginSubRun);
80  MFSU_1_ARG_UPDATER_DECL(PreModuleBeginSubRun);
81 
82  MFSU_1_ARG_UPDATER_DECL(PostModuleBeginSubRun);
83  MFSU_2_ARG_UPDATER_DECL(PostPathBeginSubRun);
84  MFSU_1_ARG_UPDATER_DECL(PostBeginSubRun);
85 
86  MFSU_1_ARG_UPDATER_DECL(PreSourceEvent);
87  MFSU_2_ARG_UPDATER_DECL(PostSourceEvent);
88 
89  MFSU_1_ARG_UPDATER_DECL(PreProcessPath);
90  MFSU_2_ARG_UPDATER_DECL(PostProcessPath);
91 
92  MFSU_2_ARG_UPDATER_DECL(PreProcessEvent);
93  MFSU_2_ARG_UPDATER_DECL(PostProcessEvent);
94 
95  MFSU_1_ARG_UPDATER_DECL(PreModule);
96  MFSU_1_ARG_UPDATER_DECL(PostModule);
97 
98  MFSU_1_ARG_UPDATER_DECL(PreModuleEndSubRun);
99  MFSU_1_ARG_UPDATER_DECL(PostModuleEndSubRun);
100  MFSU_1_ARG_UPDATER_DECL(PrePathEndSubRun);
101  MFSU_2_ARG_UPDATER_DECL(PostPathEndSubRun);
102  MFSU_2_ARG_UPDATER_DECL(PreEndSubRun);
103  MFSU_1_ARG_UPDATER_DECL(PostEndSubRun);
104 
105  MFSU_1_ARG_UPDATER_DECL(PreModuleEndRun);
106  MFSU_1_ARG_UPDATER_DECL(PostModuleEndRun);
107  MFSU_1_ARG_UPDATER_DECL(PrePathEndRun);
108  MFSU_2_ARG_UPDATER_DECL(PostPathEndRun);
109  MFSU_2_ARG_UPDATER_DECL(PreEndRun);
110  MFSU_1_ARG_UPDATER_DECL(PostEndRun);
111 
112  MFSU_1_ARG_UPDATER_DECL(PreModuleEndJob);
113  MFSU_1_ARG_UPDATER_DECL(PostModuleEndJob);
114  MFSU_0_ARG_UPDATER_DECL(PostEndJob);
115  // MFSU_0_ARG_UPDATER_DECL(JobFailure);
116  };
117 
118 } // namespace art
119 
120 #undef MFSU_0_ARG_UPDATER_DECL
121 #undef MFSU_1_ARG_UPDATER_DECL
122 #undef MFSU_2_ARG_UPDATER_DECL
123 #undef MFSU_3_ARG_UPDATER_DECL
124 #undef MFSU_UPDATER_DECL
125 
126 #ifndef MFSU_IMPL
127 #undef MFSU_0_ARG_UPDATER_DEFN
128 #undef MFSU_1_ARG_UPDATER_DEFN
129 #undef MFSU_2_ARG_UPDATER_DEFN
130 #undef MFSU_3_ART_UPDATER_DEFN
131 #endif // MFSU_IMPL
132 
133 #endif /* art_Framework_Core_MFStatusUpdater_h */
134 
135 // Local Variables:
136 // mode: c++
137 // End:
MFSU_0_ARG_UPDATER_DECL(PreOpenFile)
~MFStatusUpdater() noexcept
MFSU_1_ARG_UPDATER_DECL(PreModuleConstruction)
MFSU_2_ARG_UPDATER_DECL(PostBeginJobWorkers)
MFStatusUpdater(ActivityRegistry &areg)
MFStatusUpdater & operator=(MFStatusUpdater const &)=delete