BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page
//____________________________________________________________________
//
// BrDcDig is a BRAHMS data class for storing raw data for 
// one DC detector
//

//
// $Id: BrDcDig.cxx,v 1.1 2001/06/22 17:32:24 cholm Exp $
//
#include "BrDcDig.h"


//____________________________________________________________________
ClassImp(BrDcDig);



//____________________________________________________________________
 BrDcDig::BrDcDig() 
{
 fID        = 0;	
 fSubModule = 0;
 fPlane     = 0;
 fWire      = 0;
 fTime      = 0;
 fWidth     = 0;
}

//____________________________________________________________________
 BrDcDig::~BrDcDig() 
{
}

//____________________________________________________________________
 Int_t BrDcDig::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.
  BrDcDig * dighit = (BrDcDig*) dighit_o;

  //
  if (fSubModule > dighit->GetSubModule()) return 1;
  if (fSubModule < dighit->GetSubModule()) return -1;

  //fIdet's must be equal
  if (fPlane > dighit->GetPlane()) return 1;
  if (fPlane < dighit->GetPlane()) return -1;

  //fPlanes'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;
  //fTime's must be equal
  //=>Everything is equal!!!
  return 0;
}

//____________________________________________________________________
 Int_t BrDcDig::Compare(const TObject *dighit_o) const
{
  // 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.
  BrDcDig * dighit = (BrDcDig*) dighit_o;

  //
  if (fSubModule > dighit->GetSubModule()) return 1;
  if (fSubModule < dighit->GetSubModule()) return -1;

  //fIdet's must be equal
  if (fPlane > dighit->GetPlane()) return 1;
  if (fPlane < dighit->GetPlane()) return -1;

  //fPlanes'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;
  //fTime's must be equal
  //=>Everything is equal!!!
  return 0;
}

//____________________________________________________________________
ostream& operator<< (ostream & os,BrDcDig *dighit)
{
  os << "Idet, SubModule, Plane, Wire, Time"
     << ", " << dighit->GetSubModule()
     << ", " << dighit->GetPlane()
     << ", " << dighit->GetWire()
     << ", " << dighit->GetTime()
     << ", " << dighit->GetWidth()
  <<endl;
  return os;
}

//____________________________________________________________________
//
// $Log: BrDcDig.cxx,v $
// Revision 1.1  2001/06/22 17:32:24  cholm
// Change names so that every data class has the same format so that
// we have that down from the very beginning, so that we will not have to
// worry about that later on.  The
// affected classes are:
//
//         BrDigBB             ->        BrBbDig
//         BrDigZDC            ->        BrZdcDig
//         BrDigRHIC           ->        BrRichDig
//         BrDigDC             ->        BrDcDig
//         BrDigC1             ->        BrDcC1
// 	BrDigHit            ->	      BrHitDig
// 	BrDigTof	    ->	      BrTofDig
// 	BrTPCSequence	    ->	      BrTpcSequence
//
// Revision 1.1.1.1  2001/06/21 14:55:01  hagel
// Initial revision of brat2
//
// Revision 1.5  2001/04/19 15:02:23  cholm
//  minor fix
//
// Revision 1.4  2001/04/19 13:06:18  cholm
// Added method Compare(const TObject*) const for ROOT 3 and beautified code.
//
// Revision 1.3  2000/09/29 02:15:59  hagel
// Changes having to do with development of BrDCTrackingModule
//

This page automatically generated by script docBrat by Christian Holm

Copyright ; 2002 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
Last Update on by

Validate HTML
Validate CSS