StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPmdHit.cxx
1 /******************************************************
2  *
3  * $Id: StPmdHit.cxx,v 1.3 2010/05/28 17:23:33 rashmi Exp $
4  * Author: Subhasis Chattopadhyay, Dec 2001
5  *
6  ******************************************************
7  *
8  *Description: This is the class for Pmd hit objects
9  *
10  ******************************************************
11  * $Log: StPmdHit.cxx,v $
12  * Revision 1.3 2010/05/28 17:23:33 rashmi
13  * Added sorting routine
14  *
15  * Revision 1.2 2002/09/09 11:28:12 subhasis
16  * ADC added
17  *
18  *
19  ******************************************************/
20 #include "StPmdHit.h"
21 
22 ClassImp(StPmdHit)
23 
24 //__________________________________________________________
25 StPmdHit::StPmdHit(TArrayI *hits) : StObject()
26 {
27 }
28 //__________________________________________________________
30 {
31  mGsuper = 0; mSubdet = 0;
32  mRow =0; mCol=0;
33 
34 }
35 
36 void
37 StPmdHit::print(ostream *os)
38 {
40  *os << "Gsuper " << Gsuper();
41  *os << " SubDetector " << SubDetector();
42  *os << " Row " << Row();
43  *os << " Column " << Column();
44  *os << " Edep " << Edep();
45 }
46 
47 ostream &operator<<(ostream &os, StPmdHit &cl)
48 {
49  cl.print(&os); return os;
50 }
51 
52 Int_t StPmdHit::Compare(const TObject *hit) const
53 {
54  StPmdHit* mhit = (StPmdHit*)hit;
55  if (mAdc < mhit->mAdc) return -1;
56  else if (mAdc > mhit->mAdc) return 1;
57  else return 0;
58 }
59 
60 void StPmdHit::Browse(TBrowser *b)
61 {
62  cout << (*this) << endl;
63  StObject::Browse(b);
64 }
65 
66 
67 
virtual void print(ostream *os)
Definition: StPmdHit.cxx:37
StPmdHit()
status based on chain selection (1=OK, 0=bad)
Definition: StPmdHit.cxx:29
Int_t Row() const
function for subdetector
Definition: StPmdHit.h:95
Int_t Column() const
function for row
Definition: StPmdHit.h:96
Int_t Gsuper() const
A destructor.
Definition: StPmdHit.h:91
Float_t Edep() const
function for col
Definition: StPmdHit.h:97
Int_t SubDetector() const
function for module
Definition: StPmdHit.h:94