#include "BrDigTPC.h"

ClassImp(BrDigTPC)

/////////////////////////////////////////////////////////////
//
// BrDigTPC is a BRAHMS data class for storing information for 
// one detector TPC Digitized hit. 
//
//////////////////////////////////////////////////////////////

 Int_t BrDigTPC::Compare(TObject *digtpc_o)
{
//This routine overloads TObject::Compare(TObject *object)
//For BRAHMS, this routine is typically called by QSort
//It needs to return 1 if you want digtpc_o to be earlier
//in the list and -1 if you want digtpc_o to be later in
//the list.
BrDigTPC * digtpc = (BrDigTPC*) digtpc_o;

if( fIrow > digtpc->GetIrow() ) return 1;
if( fIrow < digtpc->GetIrow() ) return -1;
//fIrow's must be equal
if( fPadno > digtpc->GetPadno() ) return 1;
if( fPadno < digtpc->GetPadno() ) return -1;
//fPadno's must be equal
if( fTime > digtpc->GetTime() ) return 1;
if( fTime < digtpc->GetTime() ) return -1;
//fTime's must be equal
if( fAdc > digtpc->GetAdc() ) return 1;
if( fAdc < digtpc->GetAdc() ) return -1;
//fAdc's must be equal
if( fNhits > digtpc->GetNhits() ) return 1;
if( fNhits < digtpc->GetNhits() ) return -1;
//Everything is equal!!!
return 0;

}


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.