00001 #ifndef ZTR_TRawPn 00002 #define ZTR_TRawPn 00003 #include "TObject.h" 00004 00005 class TRawPn : public TObject { 00006 00007 protected: 00008 00009 Int_t fN; //Number of pn blocks. 00010 Int_t fNSample; //Number of samples 00011 Int_t *fSamples; //[fNSample] sadc samples 00012 Int_t fVInj; //in case of pulse injection Vinj*1000 00013 00014 void Init(); 00015 00016 public: 00017 00018 static Int_t fgNPns; 00019 00020 TRawPn(); 00021 TRawPn(Int_t); 00022 TRawPn(Int_t,Int_t,Int_t*); 00023 virtual ~TRawPn(); 00024 void Remove(); 00025 Int_t Compare(const TObject *obj) const { 00026 if (fN < ((TRawPn*)obj)->fN) 00027 return -1; 00028 else if (fN > ((TRawPn*)obj)->fN) 00029 return 1; 00030 else 00031 return 0; } 00032 Int_t GetN() const { return fN; } 00033 Int_t GetNSamples() { return fNSample; } 00034 Int_t GetSample(Int_t k) const { return fSamples[k]; } 00035 Int_t *GetSamples(Int_t&); 00036 Int_t GetVInj() { return fVInj; } 00037 void SetVInj( Int_t v ) { fVInj = v; } 00038 Bool_t IsSortable() const { return kTRUE; } 00039 void Print(const char *opt=0) const; 00040 void SetPn(Int_t,Int_t*); 00041 ClassDef(TRawPn,2) //A pn diode data 00042 }; 00043 #endif