1 #ifndef ALIFMDBOOLMAP_H
2 #define ALIFMDBOOLMAP_H
3 /* Copyright (c) 2004, ALICE Experiment @ CERN.
5 * See AliFMDBoolMap.cxx for full copyright notice
7 * Created Mon Nov 8 12:51:51 2004 by Christian Holm Christensen
10 /** @file AliFMDBoolMap.h
11 @author Christian Holm Christensen <cholm@nbi.dk>
12 @date Sun Mar 26 18:28:59 2006
13 @brief Per strip boolean map
15 //__________________________________________________________
17 // Map of Bool_t for each FMD strip
18 // Used in calibration and the like classes.
19 // Used amoung other things for dead-channel map
22 # include <AliFMDMap.h>
25 /** @class AliFMDBoolMap
26 @brief MAp of per strip boolean values.
29 class AliFMDBoolMap : public AliFMDMap
33 @param other Object to copy from. */
34 AliFMDBoolMap(const AliFMDBoolMap& other);
40 @param maxDet Number of detectors (3)
41 @param maxRing Number of rings (2)
42 @param maxSec Number of sectors (40)
43 @param maxStr Number of strips (20) */
44 AliFMDBoolMap(UShort_t maxDet,
49 virtual ~AliFMDBoolMap() { if (fData) delete [] fData; }
50 /** Assignment operator
51 @param other Object to assign from
52 @return reference to this object. */
53 AliFMDBoolMap& operator=(const AliFMDBoolMap& other);
55 @param v Value to reset from */
56 virtual void Reset(const Bool_t& v=Bool_t());
62 @return reference value stored for the strip */
63 virtual Bool_t& operator()(UShort_t det,
72 @return value stored for the strip */
73 virtual const Bool_t& operator()(UShort_t det,
78 Int_t MaxIndex() const { return fTotal; }
79 Bool_t AtAsBool(Int_t idx) const { return fData[idx]; }
80 Bool_t& AtAsBool(Int_t idx) { return fData[idx]; }
81 Bool_t IsBool() const { return kTRUE; }
82 Int_t AtAsInt(Int_t idx) const { return fData[idx] ? 1 : 0; }
83 Float_t AtAsFloat(Int_t idx) const { return fData[idx] ? 1.F : 0.F; }
84 UShort_t AtAsUShort(Int_t idx) const { return fData[idx] ? 1 : 0; }
85 Int_t& AtAsInt(Int_t idx) { return AliFMDMap::AtAsInt(idx); }
86 Float_t& AtAsFloat(Int_t idx) { return AliFMDMap::AtAsFloat(idx); }
87 UShort_t& AtAsUShort(Int_t idx) { return AliFMDMap::AtAsUShort(idx); }
88 Int_t fTotal; // Total number of entries
89 Bool_t* fData; // [fTotal] The Data
90 ClassDef(AliFMDBoolMap,3) // Map of Bool_t data per strip
94 //__________________________________________________________