Universita' di GenovaINFN Sezione di Genova  
AIRWATCH / EUSO Genova

TestRecoModule - source file

// ESAF : Euso Simulation and Analysis Framework
// $Id: TestRecoModule.cc,v 1.6 2004/06/22 19:11:31 naumov Exp $
// Marco Pallavicini created Oct, 16 2003

#include <iostream>
#include "TestRecoModule.hh"

ClassImp(TestRecoModule)

// constructor
 TestRecoModule::TestRecoModule(const string& n) : RecoModule(n) {
}

// destructor
 TestRecoModule::~TestRecoModule() {
}

// Init method: called at the beginning of a run
 Bool_t TestRecoModule::Init() {
    cout << "Initing Test Module named " << GetName() << endl;    
    return true;
}

// called before each event process
 Bool_t TestRecoModule::PreProcess() {
    cout << "Pre-processing Test Module named " << GetName() << endl;    
    return true;
}

// event processing
 Bool_t TestRecoModule::Process( RecoEvent* anEvent) {
    cout << "Processing Test Module named " << GetName() << endl;    
    MyData()->Add("aa",2);
    MyData()->Add("aaa",2.);
    vector<Double_t> *v=new vector<Double_t>;
    MyData()->Add("aba",v);

    return true;
}

// called after processing an event
 Bool_t TestRecoModule::PostProcess() {
    cout << "Post Processing Test Module named " << GetName() << endl;    
    return true;
}
//_____________________________________________________________________________
 Bool_t TestRecoModule::SaveRootData(RecoRootEvent *fRecoRootEvent) {
     return kTRUE;
}
// called at the end of each run
 Bool_t TestRecoModule::Done() {
    cout << "Ending Test Module named " << GetName() << endl;    
    
    return true;
}

// user cleaning
 void TestRecoModule::UserMemoryClean() {
    vector<Double_t> *v = (vector<Double_t>*)MyData()->GetObj("aba");
    delete v;
    MyData()->RemoveObj("aba");
}
About Us | EUSO Official Website | Web pages created by Roberto Pesce and Alessandro Thea - Last Update Wed Nov 16 16:57:39 2005 Wed Nov 16 16:29:22 2005