Ignore:
Timestamp:
08/17/04 09:50:03 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r4638 r4641  
    686686      pave->ConvertNDCtoPad();
    687687      pave->SetTextSize(0.05);
    688       TText *t0 = pave->AddText("  ");
    689688      TText *t1 = pave->AddText("Signal smaller 3 Pedestal RMS");
    690689      t1->SetTextColor(gStyle->GetColorPalette(Int_t(1./max*numcol)));
     
    739738      pave2->ConvertNDCtoPad();
    740739      pave2->SetTextSize(0.05);
    741       TText *tt0 = pave2->AddText("  ");
    742740      TText *tt1 = pave2->AddText("High Gain Signals could not be fitted");
    743741      tt1->SetTextColor(gStyle->GetColorPalette(Int_t(1./max2*numcol)));
     
    17611759    TFile file(oname, "UPDATE");
    17621760
     1761    *fLog << inf << " - MStatusDisplay..." << flush;
    17631762    if (fDisplay && fDisplay->Write()<=0)
    17641763    {
     
    17661765        return kFALSE;
    17671766    }
    1768 
     1767    *fLog << inf << "ok." << endl;
     1768
     1769    *fLog << inf << " - MCalibrationChargeCam..." << flush;
    17691770    if (fCalibrationCam.Write()<=0)
    17701771    {
     
    17721773        return kFALSE;
    17731774    }
    1774 
     1775    *fLog << inf << "ok." << endl;
     1776
     1777    *fLog << inf << " - MCalibrationChargeBlindCam..." << flush;
    17751778    if (fCalibrationBlindCam.Write()<=0)
    17761779    {
     
    17781781        return kFALSE;
    17791782    }
    1780 
     1783    *fLog << inf << "ok." << endl;
     1784
     1785    *fLog << inf << " - MCalibrationChargePINDiode..." << flush;
    17811786    if (fCalibrationPINDiode.Write()<=0)
    17821787    {
     
    17841789        return kFALSE;
    17851790    }
    1786 
     1791    *fLog << inf << "ok." << endl;
     1792
     1793    *fLog << inf << " - MCalibrationQECam..." << flush;
    17871794    if (fQECam.Write()<=0)
    17881795    {
     
    17901797        return kFALSE;
    17911798    }
     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;
    17921808
    17931809    if (fRelTimes)
     1810    {
     1811        *fLog << inf << " - MCalibrationRelTimeCam..." << flush;
    17941812        if (fRelTimeCam.Write()<=0)
    17951813        {
     
    17971815            return kFALSE;
    17981816        }
    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;
    18041818    }
    18051819
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r4616 r4641  
    9191MJPedestal::MJPedestal(const char *name, const char *title)
    9292    : fEnv(0), fRuns(0), fSequence(0), fExtractor(NULL), fDisplayType(kNormalDisplay),
    93       fDataCheck(kFALSE)
     93      fDataCheck(kFALSE), fUseData(kFALSE), fMaxEvents(0)
    9494{
    9595    fName  = name  ? name  : "MJPedestal";
     
    507507        SetOutputPath(e1);
    508508    }
     509
     510    fMaxEvents = fEnv->GetValue("MJPedestal.MaxEvents", fMaxEvents);
     511    fUseData   = fEnv->GetValue("MJPedestal.UseData",   fUseData);
    509512}
    510513
     
    545548    MDirIter iter;
    546549    if (fSequence)
    547         fSequence->SetupPedRuns(iter);
     550        fUseData ? fSequence->SetupDatRuns(iter) : fSequence->SetupPedRuns(iter);
    548551
    549552    if (fDataCheck)
     
    603606
    604607    // Execute first analysis
    605     if (!evtloop.Eventloop())
     608    if (!evtloop.Eventloop(fMaxEvents))
    606609    {
    607610        *fLog << err << GetDescriptor() << ": Failed." << endl;
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.h

    r4622 r4641  
    2121{
    2222private:
     23    static const Double_t fgPedestalMin;
     24    static const Double_t fgPedestalMax;
     25    static const Double_t fgPedRmsMin;
     26    static const Double_t fgPedRmsMax;
    2327
    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;
    3231
    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;
    4635
    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
    5341
    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
    6870public:
     71    MJPedestal(const char *name=NULL, const char *title=NULL);
     72    ~MJPedestal();
    6973
    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)
    9597};
    9698
Note: See TracChangeset for help on using the changeset viewer.