]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliAODCaloCells.h
turned off HLTError into Debug
[u/mrichter/AliRoot.git] / STEER / AliAODCaloCells.h
index 18da2b09d80854bb09550db34bd72e777170f941..53c05e451e4c768cda0595cd3df5746dfa645ff4 100644 (file)
 #ifndef ALIAODCELLS_H
 #define ALIAODCELLS_H
 
-#include <TNamed.h>
+#include <AliVCaloCells.h>
 #include <TMath.h>
 
-class AliAODCaloCells : public TNamed 
+class AliAODCaloCells : public AliVCaloCells
 {
  public:
-  enum AODCells_t {kUndef = -1, 
-                 kEMCAL, 
-                 kPHOS};
-
   AliAODCaloCells();
-  AliAODCaloCells(const char* name, const char* title, AODCells_t ttype=kUndef);
+  AliAODCaloCells(const char* name, const char* title, VCells_t ttype=kUndef);
   AliAODCaloCells(const AliAODCaloCells& cells); 
   AliAODCaloCells& operator=(const AliAODCaloCells& cells);
-  
+  virtual void Copy(TObject &obj) const;
+  virtual AliVCaloCells* CopyCaloCells(Bool_t all) const;
+
   virtual ~AliAODCaloCells();
-  
+  void Clear(const Option_t*);
+
   void CreateContainer(Short_t nCells);
   void DeleteContainer();
   void Sort();
   
-  Bool_t SetCell(Short_t pos, Short_t cellNumber, Double_t amplitude);
+  Bool_t SetCell(Short_t pos, Short_t cellNumber, Double_t amplitude, Double_t time = -1);
   
   Short_t GetNumberOfCells() const { return fNCells; }
-  inline Bool_t   GetCell(Short_t pos, Short_t &cellNumber, Double_t &amplitude) const;
+  void    SetNumberOfCells(Int_t n) { fNCells = n ; }
+  inline Bool_t   GetCell(Short_t pos, Short_t &cellNumber, Double_t &amplitude, Double_t &time) const;
   inline Double_t GetCellAmplitude(Short_t cellNumber);
   inline Short_t  GetCellPosition(Short_t cellNumber);
   inline Double_t GetAmplitude(Short_t pos) const;
+  Double_t GetCellTime(Short_t /*cellNumber*/) {return -1;}
   inline Short_t  GetCellNumber(Short_t pos) const;
-
+  Double_t GetTime(Short_t /*pos*/) const {return -1;}
+  Bool_t IsEMCAL() const {return (fType == kEMCALCell);}
+  Bool_t IsPHOS() const {return (fType == kPHOSCell);}
   Char_t  GetType() const { return fType;}
-  void    SetType(AODCells_t ttype) { fType=ttype; }
+  void    SetType(Char_t ttype) { fType=ttype; }
+
 
  protected:
   Int_t       fNCells;       // Number of cells
@@ -52,11 +56,11 @@ class AliAODCaloCells : public TNamed
   Char_t      fType;         // Cell type
   
   
-  ClassDef(AliAODCaloCells, 1);
+  ClassDef(AliAODCaloCells, 2);
 };
 
 
-Bool_t AliAODCaloCells::GetCell(Short_t pos, Short_t &cellNumber, Double_t &amplitude) const 
+Bool_t AliAODCaloCells::GetCell(Short_t pos, Short_t &cellNumber, Double_t &amplitude, Double_t& /*time*/) const 
 { 
   if (pos>=0 && pos<fNCells) {
     cellNumber = fCellNumber[pos];
@@ -80,7 +84,6 @@ Double_t AliAODCaloCells::GetCellAmplitude(Short_t cellNumber)
   if (pos>=0 && fCellNumber[pos] == cellNumber) {
     return fAmplitude[pos];
   } else {
-    Warning("GetCellAmplitude","Wrong cell array index %d", pos);
     return 0.;
   }
 }