Globals.h
Go to the documentation of this file.
1 #ifndef art_Utilities_Globals_h
2 #define art_Utilities_Globals_h
3 // vim: set sw=2 expandtab :
4 
7 
8 #include <string>
9 #include <vector>
10 
11 namespace art {
12 
13  class Globals {
14  friend class PathManager;
15  friend class Scheduler;
16 
17  public:
18  ~Globals();
19  Globals(Globals const&) = delete;
20  Globals(Globals&&) = delete;
21  Globals& operator=(Globals const&) = delete;
22  Globals& operator=(Globals&&) = delete;
23 
24  static Globals* instance();
27  std::string const& processName() const;
28  fhicl::ParameterSet const& triggerPSet() const;
29  std::vector<std::string> const& triggerPathNames() const;
30 
31  private:
32  Globals();
33 
34  void setNSchedules(int);
35  void setNThreads(int);
36  void setProcessName(std::string const&);
38  void setTriggerPathNames(std::vector<std::string> const&);
39 
40  int nschedules_{1};
41  int nthreads_{1};
43 
44  // Parameter set of trigger paths, the key is "trigger_paths",
45  // and the value is triggerPathNames_.
47 
48  // Trigger path names, passed to ctor.
49  std::vector<std::string> triggerPathNames_;
50  };
51 
52 } // namespace art
53 
54 // Local Variables:
55 // mode: c++
56 // End:
57 
58 #endif /* art_Utilities_Globals_h */
void setProcessName(std::string const &)
Definition: Globals.cc:54
fhicl::ParameterSet triggerPSet_
Definition: Globals.h:46
std::string string
Definition: nybbler.cc:12
void setNThreads(int)
Definition: Globals.cc:42
void setTriggerPSet(fhicl::ParameterSet const &)
Definition: Globals.cc:66
fhicl::ParameterSet const & triggerPSet() const
Definition: Globals.cc:60
ScheduleID::size_type nthreads() const
Definition: Globals.cc:36
std::string processName_
Definition: Globals.h:42
Globals & operator=(Globals const &)=delete
void setNSchedules(int)
Definition: Globals.cc:30
ScheduleID::size_type nschedules() const
Definition: Globals.cc:24
std::vector< std::string > triggerPathNames_
Definition: Globals.h:49
int nschedules_
Definition: Globals.h:40
std::string const & processName() const
Definition: Globals.cc:48
id_type size_type
Definition: ScheduleID.h:25
void setTriggerPathNames(std::vector< std::string > const &)
Definition: Globals.cc:78
static Globals * instance()
Definition: Globals.cc:17
std::vector< std::string > const & triggerPathNames() const
Definition: Globals.cc:72
int nthreads_
Definition: Globals.h:41