MarlinTPC  1.2.0
SelectNthEventsProcessor.h
1 #ifndef SelectNthEventsProcessor_h
2 #define SelectNthEventsProcessor_h 1
3 
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 #include <string>
7 
8 
9 using namespace lcio ;
10 using namespace marlin ;
11 
12 
24 class SelectNthEventsProcessor : public Processor {
25 
26  public:
27 
28  virtual Processor* newProcessor() { return new SelectNthEventsProcessor ; }
29 
30 
32 
36  virtual void init() ;
37 
40  virtual void processRunHeader( LCRunHeader* run ) ;
41 
44  virtual void processEvent( LCEvent * evt ) ;
45 
46 
47  virtual void check( LCEvent * evt ) ;
48 
49 
52  virtual void end() ;
53 
54 
55  protected:
56 
57  int _nRun ;
58  int _nEvt ;
59  int _nEvtProc;
60  int _nEvtSkip;
61 
62  int _nEventToSelect;
63  int _selectionOffset;
64  bool _invertSelection;
65 
66 } ;
67 
68 #endif
69 
70 
71 
Select a number n to use only every nth event by throwing a SkipEventException for all other ones...
Definition: SelectNthEventsProcessor.h:24