#include "BrDigHit.h"
ClassImp(BrDigHit)
/////////////////////////////////////////////////////////////
//
// BrDigHit is a BRAHMS data class for storing information for
// one detector DC Digitized hit.
//
//////////////////////////////////////////////////////////////
BrDigHit::BrDigHit()
{
fID = 0;
fIdet = 0;
fImod = 0;
fWire = 0;
fTime = 0;
fWidth= 0;
fIfuse= 0;
fUsed = 0;
fDcpl = 0;
fHitpos.Clear();
}
BrDigHit::~BrDigHit() {
fHitpos.Clear();
}
Int_t BrDigHit::Compare(TObject *dighit_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 dighit_o to be earlier
//in the list and -1 if you want dighit_o to be later in
//the list.
BrDigHit * dighit = (BrDigHit*) dighit_o;
if( fIdet > dighit->GetIdet() ) return 1;
if( fIdet < dighit->GetIdet() ) return -1;
//fIdet's must be equal
if( fImod > dighit->GetImod() ) return 1;
if( fImod < dighit->GetImod() ) return -1;
//fImod's must be equal
if( fWire > dighit->GetWire() ) return 1;
if( fWire < dighit->GetWire() ) return -1;
//fWire's must be equal
if( fTime > dighit->GetTime() ) return 1;
if( fTime < dighit->GetTime() ) return -1;
//fTime's must be equal
if( fWidth > dighit->GetWidth() ) return 1;
if( fWidth < dighit->GetWidth() ) return -1;
//Everything is equal!!!
return 0;
}
ostream& operator<< (ostream & os,BrDigHit *dighit)
{
/*os<<"xwire,xdrift,sign,uhit = "<<hitpos->GetXwire();
os<<","<<hitpos->GetXdrift();
os<<","<<hitpos->GetSign();
os<<","<<hitpos->GetUhit();*/
os<<"Idet,Imod,Wire,Time,Ifuse,NumHitPos"<<dighit->GetIdet();
os<<","<<dighit->GetImod();
os<<","<<dighit->GetWire();
os<<","<<dighit->GetTime();
os<<","<<dighit->GetIfuse();
os<<","<<dighit->GetHitposEntries();
os<<endl;
return os;
}
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.