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

Contents of /PamCut/CollectionActions/ReprocessTrackAction/ReprocessTrackAction.h

Parent Directory Parent Directory | Revision Log Revision Log


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

1 /*
2 * ReprocessTrackAction.h
3 *
4 * Created on: 23/dic/2009
5 * Author: N. Mori
6 */
7
8 #ifndef REPROCESSTRACKACTION_H_
9 #define REPROCESSTRACKACTION_H_
10
11 #include "../CollectionAction/CollectionAction.h"
12
13 /*! @brief Level 1 reprocessing
14 *
15 * This action reprocesses the level 1 to obtain a new level 2. The level 1 can be recomputed
16 * from level 0 or provided externally. Remember that the standard PamLevel2::GetPamTree needs to
17 * be instructed explicitly to open level 0 informations for tracker, by appending "+TRK0" to its 3rd
18 * parameter. Make sure that the PamLevel2 object you will use with this action (or generally, with every
19 * code that needs level 0) has been correctly initialized.
20 */
21 class ReprocessTrackAction: public CollectionAction {
22 public:
23
24 /*! @brief Constructor
25 *
26 * @param actionName The action's name.
27 * @param newTrkL1 level1 computed outside the action. If NULL, the action will compute the level 1
28 * starting from level 0.
29 * @param externalFlag This can be used to control externally if the event has to be
30 * reprocessed or not. If NULL, all the events will be reprocessed. If it
31 * points to a bool variable, an event will be reprocessed only if this variable
32 * is true.
33 */
34 ReprocessTrackAction(const char *actionName, TrkLevel1 **newTrkL1 = NULL, bool *externalFlag = NULL) :
35 CollectionAction(actionName), _newTrkL1(newTrkL1), _externalFlag(externalFlag), _allEvents(0), _reprocessed(0),
36 _lostTracks(0), _recoveredTracks(0) {
37
38 }
39
40 /*! @brief Destructor. */
41 ~ReprocessTrackAction() {
42 //delete _newTrkL1; // This causes a double delete (I suppose...)
43 }
44
45 /* @brief The reprocessing procedure.
46 *
47 * This will reprocess tracker information, depending on the flags set in constructor's parameter list.
48 */
49 void OnGood(PamLevel2 *event);
50
51 /*! @brief The finalization procedure.
52 *
53 * Produces a screen output of the refitting statistics (reprocessed events, recovered tracks and so on).
54 */
55 void Finalize() {
56 cout << "\n----> Reprocessing stats:\n";
57 cout << " events : " << _allEvents << "\n";
58 cout << " reprocessed: " << _reprocessed << "\n";
59 cout << " Tracks:\n";
60 cout << " lost : " << _lostTracks << "\n";
61 cout << " recovered : " << _recoveredTracks << endl;
62
63 }
64
65 private:
66
67 TrkLevel1 **_newTrkL1;
68 bool *_externalFlag;
69 unsigned int _allEvents, _reprocessed, _lostTracks, _recoveredTracks;
70
71 };
72
73 #endif /* REPROCESSTRACKACTION_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23