LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EnsureOnlyOneSchedule.h
Go to the documentation of this file.
1 #ifndef larcore_CoreUtils_EnsureOnlyOneSchedule_h
2 #define larcore_CoreUtils_EnsureOnlyOneSchedule_h
3 
6 #include "cetlib_except/demangle.h"
7 
24 namespace lar {
25  template <typename T>
27  public:
29  {
30  if (auto const nschedules = art::Globals::instance()->nschedules(); nschedules > 1) {
32  << "This job uses " << nschedules << " schedules, but the type '"
33  << cet::demangle_symbol(typeid(T).name()) << " supports\n"
34  << "processing only one event at a time. Please reconfigure your job to use only one "
35  "schedule.\n";
36  }
37  }
38  };
39 }
40 
41 #endif /* larcore_CoreUtils_EnsureOnlyOneSchedule_h */
42 
43 // Local Variables:
44 // mode: c++
45 // End:
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
LArSoft-specific namespace.
static Globals * instance()
Definition: Globals.cc:17