Changeset 5064
- Timestamp:
- 09/16/04 12:02:45 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5061 r5064 33 33 * mbase/MTime.h: 34 34 - added IsMidnight 35 36 * mbase/MTask.cc: 37 - changed setw(3) to Form %5.1f 38 39 * mjobs/MJCalibration.[h,cc]: 40 - set default to 'nice' data-check display 41 - removed obsolete FindColor 42 43 * mjobs/MJPedestal.cc: 44 - enhanced output 45 46 * mjobs/MJob.cc: 47 - small changes to output 35 48 36 49 -
trunk/MagicSoft/Mars/mbase/MTask.cc
r4991 r5064 492 492 { 493 493 *fLog << " " << setw(7) << n << " ("; 494 *fLog << setw(3) << TMath::Nint(100.*n/GetNumExecutions());494 *fLog << Form("5.1f", 100.*n/GetNumExecutions()); 495 495 *fLog << "%) Evts skipped: " << str << endl; 496 496 } -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r5030 r5064 200 200 MJCalibration::MJCalibration(const char *name, const char *title) 201 201 : fRuns(0), fExtractor(NULL), fTimeExtractor(NULL), 202 fColor(MCalibrationCam::kNONE), fDisplayType(k NormalDisplay),202 fColor(MCalibrationCam::kNONE), fDisplayType(kDataCheckDisplay), 203 203 fGeometry("MGeomCamMagic") 204 204 { … … 1294 1294 } 1295 1295 1296 1297 // --------------------------------------------------------------------------1298 //1299 // Find the colour of the pulsing LED:1300 // - If the run number is smaller than gkIFAEBoxInaugurationRun, take MCalibrationCam::kCT11301 // - Otherwise find the colour out of the run name1302 // - If no colour is found, return kFALSE1303 //1304 Bool_t MJCalibration::FindColor()1305 {1306 if (fColor != MCalibrationCam::kNONE)1307 return kTRUE;1308 1309 if (fSequence.IsValid())1310 {1311 fColor = MCalibrationCam::kCT1;1312 return kTRUE;1313 }1314 1315 const UInt_t nruns = fRuns->GetNumRuns();1316 if (nruns == 0)1317 return kFALSE;1318 1319 fRuns->Reset();1320 1321 TString filenames;1322 while (!(filenames=((MDirIter*)fRuns)->Next()).IsNull())1323 {1324 MCalibrationCam::PulserColor_t newcolor = MCalibrationCam::kNONE;1325 1326 TString number = filenames(TRegexp("[0-9]+_._.+[.]root$"));1327 Int_t num = atoi(number.Data());1328 1329 if (num<gkIFAEBoxInaugurationRun)1330 newcolor = MCalibrationCam::kCT1;1331 1332 switch (num)1333 {1334 case 26402:1335 case 22246:1336 case 22253:1337 newcolor = MCalibrationCam::kBLUE;1338 break;1339 1340 case 30090:1341 case 20660:1342 case 20661:1343 case 26408:1344 case 26409:1345 case 26412:1346 case 26568:1347 case 26924:1348 newcolor = MCalibrationCam::kGREEN;1349 break;1350 1351 case 27474:1352 newcolor = MCalibrationCam::kNONE;1353 *fLog << "Sorry, run 27474 was taken with CLOSED LIDS. It should not be used! " << endl;1354 return kFALSE;1355 1356 default:1357 if (filenames.Contains("green",TString::kIgnoreCase))1358 newcolor = MCalibrationCam::kGREEN;1359 if (filenames.Contains("blue",TString::kIgnoreCase))1360 newcolor = MCalibrationCam::kBLUE;1361 if (filenames.Contains("uv",TString::kIgnoreCase))1362 newcolor = MCalibrationCam::kUV;1363 if (filenames.Contains("ct1",TString::kIgnoreCase))1364 newcolor = MCalibrationCam::kCT1;1365 }1366 1367 if (newcolor==MCalibrationCam::kNONE)1368 {1369 *fLog << err << "No color found for " << filenames << "... abort." << endl;1370 return kFALSE;1371 }1372 1373 if (fColor == MCalibrationCam::kNONE)1374 fColor = newcolor;1375 1376 if (fColor != newcolor)1377 {1378 *fLog << err << "Color mismatch found in " << filenames << "... abort." << endl;1379 return kFALSE;1380 }1381 }1382 1383 *fLog << inf << "Found color: ";1384 switch (fColor)1385 {1386 case MCalibrationCam::kBLUE: *fLog << "kBLUE"; break;1387 case MCalibrationCam::kGREEN: *fLog << "kGREEN"; break;1388 case MCalibrationCam::kUV: *fLog << "kUV"; break;1389 case MCalibrationCam::kCT1: *fLog << "kCT1"; break;1390 default: *fLog << "<none>"; break;1391 }1392 *fLog << endl;1393 1394 if (fColor!=MCalibrationCam::kNONE)1395 return kTRUE;1396 1397 *fLog << "No colour found in: " << fRuns->GetRunsAsString() << "... abort." << endl;1398 return kFALSE;1399 }1400 1401 1296 // -------------------------------------------------------------------------- 1402 1297 // … … 1439 1334 Bool_t MJCalibration::CheckEnvLocal() 1440 1335 { 1441 TString col = GetEnv("Color", "");1442 if (!col.IsNull())1443 {1444 }1445 1446 1336 TString dis = GetEnv("Display", ""); 1447 1337 if (dis.BeginsWith("Full", TString::kIgnoreCase)) … … 1592 1482 fLog->Separator(GetDescriptor()); 1593 1483 1594 // if (!FindColor())1595 // return kFALSE;1596 1597 1484 *fLog << "Calculate MCalibrationCam from "; 1598 1485 if (fSequence.IsValid()) -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r5017 r5064 135 135 136 136 // WORKAROUNDS!!! 137 Bool_t FindColor();138 137 void InitBlindPixel(MExtractBlindPixel &blindext, 139 138 MHCalibrationChargeBlindCam &blindcam); -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r4895 r5064 547 547 // -------------------------------------------------------------------------------- 548 548 549 const TString type = fUseData ? "data" : "pedestal"; 550 549 551 *fLog << inf; 550 552 fLog->Separator(GetDescriptor()); 551 *fLog << "Calculate MPedestalCam from Runs ";553 *fLog << "Calculate MPedestalCam from " << type << "-runs "; 552 554 if (fSequence.IsValid()) 553 555 *fLog << fSequence.GetName() << endl; … … 572 574 if (fSequence.IsValid()) 573 575 { 574 const TString type = fUseData ? "data" : "pedestal";575 576 const Int_t n0 = fUseData ? fSequence.SetupDatRuns(iter, fPathData) : fSequence.SetupPedRuns(iter, fPathData); 576 577 const Int_t n1 = fUseData ? fSequence.GetNumDatRuns() : fSequence.GetNumPedRuns(); -
trunk/MagicSoft/Mars/mjobs/MJob.cc
r5030 r5064 186 186 { 187 187 *fLog << inf << " - Writing " << o->GetDescriptor() << "..." << flush; 188 if (o->Write( )<=0)188 if (o->Write(o->GetName())<=0) 189 189 { 190 190 *fLog << err << dbginf << "ERROR - Writing " << o->GetDescriptor() << " to file " << gFile->GetName() << endl; 191 191 return kFALSE; 192 192 } 193 *fLog << " done." << endl;193 *fLog << "ok." << endl; 194 194 } 195 195 return kTRUE; … … 214 214 return kFALSE; 215 215 } 216 *fLog << " done." << endl;216 *fLog << "ok." << endl; 217 217 } 218 218 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.