Universita' di GenovaINFN Sezione di Genova  
AIRWATCH / EUSO Genova

TestInputModule - source file

// ESAF : Euso Simulation and Analysis Framework
// $Id: TestInputModule.cc,v 1.5 2004/06/17 08:20:10 thea Exp $
// Marco Pallavicini created Oct, 16 2003

#include <iostream>
#include "TestInputModule.hh"
#include "RecoEvent.hh"

ClassImp(TestInputModule)

// ctor
 TestInputModule::TestInputModule(const string& name) : InputModule( name ) {
    fCounter = 3;
}

// dtor
 TestInputModule::~TestInputModule() {
}

// returns an event
 RecoEvent* TestInputModule::GetEvent() {
    if ( fCounter-- > 0 )
        SetRecoEvent( new RecoEvent() );
    else
        SetRecoEvent(0);
    return GetRecoEvent();
}

// init
 Bool_t TestInputModule::Init() {
    cout << "Init input module " << GetName() << endl;
    fCounter = 3;
    return true;
}

// done
 Bool_t TestInputModule::Done() {
    cout << "Done input module " << GetName() << endl;
    return true;
}

// destroy event
 void TestInputModule::DestroyEvent() {
    if ( GetRecoEvent() )
        delete GetRecoEvent();
    SetRecoEvent(0);
}
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