Changeset 3788 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 04/21/04 15:38:08 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mhbase
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MBinning.cc
r2735 r3788 61 61 62 62 SetEdges(10, 0, 1); 63 64 63 fType = kIsDefault; 65 64 } 66 65 66 MBinning::MBinning(Int_t nbins, Axis_t lo, Axis_t hi, const char *name, const char *opt="", const char *title=NULL) 67 { 68 fName = name ? name : gsDefName.Data(); 69 fTitle = title ? title : gsDefTitle.Data(); 70 71 SetEdges(nbins, lo, hi, opt); 72 73 } 67 74 void MBinning::SetEdges(const TAxis &axe) 68 75 { … … 110 117 111 118 fType = kIsLinear; 119 } 120 121 // -------------------------------------------------------------------------- 122 // 123 // Calls SetEdgesLog if opt contains "log" 124 // Calls SetEdgesCos if opt contains "cos" 125 // Calls SetEdges in all other cases 126 // 127 void MBinning::SetEdges(const Int_t nbins, const Axis_t lo, Axis_t up, const char *opt) 128 { 129 const TString o(opt); 130 if (o.Contains("log", TString::kIgnoreCase)) 131 { 132 SetEdgesLog(nbins, lo, up); 133 return; 134 } 135 if (o.Contains("cos", TString::kIgnoreCase)) 136 { 137 SetEdgesCos(nbins, lo, up); 138 return; 139 } 140 SetEdges(nbins, lo, up); 112 141 } 113 142 -
trunk/MagicSoft/Mars/mhbase/MBinning.h
r2735 r3788 32 32 public: 33 33 MBinning(const char *name=NULL, const char *title=NULL); 34 MBinning(Int_t nbins, Axis_t lo, Axis_t hi, const char *name, const char *opt="", const char *title=NULL); 34 35 35 36 void SetEdges(const TArrayD &arr) … … 42 43 void SetEdges(const TH1 &h, const Char_t axis='x'); 43 44 void SetEdges(const Int_t nbins, const Axis_t lo, Axis_t up); 45 void SetEdges(const Int_t nbins, const Axis_t lo, Axis_t up, const char *opt); 44 46 void SetEdgesLog(const Int_t nbins, const Axis_t lo, Axis_t up); 45 47 void SetEdgesCos(const Int_t nbins, const Axis_t lo, Axis_t up); -
trunk/MagicSoft/Mars/mhbase/MFillH.cc
r3500 r3788 340 340 // -------------------------------------------------------------------------- 341 341 // 342 // Use this to set a draw option used when drawing automatically to the 343 // status display. 344 // 345 void MFillH::SetDrawOption(Option_t *option="") 346 { 347 fDrawOption = option; 348 } 349 350 // -------------------------------------------------------------------------- 351 // 342 352 // Creates a new tab in a status display with the name of the MH class, 343 353 // if fDisplay is set and the MH-class overwrites the Draw function … … 357 367 358 368 fCanvas = &fDisplay->AddTab(fNameTab.IsNull() ? fH->GetName() : fNameTab.Data()); 359 fH->Draw( );369 fH->Draw(fDrawOption); 360 370 361 371 return kTRUE; … … 549 559 if (fDisplay && fDisplay->HasCanvas(fCanvas)) 550 560 { 561 const TString opt(Form("nonew %s", fDrawOption)); 551 562 fCanvas->cd(); 552 fH->DrawClone( "nonew");563 fH->DrawClone(opt); 553 564 fCanvas->Modified(); 554 565 fCanvas->Update(); -
trunk/MagicSoft/Mars/mhbase/MFillH.h
r3500 r3788 38 38 TCanvas *fCanvas; //! Canvas used to update a MStatusDisplay at the end of a loop 39 39 40 TString fDrawOption; // Draw option for status display 41 40 42 TString ExtractName(const char *name) const; 41 43 TString ExtractClass(const char *name) const; … … 63 65 void SetWeight(const char *name) { fWeightName = name; } 64 66 67 void SetDrawOption(Option_t *option=""); 68 Option_t *GetDrawOption() const { return fDrawOption; } 69 65 70 Int_t PreProcess(MParList *pList); 66 71 Bool_t ReInit(MParList *pList);
Note:
See TracChangeset
for help on using the changeset viewer.