Changeset 3141 for trunk/MagicSoft/Mars
- Timestamp:
- 02/13/04 16:04:33 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3140 r3141 8 8 2004/02/13: Wolfgang Wittek 9 9 10 * mcalib/MCalibrateData.[h,cc] 11 - new class; 12 like MCalibrate, but in ReInit it fills the MPedPhot container 13 using informations from MPedestal, MExtracteSignalCam and 14 MCalibrationCam 15 16 * mcalib/Makefile 17 CalibLinkDef.h 18 - added MCalibrateData 19 20 * manalysis/MPedestalWorkaround.[h,cc] 21 - create MMcEvt container and fill with theta = 10.0 22 - set pedestalRMS = 0. if it is > 10.0 23 24 * manalysis/MSupercuts.[h,cc] 25 - change default values of parameters 26 27 * manalysis/MSupercutsCalc.[h,cc] 28 - change dNOMLOGSIZE from 4.1 to 5.0 29 30 31 * mhist/MHBlindPixels.[h,cc] 32 - change MPedestalCam to MPedPhotCam 33 34 * mhist/MHSigmaTheta.[h,cc] 35 - automatic binning for pixel number doesn't work 36 use default binning 10 * mcalib/MCalibrateData.[h,cc] 11 - new class; 12 like MCalibrate, but in ReInit it fills the MPedPhot container 13 using informations from MPedestal, MExtracteSignalCam and 14 MCalibrationCam 15 16 * mcalib/Makefile, mcalib/CalibLinkDef.h 17 - added MCalibrateData 18 19 * manalysis/MPedestalWorkaround.[h,cc] 20 - create MMcEvt container and fill with theta = 10.0 21 - set pedestalRMS = 0. if it is > 10.0 22 23 * manalysis/MSupercuts.[h,cc] 24 - change default values of parameters 25 26 * manalysis/MSupercutsCalc.[h,cc] 27 - change dNOMLOGSIZE from 4.1 to 5.0 28 29 * mhist/MHBlindPixels.[h,cc] 30 - change MPedestalCam to MPedPhotCam 31 32 * mhist/MHSigmaTheta.[h,cc] 33 - automatic binning for pixel number doesn't work 34 use default binning 35 37 36 38 37 … … 77 76 - pipe file version number to MRawEvtHeader::ReadEvt 78 77 - create fake time for file-version<3 78 79 * macros/readMagic.C: 80 - changed to use MInteractiveTask 79 81 80 82 -
trunk/MagicSoft/Mars/macros/readMagic.C
r2624 r3141 46 46 } 47 47 48 MHCamera display[4]; 49 50 TCanvas *c; 51 MParList *fParList; 52 MTaskList *fTaskList; 53 54 Int_t PreProcess(MParList *plist) 55 { 56 fParList = plist; 57 fTaskList = (MTaskList*)plist->FindObject("MTaskList"); 58 59 MGeomCam *geomcam = (MGeomCam*)plist->FindObject("MGeomCam"); 60 61 c = new TCanvas("Events", "Real Events", 600, 600); 62 c->SetBorderMode(0); 63 c->Divide(2,2); 64 for (int i=0; i<4; i++) 65 { 66 display[i].SetGeometry(*geomcam); 67 c->cd(i+1); 68 display[i].Draw(); 69 gPad->cd(1); 70 plist->FindObject("MHillas")->Draw(); 71 } 72 return kTRUE; 73 } 74 75 Int_t Process() 76 { 77 MReadMarsFile *read = (MReadMarsFile*)fTaskList->FindObject("MRead"); 78 MClone *clone = (MClone*)fTaskList->FindObject("MClone"); 79 MImgCleanStd *clean = (MImgCleanStd*)fTaskList->FindObject("MImgCleanStd"); 80 MGeomCam *geom = (MGeomCam*)fParList->FindObject("MGeomCam"); 81 82 cout << "Event #" << read->GetNumEntry() << ":" << endl; 83 84 display[0].SetCamContent(*(MCerPhotEvt*)clone->GetClone()); 85 display[1].SetCamContent(*(MCerPhotEvt*)fParList->FindObject("MCerPhotEvt")); 86 display[2].SetCamContent(*(MCameraData*)fParList->FindObject("MCameraData")); 87 display[3].SetCamContent(*(MCameraData*)fParList->FindObject("MCameraData")); 88 89 TArrayF lvl(2); 90 lvl[0] = clean->GetCleanLvl2(); 91 lvl[1] = clean->GetCleanLvl1(); 92 display[3].SetLevels(lvl); 93 94 for (int i=1; i<=4; i++) 95 { 96 c->GetPad(i)->GetPad(1)->Modified(); 97 c->GetPad(i)->GetPad(1)->Update(); 98 } 99 100 ((MHillas*)fParList->FindObject("MHillas"))->Print(*geom); 101 ((MHillasExt*)fParList->FindObject("MHillasExt"))->Print(*geom); 102 fParList->FindObject("MNewImagePar")->Print(); 103 104 return HandleInput(); 105 } 106 107 Int_t PostProcess() 108 { 109 delete c; 110 } 111 48 112 void readMagic(const char *fname="../Proton*.root") 49 { 50 MParList plist; 113 { 114 MParList plist; 115 MTaskList tlist; 51 116 52 MHillas hillas;53 MHillasExt hillasext;54 MNewImagePar newimgpar;55 MTaskList tlist;56 57 plist.AddToList(&hillas);58 plist.AddToList(&hillasext);59 plist.AddToList(&newimgpar);60 117 plist.AddToList(&tlist); 61 118 … … 71 128 MMcPedestalCopy pcopy; 72 129 MMcPedestalNSBAdd pnsb; 73 MCerPhot Calcncalc;130 MCerPhotAnal2 ncalc; 74 131 MBlindPixelCalc blind; 75 132 blind.SetUseInterpolation(); … … 77 134 MImgCleanStd clean; 78 135 MHillasCalc hcalc; 136 MTaskInteractive mytask; 137 138 mytask.SetPreProcess(PreProcess); 139 mytask.SetProcess(Process); 79 140 80 141 tlist.AddToList(&read); … … 89 150 tlist.AddToList(&clean); 90 151 tlist.AddToList(&hcalc); 152 tlist.AddToList(&mytask); 91 153 92 154 MEvtLoop evtloop; 93 155 evtloop.SetParList(&plist); 94 156 95 if (!evtloop. PreProcess())157 if (!evtloop.Eventloop()) 96 158 return; 97 159 98 MGeomCam *geomcam = (MGeomCam*)plist->FindObject("MGeomCam"); 99 100 MHCamera display[4]; 101 TCanvas c("Events", "Real Events", 600, 600); 102 c.SetBorderMode(0); 103 c.Divide(2,2); 104 for (int i=0; i<4; i++) 105 { 106 display[i].SetGeometry(*geomcam); 107 c.cd(i+1); 108 display[i].Draw(); 109 gPad->cd(1); 110 hillas.Draw(); 111 } 112 113 // Use this if you don't want the event to be autoscaled 114 //display.SetMinimum(0); 115 //display.SetMaximum(100); 116 117 while (tlist.Process()) 118 { 119 cout << "Event #" << read.GetNumEntry() ":" << endl; 120 121 display[0].SetCamContent(*(MCerPhotEvt*)clone.GetClone()); 122 display[1].SetCamContent(*(MCerPhotEvt*)plist.FindObject("MCerPhotEvt")); 123 display[2].SetCamContent(*(MCamEvent*)plist.FindObject("MCameraData")); 124 display[3].SetCamContent(*(MCamEvent*)plist.FindObject("MCameraData")); 125 TArrayF lvl(2); 126 lvl[0] = clean.GetCleanLvl2(); 127 lvl[1] = clean.GetCleanLvl1(); 128 display[3].SetLevels(lvl); 129 130 for (int i=1; i<=4; i++) 131 { 132 c.GetPad(i)->GetPad(1)->Modified(); 133 c.GetPad(i)->GetPad(1)->Update(); 134 } 135 136 hillas.Print(*geomcam); 137 hillasext.Print(*geomcam); 138 newimgpar.Print(); 139 140 if (!HandleInput()) 141 break; 142 } 143 144 evtloop.PostProcess(); 160 tlist.PrintStatistics(); 145 161 } 146 162
Note:
See TracChangeset
for help on using the changeset viewer.