Ignore:
Timestamp:
09/16/04 12:02:45 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r5030 r5064  
    200200MJCalibration::MJCalibration(const char *name, const char *title)
    201201    : fRuns(0), fExtractor(NULL), fTimeExtractor(NULL),
    202       fColor(MCalibrationCam::kNONE), fDisplayType(kNormalDisplay),
     202      fColor(MCalibrationCam::kNONE), fDisplayType(kDataCheckDisplay),
    203203      fGeometry("MGeomCamMagic")
    204204{
     
    12941294}
    12951295
    1296 
    1297 // --------------------------------------------------------------------------
    1298 //
    1299 // Find the colour of the pulsing LED:
    1300 // - If the run number is smaller than gkIFAEBoxInaugurationRun, take MCalibrationCam::kCT1
    1301 // - Otherwise find the colour out of the run name
    1302 // - If no colour is found, return kFALSE
    1303 //
    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 
    14011296// --------------------------------------------------------------------------
    14021297//
     
    14391334Bool_t MJCalibration::CheckEnvLocal()
    14401335{
    1441     TString col = GetEnv("Color", "");
    1442     if (!col.IsNull())
    1443     {
    1444     }
    1445 
    14461336    TString dis = GetEnv("Display", "");
    14471337    if (dis.BeginsWith("Full", TString::kIgnoreCase))
     
    15921482    fLog->Separator(GetDescriptor());
    15931483
    1594     //    if (!FindColor())
    1595     //        return kFALSE;
    1596 
    15971484    *fLog << "Calculate MCalibrationCam from ";
    15981485    if (fSequence.IsValid())
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.h

    r5017 r5064  
    135135 
    136136  // WORKAROUNDS!!!
    137   Bool_t FindColor();
    138137  void   InitBlindPixel(MExtractBlindPixel &blindext,
    139138                        MHCalibrationChargeBlindCam &blindcam);
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r4895 r5064  
    547547    // --------------------------------------------------------------------------------
    548548
     549    const TString type = fUseData ? "data" : "pedestal";
     550
    549551    *fLog << inf;
    550552    fLog->Separator(GetDescriptor());
    551     *fLog << "Calculate MPedestalCam from Runs ";
     553    *fLog << "Calculate MPedestalCam from " << type << "-runs ";
    552554    if (fSequence.IsValid())
    553555        *fLog << fSequence.GetName() << endl;
     
    572574    if (fSequence.IsValid())
    573575    {
    574         const TString type = fUseData ? "data" : "pedestal";
    575576        const Int_t n0 = fUseData ? fSequence.SetupDatRuns(iter, fPathData) : fSequence.SetupPedRuns(iter, fPathData);
    576577        const Int_t n1 = fUseData ? fSequence.GetNumDatRuns() : fSequence.GetNumPedRuns();
  • trunk/MagicSoft/Mars/mjobs/MJob.cc

    r5030 r5064  
    186186    {
    187187        *fLog << inf << " - Writing " << o->GetDescriptor() << "..." << flush;
    188         if (o->Write()<=0)
     188        if (o->Write(o->GetName())<=0)
    189189        {
    190190            *fLog << err << dbginf << "ERROR - Writing " << o->GetDescriptor() << " to file " << gFile->GetName() << endl;
    191191            return kFALSE;
    192192        }
    193         *fLog << "done." << endl;
     193        *fLog << "ok." << endl;
    194194    }
    195195    return kTRUE;
     
    214214            return kFALSE;
    215215        }
    216         *fLog << "done." << endl;
     216        *fLog << "ok." << endl;
    217217    }
    218218    return kTRUE;
Note: See TracChangeset for help on using the changeset viewer.