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