Changeset 950 for trunk/MagicSoft/Mars/mmain/MAnalysis.cc
- Timestamp:
- 09/26/01 15:23:21 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmain/MAnalysis.cc
r949 r950 30 30 31 31 enum { 32 M_BUTTON_HILLAS 32 M_BUTTON_HILLAS, 33 M_CHECK_DISPLHIL 33 34 }; 35 36 void MAnalysis::AddButtons() 37 { 38 TGTextButton *hillas = new TGTextButton(fTop2, "Calculate Standard Hillas", M_BUTTON_HILLAS); 39 40 hillas->Associate(this); 41 42 fList->Add(hillas); 43 44 TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsLeft, 10, 10, 5, 5); 45 fList->Add(laybut); 46 47 fTop2->AddFrame(hillas, laybut); 48 } 49 50 void MAnalysis::AddSetupTab() 51 { 52 TGCompositeFrame *frame = CreateNewTab("Setup"); 53 54 TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsLeft, 10, 10, 5, 5); 55 fList->Add(laybut); 56 57 fCheckButton1 = new TGCheckButton(frame, "Display Hillas Histograms when finished", M_CHECK_DISPLHIL); 58 fCheckButton2 = new TGCheckButton(frame, "Display Star Map Histogram when finished", M_CHECK_DISPLHIL); 59 60 fList->Add(fCheckButton1); 61 fList->Add(fCheckButton2); 62 63 frame->AddFrame(fCheckButton1, laybut); 64 frame->AddFrame(fCheckButton2, laybut); 65 } 34 66 35 67 MAnalysis::MAnalysis(const TGWindow *main, const TGWindow *p, … … 37 69 : MBrowser(main, p, w, h) 38 70 { 39 TGTextButton *hillas = new TGTextButton(fTop2, "Calculate Standard Hillas", M_BUTTON_HILLAS); 40 41 hillas->Associate(this); 42 43 fList->Add(hillas); 44 45 TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsLeft, 10, 10, 5, 5); 46 fList->Add(laybut); 47 48 fTop2->AddFrame(hillas, laybut); 71 AddButtons(); 72 AddSetupTab(); 49 73 50 74 MapSubwindows(); … … 74 98 #include "MHillas.h" 75 99 76 void MAnalysis::CalculateHillas( const char *fname)100 void MAnalysis::CalculateHillas() const 77 101 { 78 102 // 79 103 // This is a demonstration program which calculates the Hillas 80 104 // parameter out of a Magic root file. 105 106 const Bool_t displhillas = fCheckButton1->GetState(); 107 const Bool_t displstarmap = fCheckButton2->GetState(); 81 108 82 109 // … … 131 158 // CalEvents: Calibration Events 132 159 // 133 MReadTree read("Events", f name);160 MReadTree read("Events", fInputFile); 134 161 MCerPhotCalc ncalc; 135 162 MImgCleanStd clean; … … 137 164 MFillH hfill(&hillas, hists); 138 165 MFillH sfill(&hillas, smap); 139 //140 // FIXME:141 // -----142 // I cannot use MFillH fill("name", "name") here.143 // for me it is not yet clear why this doesn't work144 //145 146 /*147 MWriteRootFile write("hillas.root");148 write.AddContainer("MHillas");149 write.AddContainer("MHHillas");150 write.AddContainer(smap);151 */152 166 153 167 tlist.AddToList(&read); … … 157 171 tlist.AddToList(&hfill); 158 172 tlist.AddToList(&sfill); 159 //tlist.AddToList(&write);160 173 161 174 // … … 174 187 // After the analysis is finished we can display the histograms 175 188 // 176 hists->Draw(); 177 smap->Draw(); 189 190 if (displhillas) 191 hists->Draw(); 192 193 if (displstarmap) 194 smap->Draw(); 178 195 } 179 196 … … 199 216 { 200 217 case M_BUTTON_HILLAS: 201 CalculateHillas( fInputFile);218 CalculateHillas(); 202 219 return kTRUE; 203 220 }
Note:
See TracChangeset
for help on using the changeset viewer.