|
// $Id: BrTofDig.cxx,v 1.2 2002/08/15 16:16:25 videbaek Exp $ // $Log: BrTofDig.cxx,v $ // Revision 1.2 2002/08/15 16:16:25 videbaek // Include the print() method instead of List.. // // Revision 1.1 2001/06/22 17:33:15 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.2 2000/05/17 10:28:49 ouerdane // see top of file // // Revision 1.1.1.1 1998/03/04 21:33:37 brahmlib // Brat tof // // //___________________ // // BrTofDig // // Elementary objects for digitized TOF information. They // constitute a simple class (like structures). // The class is implemented as inheriting from TObject. The main // reason for this is to have the capabilities of manipulating these // interactively within root. // #include "BrTofDig.h" #include <iostream.h> #ifndef ROOT_TString #include "TString.h" #endif ClassImp(BrTofDig) Int_t BrTofDig::Compare(TObject *digtof_p) { //This routine overloads TObject::Compare(TObject *object) //For BRAHMS, this routine is typically called by QSort //It needs to return 1 if you want digtof_o to be earlier //in the list and -1 if you want digtof_o to be later in //the list. // I (fv) do not really know if we need this for TOF? // BrTofDig * digtof = (BrTofDig*) digtof_p; if( fSlatno > digtof->GetSlatno() ) return 1; if( fSlatno < digtof->GetSlatno() ) return -1; return 0; } //_______________________________________________________________ void BrTofDig::List(){ // List the content of an object on cout // cout << "Slat No. " << fSlatno << "n"; cout << " Adc Up " << fAdcUp << "n"; cout << " Adc down " << fAdcDown << "n"; cout << " Tdc Up " << fTdcUp << "n"; cout << " Tdc down " << fTdcDown << "n" << endl; } //_______________________________________________________________ void BrTofDig::Print(Option_t* option) const { // Print information on this object. // Options: // D Give detailed class information as well // R Recursively list internal data (Default) TString opt(option); opt.ToLower(); TObject::Print(option); if (opt.Contains("d")) cout << endl << " Original author: FV" << endl << " Last Modifications: " << endl << " $Author: videbaek $" << endl << " $Date: 2002/08/15 16:16:25 $" << endl << " $Revision: 1.2 $ " << endl << endl << "-------------------------------------------------" << endl; if (opt.Contains("r")){ cout << "Slat No. " << fSlatno << "n"; cout << " Adc Up " << fAdcUp << "n"; cout << " Adc down " << fAdcDown << "n"; cout << " Tdc Up " << fTdcUp << "n"; cout << " Tdc down " << fTdcDown << "n" << endl; } } |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|