Changeset 18567 for trunk/Mars/fact
- Timestamp:
- 09/03/16 14:54:02 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/fact/analysis/callisto_data.C
r18270 r18567 1 1 #include "MLogManip.h" 2 2 3 int callisto_data(const char *datafile, const char *drsfile, const char *drstime, const char *delays, const char *outpath=".") 3 int callisto_data(const char *datafile, const char *drsfile, 4 const char *drstime, const char *delays, 5 const char *outpath=".") 4 6 { 5 7 // ====================================================== … … 9 11 // false: Display pixels in hardware/linear indices, 10 12 // but the order is the camera display is distorted 11 bool usemap = true;13 bool usemap = drstime ? true : false; 12 14 13 15 // map file to use (get that from La Palma!) 14 const char *m ap = usemap ? "/home/fact/FACT++/FACTmap111030.txt" : NULL;16 const char *mmap = usemap ? "FACTmap111030.txt" : NULL; 15 17 16 18 //const char *pulse_template = "template-pulse.root"; … … 82 84 // ====================================================== 83 85 84 if (m ap && gSystem->AccessPathName(map, kFileExists))86 if (mmap && gSystem->AccessPathName(mmap, kFileExists)) 85 87 { 86 gLog << err << "ERROR - Cannot access mapping file '" << m ap << "'" << endl;88 gLog << err << "ERROR - Cannot access mapping file '" << mmap << "'" << endl; 87 89 return 11; 88 90 } … … 91 93 92 94 MDrsCalibrationTime timecam; 93 if ( !timecam.ReadFits(drstime))95 if (drstime && !timecam.ReadFits(drstime)) 94 96 { 95 97 gLog << err << "ERROR - Could not get MDrsCalibrationTime from " << drstime << endl; … … 112 114 113 115 MDrsCalibration drscalib300; 114 if ( !drscalib300.ReadFits(drsfile))116 if (drsfile && !drscalib300.ReadFits(drsfile)) 115 117 return 31; 116 118 117 119 // ------------------------------------------------------- 118 120 119 if (d elays)121 if (drstime && delays) 120 122 { 121 123 TGraph g(delays); … … 175 177 gLog << all; 176 178 gLog << "Data file: " << datafile << '\n'; 177 gLog << "DRS 300: " << drsfile << '\n'; 178 gLog << "DRS Time: " << drstime << '\n'; 179 gLog << "Delays: " << delays << '\n'; 179 if (drsfile) 180 gLog << "DRS 300: " << drsfile << '\n'; 181 if (drstime) 182 gLog << "DRS Time: " << drstime << '\n'; 183 if (delays) 184 gLog << "Delays: " << delays << '\n'; 180 185 gLog << "Outpath: " << outpath << '\n'; 181 186 gLog << endl; … … 205 210 MParList plist5; 206 211 plist5.AddToList(&tlist5); 207 plist5.AddToList(&drscalib300);208 212 plist5.AddToList(&badpixels); 209 plist5.AddToList(&timecam); 213 if (drsfile) 214 plist5.AddToList(&drscalib300); 215 if (drstime) 216 plist5.AddToList(&timecam); 210 217 211 218 MEvtLoop loop5("CalibratingData"); … … 216 223 217 224 MRawFitsRead read5(datafile); 218 read5.LoadMap(map); 225 if (mmap) 226 read5.LoadMap(mmap); 219 227 220 228 MFillH fill5a(&hrate); … … 384 392 write5.AddContainer("MTime", "Events"); 385 393 write5.AddContainer("MRawEvtHeader", "Events"); 394 395 write5.AddContainer("MMcCorsikaRunHeader", "RunHeaders", kFALSE); 396 write5.AddContainer("MCorsikaRunHeader", "RunHeaders", kFALSE); 397 write5.AddContainer("MMcRunHeader", "RunHeaders", kFALSE); 398 write5.AddContainer("MCorsikaEvtHeader", "Events", kFALSE); 399 write5.AddContainer("MMcEvt", "Events", kFALSE); 400 write5.AddContainer("IncidentAngle", "Events", kFALSE); 401 write5.AddContainer("MPointingPos", "Events", kFALSE); 402 write5.AddContainer("MTime", "Events", kFALSE); 403 404 386 405 //write.AddContainer("MTriggerPattern", "Events"); 387 406
Note:
See TracChangeset
for help on using the changeset viewer.