PrincipalPackages.h
Go to the documentation of this file.
1 #ifndef art_Framework_Principal_PrincipalPackages_h
2 #define art_Framework_Principal_PrincipalPackages_h
3 
4 // ======================================================================
5 //
6 // PrincipalPackages: encapsulates information necessary for
7 // processing of Events, SubRuns, and Runs.
8 //
9 // ======================================================================
10 
23 
24 // ----------------------------------------------------------------------
25 
26 namespace art {
27 
28  template <Level L>
30  public:
31  static_assert(L == Level::Event,
32  "ProcessPackage can be used only for the Event level.\n");
35  constexpr static Level level{L};
36  static void
38  {
40  a.sPreProcessEvent.invoke(ev);
41  }
42  static void
44  {
46  a.sPostProcessEvent.invoke(ev);
47  }
48  static void
50  {
51  a.sPreProcessPath.invoke(s);
52  }
53  static void
55  std::string const& s,
56  HLTPathStatus const& status)
57  {
58  a.sPostProcessPath.invoke(s, status);
59  }
60  static void
62  {
63  a.sPreModule.invoke(md);
64  }
65  static void
67  {
68  a.sPostModule.invoke(md);
69  }
70  };
71 
72  template <Level L>
74 
75  template <Level>
77 
78  template <>
80  public:
81  class Begin {
82  public:
84  constexpr static Level level{Level::Run};
86 
87  static void
89  {
91  a.sPreBeginRun.invoke(run);
92  }
93  static void
95  {
97  a.sPostBeginRun.invoke(run);
98  }
99  static void
101  {
102  a.sPrePathBeginRun.invoke(s);
103  }
104  static void
106  std::string const& s,
107  HLTPathStatus const& status)
108  {
109  a.sPostPathBeginRun.invoke(s, status);
110  }
111  static void
113  {
114  a.sPreModuleBeginRun.invoke(md);
115  }
116  static void
118  {
119  a.sPostModuleBeginRun.invoke(md);
120  }
121  };
122 
123  class End {
124  public:
126  constexpr static Level level{Level::Run};
128 
129  static void
131  {
132  a.sPreEndRun.invoke(rp.id(), rp.endTime());
133  }
134  static void
136  {
138  a.sPostEndRun.invoke(run);
139  }
140  static void
142  {
143  a.sPrePathEndRun.invoke(s);
144  }
145  static void
147  std::string const& s,
148  HLTPathStatus const& status)
149  {
150  a.sPostPathEndRun.invoke(s, status);
151  }
152  static void
154  {
155  a.sPreModuleEndRun.invoke(md);
156  }
157  static void
159  {
160  a.sPostModuleEndRun.invoke(md);
161  }
162  };
163  };
164 
165  template <>
167  public:
168  class Begin {
169  public:
171  constexpr static Level level{Level::SubRun};
173 
174  static void
176  {
177  SubRun const sr{
179  a.sPreBeginSubRun.invoke(sr);
180  }
181  static void
183  {
184  SubRun const sr{
186  a.sPostBeginSubRun.invoke(sr);
187  }
188  static void
190  {
191  a.sPrePathBeginSubRun.invoke(s);
192  }
193  static void
195  std::string const& s,
196  HLTPathStatus const& status)
197  {
198  a.sPostPathBeginSubRun.invoke(s, status);
199  }
200  static void
202  {
203  a.sPreModuleBeginSubRun.invoke(md);
204  }
205  static void
207  {
208  a.sPostModuleBeginSubRun.invoke(md);
209  }
210  };
211 
212  class End {
213  public:
215  constexpr static Level level{Level::SubRun};
217 
218  static void
220  {
221  a.sPreEndSubRun.invoke(srp.id(), srp.endTime());
222  }
223  static void
225  {
226  SubRun const sr{
228  a.sPostEndSubRun.invoke(sr);
229  }
230  static void
232  {
233  a.sPrePathEndSubRun.invoke(s);
234  }
235  static void
237  std::string const& s,
238  HLTPathStatus const& status)
239  {
240  a.sPostPathEndSubRun.invoke(s, status);
241  }
242  static void
244  {
245  a.sPreModuleEndSubRun.invoke(md);
246  }
247  static void
249  {
250  a.sPostModuleEndSubRun.invoke(md);
251  }
252  };
253  };
254 
255  template <Level L>
257 
258  template <Level L>
259  using End = typename BeginEndPackage<L>::End;
260 }
261 
262 // ======================================================================
263 
264 #endif /* art_Framework_Principal_PrincipalPackages_h */
265 
266 // Local Variables:
267 // mode: c++
268 // End:
static void postModuleSignal(ActivityRegistry &a, ModuleDescription const &md)
Timestamp const & endTime() const
static void prePathSignal(ActivityRegistry &a, std::string const &s)
GlobalSignal< detail::SignalResponseType::LIFO, void(ModuleDescription const &)> sPostModuleBeginSubRun
static void postScheduleSignal(ActivityRegistry &a, RunPrincipal const &rp)
int status
Definition: fabricate.py:1613
static void postScheduleSignal(ActivityRegistry &a, SubRunPrincipal const &srp)
GlobalSignal< detail::SignalResponseType::FIFO, void(std::string const &)> sPrePathEndSubRun
static constexpr Level level
static void postPathSignal(ActivityRegistry &a, std::string const &s, HLTPathStatus const &status)
static void postScheduleSignal(ActivityRegistry &a, EventPrincipal const &ep)
GlobalSignal< detail::SignalResponseType::LIFO, void(std::string const &, HLTPathStatus const &)> sPostProcessPath
GlobalSignal< detail::SignalResponseType::FIFO, void(ModuleDescription const &)> sPreModuleEndSubRun
Timestamp const & endTime() const
Definition: RunPrincipal.h:64
static cet::exempt_ptr< Consumer > non_module_context()
GlobalSignal< detail::SignalResponseType::LIFO, void(std::string const &, HLTPathStatus const &)> sPostPathEndRun
GlobalSignal< detail::SignalResponseType::LIFO, void(ModuleDescription const &)> sPostModuleEndRun
Level
Definition: Level.h:12
GlobalSignal< detail::SignalResponseType::LIFO, void(Run const &)> sPostBeginRun
GlobalSignal< detail::SignalResponseType::LIFO, void(SubRun const &)> sPostBeginSubRun
static void postPathSignal(ActivityRegistry &a, std::string const &s, HLTPathStatus const &status)
static void postPathSignal(ActivityRegistry &a, std::string const &s, HLTPathStatus const &status)
GlobalSignal< detail::SignalResponseType::LIFO, void(std::string const &, HLTPathStatus const &)> sPostPathEndSubRun
static void prePathSignal(ActivityRegistry &a, std::string const &s)
GlobalSignal< detail::SignalResponseType::LIFO, void(std::string const &, HLTPathStatus const &)> sPostPathBeginSubRun
typename BeginEndPackage< L >::End End
static void postModuleSignal(ActivityRegistry &a, ModuleDescription const &md)
GlobalSignal< detail::SignalResponseType::FIFO, void(ModuleDescription const &)> sPreModuleBeginSubRun
Definition: Run.h:31
const XML_Char * s
Definition: expat.h:262
static void preModuleSignal(ActivityRegistry &a, ModuleDescription const &md)
GlobalSignal< detail::SignalResponseType::FIFO, void(ModuleDescription const &)> sPreModuleBeginRun
static void postScheduleSignal(ActivityRegistry &a, RunPrincipal const &rp)
GlobalSignal< detail::SignalResponseType::FIFO, void(ModuleDescription const &)> sPreModuleEndRun
SubRunID id() const
static constexpr double L
static void postScheduleSignal(ActivityRegistry &a, SubRunPrincipal const &srp)
GlobalSignal< detail::SignalResponseType::LIFO, void(ModuleDescription const &)> sPostModule
const double a
GlobalSignal< detail::SignalResponseType::FIFO, void(std::string const &)> sPrePathEndRun
static void preModuleSignal(ActivityRegistry &a, ModuleDescription const &md)
caf::StandardRecord * sr
static void postPathSignal(ActivityRegistry &a, std::string const &s, HLTPathStatus const &status)
GlobalSignal< detail::SignalResponseType::FIFO, void(std::string const &)> sPrePathBeginRun
BranchActionType
static void postModuleSignal(ActivityRegistry &a, ModuleDescription const &md)
Definition: run.py:1
static void postModuleSignal(ActivityRegistry &a, ModuleDescription const &md)
GlobalSignal< detail::SignalResponseType::LIFO, void(Run const &)> sPostEndRun
static void prePathSignal(ActivityRegistry &a, std::string const &s)
typename BeginEndPackage< L >::Begin Begin
static void preScheduleSignal(ActivityRegistry &a, SubRunPrincipal const &srp)
GlobalSignal< detail::SignalResponseType::FIFO, void(Run const &)> sPreBeginRun
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
GlobalSignal< detail::SignalResponseType::LIFO, void(ModuleDescription const &)> sPostModuleEndSubRun
GlobalSignal< detail::SignalResponseType::FIFO, void(SubRunID const &, Timestamp const &)> sPreEndSubRun
static void preScheduleSignal(ActivityRegistry &a, RunPrincipal const &rp)
RunID const & id() const
Definition: RunPrincipal.h:48
GlobalSignal< detail::SignalResponseType::FIFO, void(ModuleDescription const &)> sPreModule
GlobalSignal< detail::SignalResponseType::FIFO, void(Event const &)> sPreProcessEvent
static void postModuleSignal(ActivityRegistry &a, ModuleDescription const &md)
GlobalSignal< detail::SignalResponseType::FIFO, void(std::string const &)> sPreProcessPath
static void preScheduleSignal(ActivityRegistry &a, RunPrincipal const &rp)
static constexpr BranchActionType processing_action
static void preScheduleSignal(ActivityRegistry &a, EventPrincipal const &ep)
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
GlobalSignal< detail::SignalResponseType::FIFO, void(RunID const &, Timestamp const &)> sPreEndRun
static void postPathSignal(ActivityRegistry &a, std::string const &s, HLTPathStatus const &status)
static void preModuleSignal(ActivityRegistry &a, ModuleDescription const &md)
GlobalSignal< detail::SignalResponseType::FIFO, void(SubRun const &)> sPreBeginSubRun
static void prePathSignal(ActivityRegistry &a, std::string const &s)
GlobalSignal< detail::SignalResponseType::LIFO, void(Event const &)> sPostProcessEvent
GlobalSignal< detail::SignalResponseType::LIFO, void(ModuleDescription const &)> sPostModuleBeginRun
static void prePathSignal(ActivityRegistry &a, std::string const &s)
static void preModuleSignal(ActivityRegistry &a, ModuleDescription const &md)
static void preScheduleSignal(ActivityRegistry &a, SubRunPrincipal const &srp)
GlobalSignal< detail::SignalResponseType::LIFO, void(std::string const &, HLTPathStatus const &)> sPostPathBeginRun
GlobalSignal< detail::SignalResponseType::LIFO, void(SubRun const &)> sPostEndSubRun
GlobalSignal< detail::SignalResponseType::FIFO, void(std::string const &)> sPrePathBeginSubRun
static void preModuleSignal(ActivityRegistry &a, ModuleDescription const &md)