- Timestamp:
- 06/12/08 14:00:47 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/plotdb.C
r8929 r8938 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1. 39 2008-06-08 12:55:22tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.40 2008-06-12 13:00:44 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 21 21 ! Author(s): Daniela Dorner, 05/2005 <mailto:dorner@astro.uni-wuerzburg.de> 22 22 ! 23 ! Copyright: MAGIC Software Development, 2000-200 623 ! Copyright: MAGIC Software Development, 2000-2008 24 24 ! 25 25 ! … … 547 547 plot.SetDescription("Mean Signal inner Camera;S_{I} [phe]", "SignalI"); 548 548 plot.Plot("Calibration.fMeanSignalInner", 0, 7.0, 0.05); 549 plot.SetDescription("Mean PulsePosCheck (falling edge) inner camera;T [sl]", "ChkPos"); 549 550 plot.SetDescription("Mean PulsePosCheck (maximum slice) inner camera;T [sl]", "ChkPos"); 550 551 plot.Plot("Calibration.fPulsePosCheckMean", 1, 50.0, 0.1); 551 plot.SetDescription("Rms PulsePosCheck ( falling edge) inner camera;T [sl]", "ChkRms");552 plot.SetDescription("Rms PulsePosCheck (maximum slice) inner camera;T [sl]", "ChkRms"); 552 553 plot.Plot("Calibration.fPulsePosCheckRms", 0, 12.0, 0.1); 553 plot.SetDescription("Mean calibrated PulsePos ;T", "PulPos");554 plot.SetDescription("Mean calibrated PulsePos (as extracted);T [ns]", "PulPos"); 554 555 plot.Plot("Calibration.fPulsePosMean", 1, 40.0, 0.1); 555 plot.SetDescription("Rms calibrated PulsePos ;T", "PulRms");556 plot.SetDescription("Rms calibrated PulsePos (as extracted);T [ns]", "PulRms"); 556 557 plot.Plot("Calibration.fPulsePosRms", 0, 3.0, 0.02); 558 559 plot.SetDescription("Average rate of events with lvl1 trigger;R [Hz]", "RateTrig"); 560 plot.Plot("Calibration.fRateTrigEvts", 0, 500, 5); 561 plot.SetDescription("Average rate of events with only Sum trigger;R [Hz]", "RateSum"); 562 plot.Plot("Calibration.fRateSumEvts", 0, 1500, 5); 563 //plot.SetDescription("Ratio of only Sum to Lvl1 triggers;R [Hz]", "RateRatio"); 564 //plot.Plot("100*Calibration.fRateSumEvts/Calibration.fRateTrigEvts", 0, 500, 1); 565 plot.SetDescription("Average rate of events with calibration trigger;R [Hz]", "RateCal"); 566 plot.Plot("Calibration.fRateCalEvts", 0, 50, 1); 567 plot.SetDescription("Average rate of events with pedestal trigger;R [Hz]", "RatePed"); 568 plot.Plot("Calibration.fRatePedEvts", 0, 50, 1); 569 plot.SetDescription("Average rate of events with ped+cosmics trigger;R [Hz]", "RatePT"); 570 plot.Plot("Calibration.fRatePedTrigEvts", 0, 3.5, 0.1); 571 plot.SetDescription("Average rate of events without trigger pattern;R [Hz]", "Rate0"); 572 plot.Plot("Calibration.fRateNullEvts", 0, 3.5, 0.1); 573 plot.SetDescription("Average rate of unknown trigger pattern;R [Hz]", "RateUnknown"); 574 plot.Plot("Calibration.fRateUnknownEvts", 0, 3.5, 0.1); 557 575 558 576 plot.SetDescription("Hi-/Lo-Gain offset;", "PulOff"); … … 586 604 plot.SetDescription("Datarate [Hz]", "Rate"); 587 605 plot.Plot("Star.fDataRate", 0, 600, 10); 588 plot.SetDescription("Maximum Humidity [%]", "Hum"); 606 plot.SetDescription("Average Cloudiness [%]", "AvgClouds"); 607 plot.Plot("Star.fAvgCloudiness", 0, 100, 1); 608 plot.SetDescription("RMS Cloudiness [%]", "RmsClouds"); 609 plot.Plot("Star.fRmsCloudiness", 0, 100, 1); 610 plot.SetDescription("Sky Temperature [K]", "SkyTemp"); 611 plot.Plot("Star.fAvgTempSky", 200, 300, 1); 612 plot.SetDescription("Maximum Humidity [%]", "MaxHum"); 589 613 plot.Plot("Star.fMaxHumidity", 0, 100, 1); 614 plot.SetDescription("Average Humidity [%]", "AvgHum"); 615 plot.Plot("Star.fAvgHumidity", 0, 100, 1); 590 616 plot.SetDescription("Average Temperature [\\circ C];T [\\circ C]", "Temp"); 591 617 plot.Plot("Star.fAvgTemperature", -5, 25, 1); -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r8936 r8938 1049 1049 1050 1050 // Remove the canvas from the global list to make sure it is 1051 // not found by gROOT->FindOBject 1052 gROOT->GetListOfCanvases()->Remove(c); 1051 // not found by gROOT->FindObject 1052 //gROOT->GetListOfCanvases()->Remove(c); 1053 //gROOT->GetListOfCleanups()->Add(c); 1053 1054 1054 1055 return *c; … … 1081 1082 1082 1083 // Remove the canvas from the global list to make sure it is 1083 // not found by gROOT->FindOBject 1084 gROOT->GetListOfCanvases()->Remove(&c); 1084 // not found by gROOT->FindObject 1085 //gROOT->GetListOfCanvases()->Remove(&c); 1086 //gROOT->GetListOfCleanups()->Add(&c); 1085 1087 1086 1088 TGComboBox *box = (TGComboBox*)fList->FindWidget(kTabs); … … 1332 1334 if (!c) 1333 1335 return; 1336 1337 // Repair the "Workaround" being in the RecursiveRemove list 1338 // but not in a list checked by gROOT->FindObject 1339 //gROOT->GetListOfCleanups()->Remove(c); 1340 //gROOT->GetListOfCanvases()->Add(c); 1341 1342 // FIXME: Due to our workaround this is necessary for a successfull deletion 1343 //c->cd(); 1334 1344 1335 1345 const TString name(c->GetName()); -
trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc
r8935 r8938 317 317 { 318 318 pad->GetPad(1)->GetPad(2)->cd(1); 319 if ( (hx=(TH1D*)gPad->FindObject("EnergyEst_ez")))319 if (gPad->FindObject("EnergyEst_ez")) 320 320 fHEnergy.Project3D("ez"); 321 321 322 322 pad->GetPad(1)->GetPad(2)->cd(2); 323 hx = (TH1D*)fHResolutionEst.ProjectionY("Resolution", -1, -1, "e"); 324 TPaveStats *stats = dynamic_cast<TPaveStats*>(hx->FindObject("stats")); 325 if (stats) 323 if (gPad->FindObject("ResEnergyEst_py")) 326 324 { 327 stats->SetBit(BIT(17)); // TStyle.cxx: kTakeStyle=BIT(17) 328 stats->SetX1NDC(0.63); 329 stats->SetY1NDC(0.68); 325 hx = (TH1D*)fHResolutionEst.ProjectionY("_py", -1, -1, "e"); 326 TPaveStats *stats = dynamic_cast<TPaveStats*>(hx->FindObject("stats")); 327 if (stats) 328 { 329 stats->SetBit(BIT(17)); // TStyle.cxx: kTakeStyle=BIT(17) 330 stats->SetX1NDC(0.63); 331 stats->SetY1NDC(0.68); 332 } 333 334 hx->Fit("gaus", "Q", "", -1.0, 0.25); 335 hx->GetFunction("gaus")->SetLineColor(kBlue); 336 hx->GetFunction("gaus")->SetLineWidth(2); 337 gPad=NULL; 338 gStyle->SetOptFit(101); 330 339 } 331 332 hx->Fit("gaus", "Q", "", -1.0, 0.25);333 hx->GetFunction("gaus")->SetLineColor(kBlue);334 hx->GetFunction("gaus")->SetLineWidth(2);335 gPad=NULL;336 gStyle->SetOptFit(101);337 340 } 338 341 } -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r8933 r8938 635 635 MHCamEvent evtR( 4, "HiLoCal", "Hi-/Lo-Gain ratio;;Ratio"); 636 636 MHCamEvent evtO( 7, "HiLoOff", "Lo-/Hi-Gain Offset;;Offset"); 637 MHCamEvent evtC( 4, "CalPos", "Extracted pulse position of calibration pulses;;T [sl]"); 638 //MHCamEvent evt2(0, "Extra'd", "Extracted Calibration Signal;;S [cnts/sl]"); 637 639 evt2.SetErrorSpread(kFALSE); 638 640 evt5.SetErrorSpread(kFALSE); … … 649 651 // MFillH fill7(&evt7, "MSignalCam", "FillTimes"); 650 652 MFillH fill8(&evt8, "MCalibConstCam", "FillConv"); 651 MFillH fill9(&evt9, "MSignalCam", "FillPulse ");653 MFillH fill9(&evt9, "MSignalCam", "FillPulsePos"); 652 654 MFillH fillR(&evtR, "MExtractedSignalCam", "FillHiLoCal"); 653 655 MFillH fillO(&evtO, "MArrivalTimeCam", "FillHiLoOff"); 656 MFillH fillC(&evtC, "MArrivalTimeCam", "FillCalPos"); 657 //MFillH fill2(&evt2, "MExtractedSignalCam", "FillExtractedSignal"); 654 658 655 659 MHVsTime histbp("MBadPixelsCam.GetNumUnsuitable"); … … 804 808 tlist4.AddToList(&recalc); // MCalibrationRelTimeCam 805 809 810 tlist4.AddToList(&fillC); // FillCalPos 811 806 812 //tlist3.AddToList(&writecal); // MWriteRootFile 807 813 } -
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r8704 r8938 18 18 ! Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 720 ! Copyright: MAGIC Software Development, 2000-2008 21 21 ! 22 22 ! … … 263 263 264 264 if (str.BeginsWith("graph")) 265 if (str.Length()>5) 266 sscanf(&str[5], "%d", &id); 265 sscanf(str.Data()+5, "%d", &id); 267 266 if (str.BeginsWith("hist")) 268 if (str.Length()>4) 269 sscanf(&str[4], "%d", &id); 267 sscanf(str.Data()+4, "%d", &id); 270 268 271 269 MRawEvtPixelIter pix(this); … … 299 297 graphhi->SetPoint(graphhi->GetN(), i+nh, GetSample(logains, i)); 300 298 301 graphhi->SetMaximum( 256);299 graphhi->SetMaximum(GetMax()+0.5); 302 300 graphhi->SetMinimum(0); 303 301 … … 307 305 TH1F *histhi = graphhi->GetHistogram(); 308 306 histhi->SetMinimum(0); 309 histhi->SetMaximum( 255);307 histhi->SetMaximum(GetMax()+0.5); 310 308 311 309 histhi->SetXTitle("Time/FADC Slices"); … … 320 318 *fLog << inf << "Drawing Histogram of Pixel with Idx #" << dec << pix.GetPixelId() << " to " << gPad << endl; 321 319 322 TH1F *histh = new TH1F(name, "FADC Samples", nh , -0.5, nh-.5);320 TH1F *histh = new TH1F(name, "FADC Samples", nh+nl, -0.5, nh+nl-.5); 323 321 histh->SetMinimum(0); 324 histh->SetMaximum( 255);322 histh->SetMaximum(GetMax()+0.5); 325 323 histh->SetXTitle("Time [FADC Slices]"); 326 324 histh->SetYTitle("Signal [FADC Units]"); … … 329 327 histh->Fill(i, GetSample(higains, i)); 330 328 for (int i=0; i<nl; i++) 331 histh->Fill(i , GetSample(logains, i));329 histh->Fill(i+nl, GetSample(logains, i)); 332 330 histh->SetBit(kCanDelete); 333 331 histh->Draw(same ? "same" : ""); … … 613 611 614 612 evt.fConnectedPixels = fConnectedPixels; 615 } 613 614 evt.fNumBytesPerSample = fNumBytesPerSample; 615 } -
trunk/MagicSoft/Mars/mraw/MRawEvtData.h
r8571 r8938 47 47 UInt_t GetSample(const void *ptr, Int_t n) // Helper for Draw 48 48 { 49 switch ( n)49 switch (fNumBytesPerSample) 50 50 { 51 case 1: return *(Byte_t*)ptr;52 case 2: return *(UShort_t*)ptr;53 case 3: return *(Int_t*)ptr;51 case 1: return reinterpret_cast<const Byte_t*>(ptr)[n]; 52 case 2: return reinterpret_cast<const UShort_t*>(ptr)[n]; 53 case 3: return reinterpret_cast<const UInt_t*>(ptr)[n]; 54 54 } 55 55 return 0; … … 83 83 UShort_t GetNumBytesPerSample() const { return fNumBytesPerSample; } 84 84 UInt_t GetScale() const { return 1<<((fNumBytesPerSample-1)*8); } 85 UInt_t GetMax() const { return (UInt_t)(~1)>>((4-fNumBytesPerSample)*8); } 85 86 86 87 void ReadPixel(istream &fin, Int_t npix);
Note:
See TracChangeset
for help on using the changeset viewer.