Changeset 1076 for trunk/MagicSoft
- Timestamp:
- 11/14/01 10:03:20 (23 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1058 r1076 1 1 -*-*- END -*-*- 2 2001/11/09: Thomas Bretz 3 4 * mbase/MGList.[h,cc], mbase/MGTask.[h,cc], mbase/MGGroupFrame.[h,cc]: 5 - added 6 7 * Makefile.conf.linux, Makefile.conf.linux-gnu: 8 - changed to O3 9 - added -fnonnull-objects 10 - added -Woverloaded-virtual 11 12 * macros/readCT1.C, macros/readMagic.C: 13 - changed to use MClone 14 15 * manalysis/MImgCleanStd.[h,cc]: 16 - derived from TGTask 17 - added CreateGuiElements 18 - added ProcessMessage 19 20 * mbase/BaseLinkDef.h, mbase/Makefile: 21 - added MGTask 22 - added MGList 23 - added MGGroupFrame 24 25 * mbase/MInputStreamID.cc: 26 - rmoved old comment 27 28 * mbase/MParContainer.[h,cc]: 29 - changed output 30 - made Hash const 31 - added GetDiscriptor 32 33 * mbase/MParList.[h,cc]: 34 - made FindObject const correct (see TObject) 35 36 * mbase/MTask.[h,cc]: 37 - changed output to use GetDescriptor 38 - made Call* functions virtual (used in TGTask) 39 40 * mbase/MTaskList.[h,cc]: 41 - made FindObject const correct (see TObject) 42 - changed output to use GetDescriptor 43 44 * mbase/MTime.cc: 45 - code reformatting 46 47 * mbase/MWriteRootFile.cc: 48 - small changes in output 49 50 * mgui/MHexagon.cc: 51 - changed output according to TEllipse and similar 52 - made ls const 53 54 * mhist/MFillH.cc: 55 - changed output to use GetDescriptor 56 57 * mmain/MAnalysis.[h,cc]: 58 - changed to use new GUI of MImgCleanStd 59 60 * mraw/MRawEvtData.cc: 61 - small changes to output 62 - better sanity check for non existing fRunHeader 63 64 65 2 66 2001/11/09: Thomas Bretz 3 67 -
trunk/MagicSoft/Mars/Makefile.conf.linux
r1044 r1076 20 20 # ----->>> settings for compilation 21 21 # 22 OPTIM = -O 2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs22 OPTIM = -O3 -Wall -fno-rtti -fnonnull-objects -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual 23 23 DEBUG = 24 24 ARCHDEF = -D__LINUX__ -
trunk/MagicSoft/Mars/Makefile.conf.linux-gnu
r1044 r1076 20 20 # 21 21 22 OPTIM = -O 2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs22 OPTIM = -O3 -Wall -fno-rtti -fnonnull-objects -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual 23 23 DEBUG = 24 24 ARCHDEF = -D__LINUX__ -
trunk/MagicSoft/Mars/macros/readCT1.C
r1038 r1076 37 37 38 38 MCT1ReadAscii read("/home/tbretz/data/CT1_97_off1.dat"); 39 MClone clone("MCerPhotEvt"); 39 40 MImgCleanStd clean; 40 41 MHillasCalc hcalc; 41 42 42 43 tlist.AddToList(&read); 44 tlist.AddToList(&clone); 43 45 tlist.AddToList(&clean); 44 46 tlist.AddToList(&hcalc); … … 50 52 return; 51 53 52 MCerPhotEvt &phevt = *(MCerPhotEvt*)plist->FindObject("MCerPhotEvt");53 54 54 Int_t icount = 0; 55 55 MCamDisplay display(&geomcam); 56 56 display.Draw(); 57 57 58 while ( read.Process())58 while (tlist.Process()) 59 59 { 60 cout << "Event: " << icount++ << endl; 61 hillas.Reset(); 60 cout << "Event #" << icount++ << endl; 62 61 63 display.DrawPhotNum( &phevt);62 display.DrawPhotNum((MCerPhotEvt*)clone.GetClone()); 64 63 gClient->HandleInput(); 65 64 if(getchar()=='q') 66 65 break; 67 66 68 clean.Process();69 70 if (hcalc.Process()==kCONTINUE)71 {72 cout << "skipped." << endl;73 continue;74 }75 76 67 hillas.Print(); 77 68 hillas.Draw(); 78 79 display.DrawPhotNum(&phevt); 69 display.DrawPhotNum((MCerPhotEvt*)plist.FindObject("MCerPhotEvt")); 80 70 81 71 gClient->HandleInput(); -
trunk/MagicSoft/Mars/macros/readMagic.C
r1038 r1076 40 40 MReadTree read("Events", "~/data/camera.root"); 41 41 MCerPhotCalc ncalc; 42 MClone clone("MCerPhotEvt"); 42 43 MImgCleanStd clean; 43 44 MHillasCalc hcalc; … … 45 46 tlist.AddToList(&read); 46 47 tlist.AddToList(&ncalc); 48 tlist.AddToList(&clone); 47 49 tlist.AddToList(&clean); 48 50 tlist.AddToList(&hcalc); … … 54 56 return; 55 57 56 MCerPhotEvt &phevt = *(MCerPhotEvt*)plist.FindObject("MCerPhotEvt");57 58 58 MCamDisplay display(&geomcam); 59 59 display.Draw(); 60 60 61 while ( read.Process())61 while (tlist.Process()) 62 62 { 63 cout << "Event #" << read.GetEventNum() ":" << endl; 64 hillas.Reset(); 65 phevt.Reset(); 63 cout << "Event #" << read.GetEventNum() << endl; 66 64 67 ncalc.Process(); 68 69 display.DrawPhotNum(&phevt); 65 display.DrawPhotNum((MCerPhotEvt*)clone.GetClone()); 70 66 gClient->HandleInput(); 71 67 if(getchar()=='q') 72 68 break; 73 69 74 clean.Process();75 hcalc.Process();76 77 70 hillas.Print(); 78 71 hillas.Draw(); 79 80 display.DrawPhotNum(&phevt); 72 display.DrawPhotNum((MCerPhotEvt*)plist.FindObject("MCerPhotEvt")); 81 73 82 74 gClient->HandleInput(); -
trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc
r1049 r1076 258 258 return kTRUE; 259 259 } 260 260 261 261 262 // -------------------------------------------------------------------------- 262 263 // … … 272 273 } 273 274 275 #include <stdlib.h> // atof 276 277 #include <TGFrame.h> // TGFrame 278 #include <TGLabel.h> // TGLabel 279 #include <TGTextEntry.h> // TGTextEntry 280 281 #include "MGGroupFrame.h" // MGGroupFrame 282 283 enum { 284 kImgCleanLvl1, 285 kImgCleanLvl2 286 }; 287 288 void MImgCleanStd::CreateGuiElements(MGGroupFrame *f) 289 { 290 // 291 // Create a frame for line 3 and 4 to be able 292 // to align entry field and label in one line 293 // 294 TGHorizontalFrame *f1 = new TGHorizontalFrame(f, 0, 0); 295 TGHorizontalFrame *f2 = new TGHorizontalFrame(f, 0, 0); 296 297 /* 298 * --> use with root >=3.02 <-- 299 * 300 301 TGNumberEntry *fNumEntry1 = new TGNumberEntry(frame, 3.0, 2, M_NENT_LVL1, kNESRealOne, kNEANonNegative); 302 TGNumberEntry *fNumEntry2 = new TGNumberEntry(frame, 2.5, 2, M_NENT_LVL1, kNESRealOne, kNEANonNegative); 303 304 */ 305 TGTextEntry *entry1 = new TGTextEntry(f1, "****", kImgCleanLvl1); 306 TGTextEntry *entry2 = new TGTextEntry(f2, "****", kImgCleanLvl2); 307 308 // --- doesn't work like expected (until root 3.02?) --- fNumEntry1->SetAlignment(kTextRight); 309 // --- doesn't work like expected (until root 3.02?) --- fNumEntry2->SetAlignment(kTextRight); 310 311 entry1->SetText("3.0"); 312 entry2->SetText("2.5"); 313 314 entry1->Associate(f); 315 entry2->Associate(f); 316 317 TGLabel *l1 = new TGLabel(f1, "Cleaning Level 1 for standard image cleaning."); 318 TGLabel *l2 = new TGLabel(f2, "Cleaning Level 2 for standard image cleaning."); 319 320 l1->SetTextJustify(kTextLeft); 321 l2->SetTextJustify(kTextLeft); 322 323 // 324 // Align the text of the label centered, left in the row 325 // with a left padding of 10 326 // 327 TGLayoutHints *laylabel = new TGLayoutHints(kLHintsCenterY|kLHintsLeft, 10); 328 TGLayoutHints *layframe = new TGLayoutHints(kLHintsCenterY|kLHintsLeft, 5, 0, 10); 329 330 // 331 // Add one entry field and the corresponding label to each line 332 // 333 f1->AddFrame(entry1); 334 f2->AddFrame(entry2); 335 336 f1->AddFrame(l1, laylabel); 337 f2->AddFrame(l2, laylabel); 338 339 f->AddFrame(f1, layframe); 340 f->AddFrame(f2, layframe); 341 342 f->AddToList(entry1); 343 f->AddToList(entry2); 344 f->AddToList(l1); 345 f->AddToList(l2); 346 f->AddToList(laylabel); 347 f->AddToList(layframe); 348 } 349 350 Bool_t MImgCleanStd::ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2) 351 { 352 if (msg!=kC_TEXTENTRY || submsg!=kTE_ENTER) 353 return kTRUE; 354 355 TGTextEntry *txt = (TGTextEntry*)FindWidget(param1); 356 357 if (!txt) 358 return kTRUE; 359 360 Float_t lvl = atof(txt->GetText()); 361 362 switch (param1) 363 { 364 case kImgCleanLvl1: 365 fCleanLvl1 = lvl; 366 *fLog << "Cleaning level 1 set to " << lvl << " sigma." << endl; 367 return kTRUE; 368 369 case kImgCleanLvl2: 370 fCleanLvl2 = lvl; 371 *fLog << "Cleaning level 2 set to " << lvl << " sigma." << endl; 372 return kTRUE; 373 } 374 375 return kTRUE; 376 } -
trunk/MagicSoft/Mars/manalysis/MImgCleanStd.h
r1014 r1076 2 2 #define MARS_MImgCleanStd 3 3 4 #ifndef MARS_M Task5 #include "M Task.h"4 #ifndef MARS_MGTask 5 #include "MGTask.h" 6 6 #endif 7 7 … … 9 9 class MCerPhotEvt; 10 10 11 class MImgCleanStd : public MTask 11 class MGGroupFrame; 12 13 class MImgCleanStd : public MGTask 12 14 { 13 15 private: 14 const MGeomCam *fCam;15 MCerPhotEvt *fEvt; 16 const MGeomCam *fCam; //! 17 MCerPhotEvt *fEvt; //! 16 18 17 19 Float_t fCleanLvl1; 18 20 Float_t fCleanLvl2; 21 22 void CreateGuiElements(MGGroupFrame *f); 19 23 20 24 public: … … 26 30 void CleanStep3(); 27 31 28 Bool_t PreProcess 32 Bool_t PreProcess(MParList *pList); 29 33 Bool_t Process(); 34 35 Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2); 30 36 31 37 ClassDef(MImgCleanStd, 0) // task doing a standard image cleaning -
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r1035 r1076 31 31 #pragma link C++ class MInputStreamID+; 32 32 33 #pragma link C++ class MGTask+; 34 #pragma link C++ class MGList+; 35 #pragma link C++ class MGGroupFrame+; 36 33 37 #pragma link C++ class MClone+; 34 38 #pragma link C++ class MPrint+; -
trunk/MagicSoft/Mars/mbase/MInputStreamID.cc
r1003 r1076 47 47 fTitle = title; 48 48 49 fStreamId = "All"; //new char[4]; 50 //strcpy(fStreamId, "All"); 49 fStreamId = "All"; 51 50 } 52 51 -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r1030 r1076 137 137 { 138 138 TROOT::IndentLevel(); 139 *fLog <<"OBJ: " << IsA()->GetName() << "\t" << GetName() << "\t" << GetTitle() << " :"139 *fLog <<"OBJ: " << GetDescriptor() << ": " << GetTitle() << ", " 140 140 << Int_t(TestBit(kCanDelete)) << endl; 141 141 } … … 147 147 void MParContainer::Print(Option_t *) const 148 148 { 149 *fLog <<"OBJ: " << IsA()->GetName() << "\t" << GetName() << "\t" << GetTitle() << endl;149 *fLog <<"OBJ: " << GetDescriptor() << ": " << GetTitle() << endl; 150 150 } 151 151 … … 199 199 { 200 200 *fLog << "To use the the ascii input of " << GetName(); 201 *fLog << " you have to overload " << GetName() << "::AsciiRead." << endl;201 *fLog << " you have to overload " << ClassName() << "::AsciiRead." << endl; 202 202 } 203 203 … … 205 205 { 206 206 *fLog << "To use the the ascii output of " << GetName(); 207 *fLog << " you have to overload " << GetName() << "::AsciiWrite." << endl;208 } 207 *fLog << " you have to overload " << ClassName() << "::AsciiWrite." << endl; 208 } -
trunk/MagicSoft/Mars/mbase/MParContainer.h
r1030 r1076 100 100 virtual ~MParContainer() {} 101 101 102 virtual const char *GetDescriptor() const { return Form("%s [%s]", GetName(), ClassName()); } 103 102 104 virtual TObject *Clone(const char *newname="") const; 103 105 virtual Int_t Compare(const TObject *obj) const; … … 107 109 virtual const char *GetName() const { return fName.Data(); } 108 110 virtual const char *GetTitle() const { return fTitle.Data(); } 109 virtual ULong_t Hash() 111 virtual ULong_t Hash() const { return fName.Hash(); } 110 112 virtual Bool_t IsSortable() const { return kTRUE; } 111 113 -
trunk/MagicSoft/Mars/mbase/MParList.cc
r1027 r1076 227 227 // check if the object is in the list or not 228 228 // 229 TObject *MParList::FindObject( TObject *obj) const229 TObject *MParList::FindObject(const TObject *obj) const 230 230 { 231 231 return fContainer->FindObject(obj); -
trunk/MagicSoft/Mars/mbase/MParList.h
r1030 r1076 44 44 45 45 TObject *FindObject(const char *name) const; 46 TObject *FindObject( TObject *obj) const;46 TObject *FindObject(const TObject *obj) const; 47 47 MParContainer *FindCreateObj(const char *classname, const char *objname=NULL); 48 48 -
trunk/MagicSoft/Mars/mbase/MTask.cc
r1027 r1076 67 67 #include "MTask.h" 68 68 69 #include <TMethod.h> 69 70 #include <TOrdCollection.h> 70 71 … … 73 74 74 75 #include "MFilter.h" 76 #include "MGGroupFrame.h" 75 77 76 78 ClassImp(MTask); … … 176 178 177 179 fIsPreprocessed = kFALSE; 180 178 181 return PostProcess(); 179 182 } … … 224 227 void MTask::PrintStatistics(const Int_t lvl) const 225 228 { 226 *fLog << setw(lvl) << " " << Get Name() << " [";227 *fLog << ClassName() << "] \t" << fNumExecutions;228 *fLog << endl; 229 } 229 *fLog << setw(lvl) << " " << GetDescriptor() << "\t"; 230 *fLog << dec << fNumExecutions << endl; 231 } 232 -
trunk/MagicSoft/Mars/mbase/MTask.h
r1020 r1076 73 73 UInt_t GetNumExecutions() { return fNumExecutions; } 74 74 75 Bool_t CallPreProcess(MParList *plist);76 Bool_t CallProcess();77 Bool_t CallPostProcess();75 virtual Bool_t CallPreProcess(MParList *plist); 76 virtual Bool_t CallProcess(); 77 virtual Bool_t CallPostProcess(); 78 78 79 79 const TOrdCollection *GetListOfBranches() const { return fListOfBranches; } 80 80 81 ClassDef(MTask, 0) 81 ClassDef(MTask, 0) //Abstract base class for a task 82 82 }; 83 83 -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r1027 r1076 197 197 // check if the object is in the list or not 198 198 // 199 TObject *MTaskList::FindObject( TObject *obj) const199 TObject *MTaskList::FindObject(const TObject *obj) const 200 200 { 201 201 return fTasks->FindObject(obj); … … 360 360 *fLog << "Execution Statistics: " << endl; 361 361 *fLog << "---------------------" << endl; 362 *fLog << Get Name() << " [" << ClassName() << "]"<< endl;362 *fLog << GetDescriptor() << endl; 363 363 } 364 364 else 365 365 { 366 *fLog << setw(lvl) << " " << GetName() << " ["; 367 *fLog << ClassName() << "]" << endl; 366 *fLog << setw(lvl) << " " << GetDescriptor() << endl; 368 367 } 369 368 … … 380 379 void MTaskList::Print(Option_t *t) const 381 380 { 382 *fLog << "TaskList: " << GetName() << " <" << GetTitle() << ">" << endl;381 *fLog << GetDescriptor() << " <" << GetTitle() << ">" << endl; 383 382 384 383 fTasks->Print(); -
trunk/MagicSoft/Mars/mbase/MTaskList.h
r1014 r1076 40 40 41 41 TObject *FindObject(const char *name) const; 42 TObject *FindObject( TObject *obj) const;42 TObject *FindObject(const TObject *obj) const; 43 43 44 44 Bool_t PreProcess(MParList *pList); -
trunk/MagicSoft/Mars/mbase/MTime.cc
r986 r1076 43 43 fLog->setf(ios::showbase); 44 44 *fLog << "MTime Information: " << hex 45 << " " << setfill('0') << setw(2) << fTimeStamp[0]46 << " " << setfill('0') << setw(2) << fTimeStamp[1] << endl << endl;45 << " " << setfill('0') << setw(2) << fTimeStamp[0] 46 << " " << setfill('0') << setw(2) << fTimeStamp[1] << endl << endl; 47 47 } 48 48 -
trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc
r1028 r1076 116 116 void MWriteRootFile::Print(Option_t *) const 117 117 { 118 cout << "File: " << GetFileName() << endl;118 cout << "File: " << GetFileName() << dec << endl; 119 119 cout << "--------------------------------------------------" << endl; 120 120 -
trunk/MagicSoft/Mars/mbase/Makefile
r1052 r1076 44 44 MWriteAsciiFile.cc \ 45 45 MWriteRootFile.cc \ 46 MGList.cc \ 47 MGTask.cc \ 48 MGGroupFrame.cc \ 46 49 MArray.cc \ 47 50 MArrayB.cc \ -
trunk/MagicSoft/Mars/mgui/MHexagon.cc
r1023 r1076 191 191 // list this hexagon with its attributes 192 192 // 193 void MHexagon::ls( Option_t *)193 void MHexagon::ls(const Option_t *) const 194 194 { 195 195 TROOT::IndentLevel(); … … 247 247 void MHexagon::Print(Option_t *) const 248 248 { 249 cout << "MHexagon - " << GetName() << ": ";249 cout << "MHexagon: "; 250 250 cout << "x=" << fX << "mm y=" << fY << "mm r=" << fD << "mm" << endl; 251 251 -
trunk/MagicSoft/Mars/mgui/MHexagon.h
r1023 r1076 51 51 //virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); 52 52 53 virtual void ls (Option_t *Option="");53 virtual void ls(const Option_t *Option="") const; 54 54 virtual void Paint(Option_t *Option=""); 55 55 virtual void PaintHexagon(Float_t x, Float_t y, Float_t d); -
trunk/MagicSoft/Mars/mhist/MFillH.cc
r1030 r1076 172 172 if (!fH->InheritsFrom("MH")) 173 173 { 174 *fLog << dbginf << fH->Get Name() << " [" << fH->ClassName();175 *fLog << " ]doesn't inherit from MH - cannot be used for MFillH... aborting." << endl;174 *fLog << dbginf << fH->GetDescriptor() << " "; 175 *fLog << "doesn't inherit from MH - cannot be used for MFillH... aborting." << endl; 176 176 return kFALSE; 177 177 } -
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(); -
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r1045 r1076 59 59 60 60 #include "MLog.h" 61 #include "MLogManip.h" 62 61 63 #include "MArrayS.h" 62 64 #include "MArrayB.h" … … 286 288 } 287 289 288 *fLog << "MRawEvtData::Draw: Warning:You must specify either 'GRAPH' or 'HIST'" << endl;290 *fLog << dbginf << "Warning - You must specify either 'GRAPH' or 'HIST'" << endl; 289 291 } 290 292 … … 296 298 void MRawEvtData::DeletePixels(Bool_t flag) 297 299 { 298 const int npix = fRunHeader->GetNumCrates()*fRunHeader->GetNumPixInCrate(); 299 300 if (fArraySize == npix && flag) 301 { 302 fPosInArray = 0; 303 return; 300 if (fRunHeader && flag) 301 { 302 const int npix = fRunHeader->GetNumCrates()*fRunHeader->GetNumPixInCrate(); 303 304 if (fArraySize == npix) 305 { 306 fPosInArray = 0; 307 return; 308 } 304 309 } 305 310 … … 327 332 void MRawEvtData::InitArrays(Bool_t flag) 328 333 { 329 if (flag )334 if (flag && fRunHeader) 330 335 { 331 336 const int npix = fRunHeader->GetNumCrates()*fRunHeader->GetNumPixInCrate();
Note:
See TracChangeset
for help on using the changeset viewer.