CMS 3D CMS Logo

TRawPn Class Reference

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

List of all members.

Public Member Functions

Int_t Compare (const TObject *obj) const
Int_t GetN () const
Int_t GetNSamples ()
Int_t GetSample (Int_t k) const
Int_t * GetSamples (Int_t &)
Int_t GetVInj ()
Bool_t IsSortable () const
void Print (const char *opt=0) const
void Remove ()
void SetPn (Int_t, Int_t *)
void SetVInj (Int_t v)
 TRawPn (Int_t, Int_t, Int_t *)
 TRawPn (Int_t)
 TRawPn ()
virtual ~TRawPn ()

Static Public Attributes

static Int_t fgNPns

Protected Member Functions

void Init ()

Protected Attributes

Int_t fN
Int_t fNSample
Int_t * fSamples
Int_t fVInj


Detailed Description

Definition at line 5 of file TRawPn.h.


Constructor & Destructor Documentation

TRawPn::TRawPn (  ) 

TRawPn::TRawPn ( Int_t  n  ) 

Definition at line 21 of file TRawPn.cc.

References fN, and Init().

00021                       {
00022 //Constructor with Pn numb
00023   Init();
00024   fN = n;
00025 }

TRawPn::TRawPn ( Int_t  ,
Int_t  ,
Int_t *   
)

TRawPn::~TRawPn (  )  [virtual]

Definition at line 33 of file TRawPn.cc.

References fSamples.

00033                 {
00034   if (fSamples) delete [] fSamples;
00035 }


Member Function Documentation

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

Definition at line 25 of file TRawPn.h.

References fN.

00025                                              { 
00026               if (fN < ((TRawPn*)obj)->fN)
00027                 return -1;
00028               else if (fN > ((TRawPn*)obj)->fN)
00029                 return 1;
00030               else
00031                 return 0; }

Int_t TRawPn::GetN (  )  const [inline]

Definition at line 32 of file TRawPn.h.

References fN.

00032 { return fN;          }

Int_t TRawPn::GetNSamples (  )  [inline]

Definition at line 33 of file TRawPn.h.

References fNSample.

Referenced by Ecal2004TBSource::produce().

00033 { return fNSample; }

Int_t TRawPn::GetSample ( Int_t  k  )  const [inline]

Definition at line 34 of file TRawPn.h.

References fSamples.

Referenced by Ecal2004TBSource::produce().

00034 { return fSamples[k]; }

Int_t * TRawPn::GetSamples ( Int_t &  n  ) 

Definition at line 40 of file TRawPn.cc.

References fNSample, and fSamples.

00040                                   {
00041 //Give access to coefficients of polynom and their number
00042   n = fNSample;
00043   return fSamples;
00044 }

Int_t TRawPn::GetVInj (  )  [inline]

Definition at line 36 of file TRawPn.h.

References fVInj.

00036 { return fVInj; }

void TRawPn::Init ( void   )  [protected]

Definition at line 45 of file TRawPn.cc.

References fN, fNSample, and fSamples.

Referenced by Remove(), and TRawPn().

00045                   {
00046 //Initialization
00047   fN         = -1;
00048   fNSample = 0;
00049   fSamples = 0;
00050 }

Bool_t TRawPn::IsSortable (  )  const [inline]

Definition at line 38 of file TRawPn.h.

00038 { return kTRUE;       }

void TRawPn::Print ( const char *  opt = 0  )  const

Definition at line 51 of file TRawPn.cc.

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

00051                                         {
00052 //Prints everything
00053   Int_t j;
00054   cout << endl;
00055   cout << "Pn number     : " << fN << endl;
00056   cout << "Nb. of Samples: " << fNSample << endl;
00057   cout << "Samples: ";
00058   for (j=0;j<fNSample;j++) {
00059     cout << "  " << fSamples[j];
00060     if (!(j%8)) {
00061       cout << endl;
00062       cout << "Samples: ";
00063     }
00064   }
00065   cout << endl;
00066   cout << endl;
00067 }

void TRawPn::Remove (  ) 

Definition at line 36 of file TRawPn.cc.

References fSamples, and Init().

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

void TRawPn::SetPn ( Int_t  ,
Int_t *   
)

void TRawPn::SetVInj ( Int_t  v  )  [inline]

Definition at line 37 of file TRawPn.h.

References fVInj.

00037 { fVInj = v; }


Member Data Documentation

Int_t TRawPn::fgNPns [static]

Definition at line 18 of file TRawPn.h.

Int_t TRawPn::fN [protected]

Definition at line 9 of file TRawPn.h.

Referenced by Compare(), GetN(), Init(), Print(), and TRawPn().

Int_t TRawPn::fNSample [protected]

Definition at line 10 of file TRawPn.h.

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

Int_t* TRawPn::fSamples [protected]

Definition at line 11 of file TRawPn.h.

Referenced by GetSample(), GetSamples(), Init(), Print(), Remove(), and ~TRawPn().

Int_t TRawPn::fVInj [protected]

Definition at line 12 of file TRawPn.h.

Referenced by GetVInj(), and SetVInj().


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