]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDUShortMap.h
During simulation: fill STU region w/ non null time sums
[u/mrichter/AliRoot.git] / FMD / AliFMDUShortMap.h
index 0c10d6edd311bc4a7fbde0c0cb796aac2bdd4675..cd67642b2cb0697d78bbdfb30267d2321fd16420 100644 (file)
@@ -27,12 +27,14 @@ public:
   /** Copy constructor 
       @param other Object to copy from.  */
   AliFMDUShortMap(const AliFMDUShortMap& other);
+  /** Constructor */
+  AliFMDUShortMap();
   /** Constructor 
       @param maxDet  Number of detectors (3)
       @param maxRing Number of rings (2)
       @param maxSec  Number of sectors (40)
       @param maxStr  Number of strips (20) */
-  AliFMDUShortMap(UShort_t maxDet = kMaxDetectors, 
+  AliFMDUShortMap(UShort_t maxDet,
                  UShort_t maxRing= kMaxRings, 
                  UShort_t maxSec = kMaxSectors, 
                  UShort_t maxStr = kMaxStrips);
@@ -65,7 +67,30 @@ public:
                                     Char_t   ring, 
                                     UShort_t sector, 
                                     UShort_t strip) const;
+  /** 
+   * Get the raw data pointer. 
+   * 
+   * @return Pointer to the data 
+   */
+  UShort_t* Data() const { return fData; }
+  /** 
+   * The total number of entries in the data array 
+   * 
+   * @return Total number of entries in the data array 
+   */
+  Int_t     Total() const { return fTotal; }
+  void*     Ptr() const { return reinterpret_cast<void*>(fData); }
+  Int_t     MaxIndex()            const { return fTotal; }
  protected:
+  UShort_t  AtAsUShort(Int_t idx) const { return fData[idx]; }
+  UShort_t& AtAsUShort(Int_t idx)       { return fData[idx]; }
+  Int_t     AtAsInt(Int_t idx)    const { return fData[idx]; }
+  Float_t   AtAsFloat(Int_t idx)  const { return fData[idx]; }
+  Bool_t    AtAsBool(Int_t idx)   const { return fData[idx]!=0?kTRUE:kFALSE; }
+  Int_t&    AtAsInt(Int_t idx)          { return AliFMDMap::AtAsInt(idx);    }
+  Float_t&  AtAsFloat(Int_t idx)        { return AliFMDMap::AtAsFloat(idx);  }
+  Bool_t&   AtAsBool(Int_t idx)         { return AliFMDMap::AtAsBool(idx); }
+  Bool_t    IsUShort()            const { return kTRUE; }  
   Int_t     fTotal; // Total number of entries 
   UShort_t* fData;  // [fTotal] The data 
   ClassDef(AliFMDUShortMap, 3) // Cache of edep,hit information per strip