MarlinTPC  1.2.0
TimePixEventHistoProcessor.h
1 #ifndef TimePixEventHistoProcessor_h
2 #define TimePixEventHistoProcessor_h 1
3 
4 // C++
5 #include <string>
6 #include <map>
7 
8 // LCIO
9 #include "lcio.h"
10 
11 // Marlin
12 #include "marlin/Processor.h"
13 #include "TimePixMapListener.h"
14 #include "TimePixPixelMode.h"
15 #include <marlin/AIDAProcessor.h>
16 
17 namespace AIDA{
18  class IHistogram2D;
19 }
20 
21 namespace marlintpc{
22 
23  /* the following comment is tranfered to doxygen documentation
24  * which begins with a second asterix, or in case of on line comment an extra third slash
25  */
45  class TimePixEventHistoProcessor : public marlin::Processor {
46 
47  public:
48 
49  /* This method will be called by the marlin package
50  * It returns a processor of the currend type (here TimePixEventHistoProcessor)
51  */
52  virtual Processor* newProcessor() { return new TimePixEventHistoProcessor ; }
53 
54  /* the default constructor
55  * here the processor parameters are registered to the marlin package
56  * other initialisation should be placed in the init method
57  */
59 
60  /* Called at the beginning of the job before anything is read.
61  * Use to initialize the processor, e.g. book histograms
62  */
63  virtual void init() ;
64 
65  /* Called for every run.
66  * in this processor it is not used
67  */
68  virtual void processRunHeader( lcio::LCRunHeader* run ) ;
69 
70  /* Called for every event - the working horse.
71  * Here the real conversion take place
72  */
73  virtual void processEvent( lcio::LCEvent * evt ) ;
74 
75  /* This method is only called if the check flag is set (default) in the main processor
76  * (where the input files are given)
77  * It should be used to create check plots which are not needed in a complete analysis
78  * (where normaly the check flag is deactivated)
79  */
80  virtual void check( lcio::LCEvent * evt ) ;
81 
82 
83  /* Called after data processing for clean up.
84  * e.g. saving control histogramms, delete created objects
85  * (which are not stored in a collection/event), etc.
86  */
87  virtual void end() ;
88 
89 
90  protected:
91 
92  /* normally the doxygen documentation is palced before the method/variable
93  * but for one line comments in case of variables it may be more convenied for you
94  * to place it after the variable. In this case you use an arrow to tell doxygen
95  * to which variable the commet belongs to.
96  */
97  int _nColumn;
98  int _nRow;
99  std::string _mode;
100  std::string _inputColName;
101  std::string _histoBaseName;
102 
108  {
109  public:
110  AIDAHistogram();
111  ~AIDAHistogram();
112  AIDA::IHistogram2D *histo;
113  };
114 
116  std::map<int, AIDAHistogram> _eventHistos;
117  tpcconddata::TimePixMap * _timePixMap;
118 
119  } ;
120 
121 }
122 
123 #endif
124 
125 
126 
std::string _mode
mode that should be plotted
Definition: TimePixEventHistoProcessor.h:99
int _nRow
number of rows of the chip
Definition: TimePixEventHistoProcessor.h:98
int _nColumn
number of columns of the chip
Definition: TimePixEventHistoProcessor.h:97
std::map< int, AIDAHistogram > _eventHistos
A map with the chipID as key and an AIDAHistogram as value.
Definition: TimePixEventHistoProcessor.h:116
Creates one aida histogram per chip and event.
Definition: TimePixEventHistoProcessor.h:45
A helper class to store AIDA histograms in a map.
Definition: TimePixEventHistoProcessor.h:107
std::string _inputColName
Name of the input collection.
Definition: TimePixEventHistoProcessor.h:100
std::string _histoBaseName
Base name of the histograms.
Definition: TimePixEventHistoProcessor.h:101