1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TrkMDRHistoAction.h |
3 |
|
|
* |
4 |
|
|
* Created on: 03-aug-2009 |
5 |
|
|
* Author: S. Ricciarini |
6 |
|
|
*/ |
7 |
|
|
/*! @file TrkMDRHistoAction.h The TrkMDRHistoAction class declaration file. */ |
8 |
|
|
|
9 |
|
|
#ifndef TRKMDRHISTOACTION_H_ |
10 |
|
|
#define TRKMDRHISTOACTION_H_ |
11 |
|
|
|
12 |
|
|
#include "../CollectionAction/CollectionAction.h" |
13 |
|
|
#include <TH1F.h> |
14 |
|
|
|
15 |
|
|
/*! @brief An action that fills an MDR (GV) 1D histogram. |
16 |
|
|
* |
17 |
|
|
*/ |
18 |
|
|
class TrkMDRHistoAction: public CollectionAction { |
19 |
|
|
|
20 |
|
|
public: |
21 |
|
|
/*! @brief Constructor. |
22 |
|
|
* |
23 |
|
|
* @param actionName The action's name. |
24 |
|
|
* @param outFileName The output file name. |
25 |
|
|
* @param mode The mode of file creation (see documentation of TFile constructor |
26 |
|
|
* in ROOT's reference guide) |
27 |
|
|
*/ |
28 |
|
|
TrkMDRHistoAction(const char *actionName, TString outFileName, TString mode = "UPDATE"); |
29 |
|
|
|
30 |
|
|
/*! @brief Destructor */ |
31 |
|
|
~TrkMDRHistoAction() { |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
/*! @brief Fills histogram with the selected event. |
35 |
|
|
* |
36 |
|
|
* @param event The selected event. |
37 |
|
|
*/ |
38 |
|
|
void OnGood(PamLevel2 *event); |
39 |
|
|
|
40 |
|
|
/*! @brief Writes the histogram to the output file. */ |
41 |
|
|
void Finalize(); |
42 |
|
|
|
43 |
|
|
private: |
44 |
|
|
|
45 |
|
|
TString _outFileName; |
46 |
|
|
TH1F _histo; |
47 |
|
|
TString _mode; |
48 |
|
|
|
49 |
|
|
}; |
50 |
|
|
|
51 |
|
|
#endif /* TRKMDRHISTOACTION_H_ */ |