MarlinTPC  1.2.0
SignalCombinerProcessor.h
1 #ifndef SIGNALCOMBINERPROCESSOR_H
2 #define SIGNALCOMBINERPROCESSOR_H 1
3 
4 // Marlin
5 #include <marlin/Processor.h>
6 
7 namespace EVENT {
8 
9  class LCRunHeader;
10  class LCEvent;
11 }
12 
13 namespace marlintpc {
14 
19 class SignalCombinerProcessor : public marlin::Processor {
20 
21 public:
25 
28  virtual ~SignalCombinerProcessor();
29 
32  virtual Processor* newProcessor() { return new SignalCombinerProcessor() ; }
33 
38  virtual void init();
39 
42  virtual void processRunHeader(lcio::LCRunHeader* run );
43 
46  virtual void processEvent(lcio::LCEvent * evt );
47 
50  virtual void check(lcio::LCEvent * evt );
51 
54  virtual void end();
55 
58  struct DataTag {
59 
60  DataTag( int pad, int module ):
61  pad_id(pad),
62  module_id(module) {}
63 
64  bool operator < (const DataTag &tag) const {
65 
66  if( tag.pad_id != pad_id ) {
67 
68  return tag.pad_id < pad_id;
69  }
70  else {
71 
72  return tag.module_id < module_id;
73  }
74  }
75 
76  bool operator != (const DataTag &tag) {
77 
78  return (tag.pad_id != pad_id) || (tag.module_id != module_id);
79  }
80 
81  int pad_id;
82  int module_id;
83  };
84 
85 protected:
86 
87 private:
88 
91  std::string _input_collection_name;
92 
95  std::string _output_collection_name;
96 
99  double _time_resolution;
100 
103  void combine_data( const EVENT::TrackerData &, IMPL::TrackerDataImpl &, const double );
104 };
105 
106 } // namespace marlintpc
107 
108 #endif // SIGNALCOMBINERPROCESSOR_H
virtual void processRunHeader(lcio::LCRunHeader *run)
Called for every run.
Definition: SignalCombinerProcessor.cc:67
SignalCombinerProcessor()
constructor
Definition: SignalCombinerProcessor.cc:36
virtual void end()
Called after data processing for clean up.
Definition: SignalCombinerProcessor.cc:223
a helper class for managing signals
Definition: SignalCombinerProcessor.h:58
virtual void init()
Called at the begin of the job before anything is read.
Definition: SignalCombinerProcessor.cc:211
virtual void check(lcio::LCEvent *evt)
Called after the event has been processed.
Definition: SignalCombinerProcessor.cc:218
SignalCombinerProcessor : This processor takes the individual shaped signals (could be more than one ...
Definition: SignalCombinerProcessor.h:19
virtual ~SignalCombinerProcessor()
destructor
Definition: SignalCombinerProcessor.cc:64
virtual void processEvent(lcio::LCEvent *evt)
Called for every event - the working horse.
Definition: SignalCombinerProcessor.cc:80
virtual Processor * newProcessor()
used by Marlin to create a new processor
Definition: SignalCombinerProcessor.h:32