//
// $Id: BrIOModule.cxx,v 1.2 1998/05/14 21:18:07 videbaek Exp $
// $Log: BrIOModule.cxx,v $
// Revision 1.2 1998/05/14 21:18:07 videbaek
// update makefile - do not reload .so libraries
//
// Revision 1.1 1998/04/03 21:13:56 videbaek
// part of first base release
//
//
#include "BrIOModule.h"
#include "BrEvent.h"
//
// Needed for Info
#ifndef ROOT_TClass
#include "TClass.h"
#endif
#include <iostream.h>
///////////////////////////////////////////////////////////
//
// BrIOModule
//
// BRAHMS Analysis Module Class
//
// A standard Physics analysis Module should be derived from
// this base class. This ensure that the general framework
// is capable of accessing these in a common and general way.
// The methods (member functions) consists of a general set for
// all modules; but the user if free to add specific ones for
// specific needs. Ideas for this has been taken from both the
// PHOBOS tool set as well as from the BABAR framework. The initial version
// is derived from the ROOT base classes,
//
// Author : Flemming Videbaek
// Created: 27/12/97
// Version: 1.0
//
///////////////////////////////////////////////////////////
ClassImp(BrIOModule)
BrIOModule::BrIOModule()
{
// Vanilla constructor; Should not be called within the ROOT environment.
//
d_Verbose = 0;
d_DebugLevel = 0;
fCpuTime = 0;
}
BrIOModule::BrIOModule(Char_t *Name, Char_t *Title)
: TNamed(Name, Title)
{
//
// Constructor. This is the default constructor to use. The names of the
// Modules can be used for navigation and identification.
//
d_Verbose = 0;
d_DebugLevel = 0;
fCpuTime = 0;
}
BrIOModule::~BrIOModule()
{
//
// default destructor
//
fTimer.Stop();
}
void BrIOModule::Event(BrEvent* event){
//
// Default Event method with in/out Data objects. In normal application to be
// called once per event.
// method should also be overwritten in the concrete class. A dummy
// routine is supplied in case a module for some strange reason is not called
// per event.
//
if(d_Verbose != 0)
cout << "Calling Event from Module " << GetName() << endl;
};
void BrIOModule::Info() const {
// Information module. In the final implementation this MUST be overwritten by the derived
// class. Here a default behaviour is implemented.
cout << "**********************************************************n";
cout << "* Module *n";
cout << "* Class : " << IsA()->GetName()<< "n";
cout << "* Name : " << GetName() << "n";
cout << "* Title : " << GetTitle() << "n";
cout << "*n";
cout << "* Status: " << fStatus << "n";
if(fEof)
cout << "* EOF : TRUE n";
else
cout << "* EOF : FALSE n";
if(fError)
cout << "* ERROR : TRUE n";
else
cout << "* ERROR : FALSE n";
cout << "**********************************************************n";
cout << flush;
}
void BrIOModule::EventStatisticsStart() {
fTimer.Start();
}
void BrIOModule::EventStatisticsEnd() {
fTimer.Stop();
fCpuTime += fTimer.CpuTime();
}
void BrIOModule::ListEventStatistics() {
cout<< "Accumulated CPU time in "<<GetName()<<" is "<<fCpuTime<<endl;
}
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.