Changeset 5621 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
12/17/04 18:27:43 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5620 r5621  
    2020
    2121                                                 -*-*- END OF LINE -*-*-
     22
     23 2004/12/17: Markus Gaug
     24
     25   * mcalib/MCalibColorSet.cc:
     26     - added missing runs where run number does not appear any more in
     27       project-name and is not yet set in the digital modules.
     28
    2229
    2330 2004/12/17: Thomas Bretz
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc

    r5619 r5621  
    5656const Int_t MCalibColorSet::gkIFAEBoxInaugurationRun = 20113;
    5757const Int_t MCalibColorSet::gkMCRunLimit             = 1000;
     58const UInt_t MCalibColorSet::gkFirstRunWithFinalBits = 45626;
    5859// --------------------------------------------------------------------------
    5960//
     
    123124    }
    124125 
     126  if (header->GetRunNumber() > gkFirstRunWithFinalBits)
     127    return kTRUE;
     128
    125129  //
    126130  // Consider the case that a pedestal run is interleaved in the calibration run sequence ... prepare
    127131  // to skip this run.
    128132  //
     133  const UShort_t runtype = header->GetRunType();
     134
    129135  if (header->GetRunType() == MRawRunHeader::kRTPedestal)
    130136    {
     
    208214    case 44768:
    209215    case 44976:
     216    case 45249:
     217    case 45253:
     218    case 45262:
     219    case 45274:
     220    case 45275:
     221    case 45276:
     222    case 45365:
     223    case 45366:
     224    case 45367:
    210225    case 45368:
     226    case 45369:
     227    case 45370:
     228    case 45371:
     229    case 45382:
     230    case 45401:
     231    case 45419:
     232    case 45432:
     233    case 45471:
     234    case 45485:
     235    case 45489:
    211236      //    case 31756:
    212237      color = kBLUE;
     
    214239     
    215240    case 30090:
     241    case 31745:
     242    case 31746:
     243    case 31747:
     244    case 31748:
    216245    case 20660:
    217246    case 20661:
     
    221250    case 26568:
    222251    case 26924:
     252    case 45227:
     253    case 45241:
     254    case 45250:
     255    case 45254:
     256    case 45263:
     257    case 45372:
     258    case 45373:
    223259      color = kGREEN;
     260      break;
     261     
     262    case 45216:
     263    case 45218:
     264    case 45226:
     265    case 45240:
     266    case 45251:
     267    case 45278:
     268    case 45336:
     269    case 45341:
     270    case 45358:
     271    case 45374:
     272    case 45375:
     273    case 45376:
     274    case 45377:
     275    case 45381:
     276    case 45400:
     277    case 45418:
     278    case 45431:
     279    case 45470:
     280    case 45484:
     281    case 45490:
     282      color = kUV;
    224283      break;
    225284     
     
    227286      *fLog << err << "Sorry, run 27474 was taken with CLOSED LIDS. It should not be used! " << endl;
    228287      return kFALSE;
     288      break;
     289     
     290    case 45219:
     291      *fLog << err << "Sorry, run 45219 was taken with a combination of colours used to flat-field ";
     292      *fLog << err << "the camera. It cannot be used for the standard calibration " << endl;
     293      return kFALSE;
     294      break;
    229295    }
    230296 
     
    252318    {
    253319
    254       const TString proj = header->GetProjectName();
    255      
     320      TString proj = header->GetProjectName();
     321      proj.ToLower();
     322
    256323      // Possible green combinations
    257       TRegexp gre0("0.1[lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]");
     324      TRegexp gre0("0.1led[sS]?[gG][rR][eE][eE]");
    258325      if (proj.Contains(gre0))
    259326        { fPattern |= k01LedGreen; color = kGREEN;    }
    260       TRegexp gre1("1[lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]");
     327      TRegexp gre1("1led[sS]?[gG][rR][eE][eE]");
    261328      if (proj.Contains(gre1))
    262329        { fPattern |= k1LedGreen; color = kGREEN;    }
    263       TRegexp gre2("[2][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]");
     330      TRegexp gre2("2led[sS]?[gG][rR][eE][eE]");
    264331      if (proj.Contains(gre2))
    265332        { fPattern |= k2LedGreen; color = kGREEN;    }
    266       TRegexp gre3("[3][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]");
     333      TRegexp gre3("3led[sS]?[gG][rR][eE][eE]");
    267334      if (proj.Contains(gre3))
    268335        { fPattern |= k3LedGreen; color = kGREEN;    }
    269       TRegexp gre5("[5][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]");
     336      TRegexp gre5("5led[sS]?[gG][rR][eE][eE]");
    270337      if (proj.Contains(gre5))
    271338        { fPattern |= k5LedGreen; color = kGREEN;    }
    272       TRegexp gre6("[6][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]");
     339      TRegexp gre6("6led[sS]?[gG][rR][eE][eE]");
    273340      if (proj.Contains(gre6))
    274341        { fPattern |= k6LedGreen; color = kGREEN;    }
    275       TRegexp gre7("[7][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]");
     342      TRegexp gre7("7led[sS]?[gG][rR][eE][eE]");
    276343      if (proj.Contains(gre7))
    277344        { fPattern |= k7LedGreen; color = kGREEN;    }
    278       TRegexp gre8("[8][lL]?[eE]?[dD]?[sS]?[gG][rR][eE][eE]");
     345      TRegexp gre8("8led[sS]?[gG][rR][eE][eE]");
    279346      if (proj.Contains(gre8))
    280347        { fPattern |= k8LedGreen; color = kGREEN;    }
    281348
    282       // Possible green combinations
    283       TRegexp blu0("0.1[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     349      // Possible blue combinations
     350      TRegexp blu0("0.1led[sS]?[bB][lL][uU][eE]");
    284351      if (proj.Contains(blu0))
    285352        { fPattern |= k01LedBlue; color = kBLUE;    }
    286       TRegexp blu1("1[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     353      TRegexp blu1("1led[sS]?[bB][lL][uU][eE]");
    287354      if (proj.Contains(blu1))
    288355        { fPattern |= k1LedBlue; color = kBLUE;    }
    289       TRegexp blu2("2[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     356      TRegexp blu2("2led[sS]?[bB][lL][uU][eE]");
    290357      if (proj.Contains(blu2))
    291358        { fPattern |= k2LedBlue; color = kBLUE;    }
    292       TRegexp blu3("3[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     359      TRegexp blu3("3led[sS]?[bB][lL][uU][eE]");
    293360      if (proj.Contains(blu3))
    294361        { fPattern |= k3LedBlue; color = kBLUE;    }
    295       TRegexp blu5("5[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     362      TRegexp blu5("5led[sS]?[bB][lL][uU][eE]");
    296363      if (proj.Contains(blu5))
    297364        { fPattern |= k5LedBlue1; color = kBLUE;    }
    298       TRegexp blu6("6[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     365      TRegexp blu6("6led[sS]?[bB][lL][uU][eE]");
    299366      if (proj.Contains(blu6))
    300367        { fPattern |= k6LedBlue; color = kBLUE;    }
    301       TRegexp blu7("7[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     368      TRegexp blu7("7led[sS]?[bB][lL][uU][eE]");
    302369      if (proj.Contains(blu7))
    303370        { fPattern |= k7LedBlue; color = kBLUE;    }
    304       TRegexp blu8("8[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     371      TRegexp blu8("8led[sS]?[bB][lL][uU][eE]");
    305372      if (proj.Contains(blu8))
    306373        { fPattern |= k8LedBlue; color = kBLUE;    }
    307       TRegexp blu10("10[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     374      TRegexp blu10("10led[sS]?[bB][lL][uU][eE]");
    308375      if (proj.Contains(blu10))
    309376        { fPattern |= k10LedBlue; color = kBLUE;    }
    310       TRegexp blu15("15[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     377      TRegexp blu15("15led[sS]?[bB][lL][uU][eE]");
    311378      if (proj.Contains(blu15))
    312379        { fPattern |= k15LedBlue; color = kBLUE;    }
    313       TRegexp blu20("20[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     380      TRegexp blu20("20led[sS]?[bB][lL][uU][eE]");
    314381      if (proj.Contains(blu20))
    315382        { fPattern |= k20LedBlue; color = kBLUE;    }
    316       TRegexp blu21("21[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     383      TRegexp blu21("21led[sS]?[bB][lL][uU][eE]");
    317384      if (proj.Contains(blu21))
    318385        { fPattern |= k21LedBlue; color = kBLUE;    }
    319       TRegexp blu22("22[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     386      TRegexp blu22("22led[sS]?[bB][lL][uU][eE]");
    320387      if (proj.Contains(blu22))
    321388        { fPattern |= k22LedBlue; color = kBLUE;    }
    322       TRegexp blu23("23[lL]?[eE]?[dD]?[sS]?[bB][lL][uU][eE]");
     389      TRegexp blu23("23led[sS]?[bB][lL][uU][eE]");
    323390      if (proj.Contains(blu23))
    324391        { fPattern |= k23LedBlue; color = kBLUE;    }
    325392
    326393      // Possible UV combinations
    327       TRegexp uv1("[1][lL]?[eE]?[dD]?[sS]?[U][vV]");
     394      TRegexp uv1("1led[sS]?[U][vV]");
    328395      if (proj.Contains(uv1))
    329396        { fPattern |= k1LedUV; color = kUV;    }
    330       TRegexp uv2("[2][lL]?[eE]?[dD]?[sS]?[U][vV]");
     397      TRegexp uv2("2led[sS]?[U][vV]");
    331398      if (proj.Contains(uv2))
    332399        { fPattern |= k2LedUV; color = kUV;    }
    333       TRegexp uv3("[3][lL]?[eE]?[dD]?[sS]?[U][vV]");
     400      TRegexp uv3("3led[sS]?[U][vV]");
    334401      if (proj.Contains(uv3))
    335402        { fPattern |= k3LedUV; color = kUV;    }
    336       TRegexp uv5("[5][lL]?[eE]?[dD]?[sS]?[U][vV]");
     403      TRegexp uv5("5led[sS]?[U][vV]");
    337404      if (proj.Contains(uv5))
    338405        { fPattern |= k5LedUV1; color = kUV;    }
    339       TRegexp uv6("[6][lL]?[eE]?[dD]?[sS]?[U][vV]");
     406      TRegexp uv6("6led[sS]?[U][vV]");
    340407      if (proj.Contains(uv6))
    341408        { fPattern |= k6LedUV; color = kUV;    }
    342       TRegexp uv7("[7][lL]?[eE]?[dD]?[sS]?[U][vV]");
     409      TRegexp uv7("7led[sS]?[U][vV]");
    343410      if (proj.Contains(uv7))
    344411        { fPattern |= k7LedUV; color = kUV;    }
    345       TRegexp uv8("[8][lL]?[eE]?[dD]?[sS]?[U][vV]");
     412      TRegexp uv8("8led[sS]?[U][vV]");
    346413      if (proj.Contains(uv8))
    347414        { fPattern |= k8LedUV; color = kUV;    }
    348       TRegexp uv10("[10][lL]?[eE]?[dD]?[sS]?[U][vV]");
     415      TRegexp uv10("10led[sS]?[U][vV]");
    349416      if (proj.Contains(uv10))
    350417        { fPattern |= k10LedUV; color = kUV;    }
    351       TRegexp uv11("[11][lL]?[eE]?[dD]?[sS]?[U][vV]");
     418      TRegexp uv11("11led[sS]?[U][vV]");
    352419      if (proj.Contains(uv11))
    353420        { fPattern |= k11LedUV; color = kUV;    }
    354       TRegexp uv12("[12][lL]?[eE]?[dD]?[sS]?[U][vV]");
     421      TRegexp uv12("12led[sS]?[U][vV]");
    355422      if (proj.Contains(uv12))
    356423        { fPattern |= k12LedUV; color = kUV;    }
    357       TRegexp uv13("[13][lL]?[eE]?[dD]?[sS]?[U][vV]");
     424      TRegexp uv13("13led[sS]?[U][vV]");
    358425      if (proj.Contains(uv13))
    359426        { fPattern |= k13LedUV; color = kUV;    }
    360427
     428      // Possible slot combinations
     429      TRegexp slot("slot");
     430      if (proj.Contains(slot))
     431        {
     432          proj.ReplaceAll("slot","");
     433          UInt_t nr = 0;
     434          TRegexp slotnr("^[0-9]");
     435         
     436          if (proj.Contains(slotnr))
     437            { fPattern = 0; proj.Replace(2,99,"");
     438            proj.ReplaceAll("u","");
     439            proj.ReplaceAll("v","");
     440            proj.ReplaceAll("g","");
     441            nr = atoi(proj.Data())-1;
     442            fPattern |= BIT(nr);
     443            color = nr < 2 ? kGREEN :
     444              ( nr < 3 ) ? kBLUE :
     445              ( nr < 5 ) ? kUV :
     446              ( nr < 11 ) ? kBLUE :
     447              ( nr < 13 ) ? kUV :
     448              ( nr < 14 ) ? kBLUE :
     449              ( nr < 16 ) ? kGREEN :
     450              kCT1;   
     451            }
     452        }
     453     
    361454      if (color != kNONE)
    362455        *fLog << inf << "Color and Intensity determined from project-name (" << proj << ")... ";         
     
    375468          else if (proj.Contains("cl",TString::kIgnoreCase))
    376469            {
    377               *fLog << err << "This run has been taken with the continuous light source." << endl;
    378               *fLog << err
     470              *fLog << warn << "This run has been taken with the continuous light source." << endl;
     471              *fLog << warn
    379472                    << "It cannot be used for calibration. Try to run a pedestal extraction on it." << endl;
    380               return kFALSE;
     473              fPattern = 0;
     474              fIsValid = kTRUE;
     475              return kTRUE;
    381476            }
    382477        }
     
    415510    {
    416511      if (fPattern == 0)
    417         {
    418           *fLog << err << "CONTINUE " << endl;
    419           return kCONTINUE;
    420         }
     512        return kCONTINUE;
     513
    421514      fHeader->SetCalibrationPattern(fPattern);
    422515    }
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSet.h

    r4899 r5621  
    1515  static const Int_t gkIFAEBoxInaugurationRun; //! Run number of first IFAE box calibration (set to: 20113)
    1616  static const Int_t gkMCRunLimit;             //! Maximum MC run number (now set to: 1000)
    17 
     17  static const UInt_t gkFirstRunWithFinalBits; //! Run number of first functionning digital modules
     18 
    1819  MRawEvtHeader *fHeader;                     //! Event header with the pulse pattern information
    1920 
Note: See TracChangeset for help on using the changeset viewer.