IArtEventVisitor.h
Go to the documentation of this file.
1 /** An art event visitor component takes a reference to an art::Event
2  * object. Components with this interface will typically implement a
3  * sink or a source WCT interface.
4  *
5  * Note, this is a Wire Cell Toolkit Interface class which depends on
6  * external types so is not kept in wire-cell-iface. See that package
7  * for in-toolkit WCT interfaces.
8  *
9  * https://github.com/WireCell/wire-cell-iface/tree/master/inc/WireCellIface
10  */
11 
12 #ifndef LARWIRECELL_INTERFACES_IARTEVENTVISITOR
13 #define LARWIRECELL_INTERFACES_IARTEVENTVISITOR
14 
15 #include "WireCellUtil/IComponent.h"
16 
17 namespace art {
18  class Event;
19  class EDProducer;
20  class ProducesCollector;
21 }
22 namespace wcls {
23  class IArtEventVisitor : public WireCell::IComponent<IArtEventVisitor> {
24  public:
25  virtual ~IArtEventVisitor() {}
26 
27  /// If data is produced, must implement in order to call:
28  /// collector.produces<DataType>();
29  /// If only reading data, implementation is not required.
30  virtual void produces(art::ProducesCollector& collector) {}
31 
32  /// Implement to visit an Art event.
33  virtual void visit(art::Event & event) = 0;
34  };
35 }
36 #endif
virtual void produces(art::ProducesCollector &collector)
Definition: types.h:32
Event finding and building.