Changeset 2421 for trunk/MagicSoft/Mars
- Timestamp:
- 10/22/03 20:59:40 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2419 r2421 1 1 -*-*- END OF LINE -*-*- 2 2003/10/22: Thomas Bretz 3 4 * mars.cc: 5 - replaced TApplication by TGApplication 6 - removed TROOT 7 - reset Batch mode in any case 8 9 * meventdisp/MGCamDisplay.cc: 10 - use new MHCamera::SetLevels to display cleaning levels 11 12 * mhist/MHCamera.[h,cc]: 13 - removed FillLevels - obsolete 14 - added SetLevels instead 15 16 17 2 18 2003/10/21: Wolfgang Wittek 3 19 -
trunk/MagicSoft/Mars/manalysis/MMatrixLoop.cc
r2419 r2421 54 54 // -------------------------------------------------------------------------- 55 55 // 56 Int_t MMatrixLoop::PreProcess(MParList *plist) 57 { 58 fNumRow = 0; 56 59 57 Int_t MMatrixLoop::PreProcess(MParList *plist) 58 { 59 fNumRow = 0; 60 61 return fMatrix ? kTRUE : kFALSE; 62 } 60 return fMatrix ? kTRUE : kFALSE; 61 } 63 62 64 63 // -------------------------------------------------------------------------- … … 71 70 return fMatrix->SetNumRow(fNumRow++); 72 71 } 73 74 75 76 77 78 79 80 81 82 -
trunk/MagicSoft/Mars/mars.cc
r2408 r2421 1 1 #include <TROOT.h> 2 #include <T Application.h>2 #include <TGApplication.h> 3 3 4 4 #include "MAGIC.h" … … 25 25 // 26 26 // started by h. kornmayer january, 3rd 2001 27 static void StartUpMessage() 28 { 29 gLog << all << endl; 27 30 28 void Usage() 31 // 1 2 3 4 5 32 // 12345678901234567890123456789012345678901234567890 33 gLog << "==================================================" << endl; 34 gLog << " MARS V" << MARSVER << endl; 35 gLog << " Magic Analysis and Reconstruction Software" << endl; 36 gLog << " Compiled on <" << __DATE__ << ">" << endl; 37 gLog << " Using ROOT v" << ROOTVER << endl; 38 gLog << "==================================================" << endl; 39 gLog << endl; 40 } 41 42 static void Usage() 29 43 { 30 44 gLog << "Sorry the usage is:" << endl; … … 34 48 gLog << " -v2: errors and warnings <default>" << endl; 35 49 gLog << " -v3: errors, warnings and infos" << endl; 36 }37 38 void StartUpMessage()39 {40 gLog << all << endl;41 42 // 1 2 3 4 543 // 1234567890123456789012345678901234567890123456789044 gLog << "==================================================" << endl;45 gLog << " MARS V" << MARSVER << " " << endl;46 gLog << " Magic Analysis and Reconstruction Software " << endl;47 gLog << " Compiled on <" << __DATE__ << ">" << endl;48 gLog << " Using ROOT v" << ROOTVER << endl;49 gLog << "==================================================" << endl;50 gLog << endl;51 50 } 52 51 … … 59 58 60 59 StartUpMessage(); 60 61 TGApplication app("MarsApp", &argc, argv); 62 if (gROOT->IsBatch()) 63 gROOT->SetBatch(kFALSE); 61 64 62 65 // … … 105 108 MParContainer::Class()->IgnoreTObjectStreamer(); 106 109 107 //108 // initialise ROOT109 //110 TROOT simple("mars", "MARS - Magic Analysis and Reconstruction Software");111 112 TApplication app("MarsApp", &argc, argv);113 114 110 #ifdef HAVE_XPM 115 111 logo.Popdown(); -
trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc
r2381 r2421 280 280 } 281 281 282 TArrayF lvl(2); 283 lvl[0] = clean->GetCleanLvl2(); 284 lvl[1] = clean->GetCleanLvl1(); 285 282 286 fDisplay[0]->SetCamContent(*evt, 0); 283 287 fDisplay[1]->SetCamContent(*ped, 1); 284 288 fDisplay[2]->SetCamContent(val, &use); 285 fDisplay[3]->FillLevels(*evt, *clean); 289 fDisplay[3]->SetCamContent(val, &use); 290 fDisplay[3]->SetLevels(lvl); 286 291 fDisplay[4]->SetCamContent(*ped, 0); 287 292 -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2416 r2421 818 818 // ------------------------------------------------------------------------ 819 819 // 820 // Fill the colors in respect to the cleaning levels 821 // 822 void MHCamera::FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2) 820 // The array must be in increasing order, eg: 2.5, 3.7, 4.9 821 // The values in each bin are replaced by the interval in which the value 822 // fits. In the example we have four intervals 823 // (<2.5, 2.5-3.7, 3.7-4.9, >4.9). Maximum and minimum are set 824 // accordingly. 825 // 826 void MHCamera::SetLevels(const TArrayF &arr) 823 827 { 824 828 if (fNcells<=1) 825 829 return; 826 827 SetCamContent(event, 2);828 830 829 831 for (Int_t i=0; i<fNcells-2; i++) … … 832 834 continue; 833 835 834 if (fArray[i+1]>lvl1) 835 fArray[i+1] = 0; 836 else 837 if (fArray[i+1]>lvl2) 838 fArray[i+1] = 1; 839 else 840 fArray[i+1] = 2; 841 } 842 } 843 844 // ------------------------------------------------------------------------ 845 // 846 // Fill the colors in respect to the cleaning levels 847 // 848 void MHCamera::FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean) 849 { 850 FillLevels(event, clean.GetCleanLvl1(), clean.GetCleanLvl2()); 836 Int_t j = arr.GetSize(); 837 while (j && fArray[i+1]<arr[j-1]) 838 j--; 839 840 fArray[i+1] = j; 841 } 842 SetMaximum(arr.GetSize()); 843 SetMinimum(0); 851 844 } 852 845 -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r2409 r2421 138 138 Double_t GetMaximum() const { return GetMaximum(0/*kTRUE*/); } 139 139 140 void FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2); 141 void FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean); 140 void SetLevels(const TArrayF &arr); 142 141 143 142 void FillRandom(const char *fname, Int_t ntimes=5000) { TH1::FillRandom(fname, ntimes); } … … 152 151 void Reset() { Reset(""); } // *MENU* 153 152 TH1 *DrawCopy() const/* { gPad=NULL; return TH1D::DrawCopy(); }*/; // *MENU* 153 TH1 *DrawCopy(Option_t *o) const { return TH1D::DrawCopy(o); } 154 154 155 155 void Print(Option_t *) const; -
trunk/MagicSoft/Mars/mhist/MHMatrix.cc
r2419 r2421 126 126 // 127 127 Bool_t MHMatrix::SetNumRow(Int_t row) 128 { 129 if (row>=fM.GetNrows() || row<0) return kFALSE; 130 fRow = row; 131 return kTRUE; 132 } 133 128 { 129 if (row>=fM.GetNrows() || row<0) return kFALSE; 130 fRow = row; 131 return kTRUE; 132 } 134 133 135 134 // -------------------------------------------------------------------------- … … 1191 1190 return kTRUE; 1192 1191 } 1193
Note:
See TracChangeset
for help on using the changeset viewer.