MarlinTPC  1.2.0
TimePixMapHandlerProcessor.h
1 #ifndef TimePixMapHandlerProcessor_h
2 #define TimePixMapHandlerProcessor_h 1
3 
4 #include "TimePixMapListener.h"
5 //#include "TimePixHighTOTAnalyserProcessor.h"
6 
7 // C++
8 #include <string>
9 #include <map>
10 #include <vector>
11 
12 // LCIO
13 #include "lcio.h"
14 
15 // Marlin
16 #include "marlin/Processor.h"
17 #include "TimePixPixelMode.h"
18 #include "lccd/ConditionsMap.hh"
19 
20 
21 //AIDA
22 //#include <AIDA/AIDA.h>
23 
24 //ROOT
25 //#include "TFile.h"
26 //#include "THStack.h"
27 
28 namespace AIDA
29 {
30 
31 class IHistogram1D;
32 class IHistogram2D;
33 
34 }
35 
36 namespace marlintpc
37 {
38 
39 class TimePixHighTOTAnalyserProcessor;
40 
41 /* the following comment is tranfered to doxygen documentation
42  * which begins with a second asterix, or in case of on line comment an extra third slash
43  */
63 class TimePixMapHandlerProcessor : public marlin::Processor
64 {
65 
66  public:
67 
68  /* This method will be called by the marlin package
69  * It returns a processor of the currend type (here TimePixMapHandlerProcessor)
70  */
71  virtual Processor* newProcessor()
72  {
73  return new TimePixMapHandlerProcessor ;
74  }
75 
76  /* the default constructor
77  * here the processor parameters are registered to the marlin package
78  * other initialisation should be placed in the init method
79  */
81 
82  /* Called at the beginning of the job before anything is read.
83  * Use to initialize the processor, e.g. book histograms
84  */
85  virtual void init() ;
86 
87  /* Called for every run.
88  * in this processor it is not used
89  */
90  virtual void processRunHeader(lcio::LCRunHeader* run) ;
91 
92  /* Called for every event - the working horse.
93  * Here the real conversion take place
94  */
95  virtual void processEvent(lcio::LCEvent * evt) ;
96 
97  /* This method is only called if the check flag is set (default) in the main processor
98  * (where the input files are given)
99  * It should be used to create check plots which are not needed in a complete analysis
100  * (where normaly the check flag is deactivated)
101  */
102  virtual void check(lcio::LCEvent * evt) ;
103 
104 
105  /* Called after data processing for clean up.
106  * e.g. saving control histogramms, delete created objects
107  * (which are not stored in a collection/event), etc.
108  */
109  virtual void end() ;
110 
111 
115  static tpcconddata::TimePixMap * getTimePixMap();
116 
125 
126  friend class TimePixHighTOTAnalyserProcessor;
127 
128 
129  protected:
130 
131  /* normally the doxygen documentation is palced before the method/variable
132  * but for one line comments in case of variables it may be more convenied for you
133  * to place it after the variable. In this case you use an arrow to tell doxygen
134  * to which variable the commet belongs to.
135  */
136 
137  std::string _inputColName ;
138  std::string _outputColName ;
139  std::string _modeMapColName ;
140  std::string _statusMapColName ;
141 
142  int _chipID;
143 
148 
154 
155  int _nRun ;
156 
157  double a;
158  double b;
159 
164 
170 
175 
176  private:
181  tpcconddata::TimePixMap* getUnmodifiedTimePixMap();
182 
183  std::vector<AIDA::IHistogram1D *> hProjectXVec;
184  AIDA::IHistogram1D * highTOT;
185  AIDA::IHistogram2D * aidahistocluster;
186  AIDA::IHistogram2D ** aidaonehit;
187 
188 
189 } ;
190 
191 }
192 
193 #endif
194 
195 
196 
std::string _modeMapColName
Definition: TimePixMapHandlerProcessor.h:139
int _outputIsTransient
give the status which is set to the transient flag of the output collection it is an int instead of a...
Definition: TimePixMapHandlerProcessor.h:147
int _nRun
Definition: TimePixMapHandlerProcessor.h:155
double b
Definition: TimePixMapHandlerProcessor.h:158
std::string _outputColName
Definition: TimePixMapHandlerProcessor.h:138
static TimePixMapHandlerProcessor * registerHighTOTProcessor(TimePixHighTOTAnalyserProcessor *htp)
This function is called within the TimePixHighTOTAnalyserProcessor.
Definition: TimePixMapHandlerProcessor.cc:205
Analysis Processor of MarlinTPC for TimePix Events with extraordinary high TOT values.
Definition: TimePixHighTOTAnalyserProcessor.h:48
static TimePixHighTOTAnalyserProcessor * _HighTOTProcessor
pointer to TimePixHighTOTAnalyserProcessor in case that this processor is active, the TimePixMap must...
Definition: TimePixMapHandlerProcessor.h:169
double a
Definition: TimePixMapHandlerProcessor.h:157
reads in conditionsdata objects TimePixModeMap and TimePixStatusMap and unifies them to the TimePixMa...
Definition: TimePixMapHandlerProcessor.h:63
static tpcconddata::TimePixMapListener * _timePixMapListener
pointer to TimePixMapListener TimePixMapListener controlls the TimePixMap.
Definition: TimePixMapHandlerProcessor.h:163
static TimePixMapHandlerProcessor * _MapHandlerProcessor
pointer to TimePixMapHandlerProcessor needed as return value for registerHighTOTProcessor.
Definition: TimePixMapHandlerProcessor.h:174
bool isFirstCollection
is true till the first output collection is writen to an event used to store parameters only in the f...
Definition: TimePixMapHandlerProcessor.h:153
std::string _statusMapColName
Definition: TimePixMapHandlerProcessor.h:140
Definition: TimePixMapListener.h:19
std::string _inputColName
Definition: TimePixMapHandlerProcessor.h:137
static tpcconddata::TimePixMap * getTimePixMap()
This is the function that can be called from all following processors.
Definition: TimePixMapHandlerProcessor.cc:178
int _chipID
Definition: TimePixMapHandlerProcessor.h:142