TestReplicatedAnalyzer_module.cc
Go to the documentation of this file.
4 
5 #include <iostream>
6 
7 using namespace art;
8 
9 namespace {
10  class TestReplicatedAnalyzer : public ReplicatedAnalyzer {
11  public:
12  struct Config {
13  };
14  using Parameters = Table<Config>;
15  explicit TestReplicatedAnalyzer(Parameters const& p,
16  ScheduleID const sid) noexcept
17  : ReplicatedAnalyzer{p}, sid_{sid}
18  {
19  std::cout << "Module constructor - ScheduleID: " << sid_ << '\n';
20  }
21 
22  private:
23  void analyze(Event const&) override;
24  ScheduleID const sid_;
25  };
26 
27  void
29  {
30  std::cout << "Schedule: " << sid_ << " Event: " << e.id() << '\n';
31  }
32 }
33 
34 DEFINE_ART_MODULE(TestReplicatedAnalyzer)
def analyze(root, level, gtrees, gbranches, doprint)
Definition: rootstat.py:67
const double e
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:68
p
Definition: test.py:228
EventID id() const
Definition: Event.cc:37