LegacyModule.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_detail_LegacyModule_h
2 #define art_Framework_Core_detail_LegacyModule_h
3 // vim: set sw=2 expandtab :
4 
8 
9 #include <atomic>
10 #include <string>
11 
12 namespace art::detail {
13  class LegacyModule : public SharedModule, private EngineCreator {
14  public:
15  explicit LegacyModule(std::string const& module_label);
16 
17  ScheduleID scheduleID() const noexcept;
18 
22 
24 
25  class ScheduleIDSentry;
26 
27  private:
28  void setScheduleID(ScheduleID const sid) noexcept;
29 
30  // The thread-sanitizer wants this to be atomic, even though
31  // it's unlikely to be a problem in any practical scenario.
32  std::atomic<ScheduleID> scheduleID_;
33  };
34 
36  public:
37  explicit ScheduleIDSentry(LegacyModule& mod, ScheduleID const sid) noexcept;
38  ~ScheduleIDSentry() noexcept;
39 
40  private:
42  };
43 }
44 
45 // Local Variables:
46 // mode: c++
47 // End:
48 
49 #endif /* art_Framework_Core_detail_LegacyModule_h */
base_engine_t & createEngine(seed_t seed)
std::string string
Definition: nybbler.cc:12
RNGsnapshot::label_t label_t
Definition: EngineCreator.h:37
LegacyModule(std::string const &module_label)
Definition: LegacyModule.cc:5
ScheduleID scheduleID() const noexcept
Definition: LegacyModule.cc:12
std::atomic< ScheduleID > scheduleID_
Definition: LegacyModule.h:32
CLHEP::HepRandomEngine base_engine_t
Definition: EngineCreator.h:36
void setScheduleID(ScheduleID const sid) noexcept
Definition: LegacyModule.cc:18