Changeset 3832 for trunk/MagicSoft/Mars/macros/calibration.C
- Timestamp:
- 04/26/04 16:44:20 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/calibration.C
r3796 r3832 52 52 // 53 53 ///////////////////////////////////////////////////////////////////////////// 54 const TString inpath = "/home/rootdata/ BlindPixel/";55 const Int_t pedrun = 2 0491;56 const Int_t calrun1 = 2 0494;57 const Int_t calrun2 = 2 0496;54 const TString inpath = "/home/rootdata/Calib/2004_04_16/"; 55 const Int_t pedrun = 22265; 56 const Int_t calrun1 = 22299; 57 const Int_t calrun2 = 22300; 58 58 59 59 void calibration(const Int_t prun=pedrun, const Int_t crun1=calrun1, const Int_t crun2=calrun2) … … 70 70 cruns.AddRuns(crun1,crun2,inpath); 71 71 72 MCalibrationCam::PulserColor_t color;73 74 if (crun1 < 20000)75 color = MCalibrationCam::kCT1;76 else77 color = FindColor((MDirIter*)&cruns);78 79 if (color == MCalibrationCam::kNONE)80 return;81 82 72 MCalibrationQECam qecam; 83 73 MBadPixelsCam badcam; … … 88 78 // 89 79 // badcam.AsciiRead("badpixels.dat"); 90 91 for (Int_t i=0;i<badcam.GetSize();i++)92 if (badcam[i].IsBad())93 cout << "Bad Pixel: " << i << endl;94 80 95 81 MStatusDisplay *display = new MStatusDisplay; … … 114 100 // 115 101 MJCalibration calloop; 116 calloop.SetColor(color);102 // calloop.SetColor(color); 117 103 118 104 // … … 136 122 } 137 123 138 MCalibrationCam::PulserColor_t FindColor(MDirIter* run)139 {140 141 MCalibrationCam::PulserColor_t col = MCalibrationCam::kNONE;142 143 TString filenames;144 145 while (!(filenames=run->Next()).IsNull())146 {147 148 filenames.ToLower();149 150 if (filenames.Contains("green"))151 if (col == MCalibrationCam::kNONE)152 {153 cout << "Found colour: Green in " << filenames << endl;154 col = MCalibrationCam::kGREEN;155 }156 else if (col != MCalibrationCam::kGREEN)157 {158 cout << "Different colour found in " << filenames << "... abort" << endl;159 return MCalibrationCam::kNONE;160 }161 162 if (filenames.Contains("blue"))163 if (col == MCalibrationCam::kNONE)164 {165 cout << "Found colour: Blue in " << filenames << endl;166 col = MCalibrationCam::kBLUE;167 }168 else if (col != MCalibrationCam::kBLUE)169 {170 cout << "Different colour found in " << filenames << "... abort" << endl;171 return MCalibrationCam::kNONE;172 }173 174 if (filenames.Contains("uv"))175 if (col == MCalibrationCam::kNONE)176 {177 cout << "Found colour: Uv in " << filenames << endl;178 col = MCalibrationCam::kUV;179 }180 else if (col != MCalibrationCam::kUV)181 {182 cout << "Different colour found in " << filenames << "... abort" << endl;183 return MCalibrationCam::kNONE;184 }185 186 if (filenames.Contains("ct1"))187 if (col == MCalibrationCam::kNONE)188 {189 cout << "Found colour: Ct1 in " << filenames << endl;190 col = MCalibrationCam::kCT1;191 }192 else if (col != MCalibrationCam::kCT1)193 {194 cout << "Different colour found in " << filenames << "... abort" << endl;195 return MCalibrationCam::kNONE;196 }197 198 }199 200 201 202 if (col == MCalibrationCam::kNONE)203 cout << "No colour found in filenames of runs: " << ((MRunIter*)run)->GetRunsAsString()204 << "... abort" << endl;205 206 return col;207 }
Note:
See TracChangeset
for help on using the changeset viewer.