Changeset 3400 for trunk/MagicSoft/Mars/mhist/MHCamera.h
- Timestamp:
- 03/04/04 15:46:17 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamera.h
r3237 r3400 78 78 void ResetUsed(Int_t idx) { CLRBIT(fUsed[idx], kIsUsed); } 79 79 80 Bool_t MatchSector(Int_t idx, Int_t sector) const; 80 Bool_t FindVal(const TArrayI &arr, Int_t val) const 81 { 82 const Int_t n = arr.GetSize(); 83 if (n==0) 84 return kTRUE; 85 86 const Int_t *p = arr.GetArray(); 87 const Int_t *end = p+n; 88 while (p<end) 89 if (val==*p++) 90 return kTRUE; 91 92 return kFALSE; 93 } 94 Bool_t MatchSector(Int_t idx, const TArrayI §or, const TArrayI &aidx) const; 81 95 82 96 // This is a trick to remove TH1 entries from the context menu … … 140 154 Stat_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const { return GetBinError(binx); } 141 155 142 Double_t GetMinimum(Bool_t all) const { return GetMinimumSector(-1, all); } 143 Double_t GetMaximum(Bool_t all) const { return GetMaximumSector(-1, all); } 144 145 Double_t GetMinimum() const { return GetMinimumSector(-1, kFALSE); } 146 Double_t GetMaximum() const { return GetMaximumSector(-1, kFALSE); } 147 148 Double_t GetMinimumSector(Int_t sector, Bool_t all=kFALSE) const; 149 Double_t GetMaximumSector(Int_t sector, Bool_t all=kFALSE) const; 156 Double_t GetMinimum(Bool_t all) const { return GetMinimumSectors(TArrayI(), TArrayI(), all); } 157 Double_t GetMaximum(Bool_t all) const { return GetMaximumSectors(TArrayI(), TArrayI(), all); } 158 159 Double_t GetMinimum() const { return GetMinimumSectors(TArrayI(), TArrayI(), kFALSE); } 160 Double_t GetMaximum() const { return GetMaximumSectors(TArrayI(), TArrayI(), kFALSE); } 161 162 Double_t GetMinimumSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const 163 { 164 return GetMinimumSectors(TArrayI(1, §or), TArrayI(1, &aidx), all); 165 } 166 Double_t GetMaximumSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const 167 { 168 return GetMaximumSectors(TArrayI(1, §or), TArrayI(1, &aidx), all); 169 } 170 Double_t GetMinimumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all=kFALSE) const; 171 Double_t GetMaximumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all=kFALSE) const; 150 172 151 173 void SetLevels(const TArrayF &arr); … … 186 208 void AddNotify(TObject *event); 187 209 188 Stat_t GetMean(Bool_t all) const { return GetMeanSector(-1, all); } 189 Stat_t GetRMS(Bool_t all) const { return GetRmsSector(-1, all); } 190 191 Stat_t GetMean(Int_t sector=-1) const { return GetMeanSector(-1, kFALSE); } 192 Stat_t GetRMS(Int_t sector=-1) const { return GetRmsSector(-1, kFALSE); } 193 194 Stat_t GetMeanSector(Int_t sector, Bool_t all=kFALSE) const; 195 Stat_t GetRmsSector(Int_t sector, Bool_t all=kFALSE) const; 210 Stat_t GetMean(Bool_t all) const { return GetMeanSectors(TArrayI(), TArrayI(), all); } 211 Stat_t GetRMS(Bool_t all) const { return GetRmsSectors(TArrayI(), TArrayI(), all); } 212 213 Stat_t GetMean(Int_t=0) const { return GetMeanSectors(TArrayI(), TArrayI(), kFALSE); } 214 Stat_t GetRMS(Int_t=0) const { return GetRmsSectors(TArrayI(), TArrayI(), kFALSE); } 215 216 Stat_t GetMeanSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const 217 { 218 return GetMeanSectors(TArrayI(1, §or), TArrayI(1, &aidx), all); 219 } 220 Stat_t GetRmsSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const 221 { 222 return GetRmsSectors(TArrayI(1, §or), TArrayI(1, &aidx), all); 223 } 224 225 Stat_t GetMeanSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all=kFALSE) const; 226 Stat_t GetRmsSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all=kFALSE) const; 196 227 197 228 UInt_t GetNumPixels() const; 198 229 199 TH1D *Projection(const char *name="_py") const { return ProjectionS(-1, name); } 200 TH1D *ProjectionS(Int_t sector, const char *name="_py") const; 230 TH1D *Projection(const char *name="_py") const { return ProjectionS(TArrayI(), TArrayI(), name); } 231 TH1D *ProjectionS(Int_t sector, Int_t aidx, const char *name="_py") const 232 { 233 return ProjectionS(TArrayI(1, §or), TArrayI(1, &aidx), name); 234 } 235 TH1D *ProjectionS(const TArrayI §or, const TArrayI &aidx, const char *name="_py") const; 201 236 202 237 const MGeomCam &GetGeomCam() const { return *fGeomCam; }
Note:
See TracChangeset
for help on using the changeset viewer.