Marlin  1.17.1
 All Classes Namespaces Functions Variables Enumerations Friends Pages
EventSelector.h
1 #ifndef EventSelector_h
2 #define EventSelector_h 1
3 
4 #include "marlin/Processor.h"
5 #include "marlin/EventModifier.h"
6 #include "lcio.h"
7 #include <string>
8 #include <set>
9 #include <map> // pair
10 
11 using namespace lcio ;
12 using namespace marlin ;
13 
14 
26 namespace marlin {
27 
29 
30  typedef std::set< std::pair< int, int > > SET ;
31 
32  public:
33 
34  virtual Processor* newProcessor() { return new EventSelector ; }
35 
36  EventSelector() ;
37 
41  virtual void init() ;
42 
45  virtual void processRunHeader( LCRunHeader* run ) ;
46 
49  virtual void processEvent( LCEvent * evt ) ;
50 
51  virtual void check( LCEvent * evt ) ;
52 
53  virtual void modifyEvent( LCEvent *evt ) ;
54 
57  virtual void end() ;
58 
59  virtual const std::string & name() const { return Processor::name() ; }
60 
61 
62  protected:
63 
66  IntVec _evtList{};
67  SET _evtSet{};
68 
69  int _nRun=-1;
70  int _nEvt=-1;
71  } ;
72 
73 } // namespace marlin
74 
75 #endif
76 
77 
78 
Tagging interface for processors that modify the LCIO event.
Definition: EventModifier.h:13
virtual Processor * newProcessor()
Return a new instance of the processor.
Definition: EventSelector.h:34
virtual const std::string & name() const
Return name of this event modifier.
Definition: EventSelector.h:59
Base class for Marlin processors.
Definition: Processor.h:64
Definition: EventSelector.h:28