]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDUShortMap.h
Make sure that log scale is set, and the full range shown, even
[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;
70 protected:
021f1396 71 Int_t MaxIndex() const { return fTotal; }
72 UShort_t AtAsUShort(Int_t idx) const { return fData[idx]; }
73 UShort_t& AtAsUShort(Int_t idx) { return fData[idx]; }
74 Int_t AtAsInt(Int_t idx) const { return fData[idx]; }
75 Float_t AtAsFloat(Int_t idx) const { return fData[idx]; }
76 Bool_t AtAsBool(Int_t idx) const { return fData[idx]!=0?kTRUE:kFALSE; }
77 Int_t& AtAsInt(Int_t idx) { return AliFMDMap::AtAsInt(idx); }
78 Float_t& AtAsFloat(Int_t idx) { return AliFMDMap::AtAsFloat(idx); }
79 Bool_t& AtAsBool(Int_t idx) { return AliFMDMap::AtAsBool(idx); }
80 Bool_t IsUShort() const { return kTRUE; }
0ed9abeb 81 Int_t fTotal; // Total number of entries
bfdc7f5d 82 UShort_t* fData; // [fTotal] The data
0ed9abeb 83 ClassDef(AliFMDUShortMap, 3) // Cache of edep,hit information per strip
e802be3e 84};
85
86#endif
87//____________________________________________________________________
88//
89// Local Variables:
90// mode: C++
91// End:
92//
93// EOF
94//
95
96