Changeset 6173
- Timestamp:
- 02/01/05 15:51:16 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/callisto.rc
r6172 r6173 79 79 # Type of used data format: raw, root, mc 80 80 #MJCalibration.DataType: Root 81 # Type of displayed plots 82 #MJCalibration.Display: Full,DataCheck,Normal81 # Type of displayed plots: Full,DataCheck,Normal 82 #MJCalibration.Display: datacheck 83 83 # Write additinal debug output 84 84 #MJCalibration.Debug: No … … 135 135 #MJPedestalC2.DataType: Root 136 136 #MJPedestalC3.DataType: Root 137 # Type of displayed plots: Full,DataCheck,None 138 #MJPedestalC1.Display: datacheck 139 #MJPedestalC2.Display: datacheck 140 #MJPedestalC3.Display: datacheck 137 141 # Maximum number of event processed in the loop 138 142 #MJPedestalC1.MaxEvents: 1000 -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6150 r6173 122 122 fTitle = title ? title : "Tool to calibrate data"; 123 123 124 Set RootData();124 SetUseRootData(); 125 125 } 126 126 … … 192 192 SetHiLoCalibration(GetEnv("HiLoCalibration", fIsHiLoCalibration)); 193 193 194 SetRootData(); 195 196 if (HasEnv("RawData")) 197 { 198 fDataFlag = 0; 199 SetRawData(); 200 } 201 202 if (HasEnv("MC")) 203 { 204 fDataFlag = 0; 205 SetMC(); 206 } 207 194 SetUseRootData(); 195 196 TString dat = GetEnv("DataType", ""); 197 if (dat.BeginsWith("raw", TString::kIgnoreCase)) 198 { 199 fDataFlag = 0; 200 SetUseRawData(); 201 } 202 if (dat.BeginsWith("root", TString::kIgnoreCase)) 203 { 204 fDataFlag = 0; 205 SetUseRootData(); 206 } 207 if (dat.BeginsWith("mc", TString::kIgnoreCase)) 208 { 209 fDataFlag = 0; 210 SetUseMC(); 211 } 212 208 213 return kTRUE; 209 214 } … … 247 252 248 253 MDirIter iter; 249 const Int_t n0 = fSequence.SetupDatRuns(iter, fPathData, "D", Is RawData());254 const Int_t n0 = fSequence.SetupDatRuns(iter, fPathData, "D", IsUseRawData()); 250 255 const Int_t n1 = fSequence.GetNumDatRuns(); 251 256 if (n0==0) … … 364 369 //read.DisableAutoScheme(); 365 370 MRawFileRead rawread(NULL); 366 if (Is RawData())371 if (IsUseRawData()) 367 372 rawread.AddFiles(fSequence.IsValid() ? iter : *fRuns); 368 373 else … … 464 469 calib.SetSignalType(MCalibrateData::kPhe); 465 470 466 if (Is MC()) // MC file471 if (IsUseMC()) // MC file 467 472 { 468 473 calib.SetCalibrationMode(MCalibrateData::kFfactor); … … 612 617 tlist2.AddToList(&apply); 613 618 tlist2.AddToList(&merge); 614 if (Is MC())619 if (IsUseMC()) 615 620 tlist2.AddToList(&pcopy); 616 621 else … … 678 683 679 684 // Now setup main tasklist 680 tlist.AddToList(Is RawData() ? (MTask*)&rawread : (MTask*)&readreal);681 if (Is RootData())685 tlist.AddToList(IsUseRawData() ? (MTask*)&rawread : (MTask*)&readreal); 686 if (IsUseRootData()) 682 687 tlist2.AddToList(&pextr); 683 tlist.AddToList(&tlist2, Is RootData() ? "Events" : "All");688 tlist.AddToList(&tlist2, IsUseRootData() ? "Events" : "All"); 684 689 if (fIsInterlaced) 685 690 tlist.AddToList(&fill8); 686 691 687 if (Is MC())692 if (IsUseMC()) 688 693 tlist.AddToList(&pcalc, "Drive"); 689 694 -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r6150 r6173 51 51 // Otherwise, (default: SetNormalDisplay()), a good selection of plots is given 52 52 // 53 // If the flag SetDataCheck() is set, the calibration is used as in the data check at54 // La Palma, which mean especially running on raw data files.55 //56 53 // The absolute light calibration devices Blind Pixel and PIN Diode can be switched on 57 54 // and off with the commands: … … 146 143 #include "MHCalibrationChargePINDiode.h" 147 144 #include "MHCalibrationRelTimeCam.h" 145 #include "MHCalibrationPix.h" 148 146 149 147 #include "MReadMarsFile.h" … … 200 198 201 199 SetRelTimeCalibration(); 202 SetDataCheck(kFALSE);203 200 SetDebug(kFALSE); 204 201 SetIntensity(kFALSE); … … 1411 1408 Bool_t MJCalibration::CheckEnvLocal() 1412 1409 { 1410 1413 1411 TString dis = GetEnv("Display", ""); 1414 1412 if (dis.BeginsWith("Full", TString::kIgnoreCase)) … … 1419 1417 SetNormalDisplay(); 1420 1418 1419 SetUseRootData(); 1420 1421 TString dat = GetEnv("DataType", ""); 1422 if (dat.BeginsWith("raw", TString::kIgnoreCase)) 1423 { 1424 fDataFlag = 0; 1425 SetUseRawData(); 1426 } 1427 if (dat.BeginsWith("root", TString::kIgnoreCase)) 1428 { 1429 fDataFlag = 0; 1430 SetUseRootData(); 1431 } 1432 if (dat.BeginsWith("mc", TString::kIgnoreCase)) 1433 { 1434 fDataFlag = 0; 1435 SetUseMC(); 1436 } 1437 1421 1438 SetRelTimeCalibration(GetEnv("RelTimeCalibration", IsRelTimes())); 1422 1439 SetIntensity(GetEnv("IntensityCalibration", IsIntensity())); 1423 SetDataCheck(GetEnv("DataCheck", IsDataCheck()));1424 1440 SetDebug(GetEnv("Debug", IsDebug())); 1425 1441 … … 1427 1443 SetUsePINDiode(GetEnv("UsePINDiode", IsUsePINDiode())); 1428 1444 SetGeometry(GetEnv("Geometry", fGeometry)); 1429 1430 SetRootData();1431 1432 if (HasEnv("MC"))1433 {1434 fDataFlag = 0;1435 SetMC();1436 }1437 1438 if (HasEnv("RawData") || IsDataCheck())1439 {1440 fDataFlag = 0;1441 SetRawData();1442 }1443 1445 1444 1446 fReferenceFile = GetEnv("ReferenceFile",fReferenceFile.Data()); … … 1642 1644 if (fSequence.IsValid()) 1643 1645 { 1644 const Int_t n0 = fSequence.SetupCalRuns(iter, fPathData, "C", Is RawData());1646 const Int_t n0 = fSequence.SetupCalRuns(iter, fPathData, "C", IsUseRawData()); 1645 1647 const Int_t n1 = fSequence.GetNumCalRuns(); 1646 1648 if (n0==0) … … 1702 1704 MRawFileRead rawread(NULL); 1703 1705 1704 if (Is RawData())1706 if (IsUseRawData()) 1705 1707 { 1706 1708 rawread.AddFiles(fSequence.IsValid() ? iter : *fRuns); … … 1720 1722 MGeomApply apply; 1721 1723 apply.SetGeometry(fGeometry); 1724 1722 1725 MBadPixelsMerge merge(&fBadPixels); 1723 1726 MExtractPINDiode pinext; … … 1873 1876 1874 1877 tlist.PrintStatistics(); 1878 1879 /* 1880 MHCalibrationRelTimeCam *hcam = (MHCalibrationRelTimeCam*)plist.FindObject("MHCalibrationRelTimeCam"); 1881 MHCalibrationPix &pix1 = (*hcam)(100); 1882 pix1.DrawClone(""); 1883 gPad->SaveAs("test_time_100.ps"); 1884 1885 MHCalibrationChargeCam *hccam = (MHCalibrationChargeCam*)plist.FindObject("MHCalibrationChargeCam"); 1886 MHCalibrationPix &pix11 = (*hccam)(100); 1887 pix11.DrawClone(""); 1888 gPad->SaveAs("test_charge_100.ps"); 1889 1890 MHCalibrationPix &pix2 = (MHCalibrationPix&)(*hcam)(400); 1891 pix2.DrawClone(""); 1892 gPad->SaveAs("test_time_400.ps"); 1893 1894 MHCalibrationPix &pix22 = (*hccam)(400); 1895 pix22.DrawClone(""); 1896 gPad->SaveAs("test_charge_400.ps"); 1897 1898 *fLog << err << "Blackout 100: " << fRelTimeCam[100].GetNumBlackout() << endl; 1899 *fLog << err << "Picup 100: " << fRelTimeCam[100].GetNumPickup () << endl; 1900 *fLog << err << "Blackout 400: " << fRelTimeCam[400].GetNumBlackout() << endl; 1901 *fLog << err << "Picup 400: " << fRelTimeCam[400].GetNumPickup () << endl; 1902 */ 1875 1903 1876 1904 if (!fCalibrationPINDiode.IsValid()) -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r6137 r6173 142 142 Byte_t fStorage; // Bit-field for chosen storage type 143 143 144 enum { kRelTimes, kD ataCheck, kDebug, kIntensity }; // Possible flags144 enum { kRelTimes, kDebug, kIntensity }; // Possible flags 145 145 146 146 Byte_t fFlags; // Bit-field for the flags … … 152 152 153 153 Bool_t IsRelTimes () const { return TESTBIT(fFlags,kRelTimes); } 154 Bool_t IsDataCheck () const { return TESTBIT(fFlags,kDataCheck); }155 154 Bool_t IsDebug () const { return TESTBIT(fFlags,kDebug); } 156 155 Bool_t IsIntensity () const { return TESTBIT(fFlags,kIntensity); } … … 213 212 // Flags 214 213 void SetRelTimeCalibration( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kRelTimes) : CLRBIT(fFlags,kRelTimes); } 215 void SetDataCheck ( const Bool_t b=kTRUE ) { b ? SetDataCheckDisplay(), SETBIT(fFlags,kDataCheck)216 : CLRBIT(fFlags,kDataCheck); }217 214 void SetDebug ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kDebug) : CLRBIT(fFlags,kDebug); } 218 215 void SetIntensity ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kIntensity) : CLRBIT(fFlags,kIntensity); } -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r6129 r6173 96 96 // - fRuns to 0, 97 97 // - fExtractor to NULL, 98 // - fDataCheck to kFALSE,99 98 // - fExtractType to kUsePedRun 100 99 // - fStorage to Normal Storage … … 103 102 MJPedestal::MJPedestal(const char *name, const char *title) 104 103 : fRuns(0), fExtractor(NULL), fDisplayType(kDisplayDataCheck), 105 f DataCheck(kFALSE), fExtractType(kUsePedRun), fExtractionType(kFundamental)104 fExtractType(kUsePedRun), fExtractionType(kFundamental) 106 105 { 107 106 fName = name ? name : "MJPedestal"; … … 731 730 Bool_t MJPedestal::CheckEnvLocal() 732 731 { 733 SetDataCheck(GetEnv("DataCheck", fDataCheck));734 735 732 if (HasEnv("Display")) 736 733 { … … 744 741 fDisplayType = kDisplayNone; 745 742 } 743 744 SetUseRootData(); 745 746 TString dat = GetEnv("DataType", ""); 747 if (dat.BeginsWith("raw", TString::kIgnoreCase)) 748 { 749 fDataFlag = 0; 750 SetUseRawData(); 751 } 752 if (dat.BeginsWith("root", TString::kIgnoreCase)) 753 { 754 fDataFlag = 0; 755 SetUseRootData(); 756 } 757 if (dat.BeginsWith("mc", TString::kIgnoreCase)) 758 { 759 fDataFlag = 0; 760 SetUseMC(); 761 } 746 762 747 763 if (HasEnv("UseData")) … … 869 885 if (fSequence.IsValid()) 870 886 { 871 const Int_t n0 = IsUseData() ? fSequence.SetupDatRuns(iter, fPathData, "D", fDataCheck) : fSequence.SetupPedRuns(iter, fPathData, "P", fDataCheck);887 const Int_t n0 = IsUseData() ? fSequence.SetupDatRuns(iter, fPathData, "D", IsUseRawData()) : fSequence.SetupPedRuns(iter, fPathData, "P", IsUseRawData()); 872 888 const Int_t n1 = IsUseData() ? fSequence.GetNumDatRuns() : fSequence.GetNumPedRuns(); 873 889 if (n0==0) … … 883 899 } 884 900 885 if ( fDataCheck)901 if (IsUseRawData()) 886 902 { 887 903 if (fRuns || fSequence.IsValid())
Note:
See TracChangeset
for help on using the changeset viewer.