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