1 | // ESAF : Euso Simulation and Analysis Framework |
---|
2 | // $Id: TestRecoModule.cc 2633 2006-03-28 09:13:43Z thea $ |
---|
3 | // Marco Pallavicini created Oct, 16 2003 |
---|
4 | |
---|
5 | #include <iostream> |
---|
6 | #include "TestRecoModule.hh" |
---|
7 | |
---|
8 | ClassImp(TestRecoModule) |
---|
9 | |
---|
10 | //______________________________________________________________________________ |
---|
11 | TestRecoModule::TestRecoModule(const string& n) : RecoModule(n) { |
---|
12 | // constructor |
---|
13 | } |
---|
14 | |
---|
15 | //______________________________________________________________________________ |
---|
16 | TestRecoModule::~TestRecoModule() { |
---|
17 | // destructor |
---|
18 | } |
---|
19 | |
---|
20 | //______________________________________________________________________________ |
---|
21 | Bool_t TestRecoModule::Init() { |
---|
22 | // Init method: called at the beginning of a run |
---|
23 | cout << "Initing Test Module named " << GetName() << endl; |
---|
24 | return true; |
---|
25 | } |
---|
26 | |
---|
27 | //______________________________________________________________________________ |
---|
28 | Bool_t TestRecoModule::PreProcess() { |
---|
29 | // called before each event process |
---|
30 | cout << "Pre-processing Test Module named " << GetName() << endl; |
---|
31 | return true; |
---|
32 | } |
---|
33 | |
---|
34 | //______________________________________________________________________________ |
---|
35 | Bool_t TestRecoModule::Process( RecoEvent* anEvent) { |
---|
36 | // event processing |
---|
37 | cout << "Processing Test Module named " << GetName() << endl; |
---|
38 | MyData()->Add("aa",2); |
---|
39 | MyData()->Add("aaa",2.); |
---|
40 | vector<Double_t> *v=new vector<Double_t>; |
---|
41 | MyData()->Add("aba",v); |
---|
42 | |
---|
43 | return true; |
---|
44 | } |
---|
45 | |
---|
46 | //______________________________________________________________________________ |
---|
47 | Bool_t TestRecoModule::PostProcess() { |
---|
48 | // called after processing an event |
---|
49 | cout << "Post Processing Test Module named " << GetName() << endl; |
---|
50 | return true; |
---|
51 | } |
---|
52 | //_____________________________________________________________________________ |
---|
53 | Bool_t TestRecoModule::SaveRootData(RecoRootEvent *fRecoRootEvent) { |
---|
54 | return kTRUE; |
---|
55 | } |
---|
56 | |
---|
57 | //______________________________________________________________________________ |
---|
58 | Bool_t TestRecoModule::Done() { |
---|
59 | // called at the end of each run |
---|
60 | cout << "Ending Test Module named " << GetName() << endl; |
---|
61 | |
---|
62 | return true; |
---|
63 | } |
---|
64 | |
---|
65 | //______________________________________________________________________________ |
---|
66 | void TestRecoModule::UserMemoryClean() { |
---|
67 | // user cleaning |
---|
68 | vector<Double_t> *v = (vector<Double_t>*)MyData()->GetObj("aba"); |
---|
69 | delete v; |
---|
70 | MyData()->RemoveObj("aba"); |
---|
71 | } |
---|
72 | |
---|
73 | //______________________________________________________________________________ |
---|
74 | void TestRecoModule::TmpMemoryClean() { |
---|
75 | // user cleaning |
---|
76 | |
---|
77 | vector<Int_t> dummy; |
---|
78 | dummy.swap(fTmpVector); |
---|
79 | } |
---|