Changeset 18282 for branches/MarsGapdTimeJitter/fact
- Timestamp:
- 08/18/15 10:28:44 (9 years ago)
- Location:
- branches/MarsGapdTimeJitter
- Files:
-
- 8 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/MarsGapdTimeJitter
- Property svn:mergeinfo changed
-
branches/MarsGapdTimeJitter/fact/analysis/callisto.C
r17894 r18282 1 1 #include "MLogManip.h" 2 2 3 int callisto(const char *seqfile="seq/2012/01/23/20120123_023.seq", const char *outpath = "output", bool use_delays=false) 3 int callisto(const char *seqfile="seq/2012/01/23/20120123_023.seq", const char *outpath = "output", 4 // TString drstime = "/gpfs0/fact/processing/drs_time_calib/20111115.time.drs.fits", 5 const char *drstime = "/gpfs0/fact/processing/drs_time_calib/20111115.time.drs.fits", 6 const char *delays="resources/delays-20150217.txt") 4 7 { 5 8 // ====================================================== … … 107 110 } 108 111 109 TString timfile = drs.GetFileName(0, MSequence::kFitsDat);110 112 TString drs1024 = drs.GetFileName(0, MSequence::kFitsDrs); 111 113 TString pedfile = seq.GetFileName(0, MSequence::kFitsPed); … … 115 117 gLog << "DRS calib 300: " << drsfile << '\n'; 116 118 gLog << "DRS calib 1024: " << drs1024 << "\n\n"; 119 gLog << "DRS calib Time: " << drstime << "\n\n"; 120 121 MDrsCalibrationTime drscalibtime; 122 if (!drscalibtime.ReadFits(drstime))) 123 return 5; 117 124 118 125 MDrsCalibration drscalib300; 119 126 if (!drscalib300.ReadFits(drsfile.Data())) 120 return 5;127 return 6; 121 128 122 129 MDrsCalibration drscalib1024; 123 130 if (!drscalib1024.ReadFits(drs1024.Data())) 124 return 6;131 return 7; 125 132 126 133 gLog << all; 127 gLog << "Time calibration : " << timfile << '\n';128 134 gLog << "Pedestal file: " << pedfile << '\n'; 129 135 gLog << "Light Pulser file: " << calfile << '\n' << endl; … … 135 141 { 136 142 gLog << err << "ERROR - Sequence valid but without files." << endl; 137 return 7;143 return 8; 138 144 } 139 145 iter.Print(); … … 195 201 // hrate.DefaultLabelY("ERROR"); 196 202 197 MDrsCalibrationTime timecam;203 // MDrsCalibrationTime timecam; 198 204 199 205 gStyle->SetOptFit(kTRUE); 200 206 201 207 // ====================================================== 202 208 /* 203 209 gLog << endl; 204 210 gLog.Separator("Processing DRS timing calibration run"); … … 240 246 if (!loop0.GetDisplay()) 241 247 return 9; 242 248 */ 243 249 /* 244 250 MHDrsCalibrationT *t = (MHDrsCalibrationT*)plist4.FindObject("MHDrsCalibrationT"); … … 258 264 plist1.AddToList(&drscalib300); 259 265 plist1.AddToList(&badpixels); 260 plist1.AddToList(& timecam);266 plist1.AddToList(&drscalibtime); 261 267 262 268 MEvtLoop loop1("DetermineCalConst"); … … 348 354 tlist1.AddToList(&fill1d); 349 355 350 if (!loop1.Eventloop(max1)) 351 return 10; 352 353 if (!loop1.GetDisplay()) 354 return 11; 355 356 if (use_delays) 357 timecam.SetDelays(*evt1h.GetHist()); 356 //if (!loop1.Eventloop(max1)) 357 // return 10; 358 359 //if (!loop1.GetDisplay()) 360 // return 11; 361 362 if (delays) 363 { 364 TGraph g(delays); 365 if (g.GetN()!=1440) 366 { 367 gLog << err << "Error reading file " << delays << endl; 368 return 41; 369 } 370 371 drscalibtime.SetDelays(g); 372 } 358 373 359 374 // ====================================================== … … 368 383 plist3.AddToList(&drscalib300); 369 384 plist3.AddToList(&badpixels); 370 plist3.AddToList(& timecam);385 plist3.AddToList(&drscalibtime); 371 386 372 387 MEvtLoop loop3("DetermineRndmPed"); … … 442 457 plist4.AddToList(&drscalib300); 443 458 plist4.AddToList(&badpixels); 444 plist4.AddToList(& timecam);459 plist4.AddToList(&drscalibtime); 445 460 446 461 MEvtLoop loop4("DetermineExtractedPed"); … … 510 525 plist5.AddToList(&drscalib300); 511 526 plist5.AddToList(&badpixels); 512 plist5.AddToList(& timecam);527 plist5.AddToList(&drscalibtime); 513 528 514 529 MEvtLoop loop5("CalibratingData"); -
branches/MarsGapdTimeJitter/fact/analysis/callisto_data.C
r18078 r18282 90 90 // ------------------------------------------------------- 91 91 92 TFile file(drstime);93 if ( file.IsZombie())92 MDrsCalibrationTime timecam; 93 if (!timecam.ReadFits(drstime)) 94 94 { 95 gLog << err << "ERROR - Could not open" << drstime << endl;95 gLog << err << "ERROR - Could not get MDrsCalibrationTime from " << drstime << endl; 96 96 return 21; 97 97 } 98 98 99 MDrsCalibrationTime *timecam = 0; 100 file.GetObject("MDrsCalibrationTime", timecam); 101 if (!timecam) 99 if (delays) 102 100 { 103 gLog << err << "ERROR - Could not get MDrsCalibrationTime from " << drstime << endl; 104 return 22; 101 TGraph g(delays); 102 if (g.GetN()!=1440) 103 { 104 gLog << err << "Error reading file " << delays << endl; 105 return 22; 106 } 107 108 timecam.SetDelays(g); 105 109 } 106 110 … … 113 117 // ------------------------------------------------------- 114 118 115 //if (use_delays) 116 // timecam.SetDelays(*evt1h.GetHist()); 119 if (delays) 120 { 121 TGraph g(delays); 122 if (g.GetN()!=1440) 123 { 124 gLog << err << "Error reading file " << delays << endl; 125 return 41; 126 } 127 128 timecam.SetDelays(g); 129 } 117 130 118 131 // ------------------------------------------------------- … … 194 207 plist5.AddToList(&drscalib300); 195 208 plist5.AddToList(&badpixels); 196 plist5.AddToList( timecam);209 plist5.AddToList(&timecam); 197 210 198 211 MEvtLoop loop5("CalibratingData"); -
branches/MarsGapdTimeJitter/fact/plots/plotratescan.C
r15243 r18282 129 129 { 130 130 TString query; 131 query += "SELECT fTimeBegin, fTimeEnd, fVoltageIsOn, fOvervoltage, fCurrentMedMean, fNight ";131 query += "SELECT fTimeBegin, fTimeEnd, fVoltageIsOn, fOvervoltage, fCurrentMedMean, fNight, fAzMin, fAzMax, fZdMin, fZdMax "; 132 132 query += "FROM Ratescan WHERE fRatescanID="; 133 133 query += search_id; … … 149 149 const char *time_end = (*row)[1]; 150 150 const char *night = (*row)[5]; 151 const char *az_beg = (*row)[6]; 152 const char *az_end = (*row)[7]; 153 const char *zd_beg = (*row)[8]; 154 const char *zd_end = (*row)[9]; 151 155 152 156 int voltage_on = (*row)[2] ? atoi((*row)[2]) : -1; … … 167 171 leg.SetBorderSize(1); 168 172 leg.SetFillColor(kWhite); 169 leg.AddText("Ratescan"); 170 leg.AddText(""); 171 leg.AddText(Form("Begin %s", time_beg)); 172 leg.AddText(Form("End %s", time_end)); 173 leg.AddText(""); 173 leg.SetTextAlign(12); 174 leg.AddText(Form("Ratescan %d ", search_id)); 175 //leg.AddText(""); 176 leg.AddText(Form("Begin %s", time_beg)); 177 leg.AddText(Form("End %s", time_end)); 178 leg.AddText(Form("Az %s#circ to %s#circ", az_beg, az_end)); 179 leg.AddText(Form("Zd %s#circ to %s#circ", zd_beg, zd_end)); 180 //leg.AddText(""); 174 181 if (voltage_on==0) 175 182 leg.AddText("Voltage off"); … … 179 186 leg.AddText(Form("Current <I_{med}> = %.1f #muA", current)); 180 187 if (overvoltage>-70) 181 leg.AddText(Form("Voltage 188 leg.AddText(Form("Voltage #DeltaU = %+.2f V", overvoltage)); 182 189 } 183 190 … … 209 216 g.DrawClone("PL"); 210 217 218 TGraph gr("good_ratescan_edit.txt", "%lg %lg"); 219 gr.SetLineColor(12); 220 gr.DrawClone("L"); 221 211 222 c->Write(); 212 223 … … 216 227 name += time_beg; 217 228 218 c->SaveAs(name+".pdf"); 219 c->SaveAs(name+".eps"); 220 c->SaveAs(name+".png"); 229 //c->SaveAs(name+".pdf"); 230 //c->SaveAs(name+".eps"); 231 //c->SaveAs("/loc_data/analysis/"+name+".png"); 232 c->SaveAs(Form("/loc_data/analysis/ratescans/%04d/%02d/%02d/%06d_%d.png", atoi(night)/10000, (atoi(night)/100)%100, atoi(night)%100, atoi(night), search_id)); 221 233 222 234 delete c; … … 305 317 306 318 TString oname = Form("%06d-ratescan.root", night); 307 308 cout << " " << oname << '\n' << endl; 309 319 //cout << " " << oname << '\n' << endl; 310 320 TFile rootfile(oname.Data(), "recreate"); 311 321 -
branches/MarsGapdTimeJitter/fact/plots/quality.C
r17956 r18282 95 95 Double_t jd = time + 40587 + 2400000.5; 96 96 97 // Sun properties 98 Nova::EquPosn sun = Nova::GetSolarEquCoords(jd); 99 Nova::ZdAzPosn hrzs = Nova::GetHrzFromEqu(sun, jd); 100 97 101 // Get source position 98 102 Nova::EquPosn pos = FindPointing(time); 99 103 100 return FACT::PredictI(jd, pos); 104 105 // Moon properties 106 Nova::EquPosn moon = Nova::GetLunarEquCoords(jd, 0.01); 107 Nova::HrzPosn hrzm = Nova::GetHrzFromEqu(moon, jd); 108 double disk = Nova::GetLunarDisk(jd); 109 110 // Derived moon properties 111 double angle = Nova::GetAngularSeparation(moon, pos); 112 double edist = Nova::GetLunarEarthDist(jd)/384400; 113 114 // Current prediction 115 double sin_malt = hrzm.alt<0 ? 0 : sin(hrzm.alt*TMath::DegToRad()); 116 double cos_mdist = cos(angle*TMath::DegToRad()); 117 double sin_szd = sin(hrzs.zd*TMath::DegToRad()); 118 119 double c0 = pow(disk, 2.63); 120 double c1 = pow(sin_malt, 0.60); 121 double c2 = pow(edist, -2.00); 122 double c3 = exp(0.67*cos_mdist*cos_mdist*cos_mdist*cos_mdist); 123 double c4 = exp(-97.8+105.8*sin_szd*sin_szd); 124 125 double cur = 6.2 + 95.7*c0*c1*c2*c3 + c4; 126 127 return cur; 101 128 } 102 129 … … 340 367 } 341 368 369 Int_t PlotSqm(TArrayD **vec, TString fname) 370 { 371 fname += ".SQM_CONTROL_DATA.fits"; 372 373 fits file(fname.Data()); 374 if (!file) 375 { 376 cerr << fname << ": " << gSystem->GetError() << endl; 377 return -2; 378 } 379 380 //cout << fname << endl; 381 382 Double_t time; 383 Float_t mag; // magnitude 384 385 if (!file.SetPtrAddress("Time", &time)) 386 return -1; 387 if (!file.SetPtrAddress("Mag", &mag)) 388 return -1; 389 390 //const int marker_style = kFullDotMedium; 391 const int marker_style = kDot; 392 393 TGraph g1; 394 g1.SetName("SQM"); 395 396 397 bool found_first_time = false; 398 while (file.GetNextRow()) 399 if (Contains(vec, time)) 400 { 401 g1.SetPoint(g1.GetN(), time*24*3600, mag); 402 } 403 404 405 g1.SetMinimum(19.0); 406 g1.SetMaximum(21.5); 407 g1.SetMarkerColor(kBlack); 408 g1.SetMarkerStyle(marker_style); 409 g1.GetXaxis()->SetTimeDisplay(true); 410 g1.GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00 GMT"); 411 g1.GetXaxis()->SetLabelSize(0.12); 412 g1.GetYaxis()->SetLabelSize(0.1); 413 g1.GetYaxis()->SetTitle("SQM [mag]"); 414 g1.GetYaxis()->SetTitleOffset(0.2); 415 g1.GetYaxis()->SetTitleSize(0.1); 416 g1.DrawClone("AP"); 417 418 return 0; 419 } 420 421 Int_t PlotSqmLinear(TArrayD **vec, TString fname) 422 { 423 fname += ".SQM_CONTROL_DATA.fits"; 424 425 fits file(fname.Data()); 426 if (!file) 427 { 428 cerr << fname << ": " << gSystem->GetError() << endl; 429 return -2; 430 } 431 432 //cout << fname << endl; 433 434 Double_t time; 435 Float_t mag; // magnitude 436 437 if (!file.SetPtrAddress("Time", &time)) 438 return -1; 439 if (!file.SetPtrAddress("Mag", &mag)) 440 return -1; 441 442 //const int marker_style = kFullDotMedium; 443 const int marker_style = kDot; 444 445 TGraph g1; 446 g1.SetName("SQM"); 447 448 449 bool found_first_time = false; 450 while (file.GetNextRow()) 451 if (Contains(vec, time)) 452 { 453 Double_t mag_double = 4.4 * pow(10, 20) * pow( 10, mag*(-0.4)); 454 g1.SetPoint(g1.GetN(), time*24*3600, mag_double); 455 } 456 457 458 g1.SetMinimum(1.e12); 459 g1.SetMaximum(5.e12); 460 g1.SetMarkerColor(kBlack); 461 g1.SetMarkerStyle(marker_style); 462 g1.GetXaxis()->SetTimeDisplay(true); 463 g1.GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00 GMT"); 464 g1.GetXaxis()->SetLabelSize(0.12); 465 g1.GetYaxis()->SetLabelSize(0.1); 466 g1.GetYaxis()->SetTitle("SQM lin [phot./(s sr m^2)]"); 467 g1.GetYaxis()->SetTitleOffset(0.2); 468 g1.GetYaxis()->SetTitleSize(0.1); 469 g1.DrawClone("AP"); 470 471 return 0; 472 } 473 474 Int_t PlotHumidity(TArrayD **vec, TString fname) 475 { 476 fname += ".FSC_CONTROL_HUMIDITY.fits"; 477 478 fits file(fname.Data()); 479 if (!file) 480 { 481 cerr << fname << ": " << gSystem->GetError() << endl; 482 return -2; 483 } 484 485 //cout << fname << endl; 486 487 Double_t time; 488 Float_t H[4]; 489 490 if (!file.SetPtrAddress("Time", &time)) 491 return -1; 492 if (!file.SetPtrAddress("H", H)) 493 return -1; 494 495 //const int marker_style = kFullDotMedium; 496 const int marker_style = kDot; 497 498 TGraph g1; 499 TGraph g2; 500 TGraph g3; 501 TGraph g4; 502 //TGraph g5; 503 g1.SetName("H0"); 504 g2.SetName("H1"); 505 g3.SetName("H2"); 506 g4.SetName("H3"); 507 //g5.SetName("PFmini"); 508 509 510 Double_t first_time, last_time; 511 bool found_first_time = false; 512 while (file.GetNextRow()) 513 if (Contains(vec, time)) 514 { 515 if (!found_first_time){ 516 first_time = time*24*3600; 517 found_first_time = true; 518 } 519 g1.SetPoint(g1.GetN(), time*24*3600, H[0]); 520 g2.SetPoint(g2.GetN(), time*24*3600, H[1]); 521 g3.SetPoint(g3.GetN(), time*24*3600, H[2]); 522 g4.SetPoint(g4.GetN(), time*24*3600, H[3]); 523 //g5.SetPoint(g5.GetN(), time*24*3600, I[319]); 524 last_time = time*24*3600; 525 } 526 527 528 g1.SetMinimum(10); 529 g1.SetMaximum(80); 530 g1.SetMarkerColor(kAzure); 531 g1.SetMarkerStyle(marker_style); 532 g1.GetXaxis()->SetTimeDisplay(true); 533 g1.GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00 GMT"); 534 g1.GetXaxis()->SetLabelSize(0.12); 535 g1.GetYaxis()->SetLabelSize(0.1); 536 g1.GetYaxis()->SetTitle("HUMITIDY"); 537 g1.GetYaxis()->SetTitleOffset(0.2); 538 g1.GetYaxis()->SetTitleSize(0.1); 539 g1.DrawClone("AP"); 540 541 g2.SetMarkerColor(kAzure+1); 542 g2.SetMarkerStyle(marker_style); 543 g2.DrawClone("P"); 544 545 g3.SetMarkerColor(kAzure+3); 546 g3.SetMarkerStyle(marker_style); 547 g3.DrawClone("P"); 548 549 g4.SetMarkerColor(kAzure+6); 550 g4.SetMarkerStyle(marker_style); 551 g4.DrawClone("P"); 552 553 //g5.SetMarkerColor(kAzure+1); 554 //g5.SetMarkerStyle(kFullDotMedium); 555 //g5.DrawClone("P"); 556 557 g1.DrawClone("P"); 558 559 TLine l1(first_time-600, 40, last_time+600, 40); 560 l1.SetLineColor(kOrange); 561 l1.DrawClone(); 562 TText t1(first_time-600, 41, "Please, note in logbook"); 563 t1.SetTextSize(0.1); 564 t1.DrawClone(); 565 566 567 TLine l2(first_time-600, 55, last_time+600, 55); 568 l2.SetLineColor(kRed); 569 l2.DrawClone(); 570 TText t2(first_time-600, 56, "Please, report to fact-online"); 571 t2.SetTextSize(0.1); 572 t2.DrawClone(); 573 574 575 return 0; 576 } 577 578 Int_t PlotHumidity2(TArrayD **vec, TString fname) 579 { 580 fname += ".PFMINI_CONTROL_DATA.fits"; 581 582 fits file(fname.Data()); 583 if (!file) 584 { 585 cerr << fname << ": " << gSystem->GetError() << endl; 586 return -2; 587 } 588 589 //cout << fname << endl; 590 591 Double_t time; 592 Float_t H; 593 594 if (!file.SetPtrAddress("Time", &time)) 595 return -1; 596 if (!file.SetPtrAddress("Humidity", &H)) 597 return -1; 598 599 const int marker_style = kFullDotMedium; 600 //const int marker_style = kDot; 601 602 TGraph g1; 603 g1.SetName("PFmini"); 604 605 606 while (file.GetNextRow()) 607 if (Contains(vec, time)) 608 { 609 g1.SetPoint(g1.GetN(), time*24*3600, H); 610 } 611 612 g1.SetMarkerStyle(marker_style); 613 g1.SetMarkerColor(kGreen); 614 g1.DrawClone("P"); 615 return 0; 616 } 342 617 343 618 Int_t PlotPointing(TArrayD **vec, TString fname) … … 420 695 g.GetXaxis()->SetLabelSize(0.1); 421 696 g.GetYaxis()->SetLabelSize(0.1); 422 g.GetYaxis()->SetTitle("TEMP ");697 g.GetYaxis()->SetTitle("TEMPERATURE"); 423 698 g.GetYaxis()->SetTitleOffset(0.2); 424 699 g.GetYaxis()->SetTitleSize(0.1); … … 542 817 if (!file.SetPtrAddress("Time", &time)) 543 818 return -1; 544 if (!file.SetPtrAddress("Data1", temp) && 545 !file.SetPtrAddress("temp", temp)) 819 // if (!file.SetPtrAddress("Data1", temp) && 820 // !file.SetPtrAddress("temp", temp)) 821 if (!file.SetPtrAddress("temp", temp)) 546 822 return -1; 547 823 … … 669 945 } 670 946 671 TCanvas *c = new TCanvas("quality", Form("Quality %04d/%02d/%02d", y, m, d), 1280, 960); 672 c->Divide(1, 6, 1e-5, 1e-5); 947 //check if the sqm was already installed on the telescope 948 TCanvas *c = NULL; 949 TString datestring = Form("%04d%02d%02d", y, m, d); 950 if( datestring.Atoi() > 20140723 ) { 951 TCanvas *c = new TCanvas("quality", Form("Quality %04d/%02d/%02d", y, m, d), 1280, 1280); 952 c->Divide(1, 8, 1e-5, 1e-5); 953 }else{ 954 TCanvas *c = new TCanvas("quality", Form("Quality %04d/%02d/%02d", y, m, d), 1280, 1120); 955 c->Divide(1, 7, 1e-5, 1e-5); 956 } 673 957 674 958 gROOT->SetSelectedPad(0); … … 716 1000 gPad->SetRightMargin(0.001); 717 1001 gPad->SetLeftMargin(0.04); 1002 gPad->SetBottomMargin(0); 718 1003 cout << PlotTemperature1(runs, fname) << endl; 719 1004 cout << PlotTemperature2(runs, fname) << endl; … … 721 1006 cout << PlotTemperature4(runs, fname) << endl; 722 1007 1008 gROOT->SetSelectedPad(0); 1009 c->cd(7); 1010 gPad->SetGrid(); 1011 gPad->SetTopMargin(0); 1012 gPad->SetBottomMargin(0); 1013 gPad->SetRightMargin(0.001); 1014 gPad->SetLeftMargin(0.04); 1015 cout << PlotHumidity(runs, fname) << endl; 1016 cout << PlotHumidity2(runs, fname) << endl; 1017 1018 //check if the sqm was already installed 1019 if( datestring.Atoi() > 20140723 ) { 1020 gROOT->SetSelectedPad(0); 1021 c->cd(7); 1022 gPad->SetGrid(); 1023 gPad->SetTopMargin(0); 1024 gPad->SetBottomMargin(0); 1025 gPad->SetRightMargin(0.001); 1026 gPad->SetLeftMargin(0.04); 1027 cout << PlotHumidity(runs, fname) << endl; 1028 cout << PlotHumidity2(runs, fname) << endl; 1029 1030 gROOT->SetSelectedPad(0); 1031 c->cd(8); 1032 gPad->SetGrid(); 1033 gPad->SetTopMargin(0); 1034 gPad->SetRightMargin(0.001); 1035 gPad->SetLeftMargin(0.04); 1036 cout << PlotSqm(runs, fname) << endl; 1037 }else{ 1038 1039 gROOT->SetSelectedPad(0); 1040 c->cd(7); 1041 gPad->SetGrid(); 1042 gPad->SetTopMargin(0); 1043 gPad->SetRightMargin(0.001); 1044 gPad->SetLeftMargin(0.04); 1045 cout << PlotHumidity(runs, fname) << endl; 1046 cout << PlotHumidity2(runs, fname) << endl; 1047 } 1048 723 1049 c->SaveAs(Form("%s/%04d%02d%02d.png", outpath, y, m, d)); 724 1050 -
branches/MarsGapdTimeJitter/fact/processing/buildseqentries.C
r15237 r18282 584 584 585 585 TString query; 586 query = "SELECT fRunID FROM runinfo WHERE fExcludedFDAKEY=1 AND ";586 query = "SELECT fRunID FROM RunInfo WHERE fExcludedFDAKEY=1 AND "; 587 587 query += cond; 588 588 query += " AND fRunTypeKEY=4 AND fRunID BETWEEN "; … … 599 599 600 600 // Get DRS file with pedestal (roi<1024) 601 query = "SELECT MAX(fRunID) FROM runinfo WHERE ";601 query = "SELECT MAX(fRunID) FROM RunInfo WHERE "; 602 602 query += cond; 603 603 query += " AND fHasDrsFile=1 AND (fDrsStep IS NULL OR fDrsStep=2) AND fRunTypeKEY=2"; -
branches/MarsGapdTimeJitter/fact/processing/drstemp.C
r17145 r18282 163 163 164 164 float temp[160]; 165 if (file.SetPtrAddress("temp", temp, 82))166 {167 drstemp82(file, beg, end);168 return;169 }165 // if (file.SetPtrAddress("temp", temp, 82)) 166 // { 167 // drstemp82(file, beg, end); 168 // return; 169 // } 170 170 171 171 file.SetPtrAddress("temp", temp, 160); -
branches/MarsGapdTimeJitter/fact/processing/fillratescan.C
r17102 r18282 48 48 Float_t GetOffset(TString fname, Double_t beg, Double_t end) 49 49 { 50 fname.ReplaceAll("RATE_SCAN_DATA", "FEEDBACK_DEVIATION"); 50 if (end < 15937) 51 fname.ReplaceAll("RATE_SCAN_DATA", "FEEDBACK_DEVIATION"); 52 else 53 fname.ReplaceAll("RATE_SCAN_DATA", "FEEDBACK_CALIBRATED_CURRENTS"); 51 54 52 55 fits file(fname.Data()); … … 61 64 return -100; 62 65 63 if (!file.SetPtrAddress("DeltaUser", &delta)) 64 return -100; 66 if (end < 15937) 67 { 68 if (!file.SetPtrAddress("DeltaUser", &delta)) 69 return -100; 70 } 71 else 72 { 73 if (!file.SetPtrAddress("U_nom", &delta)) 74 return -100; 75 } 65 76 66 77 //cout << "Search for: " << beg-15773 << " " << end-15773 << endl; … … 80 91 Float_t GetCurrent(TString fname, Double_t beg, Double_t end) 81 92 { 82 fname.ReplaceAll("RATE_SCAN_DATA", "CALIBRATED_CURRENTS"); 83 fname = gSystem->BaseName(fname.Data()); 84 85 fname.Prepend("/scratch_nfs/calibrated_currents/"); 93 fname.ReplaceAll("RATE_SCAN_DATA", "FEEDBACK_CALIBRATED_CURRENTS"); 94 95 //the next two lines are needed for ISDC and data before 11.3.2013 96 //fname.ReplaceAll("RATE_SCAN_DATA", "CALIBRATED_CURRENTS"); 97 //fname = gSystem->BaseName(fname.Data()); 98 //fname.Prepend("/scratch_nfs/calibrated_currents/"); 86 99 87 100 fits file(fname.Data()); … … 326 339 !file.SetPtrAddress(string(old ? "Data3" : "RelOnTime"), &ontime)) 327 340 return -1; 328 */341 */ 329 342 Double_t *ptime = file.SetPtrAddress("Time"); 330 343 ULong64_t *pid = file.SetPtrAddress(old ? "Data0" : "Id");
Note:
See TracChangeset
for help on using the changeset viewer.