CMS 3D CMS Logo

TRawCrystal Class Reference

#include <IORawData/Ecal2004TBInputService/interface/TRawCrystal.h>

List of all members.

Public Member Functions

virtual void Clear (const char *opt="")
Int_t Compare (const TObject *obj) const
Int_t GetHeader ()
Int_t GetNSamples ()
Int_t GetSample (Int_t n)
Int_t * GetSamples ()
Bool_t IsSortable () const
virtual void Print (const char *opt=0) const
void SetCrystalRaw (Int_t, Int_t *)
 TRawCrystal (Int_t, Int_t *)
 TRawCrystal ()
virtual ~TRawCrystal ()

Static Public Attributes

static Int_t fgNSamplesCrystal

Private Member Functions

void Init ()

Private Attributes

Int_t fHeader
Int_t fNSample
Int_t * fSamples


Detailed Description

Definition at line 6 of file TRawCrystal.h.


Constructor & Destructor Documentation

TRawCrystal::TRawCrystal (  ) 

TRawCrystal::TRawCrystal ( Int_t  ,
Int_t *   
)

TRawCrystal::~TRawCrystal (  )  [virtual]

Definition at line 34 of file TRawCrystal.cc.

References Clear().

00034                           {
00035   Clear();
00036 }


Member Function Documentation

void TRawCrystal::Clear ( const char *  opt = ""  )  [virtual]

Definition at line 37 of file TRawCrystal.cc.

References fSamples, and Init().

Referenced by ~TRawCrystal().

00037                                        {
00038   if (fSamples) delete [] fSamples;
00039   Init();
00040 }

Int_t TRawCrystal::Compare ( const TObject *  obj  )  const [inline]

Definition at line 24 of file TRawCrystal.h.

References fHeader.

00024                                               { 
00025               if (fHeader < ((TRawCrystal*)obj)->fHeader)
00026                 return -1;
00027               else if (fHeader > ((TRawCrystal*)obj)->fHeader)
00028                 return 1;
00029               else
00030                 return 0; }

Int_t TRawCrystal::GetHeader (  )  [inline]

Definition at line 31 of file TRawCrystal.h.

References fHeader.

00031 { return fHeader;           }

Int_t TRawCrystal::GetNSamples (  )  [inline]

Definition at line 32 of file TRawCrystal.h.

References fNSample.

Referenced by Ecal2004TBSource::produce().

00032 { return fNSample; }

Int_t TRawCrystal::GetSample ( Int_t  n  )  [inline]

Definition at line 33 of file TRawCrystal.h.

References fSamples.

Referenced by Ecal2004TBSource::produce().

00033 { return fSamples[n];       }

Int_t* TRawCrystal::GetSamples (  )  [inline]

Definition at line 34 of file TRawCrystal.h.

References fSamples.

00034 { return fSamples;          }

void TRawCrystal::Init ( void   )  [private]

Definition at line 41 of file TRawCrystal.cc.

References fHeader, fNSample, and fSamples.

Referenced by Clear().

00041                        {
00042 //Everything to 0
00043   fHeader  = 0;
00044   fNSample = 0;
00045   fSamples = 0;
00046 }

Bool_t TRawCrystal::IsSortable (  )  const [inline]

Definition at line 35 of file TRawCrystal.h.

00035 { return kTRUE;            }

void TRawCrystal::Print ( const char *  opt = 0  )  const [virtual]

Definition at line 47 of file TRawCrystal.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fgNSamplesCrystal, fHeader, fNSample, fSamples, and j.

Referenced by TRawTower::Print().

00047                                              {
00048 //Prints the whole class
00049   Short_t j;
00050   cout << endl;
00051 
00052   cout << "TCrystal fHeader       : ";
00053   cout << fHeader << "  ";
00054   cout << endl;
00055   cout << "Nb. of Samples : " << fNSample << endl;
00056   cout << "TCrystal Samples: ";
00057   for (j=0;j<fgNSamplesCrystal;j++) {
00058     cout << "  ";
00059     cout.width(12);
00060     cout << fSamples[j];
00061     if (!((j+1)%6)) {
00062       cout << endl;
00063       cout << "TCrystal Samples: ";
00064     }
00065   }
00066   cout << endl;
00067   cout << endl;
00068 }

void TRawCrystal::SetCrystalRaw ( Int_t  ,
Int_t *   
)

Referenced by TRawTower::FillCrystalData().


Member Data Documentation

Int_t TRawCrystal::fgNSamplesCrystal [static]

Definition at line 18 of file TRawCrystal.h.

Referenced by Print().

Int_t TRawCrystal::fHeader [private]

Definition at line 10 of file TRawCrystal.h.

Referenced by Compare(), GetHeader(), Init(), and Print().

Int_t TRawCrystal::fNSample [private]

Definition at line 11 of file TRawCrystal.h.

Referenced by GetNSamples(), Init(), and Print().

Int_t* TRawCrystal::fSamples [private]

Definition at line 12 of file TRawCrystal.h.

Referenced by Clear(), GetSample(), GetSamples(), Init(), and Print().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:34:30 2009 for CMSSW by  doxygen 1.5.4