Changeset 2098
- Timestamp:
- 05/08/03 18:00:03 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2097 r2098 1 1 -*-*- END OF LINE -*-*- 2 2 3 2003/05/08: Thomas Bretz 4 5 * Makefile.rules: 6 - fixed the rmhtml bug 7 8 * macros/collarea.C: 9 - changed to use MStatusDisplay 10 11 * manalysis/MCT1SupercutsCalc.cc: 12 - fixed a typo 13 14 * mbase/MEvtLoop.[h,cc], mbase/MTaskList.[h,cc]: 15 - added FindTask member functions 16 17 * mbase/MLog.cc: 18 - do not crop logging to GUI to 1000 lines anymore 19 20 * mdata/MDataChain.cc: 21 - use GetRule() in the constructor instead of Print() 22 23 * mdata/MDataElement.cc, mfilter/MFDataChain.cc: 24 - do not return str+"something" 25 26 * mhist/MH.[h,cc]: 27 - fixed a bug in DrawCopy(TH1*,TH1*) 28 - overwrite Clone function and do not add TH1 to gDirectory 29 when cloning MH classes 30 31 * mimage/MHHillas.cc, mimage/MHHillasSrc.cc: 32 - adde a sanity check to Fill 33 34 * mimage/MHHillasSrc.cc: 35 - do not set the log scale before we have entries in the histogram 36 37 38 3 39 2003/05/08: Abelardo Moralejo 40 41 * mimage/MImgCleanStd.cc 42 - extended comment on standard cleaning. 4 43 5 44 * mhistmc/MHMcCollectionAreaCalc.cc 6 45 - Changed binning of histograms, so that the collection area 7 46 can be calculated also between 5 and 10 GeV (for pulsar studies) 8 9 2003/05/08: Thomas Bretz10 11 * Makefile.rules:12 - fixed the rmhtml bug13 14 15 16 2003/05/08: Abelardo Moralejo17 18 * mimage/MImgCleanStd.cc19 - extended comment on standard cleaning.20 47 21 48 -
trunk/MagicSoft/Mars/macros/collarea.C
r1660 r2098 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)18 ! Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 120 ! Copyright: MAGIC Software Development, 2000-2003 21 21 ! 22 22 ! … … 25 25 26 26 void collarea(TString filename="camera.root", TString outname="") 27 { 27 { 28 MStatusDisplay *d = new MStatusDisplay; 29 // redirect logging output to GUI, kFALSE to disable stream to stdout 30 d->SetLogStream(&gLog, kTRUE); 31 28 32 // 29 33 // first we have to create our empty lists … … 54 58 // Start to loop over all events 55 59 // 56 MProgressBar bar; 57 magic.SetProgressBar(&bar); 60 magic.SetDisplay(d); 58 61 if (!magic.Eventloop()) 59 62 return; … … 65 68 // filled and can be displayed 66 69 // 67 parlist.FindObject("MHMcCollectionArea")->DrawClone(); 70 if ((d = magic.GetDisplay())) 71 d->AddTab("Collection Area"); 72 else 73 new TCanvas("CollArea", "Result of the collection area calculation"); 74 75 parlist.FindObject("MHMcCollectionArea")->DrawClone("nonew"); 68 76 69 77 -
trunk/MagicSoft/Mars/manalysis/MCT1SupercutsCalc.cc
r2038 r2098 16 16 ! 17 17 ! 18 ! Author(s): Wolfgang Wittek 19 18 ! Author(s): Wolfgang Wittek, 04/2003 <mailto:wittek@mppmu.mpg.de> 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2003 21 21 ! -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r2080 r2098 120 120 if (TestBit(kIsOwner) && fParList) 121 121 delete fParList; 122 } 123 124 // -------------------------------------------------------------------------- 125 // 126 // If the evntloop knows its tasklist search for the task there, 127 // otherwise return NULL. 128 // 129 MTask *MEvtLoop::FindTask(const char *name) const 130 { 131 return fTaskList ? fTaskList->FindTask(name) : NULL; 132 } 133 134 // -------------------------------------------------------------------------- 135 // 136 // If the evntloop knows its tasklist search for the task there, 137 // otherwise return NULL. 138 // 139 MTask *MEvtLoop::FindTask(const MTask *obj) const 140 { 141 return fTaskList ? fTaskList->FindTask(obj) : NULL; 122 142 } 123 143 -
trunk/MagicSoft/Mars/mbase/MEvtLoop.h
r1965 r2098 14 14 #endif 15 15 16 class MTask; 16 17 class MParList; 17 18 class MTaskList; … … 45 46 MParList *GetParList() const { return fParList; } 46 47 MTaskList *GetTaskList() const { return fTaskList; } 48 49 MTask *FindTask(const char *name) const; 50 MTask *FindTask(const MTask *obj) const; 47 51 48 52 MStatusDisplay *GetDisplay() { return fDisplay; } -
trunk/MagicSoft/Mars/mbase/MLog.cc
r2079 r2098 209 209 switch (fOutputLevel) 210 210 { 211 case 0: out << MLog::kReset; break; // all 211 case 0: out << MLog::kReset; break; // all // maybe not necessary? 212 212 case 1: out << MLog::kRed; break; // err 213 213 case 2: out << MLog::kYellow; break; // warn … … 284 284 } 285 285 286 #include <TVirtualX.h>287 286 void MLog::UpdateGui() 288 287 { … … 308 307 309 308 // cut text box top 1000 lines 310 while (txt.RowCount()>1000)311 txt.DelLine(0);309 // while (txt.RowCount()>1000) 310 // txt.DelLine(1); 312 311 313 312 // show last entry -
trunk/MagicSoft/Mars/mbase/MTaskList.h
r2015 r2098 52 52 TObject *FindObject(const TObject *obj) const; 53 53 54 MTask *FindTask(const char *name) const 55 { 56 return (MTask*)FindObject(name); 57 } 58 MTask *FindTask(const MTask *obj) const 59 { 60 return (MTask*)FindObject(obj); 61 } 62 54 63 Bool_t ReInit(MParList *pList=NULL); 55 64 -
trunk/MagicSoft/Mars/mdata/MDataChain.cc
r1853 r2098 150 150 return; 151 151 } 152 *fLog << inf << "found: " << flush; 153 fMember->Print(); 154 *fLog << endl; 152 *fLog << inf << "found: " << GetRule() << endl; 155 153 } 156 154 -
trunk/MagicSoft/Mars/mdata/MDataElement.cc
r1574 r2098 115 115 TString rule = fMatrixName + "["; 116 116 rule += fNumCol; 117 return rule+"]"; 117 rule += "]"; 118 return rule; 118 119 } -
trunk/MagicSoft/Mars/mfilter/MFDataChain.cc
r1668 r2098 119 119 str += fValue; 120 120 121 return ret+str.Strip(TString::kBoth); 121 ret += str.Strip(TString::kBoth); 122 return ret; 122 123 } 123 124 -
trunk/MagicSoft/Mars/mhist/MH.cc
r2052 r2098 630 630 // Draw second histogram 631 631 // 632 ((TH1&)hist2).DrawCopy("sames");632 TH1 *h2 = ((TH1&)hist2).DrawCopy("sames"); 633 633 gPad->Update(); 634 634 … … 642 642 s2.GetY1NDC()-0.01 643 643 ); 644 l.AddEntry( (TH1*)&hist1, hist1.GetTitle());645 l.AddEntry( (TH1*)&hist2, hist2.GetTitle());644 l.AddEntry(h1, h1->GetTitle()); 645 l.AddEntry(h2, h2->GetTitle()); 646 646 l.SetTextSize(s2.GetTextSize()); 647 647 l.SetTextFont(s2.GetTextFont()); … … 749 749 // -------------------------------------------------------------------------- 750 750 // 751 // Encapsulate the TObject::Clone such, that a cloned TH1 (or derived) 752 // object is not added to the current directory, when cloned. 753 // 754 TObject *MH::Clone(const char *name) const 755 { 756 Bool_t store = TH1::AddDirectoryStatus(); 757 TH1::AddDirectory(kFALSE); 758 759 TObject *o = MParContainer::Clone(name); 760 761 TH1::AddDirectory(store); 762 763 return o; 764 } 765 766 // -------------------------------------------------------------------------- 767 // 751 768 // If the opt string contains 'nonew' or gPad is not given a new canvas 752 769 // with size w/h is created. Otherwise the object is cloned and drawn … … 763 780 gROOT->SetSelectedPad(NULL); 764 781 765 Bool_t store = TH1::AddDirectoryStatus();766 TH1::AddDirectory(kFALSE);767 768 782 TObject *o = MParContainer::DrawClone(opt); 769 783 o->SetBit(kCanDelete); 770 771 TH1::AddDirectory(store);772 773 784 return o; 774 785 } -
trunk/MagicSoft/Mars/mhist/MH.h
r2043 r2098 61 61 static void Draw(TH1 &hist1, TH1 &hist2, const TString title); 62 62 63 TObject *Clone(const char *name="") const; 64 63 65 void Draw(Option_t *o="") { MParContainer::Draw(o); } 64 66 TObject *DrawClone(Option_t *opt, Int_t w, Int_t h) const; -
trunk/MagicSoft/Mars/mimage/MHHillas.cc
r2062 r2098 242 242 Bool_t MHHillas::Fill(const MParContainer *par, const Stat_t w) 243 243 { 244 if (!par) 245 { 246 *fLog << err << "MHHillas::Fill: Pointer (!=NULL) expected." << endl; 247 return kFALSE; 248 } 249 244 250 const MHillas &h = *(MHillas*)par; 245 251 … … 247 253 const Double_t scale = fUseMmScale ? 1 : fMm2Deg; 248 254 249 fLength 250 fWidth 251 fDistC 252 fCenter 253 fDelta 254 fSize 255 fLength->Fill(scale*h.GetLength(), w); 256 fWidth ->Fill(scale*h.GetWidth(), w); 257 fDistC ->Fill(scale*d, w); 258 fCenter->Fill(scale*h.GetMeanX(), scale*h.GetMeanY(), w); 259 fDelta ->Fill(kRad2Deg*h.GetDelta(), w); 260 fSize ->Fill(h.GetSize(), w); 255 261 256 262 return kTRUE; -
trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc
r2043 r2098 130 130 Bool_t MHHillasSrc::Fill(const MParContainer *par, const Stat_t w) 131 131 { 132 if (!par) 133 { 134 *fLog << err << "MHHillasSrc::Fill: Pointer (!=NULL) expected." << endl; 135 return kFALSE; 136 } 137 132 138 const MHillasSrc &h = *(MHillasSrc*)par; 133 139 … … 211 217 pad->cd(4); 212 218 gPad->SetBorderMode(0); 213 gPad->SetLogy();219 //gPad->SetLogy(); 214 220 fCosDA->Draw(); 215 221 216 222 pad->Modified(); 217 223 pad->Update(); 224 } 225 226 void MHHillasSrc::Paint(Option_t *opt) 227 { 228 if (fCosDA->GetEntries()==0) 229 return; 230 231 TVirtualPad *savepad = gPad; 232 gPad->cd(4); 233 gPad->SetLogy(); 234 gPad = savepad; 218 235 } 219 236
Note:
See TracChangeset
for help on using the changeset viewer.