Changeset 8291 for trunk/MagicSoft/Mars
- Timestamp:
- 02/03/07 12:49:36 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
r8284 r8291 90 90 // 91 91 MHCamEvent::MHCamEvent(const char *name, const char *title) 92 : fSum(NULL), fEvt(NULL), fType(0), fErrorSpread(kTRUE), fThreshold(0), fUseThreshold(0) 92 : fSum(NULL), fEvt(NULL), fType(0), fErrorSpread(kTRUE), fErrorRelative(kFALSE), 93 fThreshold(0), fUseThreshold(0) 93 94 { 94 95 Init(name, title); … … 100 101 // 101 102 MHCamEvent::MHCamEvent(Int_t type, const char *name, const char *title) 102 : fSum(NULL), fEvt(NULL), fType(type), fErrorSpread(kTRUE), fThreshold(0), fUseThreshold(0) 103 : fSum(NULL), fEvt(NULL), fType(type), fErrorSpread(kTRUE), fErrorRelative(kFALSE), 104 fThreshold(0), fUseThreshold(0) 103 105 { 104 106 Init(name, title); … … 159 161 fSum->SetBit(MHCamera::kErrorMean); 160 162 161 fSum->SetXTitle("Pixel Idx");162 163 163 return kTRUE; 164 164 } … … 250 250 MHCamera *cam = (MHCamera*)gPad->FindObject(Form("%s;err", fName.Data())); 251 251 if (cam) 252 cam->SetCamContent(*fSum, 1);252 cam->SetCamContent(*fSum, fErrorRelative ? 1 : 2); 253 253 } 254 254 … … 294 294 p->cd(); 295 295 296 TString e = "Sqrt(Variance)"; 297 if (fSum->TestBit(MHCamera::kErrorMean)) 298 e += "/Sqrt(n_{i})"; 299 if (fErrorRelative) 300 e += "/v_{i}"; 301 296 302 MHCamera *cam = new MHCamera(*fSum->GetGeometry()); 297 303 cam->SetName(Form("%s;err", fName.Data())); 298 cam->SetTitle( fErrorSpread?"Sqrt(Variance)":"Sqrt(Variance)/Sqrt(n_{i})");304 cam->SetTitle(e); 299 305 cam->SetYTitle(fSum->GetYaxis()->GetTitle()); 300 cam->SetCamContent(*fSum, 1);306 cam->SetCamContent(*fSum, fErrorRelative ? 1 : 2); 301 307 cam->SetBit(kCanDelete); 302 308 cam->Draw(); -
trunk/MagicSoft/Mars/mhist/MHCamEvent.h
r8281 r8291 24 24 Int_t fType; // Type to used for calling GetPixelContent 25 25 Bool_t fErrorSpread; // kFALSE==mean, kTRUE==spread 26 Bool_t fErrorRelative; // Display relative error? 26 27 27 28 Float_t fThreshold; // Count pixel above/below this threshold … … 45 46 46 47 void SetHist(const MHCamera &cam); 48 MHCamera *GetHist() { return fSum; } 49 const MHCamera *GetHist() const { return fSum; } 47 50 48 51 TH1 *GetHistByName(const TString name="") const; 49 52 50 53 void Paint(Option_t *o=""); 51 void Draw(Option_t *o=""); 54 void Draw(Option_t *o=""); //*MENU* 52 55 53 56 void PrintOutliers(Float_t s) const; … … 55 58 void SetThreshold(Float_t f=0, Char_t direction=kIsLowerBound) { fThreshold = f; fUseThreshold=direction; } 56 59 void SetErrorSpread(Bool_t b=kTRUE) { fErrorSpread = b; } 60 void SetErrorRelative(Bool_t b=kTRUE) { fErrorRelative = b; } 57 61 58 62 ClassDef(MHCamEvent, 2) // Histogram to sum camera events
Note:
See TracChangeset
for help on using the changeset viewer.