Changeset 1076 for trunk/MagicSoft/Mars/mmain
- Timestamp:
- 11/14/01 10:03:20 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mmain
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmain/MAnalysis.cc
r1030 r1076 25 25 #include "MAnalysis.h" 26 26 27 #include <stdlib.h> // atof28 27 #include <iostream.h> 29 28 … … 32 31 #include <TGTextEntry.h> // TGNumberEntry 33 32 33 #include "MImgCleanStd.h" // MImgCleanStd 34 34 35 ClassImp(MAnalysis) 35 36 … … 59 60 TGCompositeFrame *frame = CreateNewTab("Setup"); 60 61 62 TGGroupFrame *grp = new TGGroupFrame(frame, "Setup Display"); 63 fList->Add(grp); 64 61 65 // 62 66 // Align the lines: … … 64 68 // - padding: top=20, bottom=0, left=20, right=0 65 69 // 66 TGLayoutHints *lay line = new TGLayoutHints(kLHintsNormal, 20, 0, 20);67 fList->Add(lay line);70 TGLayoutHints *laybut = new TGLayoutHints(kLHintsNormal, 10, 10, 10); 71 fList->Add(laybut); 68 72 69 73 // 70 74 // Create check buttons for the first two lines 71 75 // 72 fCheckButton1 = new TGCheckButton(frame, "Display Hillas Histograms when finished"); //, M_CHECK_DISPLHIL); 73 fCheckButton2 = new TGCheckButton(frame, "Display Star Map Histogram when finished"); //, M_CHECK_DISPLHIL); 76 fCheckButton1 = new TGCheckButton(grp, "Display Hillas Histograms when finished"); //, M_CHECK_DISPLHIL); 77 fCheckButton2 = new TGCheckButton(grp, "Display Star Map Histogram when finished"); //, M_CHECK_DISPLHIL); 78 79 fList->AddFirst(fCheckButton1); 80 fList->AddFirst(fCheckButton2); 81 82 // 83 // Create first two lines with the checkbuttons 84 // 85 grp->AddFrame(fCheckButton1, laybut); 86 grp->AddFrame(fCheckButton2, laybut); 87 88 TGLayoutHints *laygrp = new TGLayoutHints(kLHintsNormal|kLHintsExpandX, 20, 20, 20); 89 fList->Add(laygrp); 90 91 frame->AddFrame(grp, laygrp); 74 92 75 93 /* 76 FIXME... 77 78 fList->Add(fCheckButton1); 79 fList->Add(fCheckButton2); 94 * Create GUI for image cleaning 80 95 */ 81 82 // 83 // Create first two lines with the checkbuttons 84 // 85 frame->AddFrame(fCheckButton1, layline); 86 frame->AddFrame(fCheckButton2, layline); 87 88 // 89 // Create entry fields and labels for line 3 and 4 90 // 91 92 /* 93 * --> use with root >=3.02 <-- 94 * 95 96 TGNumberEntry *fNumEntry1 = new TGNumberEntry(frame, 3.0, 2, M_NENT_LVL1, kNESRealOne, kNEANonNegative); 97 TGNumberEntry *fNumEntry2 = new TGNumberEntry(frame, 2.5, 2, M_NENT_LVL1, kNESRealOne, kNEANonNegative); 98 99 */ 100 101 // 102 // Create a frame for line 3 and 4 to be able 103 // to align entry field and label in one line 104 // 105 TGHorizontalFrame *f1 = new TGHorizontalFrame(frame, 0, 0); 106 TGHorizontalFrame *f2 = new TGHorizontalFrame(frame, 0, 0); 107 108 fNumEntry1 = new TGTextEntry(f1, "****"); 109 fNumEntry2 = new TGTextEntry(f2, "****"); 110 111 // --- doesn't work like expected --- fNumEntry1->SetAlignment(kTextRight); 112 // --- doesn't work like expected --- fNumEntry2->SetAlignment(kTextRight); 113 114 fNumEntry1->SetText("3.0"); 115 fNumEntry2->SetText("2.5"); 116 117 fList->Add(fNumEntry1); 118 fList->Add(fNumEntry2); 119 120 TGLabel *l1 = new TGLabel(f1, "Cleaning Level 1 for standard image cleaning."); 121 TGLabel *l2 = new TGLabel(f2, "Cleaning Level 2 for standard image cleaning."); 122 123 l1->SetTextJustify(kTextLeft); 124 l2->SetTextJustify(kTextLeft); 125 126 fList->Add(l1); 127 fList->Add(l2); 128 129 // 130 // Align the text of the label centered, left in the row 131 // with a left padding of 10 132 // 133 TGLayoutHints *laylabel = new TGLayoutHints(kLHintsCenterY|kLHintsLeft, 10); //, 10); //, 5, 5); 134 fList->Add(laylabel); 135 136 // 137 // Add one entry field and the corresponding label to each line 138 // 139 f1->AddFrame(fNumEntry1); 140 f2->AddFrame(fNumEntry2); 141 142 f1->AddFrame(l1, laylabel); 143 f2->AddFrame(l2, laylabel); 144 145 // 146 // Add line 3 and 4 to tab 147 // 148 frame->AddFrame(f1, layline); 149 frame->AddFrame(f2, layline); 96 fImgClean = new MImgCleanStd; 97 fImgClean->CreateGui(frame, laygrp); 98 fList->Add(fImgClean); 150 99 } 151 100 … … 192 141 const Bool_t displstarmap = fCheckButton2->GetState(); 193 142 194 Float_t cleanlvl1 = atof(fNumEntry1->GetText());195 Float_t cleanlvl2 = atof(fNumEntry2->GetText());196 197 if (cleanlvl1<0)198 {199 cleanlvl1=0;200 fNumEntry1->SetText("0");201 }202 203 if (cleanlvl2<0)204 {205 cleanlvl2=0;206 fNumEntry2->SetText("0");207 }208 209 143 // 210 144 // Create a empty Parameter List and an empty Task List … … 245 179 246 180 MCerPhotCalc ncalc; 247 MImgCleanStd clean(cleanlvl1, cleanlvl2);248 181 MHillasCalc hcalc; 249 182 250 183 tlist.AddToList(&read); 251 184 tlist.AddToList(&ncalc); 252 tlist.AddToList( &clean);185 tlist.AddToList(fImgClean); 253 186 tlist.AddToList(&hcalc); 254 187 -
trunk/MagicSoft/Mars/mmain/MAnalysis.h
r1021 r1076 9 9 class TGCheckButton; 10 10 11 class MImgCleanStd; 12 11 13 class MAnalysis : public MBrowser 12 14 { … … 15 17 TGCheckButton *fCheckButton2; 16 18 17 TGTextEntry *fNumEntry1; 18 TGTextEntry *fNumEntry2; 19 // TGTextEntry *fNumEntry1; 20 // TGTextEntry *fNumEntry2; 21 22 MImgCleanStd *fImgClean; 19 23 20 24 void CalculateHillas();
Note:
See TracChangeset
for help on using the changeset viewer.