Overlay  0.16.0
Overlay.h
1 #ifndef Overlay_h
2 #define Overlay_h 1
3 
4 #include "marlin/Processor.h"
5 #include "marlin/EventModifier.h"
6 #include "lcio.h"
7 #include <string>
8 
9 
10 namespace overlay{
11 
46  class Overlay : public marlin::Processor, public marlin::EventModifier {
47 
48  public:
49 
50  virtual marlin::Processor* newProcessor() { return new Overlay ; }
51 
52 
53  Overlay() ;
54 
55  virtual const std::string & name() const { return Processor::name() ; }
56 
57  virtual void modifyEvent( EVENT::LCEvent * evt ) ;
58 
59 
63  virtual void init() ;
64 
67  virtual void processRunHeader( LCRunHeader* run ) ;
68 
71  // virtual void processEvent( EVENT::LCEvent * evt ) ;
72 
73 
74  virtual void check( EVENT::LCEvent * evt ) ;
75 
76 
79  virtual void end() ;
80 
81 
82  protected:
83 
84 
87  LCEvent* readNextEvent( ) ;
88 
91  StringVec _fileNames ;
92  int _numOverlay;
93  double _expBG;
94  bool _runOverlay;
95  int _nSkipEventsRandom ;
96 
97  StringVec _colVec;
98  std::map<std::string, std::string> _colMap;
99 
100  IO::LCReader* _lcReader ;
101  EVENT::LCEvent* _overlayEvent ;
102 
103  int _activeRunNumber;
104  int _nRun ;
105  int _nEvt ;
106  int _nOverlayEvt ;
107  IntVec _events ;
108  } ;
109 
110 }
111 #endif
112 
113 
114 
virtual void init()
Called at the begin of the job before anything is read.
Definition: Overlay.cc:108
LCEvent * readNextEvent()
Helper method.
Definition: Overlay.cc:306
Overlay processor allows to overlay an event with background events from additional LCIO files based ...
Definition: Overlay.h:46
virtual void check(EVENT::LCEvent *evt)
Called for every event - the working horse.
Definition: Overlay.cc:288
virtual void end()
Called after data processing for clean up.
Definition: Overlay.cc:293
StringVec _fileNames
Input file names.
Definition: Overlay.h:91
virtual void processRunHeader(LCRunHeader *run)
Called for every run.
Definition: Overlay.cc:176