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