#include <IORawData/Ecal2004TBInputService/interface/TRawTdcInfo.h>
Public Member Functions | |
virtual void | Clear (const char *opt="") |
Int_t | GetNValue () |
Int_t | GetValue (Int_t n) const |
Int_t * | GetValues () |
virtual void | Print (const char *opt=0) const |
void | SetValues (Int_t, Int_t v[]) |
TRawTdcInfo (Int_t, Int_t *) | |
TRawTdcInfo (Int_t) | |
TRawTdcInfo () | |
virtual | ~TRawTdcInfo () |
Protected Member Functions | |
void | Init () |
Protected Attributes | |
Int_t | fNValue |
Int_t * | fValues |
Definition at line 5 of file TRawTdcInfo.h.
TRawTdcInfo::TRawTdcInfo | ( | ) |
TRawTdcInfo::TRawTdcInfo | ( | Int_t | n | ) |
Definition at line 23 of file TRawTdcInfo.cc.
References fNValue, fValues, and j.
00023 { 00024 //Constructor with number of elements 00025 Short_t j; 00026 fNValue = n; 00027 fValues = new Int_t [fNValue]; 00028 printf( "TRawTdcInfo allocating %d int in Ctor(int)\n", fNValue ); 00029 for (j=0;j<fNValue;j++) fValues[j] = 0; 00030 }
TRawTdcInfo::TRawTdcInfo | ( | Int_t | , | |
Int_t * | ||||
) |
TRawTdcInfo::~TRawTdcInfo | ( | ) | [virtual] |
Definition at line 36 of file TRawTdcInfo.cc.
References Clear().
00036 { 00037 //Destructor 00038 Clear(); 00039 }
void TRawTdcInfo::Clear | ( | const char * | opt = "" |
) | [virtual] |
Definition at line 40 of file TRawTdcInfo.cc.
References fNValue, fValues, and Init().
Referenced by SetValues(), and ~TRawTdcInfo().
00040 { 00041 if (fValues) { 00042 printf( "deleting %d int in Clear\n", fNValue ); 00043 delete [] fValues; 00044 } 00045 Init(); 00046 }
Int_t TRawTdcInfo::GetNValue | ( | ) | [inline] |
Definition at line 22 of file TRawTdcInfo.h.
References fNValue.
Referenced by Ecal2004TBSource::produce().
00022 { return fNValue; }
Int_t TRawTdcInfo::GetValue | ( | Int_t | n | ) | const [inline] |
Definition at line 23 of file TRawTdcInfo.h.
References fNValue, and fValues.
Referenced by Ecal2004TBSource::produce().
Int_t* TRawTdcInfo::GetValues | ( | ) | [inline] |
void TRawTdcInfo::Print | ( | const char * | opt = 0 |
) | const [virtual] |
Definition at line 53 of file TRawTdcInfo.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fNValue, fValues, and j.
00053 { 00054 Short_t j; 00055 cout << endl; 00056 cout << "TRawTdcInfo nb val : " << fNValue << endl; 00057 cout << "Values: "; 00058 for (j=0;j<fNValue;j++) cout << " " << fValues[j]; 00059 cout << endl; 00060 cout << endl; 00061 }
void TRawTdcInfo::SetValues | ( | Int_t | n, | |
Int_t | v[] | |||
) |
Definition at line 62 of file TRawTdcInfo.cc.
References Clear(), fNValue, fValues, and j.
00062 { 00063 //Set values to all variables of the class 00064 Short_t j; 00065 if ((n<=0) && (fNValue != 0)) Clear(); 00066 if ((n >0) && (fNValue != n)) { 00067 Clear(); 00068 fNValue = n; 00069 printf( "allocating %d int in SetValues(int)\n", fNValue ); 00070 fValues = new Int_t [fNValue]; 00071 } 00072 for (j=0;j<n;j++) fValues[j] = v[j]; 00073 }
Int_t TRawTdcInfo::fNValue [protected] |
Definition at line 9 of file TRawTdcInfo.h.
Referenced by Clear(), GetNValue(), GetValue(), Init(), Print(), SetValues(), and TRawTdcInfo().
Int_t* TRawTdcInfo::fValues [protected] |
Definition at line 10 of file TRawTdcInfo.h.
Referenced by Clear(), GetValue(), GetValues(), Init(), Print(), SetValues(), and TRawTdcInfo().