Changeset 18282 for branches/MarsGapdTimeJitter/fact/analysis
- Timestamp:
- 08/18/15 10:28:44 (9 years ago)
- Location:
- branches/MarsGapdTimeJitter
- Files:
-
- 3 edited
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");
Note:
See TracChangeset
for help on using the changeset viewer.