Changeset 5690 for trunk/MagicSoft/Mars
- Timestamp:
- 12/27/04 13:13:32 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5688 r5690 22 22 23 23 24 2004/12/27 Thomas Bretz 25 26 * macros/CCDataCheck.C: 27 - fixed some warnings: Wrong data access operator 28 29 * manalysis/MCerPhotPix.h: 30 - added to possibility to reset the core-flag 31 32 * mcalib/MCalibColorSet.[h,cc]: 33 - moved some common code to a new function CheckAndSet for 34 simplicity of the color decoding 35 - added an include for stdlib.h (needed for some compilers and atoi) 36 37 * mcalib/MCalibrationIntensityChargeCam.cc: 38 - fixed a warning about a invalid escape sequence -- seems that 39 not all compilers do display this warning... 40 - corrected order of includes 41 42 * mfbase/MFEventSelector2.[h,cc]: 43 - some cosmetic fixes 44 - some adpations to standard output (eg. Separator() instead of ***) 45 - added a check whether 'filter' inherits from MFilter 46 - fixed the return of ReadDistribution 47 - made comments for data members in cleass header 'one line' 48 49 * mimage/MImgCleanStd.[h,cc]: 50 - added fNameGeomCam for parameter list access 51 - added fNameCerPhotEvt for parameter list access 52 - fixed a typo in an output 53 - NO change to ANY algorithm! 54 - changed class version from 1 to 2 55 56 * mjobs/MJCalibrateSignal.cc: 57 - added a rule to replace .raw by .root in MWriteRootFile 58 59 * mranforest/MRanForestCalc.[h,cc]: 60 - fixed missing data member initialization in constructor 61 - added ReadEnv which is able to read a random forest from a file 62 - added an owner flag for the random forest tree 63 64 65 24 66 2004/12/22 Markus Gaug 25 67 26 * mraw/MRawEvtHeader.[h,cc] 68 * mraw/MRawEvtHeader.[h,cc]: 27 69 - added some new Getter-functions for the calibration conf. 28 70 pattern 29 * mcalib/MCalibrationChargeCalc.[h,cc] 30 * mcalib/MCalibrationRelTimeCalc.[h,cc] 31 * mcalib/MCalibrationColorSteer.cc 71 72 * mcalib/MCalibrationChargeCalc.[h,cc], 73 mcalib/MCalibrationRelTimeCalc.[h,cc], 74 mcalib/MCalibrationColorSteer.cc: 32 75 - use the new functions 33 76 34 * mhcalib/MHCalibrationCam.[h,cc] 35 * mhcalib/MHCalibrationRelTimeCam.[h,cc]36 * mhcalib/MHCalibrationChargeCam.[h,cc]77 * mhcalib/MHCalibrationCam.[h,cc], 78 mhcalib/MHCalibrationRelTimeCam.[h,cc], 79 mhcalib/MHCalibrationChargeCam.[h,cc]: 37 80 - centralize the decision about the probability limit to be 38 81 taken inside these classes. … … 41 84 - fix a bug in the calculation of outliers. Standard analyses 42 85 not affected! 86 43 87 44 88 … … 91 135 92 136 137 93 138 2004/12/22: Eva Domingo (for Wolfgang Wittek) 94 139 … … 102 147 103 148 149 104 150 2004/12/22: Abelardo Moralejo 105 151 … … 112 158 113 159 160 114 161 2004/12/17: Markus Gaug 115 162 … … 117 164 - added missing runs where run number does not appear any more in 118 165 project-name and is not yet set in the digital modules. 119 * mcalib/MCalibrationIntensityCam.[h,cc] 120 * mcalib/MCalibrationIntensityChargeCam.[h,cc] 121 * mcalib/MCalibrationIntensityRelTimeCam.[h,cc] 166 167 * mcalib/MCalibrationIntensityCam.[h,cc], 168 mcalib/MCalibrationIntensityChargeCam.[h,cc], 169 mcalib/MCalibrationIntensityRelTimeCam.[h,cc]: 122 170 - added some new functions to display the results of the intensity 123 171 calibration 172 173 124 174 125 175 2004/12/17: Thomas Bretz -
trunk/MagicSoft/Mars/macros/CCDataCheck.C
r3866 r5690 509 509 // Drive report (pointing.C from T. Bretz) 510 510 // 511 TCanvas *c1; 511 512 if ((d = evtloop.GetDisplay())) 512 TCanvas &c1 = d.AddTab("DRIVE SYSTEM");513 c1 = &d->AddTab("DRIVE SYSTEM"); 513 514 else 514 TCanvas *c1 = new TCanvas(); 515 c1 = new TCanvas(); 516 515 517 // ************* Plot the telescope tracking positions on the sky *********** 516 518 TGraph *g1 = hZd.GetGraph(); … … 563 565 gStyle->SetStatFormat(".2g"); 564 566 mh3 = (MH3*)hError.DrawClone("nonew"); 565 mh3->GetHist() ->SetXTitle("\\Delta [arcmin]");566 mh3->GetHist() ->SetYTitle("");567 mh3->GetHist() ->SetTitle("Control deviation of the motors");568 mh3->GetHist() ->SetStats(1);569 mh3->GetHist() ->SetLabelSize(0.06,"X");570 mh3->GetHist() ->SetLabelSize(0.06,"Y");571 mh3->GetHist() ->SetTitleSize(0.06,"X");567 mh3->GetHist().SetXTitle("\\Delta [arcmin]"); 568 mh3->GetHist().SetYTitle(""); 569 mh3->GetHist().SetTitle("Control deviation of the motors"); 570 mh3->GetHist().SetStats(1); 571 mh3->GetHist().SetLabelSize(0.06,"X"); 572 mh3->GetHist().SetLabelSize(0.06,"Y"); 573 mh3->GetHist().SetTitleSize(0.06,"X"); 572 574 TLine ln; 573 575 ln.SetLineColor(kGreen); 574 ln.DrawLine(0.5*360*60/16384., 0, 0.5*360*60/16384., hError.GetHist() ->GetMaximum());576 ln.DrawLine(0.5*360*60/16384., 0, 0.5*360*60/16384., hError.GetHist().GetMaximum()); 575 577 ln.SetLineColor(kYellow); 576 ln.DrawLine(1.0*360*60/16384., 0, 1.0*360*60/16384., hError.GetHist() ->GetMaximum());578 ln.DrawLine(1.0*360*60/16384., 0, 1.0*360*60/16384., hError.GetHist().GetMaximum()); 577 579 ln.SetLineColor(kRed); 578 ln.DrawLine(2.0*360*60/16384., 0, 2.0*360*60/16384., hError.GetHist() ->GetMaximum());580 ln.DrawLine(2.0*360*60/16384., 0, 2.0*360*60/16384., hError.GetHist().GetMaximum()); 579 581 // ---------------------- Plot the drive status vs time --------------------- 580 582 c1->cd(); … … 616 618 gStyle->SetStatFormat(".2g"); 617 619 mh3 = (MH3*)hError2.DrawClone("nonew"); 618 mh3->GetHist() ->SetXTitle("Zd [\\circ]");619 mh3->GetHist() ->SetYTitle("\\Delta [arcmin]");620 mh3->GetHist() ->SetTitle("Control deviation of the motors");621 mh3->GetHist() ->SetLabelSize(0.06,"X");622 mh3->GetHist() ->SetLabelSize(0.06,"Y");623 mh3->GetHist() ->SetTitleSize(0.06,"X");624 mh3->GetHist() ->SetTitleSize(0.06,"Y");625 mh3->GetHist() ->SetStats(1);626 mh3->GetHist() ->Draw("box");620 mh3->GetHist().SetXTitle("Zd [\\circ]"); 621 mh3->GetHist().SetYTitle("\\Delta [arcmin]"); 622 mh3->GetHist().SetTitle("Control deviation of the motors"); 623 mh3->GetHist().SetLabelSize(0.06,"X"); 624 mh3->GetHist().SetLabelSize(0.06,"Y"); 625 mh3->GetHist().SetTitleSize(0.06,"X"); 626 mh3->GetHist().SetTitleSize(0.06,"Y"); 627 mh3->GetHist().SetStats(1); 628 mh3->GetHist().Draw("box"); 627 629 // -------------------------- Zenith angle vs time -------------------------- 628 630 c1->cd(); -
trunk/MagicSoft/Mars/manalysis/MCerPhotPix.h
r4702 r5690 42 42 Short_t GetRing() const { return fRing;} 43 43 44 void SetPixelCore( ) { fIsCore = kTRUE; }44 void SetPixelCore(Bool_t b=kTRUE){ fIsCore = b; } 45 45 Bool_t IsPixelCore() const { return fIsCore; } 46 46 -
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc
r5677 r5690 39 39 #include "MCalibColorSet.h" 40 40 41 #include "TRegexp.h" 41 #include <stdlib.h> // needed for atoi on some platforms 42 43 #include <TRegexp.h> 42 44 43 45 #include "MLog.h" … … 51 53 ClassImp(MCalibColorSet); 52 54 53 54 55 using namespace std; 55 56 56 const Int_t MCalibColorSet::gkIFAEBoxInaugurationRun = 20113; 57 const Int_t MCalibColorSet::gkMCRunLimit = 1000; 58 const UInt_t MCalibColorSet::gkFirstRunWithFinalBits = 45626; 57 const Int_t MCalibColorSet::gkIFAEBoxInaugurationRun = 20113; 58 const Int_t MCalibColorSet::gkMCRunLimit = 1000; 59 const UInt_t MCalibColorSet::gkFirstRunWithFinalBits = 45626; 60 59 61 // -------------------------------------------------------------------------- 60 62 // … … 95 97 96 98 return kTRUE; 99 } 100 101 // -------------------------------------------------------------------------- 102 // 103 // Check if str contains regexp. 104 // If so or pat to pattern and set color to col. 105 // Otherwise do nothing. 106 // 107 // Normally this function is much to simple (more arguments than lines!) 108 // but in this particular case it is worth to have it to avois chaotic 109 // repitions of the same piece of code for many many times. 110 // 111 void MCalibColorSet::CheckAndSet(const TString &str, const char *regexp, UInt_t &pattern, UInt_t pat, Int_t &color, Int_t col) const 112 { 113 if (!str.Contains(TRegexp(regexp))) 114 return; 115 116 pattern |= pat; 117 color = col; 97 118 } 98 119 … … 295 316 296 317 if (color!=kNONE) 297 318 { 298 319 *fLog << inf << "Color determined from the run-number... "; 299 320 switch (color) 300 301 302 303 case kUV: *fLog << "UV."; fPattern |= k10LedUV;break;304 321 { 322 case kGREEN: *fLog << "Green."; fPattern |= k5LedGreen; break; 323 case kBLUE: *fLog << "Blue."; fPattern |= k5LedBlue1; break; 324 case kUV: *fLog << "UV."; fPattern |= k10LedUV; break; 325 } 305 326 *fLog << endl; 306 327 fIsValid = kTRUE; 307 328 return kTRUE; 308 } 309 else 310 { 311 312 TString proj = header->GetProjectName(); 313 proj.ToLower(); 314 315 // Possible green combinations 316 TRegexp gre0("0.1led[sS]?gree"); 317 if (proj.Contains(gre0)) 318 { fPattern |= k01LedGreen; color = kGREEN; } 319 TRegexp gre1("1led[sS]?gree"); 320 if (proj.Contains(gre1)) 321 { fPattern |= k1LedGreen; color = kGREEN; } 322 TRegexp gre2("2led[sS]?gree"); 323 if (proj.Contains(gre2)) 324 { fPattern |= k2LedGreen; color = kGREEN; } 325 TRegexp gre3("3led[sS]?gree"); 326 if (proj.Contains(gre3)) 327 { fPattern |= k3LedGreen; color = kGREEN; } 328 TRegexp gre5("5led[sS]?gree"); 329 if (proj.Contains(gre5)) 330 { fPattern |= k5LedGreen; color = kGREEN; } 331 TRegexp gre6("6led[sS]?gree"); 332 if (proj.Contains(gre6)) 333 { fPattern |= k6LedGreen; color = kGREEN; } 334 TRegexp gre7("7led[sS]?gree"); 335 if (proj.Contains(gre7)) 336 { fPattern |= k7LedGreen; color = kGREEN; } 337 TRegexp gre8("8led[sS]?gree"); 338 if (proj.Contains(gre8)) 339 { fPattern |= k8LedGreen; color = kGREEN; } 340 341 // Possible blue combinations 342 TRegexp blu0("0.1led[sS]?blue"); 343 if (proj.Contains(blu0)) 344 { fPattern |= k01LedBlue; color = kBLUE; } 345 TRegexp blu1("1led[sS]?blue"); 346 if (proj.Contains(blu1)) 347 { fPattern |= k1LedBlue; color = kBLUE; } 348 TRegexp blu2("2led[sS]?blue"); 349 if (proj.Contains(blu2)) 350 { fPattern |= k2LedBlue; color = kBLUE; } 351 TRegexp blu3("3led[sS]?blue"); 352 if (proj.Contains(blu3)) 353 { fPattern |= k3LedBlue; color = kBLUE; } 354 TRegexp blu5("5led[sS]?blue"); 355 if (proj.Contains(blu5)) 356 { fPattern |= k5LedBlue1; color = kBLUE; } 357 TRegexp blu6("6led[sS]?blue"); 358 if (proj.Contains(blu6)) 359 { fPattern |= k6LedBlue; color = kBLUE; } 360 TRegexp blu7("7led[sS]?blue"); 361 if (proj.Contains(blu7)) 362 { fPattern |= k7LedBlue; color = kBLUE; } 363 TRegexp blu8("8led[sS]?blue"); 364 if (proj.Contains(blu8)) 365 { fPattern |= k8LedBlue; color = kBLUE; } 366 TRegexp blu10("10led[sS]?blue"); 367 if (proj.Contains(blu10)) 368 { fPattern |= k10LedBlue; color = kBLUE; } 369 TRegexp blu15("15led[sS]?blue"); 370 if (proj.Contains(blu15)) 371 { fPattern |= k15LedBlue; color = kBLUE; } 372 TRegexp blu20("20led[sS]?blue"); 373 if (proj.Contains(blu20)) 374 { fPattern |= k20LedBlue; color = kBLUE; } 375 TRegexp blu21("21led[sS]?blue"); 376 if (proj.Contains(blu21)) 377 { fPattern |= k21LedBlue; color = kBLUE; } 378 TRegexp blu22("22led[sS]?blue"); 379 if (proj.Contains(blu22)) 380 { fPattern |= k22LedBlue; color = kBLUE; } 381 TRegexp blu23("23led[sS]?blue"); 382 if (proj.Contains(blu23)) 383 { fPattern |= k23LedBlue; color = kBLUE; } 384 385 // Possible UV combinations 386 TRegexp uv1("1led[sS]?uv"); 387 if (proj.Contains(uv1)) 388 { fPattern |= k1LedUV; color = kUV; } 389 TRegexp uv2("2led[sS]?uv"); 390 if (proj.Contains(uv2)) 391 { fPattern |= k2LedUV; color = kUV; } 392 TRegexp uv3("3led[sS]?uv"); 393 if (proj.Contains(uv3)) 394 { fPattern |= k3LedUV; color = kUV; } 395 TRegexp uv5("5led[sS]?uv"); 396 if (proj.Contains(uv5)) 397 { fPattern |= k5LedUV1; color = kUV; } 398 TRegexp uv6("6led[sS]?uv"); 399 if (proj.Contains(uv6)) 400 { fPattern |= k6LedUV; color = kUV; } 401 TRegexp uv7("7led[sS]?uv"); 402 if (proj.Contains(uv7)) 403 { fPattern |= k7LedUV; color = kUV; } 404 TRegexp uv8("8led[sS]?uv"); 405 if (proj.Contains(uv8)) 406 { fPattern |= k8LedUV; color = kUV; } 407 TRegexp uv10("10led[sS]?uv"); 408 if (proj.Contains(uv10)) 409 { fPattern |= k10LedUV; color = kUV; } 410 TRegexp uv11("11led[sS]?uv"); 411 if (proj.Contains(uv11)) 412 { fPattern |= k11LedUV; color = kUV; } 413 TRegexp uv12("12led[sS]?uv"); 414 if (proj.Contains(uv12)) 415 { fPattern |= k12LedUV; color = kUV; } 416 TRegexp uv13("13led[sS]?uv"); 417 if (proj.Contains(uv13)) 418 { fPattern |= k13LedUV; color = kUV; } 419 420 // Possible slot combinations 421 TRegexp slot("slot"); 422 if (proj.Contains(slot)) 423 { 424 proj.ReplaceAll("slot",""); 425 UInt_t nr = 0; 426 TRegexp slotnr("^[0-9]"); 427 428 if (proj.Contains(slotnr)) 429 { fPattern = 0; proj.Replace(2,99,""); 430 proj.ReplaceAll("u",""); 431 proj.ReplaceAll("v",""); 432 proj.ReplaceAll("g",""); 433 nr = atoi(proj.Data())-1; 434 fPattern |= BIT(nr); 435 color = nr < 2 ? kGREEN : 436 ( nr < 3 ) ? kBLUE : 437 ( nr < 5 ) ? kUV : 438 ( nr < 11 ) ? kBLUE : 439 ( nr < 13 ) ? kUV : 440 ( nr < 14 ) ? kBLUE : 441 ( nr < 16 ) ? kGREEN : 442 kCT1; 443 } 444 } 445 329 } 330 331 TString proj = header->GetProjectName(); 332 proj.ToLower(); 333 334 // Possible green combinations 335 CheckAndSet(proj, "0.1led[sS]?gree", fPattern, k01LedGreen, color, kGREEN); 336 CheckAndSet(proj, "1led[sS]?gree", fPattern, k1LedGreen, color, kGREEN); 337 CheckAndSet(proj, "2led[sS]?gree", fPattern, k2LedGreen, color, kGREEN); 338 CheckAndSet(proj, "3led[sS]?gree", fPattern, k3LedGreen, color, kGREEN); 339 CheckAndSet(proj, "5led[sS]?gree", fPattern, k5LedGreen, color, kGREEN); 340 CheckAndSet(proj, "6led[sS]?gree", fPattern, k6LedGreen, color, kGREEN); 341 CheckAndSet(proj, "7led[sS]?gree", fPattern, k7LedGreen, color, kGREEN); 342 CheckAndSet(proj, "8led[sS]?gree", fPattern, k8LedGreen, color, kGREEN); 343 344 // Possible blue combinations 345 CheckAndSet(proj, "0.1led[sS]?blue", fPattern, k01LedBlue, color, kBLUE); 346 CheckAndSet(proj, "1led[sS]?blue", fPattern, k1LedBlue, color, kBLUE); 347 CheckAndSet(proj, "2led[sS]?blue", fPattern, k2LedBlue, color, kBLUE); 348 CheckAndSet(proj, "3led[sS]?blue", fPattern, k3LedBlue, color, kBLUE); 349 CheckAndSet(proj, "5led[sS]?blue", fPattern, k5LedBlue1, color, kBLUE); 350 CheckAndSet(proj, "6led[sS]?blue", fPattern, k6LedBlue, color, kBLUE); 351 CheckAndSet(proj, "7led[sS]?blue", fPattern, k7LedBlue, color, kBLUE); 352 CheckAndSet(proj, "8led[sS]?blue", fPattern, k8LedBlue, color, kBLUE); 353 CheckAndSet(proj, "10led[sS]?blue", fPattern, k10LedBlue, color, kBLUE); 354 CheckAndSet(proj, "15led[sS]?blue", fPattern, k15LedBlue, color, kBLUE); 355 CheckAndSet(proj, "20led[sS]?blue", fPattern, k20LedBlue, color, kBLUE); 356 CheckAndSet(proj, "21led[sS]?blue", fPattern, k21LedBlue, color, kBLUE); 357 CheckAndSet(proj, "22led[sS]?blue", fPattern, k22LedBlue, color, kBLUE); 358 CheckAndSet(proj, "23led[sS]?blue", fPattern, k23LedBlue, color, kBLUE); 359 360 // Possible UV combinations 361 CheckAndSet(proj, "1led[sS]?uv", fPattern, k1LedUV, color, kUV); 362 CheckAndSet(proj, "2led[sS]?uv", fPattern, k2LedUV, color, kUV); 363 CheckAndSet(proj, "3led[sS]?uv", fPattern, k3LedUV, color, kUV); 364 CheckAndSet(proj, "5led[sS]?uv", fPattern, k5LedUV1, color, kUV); 365 CheckAndSet(proj, "6led[sS]?uv", fPattern, k6LedUV, color, kUV); 366 CheckAndSet(proj, "7led[sS]?uv", fPattern, k7LedUV, color, kUV); 367 CheckAndSet(proj, "8led[sS]?uv", fPattern, k8LedUV, color, kUV); 368 CheckAndSet(proj, "10led[sS]?uv", fPattern, k10LedUV, color, kUV); 369 CheckAndSet(proj, "11led[sS]?uv", fPattern, k11LedUV, color, kUV); 370 CheckAndSet(proj, "12led[sS]?uv", fPattern, k12LedUV, color, kUV); 371 CheckAndSet(proj, "13led[sS]?uv", fPattern, k13LedUV, color, kUV); 372 373 // Possible slot combinations 374 TRegexp slot("slot"); 375 if (proj.Contains(slot)) 376 { 377 proj.ReplaceAll("slot",""); 378 UInt_t nr = 0; 379 TRegexp slotnr("^[0-9]"); 380 381 if (proj.Contains(slotnr)) 382 { 383 fPattern = 0; 384 proj.Replace(2,99,""); 385 proj.ReplaceAll("u",""); 386 proj.ReplaceAll("v",""); 387 proj.ReplaceAll("g",""); 388 nr = atoi(proj.Data())-1; 389 390 fPattern |= BIT(nr); 391 392 color = nr < 2 ? kGREEN : 393 ( nr < 3 ) ? kBLUE : 394 ( nr < 5 ) ? kUV : 395 ( nr < 11 ) ? kBLUE : 396 ( nr < 13 ) ? kUV : 397 ( nr < 14 ) ? kBLUE : 398 ( nr < 16 ) ? kGREEN : 399 kCT1; 400 } 401 } 402 403 if (color == kNONE) 404 { 405 CheckAndSet(proj, "gree", fPattern, k5LedGreen, color, kGREEN); 406 CheckAndSet(proj, "blue", fPattern, k5LedBlue1, color, kBLUE); 407 CheckAndSet(proj, "uv", fPattern, k5LedUV1, color, kUV); 408 CheckAndSet(proj, "ct1", fPattern, kCT1Pulser, color, kCT1); 409 446 410 if (color != kNONE) 447 *fLog << inf << "Color and Intensity determined from project-name (" << proj << ")... ";411 *fLog << inf << "Color determined from project-name (" << proj << ")... "; 448 412 else 449 { 450 if (proj.Contains("gree",TString::kIgnoreCase)) 451 { fPattern |= k5LedGreen; color = kGREEN; } 452 if (proj.Contains("blue",TString::kIgnoreCase)) 453 { fPattern |=k5LedBlue1; color = kBLUE;} 454 if (proj.Contains("uv",TString::kIgnoreCase)) 455 { fPattern |=k5LedUV1 ; color = kUV; } 456 if (proj.Contains("ct1",TString::kIgnoreCase)) 457 { fPattern |=kCT1Pulser; color = kCT1; } 458 if (color != kNONE) 459 *fLog << inf << "Color determined from project-name (" << proj << ")... "; 460 else if (proj.Contains("cl",TString::kIgnoreCase)) 461 { 462 *fLog << warn << "This run has been taken with the continuous light source." << endl; 463 *fLog << warn 464 << "It cannot be used for calibration. Try to run a pedestal extraction on it." << endl; 413 if (proj.Contains("cl",TString::kIgnoreCase)) 414 { 415 *fLog << warn; 416 *fLog << "This run has been taken with the continuous light source." << endl; 417 *fLog << "It cannot be used for calibration. Try to run a pedestal extraction on it." << endl; 465 418 fPattern = 0; 466 419 fIsValid = kTRUE; 467 420 return kTRUE; 468 } 469 } 470 } 471 472 if (color==kNONE) 473 { 474 *fLog << err << "Sorry, calibration run " << num << " was taken before the events could be" << endl; 421 } 422 423 *fLog << err; 424 *fLog << "Sorry, calibration run " << num << " was taken before the events could be" << endl; 475 425 *fLog << "flagged with a color by the digital modul and no color" << endl; 476 426 *fLog << "could be determined... abort." << endl; 477 427 return kFALSE; 478 } 479 428 } 429 430 *fLog << inf << "Color and Intensity determined from project-name (" << proj << ")... "; 431 480 432 switch (color) 481 482 483 484 485 486 433 { 434 case kGREEN: *fLog << "Green."; break; 435 case kBLUE: *fLog << "Blue."; break; 436 case kUV: *fLog << "UV."; break; 437 case kCT1: *fLog << "CT1."; break; 438 } 487 439 *fLog << endl; 488 440 489 441 fIsValid = kTRUE; 490 442 491 443 return kTRUE; 492 444 } -
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.h
r5621 r5690 21 21 UInt_t fPattern; // Current pulse pattern 22 22 Bool_t fIsValid; // Have to set the pulse pattern? 23 23 24 void CheckAndSet(const TString &str, const char *regexp, UInt_t &pattern, UInt_t pat, Int_t &color, Int_t col) const; 25 24 26 Bool_t ReInit(MParList *pList); 25 27 Int_t PreProcess(MParList *pList); -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityChargeCam.cc
r5660 r5690 40 40 ///////////////////////////////////////////////////////////////////////////// 41 41 #include "MCalibrationIntensityChargeCam.h" 42 43 #include <TF1.h> 44 #include <TH2.h> 45 #include <TGraphErrors.h> 46 #include <TOrdCollection.h> 47 48 #include "MLog.h" 49 50 #include "MGeomCam.h" 51 #include "MGeomPix.h" 52 42 53 #include "MCalibrationChargeCam.h" 43 54 #include "MCalibrationChargePix.h" 44 45 #include "MGeomCam.h"46 #include "MGeomPix.h"47 48 #include "MLog.h"49 50 #include <TOrdCollection.h>51 #include <TGraphErrors.h>52 #include <TH2F.h>53 #include <TF1.h>54 55 55 56 ClassImp(MCalibrationIntensityChargeCam); … … 428 429 const Float_t qe = pix.GetConvertedMeanErr(); 429 430 oneoverq [i] = 1./q; 430 oneoverqerr[i] = qe / q / q;431 oneoverqerr[i] = qe / (q * q); 431 432 } 432 433 … … 436 437 gr->SetTitle(Form("%s%3i","Pixel ",pixid)); 437 438 gr->GetXaxis()->SetTitle("1/Q [FADC counts^{-1}]"); 438 gr->GetYaxis()->SetTitle("\ sigma_{red}^{2}/Q^{2} [1]");439 gr->GetYaxis()->SetTitle("\\sigma_{red}^{2}/Q^{2} [1]"); 439 440 return gr; 440 441 } -
trunk/MagicSoft/Mars/mfbase/MFEventSelector2.cc
r5667 r5690 116 116 #include "MH3.h" // MH3 117 117 #include "MRead.h" // MRead 118 //#include "MProgressBar.h" //119 118 #include "MEvtLoop.h" // MEvtLoop 120 119 #include "MTaskList.h" // MTaskList … … 158 157 // events outside these ranges won't be accepted). 159 158 // 159 // Set default name of filter to be applied when determining the original 160 // distribution for all data on the input file to "FilterSelector2" 161 // 160 162 MFEventSelector2::MFEventSelector2(MH3 &hist, const char *name, const char *title) 161 : fHistOrig(NULL), fHistNom(&hist), fHistRes(NULL), 162 fDataX(hist.GetRule('x')), fDataY(hist.GetRule('y')), 163 fDataZ(hist.GetRule('z')), fNumMax(-1), fHistIsProbability(kFALSE), 164 fUseOrigDist(kTRUE) 163 : fHistOrig(NULL), fHistNom(&hist), fHistRes(NULL), 164 fDataX(hist.GetRule('x')), fDataY(hist.GetRule('y')), 165 fDataZ(hist.GetRule('z')), fNumMax(-1), fCanvas(0), 166 fFilterName("FilterSelector2"), fHistIsProbability(kFALSE), 167 fUseOrigDist(kTRUE) 165 168 { 166 169 fName = name ? (TString)name : gsDefName; 167 170 fTitle = title ? (TString)title : gsDefTitle; 168 169 // name of filter to be applied when determining the original distribution170 // for all data on the input file171 fFilterName = "FilterSelector2";172 171 } 173 172 … … 216 215 } 217 216 218 *fLog << inf << underline << endl; 219 *fLog << "MFEventSelector2::ReadDistribution:" << endl; 220 *fLog << "**********************" << endl; 221 *fLog << " - Start of eventloop to generate the original distribution..." 222 << endl; 217 *fLog << inf; 218 fLog->Separator("MFEventSelector2::ReadDistribution"); 219 *fLog << " - Start of eventloop to generate the original distribution..." << endl; 223 220 224 221 if (filter != NULL) 225 { 226 *fLog << " filter used : " << filter->GetName() 227 << endl; 228 } 222 *fLog << " - filter used: " << filter->GetDescriptor() << endl; 229 223 230 224 231 225 MEvtLoop run("ReadDistribution"); 232 //MProgressBar bar;233 //run.SetProgressBar(&bar);234 226 235 227 MParList plist; … … 264 256 if (!run.Eventloop()) 265 257 { 266 *fLog << err << dbginf 267 << "Evtloop in MFEventSelector2::ReadDistribution failed." 268 << endl; 269 return kFALSE; 270 } 271 272 tlist.PrintStatistics(0, kTRUE); 258 *fLog << err << dbginf << "Evtloop failed... abort." << endl; 259 return kFALSE; 260 } 261 262 tlist.PrintStatistics(); 273 263 274 264 *fLog << inf; 275 265 *fLog << "MFEventSelector2::ReadDistribution:" << endl; 276 *fLog << " - Original distribution has " 277 << fHistOrig->GetHist().GetEntries() << " entries." << endl; 278 *fLog << " - End of eventloop to generate the original distribution." 279 << endl; 280 *fLog << "**********************" << endl; 266 *fLog << " - Original distribution has " << fHistOrig->GetHist().GetEntries() << " entries." << endl; 267 *fLog << " - End of eventloop to generate the original distribution." << endl; 268 fLog->Separator(); 281 269 282 270 return read.Rewind(); … … 447 435 if (!read) 448 436 { 449 *fLog << err << "MRead not found ... abort." << endl;437 *fLog << err << "MRead not found in tasklist... abort." << endl; 450 438 return kFALSE; 451 439 } 452 440 453 441 MFilter *filter = (MFilter*)tasklist->FindObject(fFilterName); 454 if (!filter) 455 { 456 *fLog << inf 457 << "No filter will be used when making the original distribution" 458 << endl; 459 filter = NULL; 460 } 461 442 if (!filter || !filter->InheritsFrom(MFilter::Class())) 443 { 444 *fLog << inf << "No filter will be used when making the original distribution" << endl; 445 filter = NULL; 446 } 462 447 463 448 if (!ReadDistribution(*read, filter)) 464 449 return kFALSE; 465 466 450 467 451 // Prepare histograms and arrays for selection 468 452 PrepareHistograms(); 469 453 470 *fLog << "MFEventSelector2::PreProcess; call PreProcess() for read and filter object again" 471 << endl; 472 Int_t rcr = read->CallPreProcess(parlist); 473 Int_t rcf = filter->CallPreProcess(parlist); 474 475 *fLog << "rcr, rcf = " << rcr << ", " << rcf << endl; 476 477 return rcf*rcr; 454 *fLog << all << "PreProcess..." << flush; 455 const Int_t rcf = filter->CallPreProcess(parlist); 456 if (rcf!=kTRUE) 457 return rcf; 458 459 const Int_t rcr = read->CallPreProcess(parlist); 460 return rcr; 478 461 } 479 462 -
trunk/MagicSoft/Mars/mfbase/MFEventSelector2.h
r5667 r5690 41 41 TCanvas *fCanvas; //! canvas for online display 42 42 43 TString fFilterName; // name of the MFilter object to be used 44 // when determining the original distribution 43 TString fFilterName; // name of the MFilter object to be used when determining the original distribution 45 44 46 45 Bool_t fResult; 47 46 Bool_t fHistIsProbability; 48 Bool_t fUseOrigDist; // flag indicating that in the selection the 49 // original distribution is not changed 47 Bool_t fUseOrigDist; // flag indicating that in the selection the original distribution is not changed 50 48 51 49 Int_t fCounter[3]; -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
r5557 r5690 325 325 326 326 const TString MImgCleanStd::gsNamePedPhotCam="MPedPhotCam"; // default name of the 'MPedPhotCam' container 327 const TString MImgCleanStd::gsNameCerPhotEvt="MCerPhotEvt"; // default name of the 'MCerPhotEvt' container 328 const TString MImgCleanStd::gsNameGeomCam ="MGeomCam"; // default name of the 'MGeomCam' container 327 329 328 330 // -------------------------------------------------------------------------- … … 337 339 const char *name, const char *title) 338 340 : fCleaningMethod(kStandard), fCleanLvl1(lvl1), 339 fCleanLvl2(lvl2), fCleanRings(1), fNamePedPhotCam(gsNamePedPhotCam) 341 fCleanLvl2(lvl2), fCleanRings(1), fNamePedPhotCam(gsNamePedPhotCam), 342 fNameGeomCam(gsNameGeomCam), fNameCerPhotEvt(gsNameCerPhotEvt) 340 343 341 344 { … … 540 543 Int_t MImgCleanStd::PreProcess (MParList *pList) 541 544 { 542 fCam = (MGeomCam*)pList->FindObject(AddSerialNumber( "MGeomCam"));545 fCam = (MGeomCam*)pList->FindObject(AddSerialNumber(fNameGeomCam), "MGeomCam"); 543 546 if (!fCam) 544 547 { 545 *fLog << err << "MGeomCamnot found (no geometry information available)... aborting." << endl;548 *fLog << err << fNameGeomCam << " [MGeomCam] not found (no geometry information available)... aborting." << endl; 546 549 return kFALSE; 547 550 } 548 551 549 fEvt = (MCerPhotEvt*)pList->FindObject(AddSerialNumber( "MCerPhotEvt"));552 fEvt = (MCerPhotEvt*)pList->FindObject(AddSerialNumber(fNameCerPhotEvt), "MCerPhotEvt"); 550 553 if (!fEvt) 551 554 { 552 *fLog << err << "MCerPhotEvtnot found... aborting." << endl;555 *fLog << err << fNameCerPhotEvt << " [MCerPhotEvt] not found... aborting." << endl; 553 556 return kFALSE; 554 557 } … … 557 560 if (!fPed) 558 561 { 559 *fLog << err << "MPedPhotCamnot found... aborting." << endl;562 *fLog << err << fNamePedPhotCam << " [MPedPhotCam] not found... aborting." << endl; 560 563 return kFALSE; 561 564 } … … 755 758 case kImgCleanLvl1: 756 759 fCleanLvl1 = lvl; 757 *fLog << "Cleaning level 1 set to " << lvl << " sigma." <<endl;760 *fLog << "Cleaning level 1 set to " << lvl << endl; 758 761 return kTRUE; 759 762 760 763 case kImgCleanLvl2: 761 764 fCleanLvl2 = lvl; 762 *fLog << "Cleaning level 2 set to " << lvl << " sigma." <<endl;765 *fLog << "Cleaning level 2 set to " << lvl << endl; 763 766 return kTRUE; 764 767 } … … 805 808 if (gsNamePedPhotCam!=fNamePedPhotCam) 806 809 out << " " << GetUniqueName() << ".SetNamePedPhotCam(\"" << fNamePedPhotCam << "\");" << endl; 810 if (gsNameGeomCam!=fNameGeomCam) 811 out << " " << GetUniqueName() << ".SetNameGeomCam(\"" << fNameGeomCam << "\");" << endl; 812 if (gsNameCerPhotEvt!=fNameCerPhotEvt) 813 out << " " << GetUniqueName() << ".SetNameCerPhotEvt(\"" << fNameCerPhotEvt << "\");" << endl; 807 814 } 808 815 -
trunk/MagicSoft/Mars/mimage/MImgCleanStd.h
r4838 r5690 29 29 private: 30 30 static const TString gsNamePedPhotCam; // default name of the 'MPedPhotCam' container 31 static const TString gsNameGeomCam; // default name of the 'MGeomCam' container 32 static const TString gsNameCerPhotEvt; // default name of the 'MCerPhotEvt' container 31 33 32 34 const MGeomCam *fCam; //! … … 44 46 45 47 TString fNamePedPhotCam; // name of the 'MPedPhotCam' container 48 TString fNameGeomCam; // name of the 'MGeomCam' container 49 TString fNameCerPhotEvt; // name of the 'MCerPhotEvt' container 46 50 47 51 … … 73 77 74 78 Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2); 79 75 80 void SetNamePedPhotCam(const char *name) { fNamePedPhotCam = name; } 81 void SetNameCerPhotEvt(const char *name) { fNameCerPhotEvt = name; } 82 void SetNameGeomCam(const char *name) { fNameGeomCam = name; } 76 83 77 ClassDef(MImgCleanStd, 2) // task doing the image cleaning84 ClassDef(MImgCleanStd, 3) // task doing the image cleaning 78 85 }; 79 86 -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r5601 r5690 388 388 MFillH fill7(&evt7, "MArrivalTime", "FillTimes"); 389 389 390 MWriteRootFile write(2, Form("%s{s/_D_/_Y_}", fPathOut.Data()), fOverwrite); 390 // The second rule is for the case reading raw-files! 391 MWriteRootFile write(2, Form("%s{s/_D_/_Y_}{s/.raw$/.root}", fPathOut.Data()), fOverwrite); 391 392 // Run Header 392 393 write.AddContainer("MRawRunHeader", "RunHeaders"); -
trunk/MagicSoft/Mars/mranforest/MRanForestCalc.cc
r3238 r5690 72 72 // 73 73 MRanForestCalc::MRanForestCalc(const char *name, const char *title) 74 : fNum(100), fHadronnessName("MHadronness"), fData(NULL) 74 : fNum(100), fHadronnessName("MHadronness"), fData(NULL), fRanForest(0), fRanTree(0) 75 75 { 76 76 // … … 87 87 MRanForestCalc::~MRanForestCalc() 88 88 { 89 // delete fData; 89 if (!IsOwner()) 90 return; 91 92 delete fRanForest; 93 delete fRanTree; 90 94 } 91 95 … … 103 107 Int_t MRanForestCalc::PreProcess(MParList *plist) 104 108 { 105 fRanForest = (MRanForest*)plist->FindObject("MRanForest");106 109 if (!fRanForest) 107 110 { 108 *fLog << err << dbginf << "MRanForest not found... aborting." << endl; 109 return kFALSE; 110 } 111 112 fRanTree = (MRanTree*)plist->FindObject("MRanTree"); 111 fRanForest = (MRanForest*)plist->FindObject("MRanForest"); 112 if (!fRanForest) 113 { 114 *fLog << err << dbginf << "MRanForest not found... aborting." << endl; 115 return kFALSE; 116 } 117 } 118 113 119 if (!fRanTree) 114 120 { 115 *fLog << err << dbginf << "MRanTree not found... aborting." << endl; 116 return kFALSE; 117 } 118 119 /*if(!fRanForest->GetCurTree()) 120 { 121 *fLog << err << dbginf << "MRanForest does not contain trees... aborting." << endl; 122 return kFALSE; 123 }*/ 121 fRanTree = (MRanTree*)plist->FindObject("MRanTree"); 122 if (!fRanTree) 123 { 124 *fLog << err << dbginf << "MRanTree not found... aborting." << endl; 125 return kFALSE; 126 } 127 } 124 128 125 129 fData = fRanTree->GetRules(); … … 253 257 return kTRUE; 254 258 } 259 260 Int_t MRanForestCalc::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 261 { 262 if (!IsEnvDefined(env, prefix, "File", print)) 263 return kFALSE; 264 265 TString fname = GetEnvValue(env, prefix, "File", "RF.root"); 266 TString tname = GetEnvValue(env, prefix, "Tree", "Tree"); 267 const Int_t num = GetEnvValue(env, prefix, "NumTrees", 100); 268 const Bool_t debug = GetEnvValue(env, prefix, "Debug", kFALSE); 269 270 fname.ReplaceAll("\015", ""); 271 tname.ReplaceAll("\015", ""); 272 273 *fLog << dbginf << "Reading " << num << " trees " << tname << " from file " << fname << endl; 274 275 gLog.SetNullOutput(!debug); 276 MEvtLoop evtloop; 277 MParList plist; 278 evtloop.SetParList(&plist); 279 MLog l; 280 l.SetNullOutput(!debug); 281 evtloop.SetLogStream(&l); 282 gLog.SetNullOutput(debug); 283 284 if (IsOwner()) 285 { 286 delete fRanForest; 287 delete fRanTree; 288 } 289 fRanForest = new MRanForest; 290 fRanTree = new MRanTree; 291 SetOwner(); 292 293 plist.AddToList(fRanForest); 294 plist.AddToList(fRanTree); 295 296 MTaskList tlist; 297 plist.AddToList(&tlist); 298 299 MReadTree read(tname, fname); 300 read.DisableAutoScheme(); 301 302 MRanForestFill rffill; 303 rffill.SetNumTrees(num); 304 305 tlist.AddToList(&read); 306 tlist.AddToList(&rffill); 307 308 if (!evtloop.Eventloop()) 309 { 310 *fLog << err << "ERROR - Reading " << tname << " from file " << fname << endl; 311 return kERROR; 312 } 313 314 return kTRUE; 315 } -
trunk/MagicSoft/Mars/mranforest/MRanForestCalc.h
r2862 r5690 31 31 Int_t Process(); 32 32 33 enum { kIsOwner = BIT(14) }; 34 35 Bool_t IsOwner() const { return TestBit(kIsOwner); } 36 void SetOwner() { SetBit(kIsOwner); } 37 33 38 public: 34 39 MRanForestCalc(const char *name=NULL, const char *title=NULL); 35 40 ~MRanForestCalc(); 41 42 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 36 43 37 44 void SetHadronnessName(const TString name) { fHadronnessName = name; }
Note:
See TracChangeset
for help on using the changeset viewer.