Changeset 9325
- Timestamp:
- 02/12/09 00:47:43 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9324 r9325 36 36 - added some getter 37 37 38 * mhist/MHEvent. cc:38 * mhist/MHEvent.[h,cc]: 39 39 - some improvements to output 40 - implemented display for trigger pattern 41 42 * mtrigger/MTriggerPattern.[h,cc]: 43 - added Copy-function 44 45 * mhist/Makefile: 46 - added -I../mtrigger 40 47 41 48 * mmc/MMcEvtBasic.[h,cc]: -
trunk/MagicSoft/Mars/NEWS
r9317 r9325 16 16 17 17 * added support for Arehucas Version >= 200812140 18 19 ;mars 20 21 * The display now also displays the trigger pattern 18 22 19 23 ;ceres -
trunk/MagicSoft/Mars/mhist/MHEvent.cc
r9313 r9325 48 48 #include <TStyle.h> 49 49 #include <TCanvas.h> 50 #include <TPaveText.h> 50 51 51 52 #include "MLog.h" … … 59 60 #include "MTaskList.h" 60 61 #include "MParList.h" 62 #include "MGeomCam.h" 61 63 #include "MSignalCam.h" 62 64 #include "MRawEvtHeader.h" … … 64 66 #include "MRawEvtData.h" 65 67 #include "MImgCleanStd.h" 68 #include "MTriggerPattern.h" 66 69 67 70 ClassImp(MHEvent); … … 77 80 fTitle = "Single Event display task"; 78 81 79 fClone = new MRawEvtData("MHEventData"); 82 fClone = new MRawEvtData("MHEventData"); 83 fTrigCpy = new MTriggerPattern; 80 84 } 81 85 … … 88 92 89 93 delete fClone; 94 delete fTrigCpy; 90 95 } 91 96 … … 97 102 fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt"); 98 103 fTime = (MTime*)plist->FindObject("MTime"); 104 fTrigger = (MTriggerPattern*)plist->FindObject("MTriggerPattern"); 99 105 100 106 fRawEvtData = (MRawEvtData*)plist->FindObject("MRawEvtData"); … … 228 234 return kERROR; 229 235 } 236 237 if (fTrigger) 238 fTrigger->Copy(*fTrigCpy); 230 239 231 240 if (fRawEvtData) … … 312 321 } 313 322 314 void MHEvent::Paint(Option_t * )323 void MHEvent::Paint(Option_t *o) 315 324 { 316 325 TVirtualPad *pad = gPad; 317 326 318 pad->GetPad(2)->cd(1); 319 if (gPad->FindObject("Proj")) 320 { 321 TH1 *h=fHist->Projection("Proj"); 322 if (h->GetMaximum()>0) 323 gPad->SetLogy(); 324 } 325 326 pad->GetPad(2)->cd(2); 327 if (gPad->FindObject("ProfRad")) 328 fHist->RadialProfile("ProfRad"); 329 330 pad->GetPad(2)->cd(3); 331 if (gPad->FindObject("ProfAz")) 332 fHist->AzimuthProfile("ProfAz"); 327 if (TString(o).IsNull()) 328 { 329 pad->GetPad(2)->cd(1); 330 if (gPad->FindObject("Proj")) 331 { 332 TH1 *h=fHist->Projection("Proj"); 333 if (h->GetMaximum()>0) 334 gPad->SetLogy(); 335 } 336 337 pad->GetPad(2)->cd(2); 338 if (gPad->FindObject("ProfRad")) 339 fHist->RadialProfile("ProfRad"); 340 341 pad->GetPad(2)->cd(3); 342 if (gPad->FindObject("ProfAz")) 343 fHist->AzimuthProfile("ProfAz"); 344 } 345 346 if (TString(o)=="1") 347 { 348 const Double_t r = fHist->GetGeometry()->GetMaxRadius(); 349 TPaveText s4(0.82*r, -r, 0.90*r, -0.92*r, "br"); 350 TPaveText s3(0.74*r, -r, 0.82*r, -0.92*r, "br"); 351 TPaveText s2(0.66*r, -r, 0.74*r, -0.92*r, "br"); 352 TPaveText s1(0.58*r, -r, 0.66*r, -0.92*r, "br"); 353 TPaveText s0(0.50*r, -r, 0.58*r, -0.92*r, "br"); 354 s0.SetBorderSize(1); 355 s1.SetBorderSize(1); 356 s2.SetBorderSize(1); 357 s3.SetBorderSize(1); 358 s4.SetBorderSize(1); 359 s0.AddText("P"); 360 s1.AddText("C"); 361 s2.AddText("1"); 362 s3.AddText("2"); 363 s4.AddText("S"); 364 365 const Byte_t pat = fTrigCpy->GetUnprescaled(); 366 367 s0.SetFillColor(pat&MTriggerPattern::kPedestal ? kBlue : kWhite); 368 s1.SetFillColor(pat&MTriggerPattern::kCalibration ? kBlue : kWhite); 369 s2.SetFillColor(pat&MTriggerPattern::kTriggerLvl1 ? kBlue : kWhite); 370 s3.SetFillColor(pat&MTriggerPattern::kTriggerLvl2 ? kBlue : kWhite); 371 s4.SetFillColor(pat&MTriggerPattern::kSumTrigger ? kBlue : kWhite); 372 373 s0.Paint(); 374 s1.Paint(); 375 s2.Paint(); 376 s3.Paint(); 377 s4.Paint(); 378 } 333 379 } 334 380 … … 352 398 gPad->SetBorderMode(0); 353 399 fHist->Draw(); 400 401 AppendPad("1"); 354 402 355 403 pad->cd(2); … … 383 431 h->Draw(); 384 432 } 433 -
trunk/MagicSoft/Mars/mhist/MHEvent.h
r9224 r9325 16 16 class MSignalCam; 17 17 class MImgCleanStd; 18 class MTriggerPattern; 18 19 19 20 class MHEvent : public MH … … 30 31 31 32 private: 32 MRawEvtData *fRawEvtData; //!33 MRawRunHeader *fRawRunHeader; //!34 MRawEvtHeader *fRawEvtHeader; //!33 MRawEvtData *fRawEvtData; //! 34 MRawRunHeader *fRawRunHeader; //! 35 MRawEvtHeader *fRawEvtHeader; //! 35 36 36 MTime *fTime; //! 37 MMcEvt *fMcEvt; //! 38 MMcTrig *fMcTrig; //! 39 MSignalCam *fCerPhotEvt; //! 40 MImgCleanStd *fImgCleanStd; //! 37 MTime *fTime; //! 38 MMcEvt *fMcEvt; //! 39 MMcTrig *fMcTrig; //! 40 MSignalCam *fCerPhotEvt; //! 41 MImgCleanStd *fImgCleanStd; //! 42 MTriggerPattern *fTrigger; //! 41 43 42 MRawEvtData *fClone; //-> 44 MRawEvtData *fClone; //-> 45 MTriggerPattern *fTrigCpy; //-> 43 46 44 47 MHCamera *fHist; … … 66 69 void Draw(Option_t *o=""); 67 70 void Paint(Option_t *o=""); 68 71 69 72 ClassDef(MHEvent, 1) 70 73 }; -
trunk/MagicSoft/Mars/mhist/Makefile
r8614 r9325 22 22 -I../mgui -I../mgeom -I../mdata -I../mfilter -I../mimage \ 23 23 -I../mpointing -I../mmc -I../mastro -I../msignal \ 24 -I../mbadpixels -I../mcalib -I../mreport 24 -I../mbadpixels -I../mcalib -I../mreport -I../mtrigger 25 25 26 26 SRCFILES = MHEvent.cc \ … … 32 32 MHCamera.cc \ 33 33 MHRate.cc \ 34 MHWeather.cc 34 MHWeather.cc \ 35 MHQuality.cc 35 36 36 37 # MHFadcPix.cc \ -
trunk/MagicSoft/Mars/mtrigger/MTriggerPattern.cc
r9157 r9325 151 151 } 152 152 153 void MTriggerPattern::Copy(TObject &obj) const 154 { 155 static_cast<MTriggerPattern&>(obj).fPrescaled=fPrescaled; 156 static_cast<MTriggerPattern&>(obj).fUnprescaled=fUnprescaled; 157 } 158 153 159 void MTriggerPattern::Print(Option_t *) const 154 160 { -
trunk/MagicSoft/Mars/mtrigger/MTriggerPattern.h
r9158 r9325 30 30 31 31 void Print(Option_t *) const; 32 void Copy(TObject &obj) const { static_cast<MTriggerPattern&>(obj).fPrescaled=fPrescaled; static_cast<MTriggerPattern&>(obj).fUnprescaled=fUnprescaled; } 32 33 33 34 void Reset() { fPrescaled=0; fUnprescaled=0; }
Note:
See TracChangeset
for help on using the changeset viewer.