]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- fix copy constructor and assignment operator for AliTRDarrayADC
authorjklein <jochen.klein@cern.ch>
Tue, 4 Mar 2014 10:30:34 +0000 (11:30 +0100)
committerjklein <jochen.klein@cern.ch>
Tue, 4 Mar 2014 12:35:09 +0000 (13:35 +0100)
- add flag to mark data as invalid

TRD/AliTRDarrayADC.cxx
TRD/AliTRDarrayADC.h

index 0a8b3e4a9d474124e7151e58c66e7a77fe19bc9a..a55ac220876d94895ea330c2186a07070c56ab9b 100644 (file)
@@ -75,7 +75,7 @@ AliTRDarrayADC::AliTRDarrayADC(Int_t nrow, Int_t ncol, Int_t ntime)
 
 //____________________________________________________________________________________
 AliTRDarrayADC::AliTRDarrayADC(const AliTRDarrayADC &b)
-               :TObject()
+               :TObject(b)
               ,fNdet(b.fNdet)
                ,fNrow(b.fNrow)
                ,fNcol(b.fNcol)
@@ -120,6 +120,7 @@ AliTRDarrayADC &AliTRDarrayADC::operator=(const AliTRDarrayADC &b)
     {
       delete [] fADC;
     }
+  TObject::operator=(b);
   fNdet=b.fNdet;
   fNrow=b.fNrow;
   fNcol=b.fNcol;
index 17c09349db1cc7a3ae065b5e427164cb1bf334ee..93713012f724077c0c88909420735f921e673e4c 100644 (file)
@@ -18,6 +18,10 @@ class AliTRDarrayADC: public TObject
 {
  public:
 
+  enum {
+    kDataInvalid = 14
+  };
+
   AliTRDarrayADC();
   AliTRDarrayADC(Int_t nrow, Int_t ncol, Int_t ntime);
   AliTRDarrayADC(const AliTRDarrayADC &b);
@@ -51,6 +55,10 @@ class AliTRDarrayADC: public TObject
   inline  void    SetData(Int_t nrow, Int_t ncol, Int_t ntime, Short_t value);
   static  void    CreateLut(); 
 
+  Bool_t  IsValid() { return !TestBit(kDataInvalid); }
+  void    SetDataInvalid() { SetBit(kDataInvalid); }
+  void    SetDataValid() { ResetBit(kDataInvalid); }
+
  protected:
 
   Int_t fNdet;    //ID number of the chamber