Overlay  0.16.0
OverlayEvents.h
1 #ifndef OverlayEvents_h
2 #define OverlayEvents_h 1
3 
4 #include "marlin/Processor.h"
5 #include "marlin/EventModifier.h"
6 #include "lcio.h"
7 #include <string>
8 #include <IMPL/LCEventImpl.h>
9 
10 #include "IO/LCWriter.h"
11 
12 namespace overlay {
13 
23  class OverlayEvents : public marlin::Processor , public marlin::EventModifier {
24 
25  public:
26 
27  virtual marlin::Processor* newProcessor() { return new OverlayEvents ; }
28 
29 
30  OverlayEvents() ;
31 
32  virtual const std::string & name() const { return Processor::name() ; }
33 
34  virtual void modifyEvent( LCEvent * evt ) ;
35 
36 
40  virtual void init() ;
41 
44  virtual void processRunHeader( LCRunHeader* run ) ;
45 
46  virtual void check( LCEvent * evt ) ;
47 
48 
51  virtual void end() ;
52 
53 
54  protected:
55 
56  std::string _outfileName ;
57 
58  LCEventImpl* outEvt ;
59 
60  double _expBG;
61  StringVec _mergedCollectionNames;
62 
63  LCWriter* _lcWriter ;
64 
65  int _activeRunNumber;
66  int _nRun ;
67  int _nEvt ;
68  } ;
69 
70 } // namespace
71 
72 #endif
virtual void processRunHeader(LCRunHeader *run)
Called for every run.
Definition: OverlayEvents.cc:83
virtual void init()
Called at the begin of the job before anything is read.
Definition: OverlayEvents.cc:56
OverlayEvents processor allows to merge a number of events in a LCIO file into 1 event.
Definition: OverlayEvents.h:23
virtual void end()
Called after data processing for clean up.
Definition: OverlayEvents.cc:124