TestEmptyEventTimestampNoRSRTS_plugin.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: TestEmptyEventTimestamp
3 // Module Type: emptyeventtimestampplugin
4 // File: TestEmptyEventTimestamp_plugin.cc
5 //
6 // Generated at Thu Aug 21 07:53:15 2014 by Christopher Green using artmod
7 // from cetpkgsupport v1_06_02.
8 ////////////////////////////////////////////////////////////////////////
9 
15 #include "fhiclcpp/ParameterSet.h"
17 
18 #include <iostream>
19 
20 namespace arttest {
21  class TestEmptyEventTimestamp;
22 }
23 
25 public:
27  // The destructor generated by the compiler is fine for classes
28  // without bare pointers or other resource use.
29 
30  // Plugins should not be copied or assigned.
35 
36  // Required functions.
37  art::Timestamp eventTimestamp(art::EventID const& eid) override;
38  void rewind() override;
39 
40  // Selected optional functions.
41  void beginJob() override;
42  void beginRun(art::Run const& r) override;
43 #ifndef TEST_USE_LAST_EVENT_TIMESTAMP
44  art::Timestamp beginRunTimestamp(art::RunID const& rid) override;
45 #endif
46  void beginSubRun(art::SubRun const& sr) override;
47 #ifndef TEST_USE_LAST_EVENT_TIMESTAMP
49 #endif
50  void endJob() override;
51 
52 private:
53  // Declare member data here.
55 };
56 
57 namespace {
58  void
59  announce(std::string const& caller)
60  {
61  std::cout << "TestEmptyEventTimestamp: in " << caller << '.' << std::endl;
62  }
63 } // namespace
64 
66  fhicl::ParameterSet const& p)
68 {
69  announce("constructor");
70 }
71 
74 {
75  announce("eventTimestamp");
76  return timeCount_++;
77 }
78 
79 void
81 {
82  announce("rewind");
83  timeCount_ = 0;
84 }
85 
86 void
88 {
89  announce("beginJob");
90 }
91 
92 void
94 {
95  announce("beginRun");
96  std::cout << "r.beginTime() = " << r.beginTime().value() << std::endl;
97 }
98 
99 #ifndef TEST_USE_LAST_EVENT_TIMESTAMP
102 {
103  announce("beginRunTimestamp");
104  return (timeCount_ - 1);
105 }
106 #endif
107 
108 void
110 {
111  announce("beginSubRun");
112  std::cout << "sr.beginTime() = " << sr.beginTime().value() << std::endl;
113 }
114 
115 #ifndef TEST_USE_LAST_EVENT_TIMESTAMP
118 {
119  announce("beginSubRunTimestamp");
120  return (timeCount_ - 1);
121 }
122 #endif
123 
124 void
126 {
127  announce("endJob");
128 }
129 
void beginRun(art::Run const &r) override
std::string string
Definition: nybbler.cc:12
art::Timestamp beginRunTimestamp(art::RunID const &rid) override
art::Timestamp eventTimestamp(art::EventID const &eid) override
constexpr TimeValue_t value() const
Definition: Timestamp.h:24
Definition: Run.h:21
void beginSubRun(art::SubRun const &sr) override
#define DEFINE_ART_EMPTYEVENTTIMESTAMP_PLUGIN(klass)
p
Definition: test.py:228
std::uint64_t TimeValue_t
Definition: Timestamp.h:7
art::Timestamp beginSubRunTimestamp(art::SubRunID const &srid) override
TestEmptyEventTimestamp & operator=(TestEmptyEventTimestamp const &)=delete
static const double sr
Definition: Units.h:167
EmptyEventTimestampPlugin(fhicl::ParameterSet const &pset)
Timestamp const & beginTime() const
TestEmptyEventTimestamp(fhicl::ParameterSet const &p)