Added new 'status' histogram to the DQM data maker and checker. This histogram
[u/mrichter/AliRoot.git] / FMD / AliFMDUShortMap.h
CommitLineData
8f6ee336 1#ifndef ALIFMDUSHORTMAP_H
2#define ALIFMDUSHORTMAP_H
e802be3e 3/* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
4 * reserved.
5 *
6 * See cxx source for full Copyright notice
7 */
c2fc1258 8/** @file AliFMDUShortMap.h
9 @author Christian Holm Christensen <cholm@nbi.dk>
10 @date Mon Mar 27 12:48:18 2006
11 @brief Per strip of unisgned shorts (16 bit) data
12*/
02a27b50 13// Map of an integer per strip
14// This class stores one short unsigned integer (16 bits) per strip in
15// the FMD detectors.
e802be3e 16#ifndef ALIFMDMAP_H
97961cbd 17# include "AliFMDMap.h"
e802be3e 18#endif
19//____________________________________________________________________
9f662337 20/** @class AliFMDUShortMap
21 @brief Map of an integer per strip
22 @ingroup FMD_base
23 */
e802be3e 24class AliFMDUShortMap : public AliFMDMap
25{
26public:
9f662337 27 /** Copy constructor
28 @param other Object to copy from. */
e802be3e 29 AliFMDUShortMap(const AliFMDUShortMap& other);
021f1396 30 /** Constructor */
31 AliFMDUShortMap();
9f662337 32 /** Constructor
33 @param maxDet Number of detectors (3)
34 @param maxRing Number of rings (2)
35 @param maxSec Number of sectors (40)
36 @param maxStr Number of strips (20) */
021f1396 37 AliFMDUShortMap(UShort_t maxDet,
6e79feeb 38 UShort_t maxRing= kMaxRings,
39 UShort_t maxSec = kMaxSectors,
40 UShort_t maxStr = kMaxStrips);
9f662337 41 /** Destructor */
e802be3e 42 virtual ~AliFMDUShortMap() { delete [] fData; }
9f662337 43 /** Assignment operator
44 @param other Object to assign from
45 @return reference to this object. */
e802be3e 46 AliFMDUShortMap& operator=(const AliFMDUShortMap& other);
9f662337 47 /** Reset to value
f8616692 48 @param val Value to reset from */
6e9e7c0a 49 virtual void Reset(const UShort_t& val=UShort_t());
9f662337 50 /** Access operator
f8616692 51 @param detector Detector
52 @param ring Ring
53 @param sector Sector
54 @param strip Strip
9f662337 55 @return reference value stored for the strip */
e802be3e 56 virtual UShort_t& operator()(UShort_t detector,
57 Char_t ring,
58 UShort_t sector,
59 UShort_t strip);
9f662337 60 /** Access operator
f8616692 61 @param detector Detector
62 @param ring Ring
63 @param sector Sector
64 @param strip Strip
9f662337 65 @return value stored for the strip */
e802be3e 66 virtual const UShort_t& operator()(UShort_t detector,
67 Char_t ring,
68 UShort_t sector,
69 UShort_t strip) const;
045a97a7 70 /**
71 * Get the raw data pointer.
72 *
73 * @return Pointer to the data
74 */
75 UShort_t* Data() const { return fData; }
76 /**
77 * The total number of entries in the data array
78 *
79 * @return Total number of entries in the data array
80 */
81 Int_t Total() const { return fTotal; }
82 void* Ptr() const { return reinterpret_cast<void*>(fData); }
021f1396 83 Int_t MaxIndex() const { return fTotal; }
045a97a7 84 protected:
021f1396 85 UShort_t AtAsUShort(Int_t idx) const { return fData[idx]; }
86 UShort_t& AtAsUShort(Int_t idx) { return fData[idx]; }
87 Int_t AtAsInt(Int_t idx) const { return fData[idx]; }
88 Float_t AtAsFloat(Int_t idx) const { return fData[idx]; }
89 Bool_t AtAsBool(Int_t idx) const { return fData[idx]!=0?kTRUE:kFALSE; }
90 Int_t& AtAsInt(Int_t idx) { return AliFMDMap::AtAsInt(idx); }
91 Float_t& AtAsFloat(Int_t idx) { return AliFMDMap::AtAsFloat(idx); }
92 Bool_t& AtAsBool(Int_t idx) { return AliFMDMap::AtAsBool(idx); }
93 Bool_t IsUShort() const { return kTRUE; }
0ed9abeb 94 Int_t fTotal; // Total number of entries
bfdc7f5d 95 UShort_t* fData; // [fTotal] The data
0ed9abeb 96 ClassDef(AliFMDUShortMap, 3) // Cache of edep,hit information per strip
e802be3e 97};
98
99#endif
100//____________________________________________________________________
101//
102// Local Variables:
103// mode: C++
104// End:
105//
106// EOF
107//
108
109