Changeset 4641 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 08/17/04 09:50:03 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r4638 r4641 686 686 pave->ConvertNDCtoPad(); 687 687 pave->SetTextSize(0.05); 688 TText *t0 = pave->AddText(" ");689 688 TText *t1 = pave->AddText("Signal smaller 3 Pedestal RMS"); 690 689 t1->SetTextColor(gStyle->GetColorPalette(Int_t(1./max*numcol))); … … 739 738 pave2->ConvertNDCtoPad(); 740 739 pave2->SetTextSize(0.05); 741 TText *tt0 = pave2->AddText(" ");742 740 TText *tt1 = pave2->AddText("High Gain Signals could not be fitted"); 743 741 tt1->SetTextColor(gStyle->GetColorPalette(Int_t(1./max2*numcol))); … … 1761 1759 TFile file(oname, "UPDATE"); 1762 1760 1761 *fLog << inf << " - MStatusDisplay..." << flush; 1763 1762 if (fDisplay && fDisplay->Write()<=0) 1764 1763 { … … 1766 1765 return kFALSE; 1767 1766 } 1768 1767 *fLog << inf << "ok." << endl; 1768 1769 *fLog << inf << " - MCalibrationChargeCam..." << flush; 1769 1770 if (fCalibrationCam.Write()<=0) 1770 1771 { … … 1772 1773 return kFALSE; 1773 1774 } 1774 1775 *fLog << inf << "ok." << endl; 1776 1777 *fLog << inf << " - MCalibrationChargeBlindCam..." << flush; 1775 1778 if (fCalibrationBlindCam.Write()<=0) 1776 1779 { … … 1778 1781 return kFALSE; 1779 1782 } 1780 1783 *fLog << inf << "ok." << endl; 1784 1785 *fLog << inf << " - MCalibrationChargePINDiode..." << flush; 1781 1786 if (fCalibrationPINDiode.Write()<=0) 1782 1787 { … … 1784 1789 return kFALSE; 1785 1790 } 1786 1791 *fLog << inf << "ok." << endl; 1792 1793 *fLog << inf << " - MCalibrationQECam..." << flush; 1787 1794 if (fQECam.Write()<=0) 1788 1795 { … … 1790 1797 return kFALSE; 1791 1798 } 1799 *fLog << inf << "ok." << endl; 1800 1801 *fLog << inf << " - MBadPixelsCam..." << flush; 1802 if (fBadPixels.Write()<=0) 1803 { 1804 *fLog << err << "Unable to write MBadPixelsCam to " << oname << endl; 1805 return kFALSE; 1806 } 1807 *fLog << inf << "ok." << endl; 1792 1808 1793 1809 if (fRelTimes) 1810 { 1811 *fLog << inf << " - MCalibrationRelTimeCam..." << flush; 1794 1812 if (fRelTimeCam.Write()<=0) 1795 1813 { … … 1797 1815 return kFALSE; 1798 1816 } 1799 1800 if (fBadPixels.Write()<=0) 1801 { 1802 *fLog << err << "Unable to write MBadPixelsCam to " << oname << endl; 1803 return kFALSE; 1817 *fLog << inf << "ok." << endl; 1804 1818 } 1805 1819 -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r4616 r4641 91 91 MJPedestal::MJPedestal(const char *name, const char *title) 92 92 : fEnv(0), fRuns(0), fSequence(0), fExtractor(NULL), fDisplayType(kNormalDisplay), 93 fDataCheck(kFALSE) 93 fDataCheck(kFALSE), fUseData(kFALSE), fMaxEvents(0) 94 94 { 95 95 fName = name ? name : "MJPedestal"; … … 507 507 SetOutputPath(e1); 508 508 } 509 510 fMaxEvents = fEnv->GetValue("MJPedestal.MaxEvents", fMaxEvents); 511 fUseData = fEnv->GetValue("MJPedestal.UseData", fUseData); 509 512 } 510 513 … … 545 548 MDirIter iter; 546 549 if (fSequence) 547 f Sequence->SetupPedRuns(iter);550 fUseData ? fSequence->SetupDatRuns(iter) : fSequence->SetupPedRuns(iter); 548 551 549 552 if (fDataCheck) … … 603 606 604 607 // Execute first analysis 605 if (!evtloop.Eventloop( ))608 if (!evtloop.Eventloop(fMaxEvents)) 606 609 { 607 610 *fLog << err << GetDescriptor() << ": Failed." << endl; -
trunk/MagicSoft/Mars/mjobs/MJPedestal.h
r4622 r4641 21 21 { 22 22 private: 23 static const Double_t fgPedestalMin; 24 static const Double_t fgPedestalMax; 25 static const Double_t fgPedRmsMin; 26 static const Double_t fgPedRmsMax; 23 27 24 static const Double_t fgPedestalMin; 25 static const Double_t fgPedestalMax; 26 static const Double_t fgPedRmsMin; 27 static const Double_t fgPedRmsMax; 28 29 static const Float_t fgRefPedClosedLids; 30 static const Float_t fgRefPedExtraGalactic; 31 static const Float_t fgRefPedGalactic; 28 static const Float_t fgRefPedClosedLids; 29 static const Float_t fgRefPedExtraGalactic; 30 static const Float_t fgRefPedGalactic; 32 31 33 static const Float_t fgRefPedRmsClosedLidsInner; 34 static const Float_t fgRefPedRmsExtraGalacticInner; 35 static const Float_t fgRefPedRmsGalacticInner; 36 37 static const Float_t fgRefPedRmsClosedLidsOuter; 38 static const Float_t fgRefPedRmsExtraGalacticOuter; 39 static const Float_t fgRefPedRmsGalacticOuter; 40 41 TString fOutputPath; // Directory where the F0-files get stored 42 43 TEnv *fEnv; // Input setup-file 44 MRunIter *fRuns; // Used pedestal runs 45 MSequence *fSequence; // Sequence 32 static const Float_t fgRefPedRmsClosedLidsInner; 33 static const Float_t fgRefPedRmsExtraGalacticInner; 34 static const Float_t fgRefPedRmsGalacticInner; 46 35 47 MExtractor *fExtractor; // Signal extractor, used to find the nr. of used FADC slices 48 49 MPedestalCam fPedestalCam; // Created pedestal results 50 MBadPixelsCam fBadPixels; // Bad Pixels 51 52 enum Display_t { kDataCheckDisplay, kNormalDisplay }; // Possible Display types 36 static const Float_t fgRefPedRmsClosedLidsOuter; 37 static const Float_t fgRefPedRmsExtraGalacticOuter; 38 static const Float_t fgRefPedRmsGalacticOuter; 39 40 TString fOutputPath; // Directory where the F0-files get stored 53 41 54 Display_t fDisplayType; // Chosen Display type 55 56 Bool_t fDataCheck; // Flag if the data check is run on raw data 57 58 Bool_t ReadPedestalCam(); 59 Bool_t WriteResult(); 60 61 void DisplayResult(MParList &plist); 62 void DisplayReferenceLines(MHCamera *cam, const Int_t what) const; 63 void DisplayOutliers(TH1D *hist) const; 64 void FixDataCheckHist(TH1D *hist) const; 65 66 void CheckEnv(); 67 42 TEnv *fEnv; // Input setup-file 43 MRunIter *fRuns; // Used pedestal runs 44 MSequence *fSequence; // Sequence 45 46 MExtractor *fExtractor; // Signal extractor, used to find the nr. of used FADC slices 47 48 MPedestalCam fPedestalCam; // Created pedestal results 49 MBadPixelsCam fBadPixels; // Bad Pixels 50 51 enum Display_t { kDataCheckDisplay, kNormalDisplay }; // Possible Display types 52 53 Display_t fDisplayType; // Chosen Display type 54 55 Bool_t fDataCheck; // Flag if the data check is run on raw data 56 Bool_t fUseData; // Use data-runs from sequence instead of pedestal runs 57 58 Int_t fMaxEvents; // Maximum number of events 59 60 Bool_t ReadPedestalCam(); 61 Bool_t WriteResult(); 62 63 void DisplayResult(MParList &plist); 64 void DisplayReferenceLines(MHCamera *cam, const Int_t what) const; 65 void DisplayOutliers(TH1D *hist) const; 66 void FixDataCheckHist(TH1D *hist) const; 67 68 void CheckEnv(); 69 68 70 public: 71 MJPedestal(const char *name=NULL, const char *title=NULL); 72 ~MJPedestal(); 69 73 70 MJPedestal(const char *name=NULL, const char *title=NULL); 71 ~MJPedestal(); 72 73 MPedestalCam &GetPedestalCam() { return fPedestalCam; } 74 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; } 75 76 const char* GetOutputFile() const; 77 const Bool_t IsDataCheck() const { return fDataCheck; } 78 79 Bool_t Process(); 80 Bool_t ProcessFile(); 81 82 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); } 83 void SetExtractor(MExtractor* ext) { fExtractor = ext; } 84 void SetInput(MRunIter *iter) { fRuns = iter; } 85 void SetSequence(MSequence *seq) { fSequence = seq; } 86 void SetOutputPath(const char *path="."); 87 void SetEnv(const char *env); 88 89 void SetDataCheck(const Bool_t b=kTRUE) { fDataCheck = b; SetDataCheckDisplay(); } 90 91 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; } 92 void SetNormalDisplay() { fDisplayType = kNormalDisplay; } 93 94 ClassDef(MJPedestal, 0) // Tool to create a pedestal file (MPedestalCam) 74 MPedestalCam &GetPedestalCam() { return fPedestalCam; } 75 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; } 76 77 const char* GetOutputFile() const; 78 const Bool_t IsDataCheck() const { return fDataCheck; } 79 80 Bool_t Process(); 81 Bool_t ProcessFile(); 82 83 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); } 84 void SetExtractor(MExtractor* ext) { fExtractor = ext; } 85 void SetInput(MRunIter *iter) { fRuns = iter; } 86 void SetSequence(MSequence *seq, Bool_t usedata=kFALSE) { fSequence = seq; } 87 void SetOutputPath(const char *path="."); 88 void SetEnv(const char *env); 89 void SetMaxEvents(Int_t max) { fMaxEvents = max; } 90 91 void SetDataCheck(const Bool_t b=kTRUE) { fDataCheck = b; SetDataCheckDisplay(); } 92 93 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; } 94 void SetNormalDisplay() { fDisplayType = kNormalDisplay; } 95 96 ClassDef(MJPedestal, 0) // Tool to create a pedestal file (MPedestalCam) 95 97 }; 96 98
Note:
See TracChangeset
for help on using the changeset viewer.