|
///////////////////////////////////////////////////////////// // // BrHitDig is a BRAHMS data class for storing information for // one detector DC Digitized hit. // ////////////////////////////////////////////////////////////// // $Id: BrHitDig.cxx,v 1.2 2001/06/25 14:26:45 cholm Exp $ // $Author: cholm $ // $Date: 2001/06/25 14:26:45 $ // $Copyright: (c) 2001 BRAHMS Collaboration <brahmlib@rhic.bnl.gov> #include "BrHitDig.h" ClassImp(BrHitDig); BrHitDig::BrHitDig() { fID = 0; fIdet = 0; fImod = 0; fWire = 0; fTime = 0; fWidth= 0; fIfuse= 0; fUsed = 0; fDcpl = 0; fHitpos.Clear(); } BrHitDig::~BrHitDig() { fHitpos.Delete(); } Int_t BrHitDig::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. BrHitDig * dighit = (BrHitDig*) 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,BrHitDig *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; } |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|