Changeset 5621 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 12/17/04 18:27:43 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc
r5619 r5621 56 56 const Int_t MCalibColorSet::gkIFAEBoxInaugurationRun = 20113; 57 57 const Int_t MCalibColorSet::gkMCRunLimit = 1000; 58 const UInt_t MCalibColorSet::gkFirstRunWithFinalBits = 45626; 58 59 // -------------------------------------------------------------------------- 59 60 // … … 123 124 } 124 125 126 if (header->GetRunNumber() > gkFirstRunWithFinalBits) 127 return kTRUE; 128 125 129 // 126 130 // Consider the case that a pedestal run is interleaved in the calibration run sequence ... prepare 127 131 // to skip this run. 128 132 // 133 const UShort_t runtype = header->GetRunType(); 134 129 135 if (header->GetRunType() == MRawRunHeader::kRTPedestal) 130 136 { … … 208 214 case 44768: 209 215 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: 210 225 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: 211 236 // case 31756: 212 237 color = kBLUE; … … 214 239 215 240 case 30090: 241 case 31745: 242 case 31746: 243 case 31747: 244 case 31748: 216 245 case 20660: 217 246 case 20661: … … 221 250 case 26568: 222 251 case 26924: 252 case 45227: 253 case 45241: 254 case 45250: 255 case 45254: 256 case 45263: 257 case 45372: 258 case 45373: 223 259 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; 224 283 break; 225 284 … … 227 286 *fLog << err << "Sorry, run 27474 was taken with CLOSED LIDS. It should not be used! " << endl; 228 287 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; 229 295 } 230 296 … … 252 318 { 253 319 254 const TString proj = header->GetProjectName(); 255 320 TString proj = header->GetProjectName(); 321 proj.ToLower(); 322 256 323 // 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]"); 258 325 if (proj.Contains(gre0)) 259 326 { 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]"); 261 328 if (proj.Contains(gre1)) 262 329 { 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]"); 264 331 if (proj.Contains(gre2)) 265 332 { 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]"); 267 334 if (proj.Contains(gre3)) 268 335 { 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]"); 270 337 if (proj.Contains(gre5)) 271 338 { 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]"); 273 340 if (proj.Contains(gre6)) 274 341 { 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]"); 276 343 if (proj.Contains(gre7)) 277 344 { 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]"); 279 346 if (proj.Contains(gre8)) 280 347 { fPattern |= k8LedGreen; color = kGREEN; } 281 348 282 // Possible greencombinations283 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]"); 284 351 if (proj.Contains(blu0)) 285 352 { 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]"); 287 354 if (proj.Contains(blu1)) 288 355 { 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]"); 290 357 if (proj.Contains(blu2)) 291 358 { 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]"); 293 360 if (proj.Contains(blu3)) 294 361 { 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]"); 296 363 if (proj.Contains(blu5)) 297 364 { 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]"); 299 366 if (proj.Contains(blu6)) 300 367 { 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]"); 302 369 if (proj.Contains(blu7)) 303 370 { 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]"); 305 372 if (proj.Contains(blu8)) 306 373 { 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]"); 308 375 if (proj.Contains(blu10)) 309 376 { 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]"); 311 378 if (proj.Contains(blu15)) 312 379 { 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]"); 314 381 if (proj.Contains(blu20)) 315 382 { 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]"); 317 384 if (proj.Contains(blu21)) 318 385 { 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]"); 320 387 if (proj.Contains(blu22)) 321 388 { 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]"); 323 390 if (proj.Contains(blu23)) 324 391 { fPattern |= k23LedBlue; color = kBLUE; } 325 392 326 393 // Possible UV combinations 327 TRegexp uv1(" [1][lL]?[eE]?[dD]?[sS]?[U][vV]");394 TRegexp uv1("1led[sS]?[U][vV]"); 328 395 if (proj.Contains(uv1)) 329 396 { fPattern |= k1LedUV; color = kUV; } 330 TRegexp uv2(" [2][lL]?[eE]?[dD]?[sS]?[U][vV]");397 TRegexp uv2("2led[sS]?[U][vV]"); 331 398 if (proj.Contains(uv2)) 332 399 { fPattern |= k2LedUV; color = kUV; } 333 TRegexp uv3(" [3][lL]?[eE]?[dD]?[sS]?[U][vV]");400 TRegexp uv3("3led[sS]?[U][vV]"); 334 401 if (proj.Contains(uv3)) 335 402 { fPattern |= k3LedUV; color = kUV; } 336 TRegexp uv5(" [5][lL]?[eE]?[dD]?[sS]?[U][vV]");403 TRegexp uv5("5led[sS]?[U][vV]"); 337 404 if (proj.Contains(uv5)) 338 405 { fPattern |= k5LedUV1; color = kUV; } 339 TRegexp uv6(" [6][lL]?[eE]?[dD]?[sS]?[U][vV]");406 TRegexp uv6("6led[sS]?[U][vV]"); 340 407 if (proj.Contains(uv6)) 341 408 { fPattern |= k6LedUV; color = kUV; } 342 TRegexp uv7(" [7][lL]?[eE]?[dD]?[sS]?[U][vV]");409 TRegexp uv7("7led[sS]?[U][vV]"); 343 410 if (proj.Contains(uv7)) 344 411 { fPattern |= k7LedUV; color = kUV; } 345 TRegexp uv8(" [8][lL]?[eE]?[dD]?[sS]?[U][vV]");412 TRegexp uv8("8led[sS]?[U][vV]"); 346 413 if (proj.Contains(uv8)) 347 414 { fPattern |= k8LedUV; color = kUV; } 348 TRegexp uv10(" [10][lL]?[eE]?[dD]?[sS]?[U][vV]");415 TRegexp uv10("10led[sS]?[U][vV]"); 349 416 if (proj.Contains(uv10)) 350 417 { fPattern |= k10LedUV; color = kUV; } 351 TRegexp uv11(" [11][lL]?[eE]?[dD]?[sS]?[U][vV]");418 TRegexp uv11("11led[sS]?[U][vV]"); 352 419 if (proj.Contains(uv11)) 353 420 { fPattern |= k11LedUV; color = kUV; } 354 TRegexp uv12(" [12][lL]?[eE]?[dD]?[sS]?[U][vV]");421 TRegexp uv12("12led[sS]?[U][vV]"); 355 422 if (proj.Contains(uv12)) 356 423 { fPattern |= k12LedUV; color = kUV; } 357 TRegexp uv13(" [13][lL]?[eE]?[dD]?[sS]?[U][vV]");424 TRegexp uv13("13led[sS]?[U][vV]"); 358 425 if (proj.Contains(uv13)) 359 426 { fPattern |= k13LedUV; color = kUV; } 360 427 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 361 454 if (color != kNONE) 362 455 *fLog << inf << "Color and Intensity determined from project-name (" << proj << ")... "; … … 375 468 else if (proj.Contains("cl",TString::kIgnoreCase)) 376 469 { 377 *fLog << err<< "This run has been taken with the continuous light source." << endl;378 *fLog << err470 *fLog << warn << "This run has been taken with the continuous light source." << endl; 471 *fLog << warn 379 472 << "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; 381 476 } 382 477 } … … 415 510 { 416 511 if (fPattern == 0) 417 { 418 *fLog << err << "CONTINUE " << endl; 419 return kCONTINUE; 420 } 512 return kCONTINUE; 513 421 514 fHeader->SetCalibrationPattern(fPattern); 422 515 } -
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.h
r4899 r5621 15 15 static const Int_t gkIFAEBoxInaugurationRun; //! Run number of first IFAE box calibration (set to: 20113) 16 16 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 18 19 MRawEvtHeader *fHeader; //! Event header with the pulse pattern information 19 20
Note:
See TracChangeset
for help on using the changeset viewer.