/[PAMELA software]/PamCut/CollectionActions/ReprocessCaloAction/ReprocessCaloAction.h
ViewVC logotype

Contents of /PamCut/CollectionActions/ReprocessCaloAction/ReprocessCaloAction.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Mar 23 10:18:34 2010 UTC (14 years, 8 months ago) by pam-fi
Branch: MAIN
CVS Tags: Root_V8, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9, HEAD
Branch point for: V8
File MIME type: text/plain
Added to repository.

1 /*
2 * ReprocessCaloAction.h
3 *
4 * Created on: 10/mar/2010
5 * Author: Nicola Mori
6 */
7
8 #ifndef NO_CALOPRESAMPLER
9
10 #ifndef REPROCESSCALOACTION_H_
11
12 #define REPROCESSCALOACTION_H_
13 #include "../CollectionAction/CollectionAction.h"
14 #include <CaloPreSampler.h>
15
16 /*! @brief Calorimeter reprocessing
17 *
18 * This action reprocesses the calorimeter data. It needs CaloPreSampler, so make sure
19 * it is available in your system.
20 */
21 class ReprocessCaloAction: public CollectionAction {
22 public:
23
24 /*! @brief Constructor.
25 *
26 * @param actionName The action's name.
27 * @param externalFlag This can be used to control externally if the event has to be
28 * reprocessed or not. If NULL, all the events will be reprocessed. If it
29 * points to a bool variable, an event will be reprocessed only if this variable
30 * is true.
31 */
32 ReprocessCaloAction(const char *actionName, bool *externalFlag = NULL) :
33 CollectionAction(actionName), _externalFlag(externalFlag), _caloPS(NULL) {
34
35 }
36
37 /*! @brief Destructor. */
38 ~ReprocessCaloAction() {
39 //delete _caloPS; // This deletes the CaloLevel2 object inside PamLevel2, which generates a
40 // double delete and the consequent segfault when PamLevel2 is deleted... sigh...
41 }
42
43 /*! @brief The setup procedure.
44 *
45 * This will set up the CaloPreSampler member object before the analysis starts.
46 *
47 * @param events Pointer to the PamLevel2 object which contains the events to analyze.
48 */
49 void Setup(PamLevel2 *events);
50
51 /* @brief The reprocessing procedure.
52 *
53 * This will reprocess calorimeter information, depending on the flag set in constructor's parameter list.
54 */
55 void OnGood(PamLevel2 *event);
56
57 /*! @brief The finalization procedure.
58 *
59 * Currently it does nothing.
60 */
61 void Finalize() {
62
63 }
64
65 private:
66
67 bool *_externalFlag;
68 CaloPreSampler *_caloPS;
69
70 };
71
72 #endif /* REPROCESSCALOACTION_H_ */
73
74 #endif // #ifndef NO_CALOPRESAMPLER

  ViewVC Help
Powered by ViewVC 1.1.23