Changeset 7719


Ignore:
Timestamp:
05/19/06 13:57:47 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7718 r7719  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2006/05/19 Thomas Bretz
     22
     23   * mbase/MMath.h:
     24     - added default to second argument of GaussProb
     25
     26   * mcamera/MCameraTD.[h,cc], mcamera/MCameraTH.[h,cc]:
     27     - added a data member fIsValid giving the status of the arrays
     28       in case the CC reports contained nonsense (mainly for files
     29       before summer 2005)
     30     - increased class version by 1
     31
     32   * mhflux/MHAlpha.h:
     33     - made SetOffData virtual
     34
     35   * mreport/MReport.cc:
     36     - small changes to some comments
     37
     38   * mreport/MReportCC.[h,cc]:
     39     - better handling of problems with the TH and TD part of the
     40       CC-REPORT for files older than 200507190 and 200412210
     41       respectively
     42
     43   * mreport/MReportFileReadCC.cc:
     44     - always output the file format version
     45
     46
     47
    2148 2006/05/18 Thomas Bretz
    2249
     
    2754     - made fHillas data member protected
    2855     - increased size of fMap
    29      - made SetOffData virtual
    3056
    3157   * mhflux/MHThetaSq.[h,cc]:
  • trunk/MagicSoft/Mars/NEWS

    r7706 r7719  
    33 *** Version  <cvs>
    44
     5   - merpp: better handling of problems with the TH and TD part of the
     6       CC-REPORT for files older than 200507190 and 200412210
     7       respectively
    58
    69
  • trunk/MagicSoft/Mars/mbase/MMath.h

    r7409 r7719  
    1717    inline Double_t HorToRad() { return 15/TMath::RadToDeg(); }
    1818
    19     Double_t GaussProb(Double_t x, Double_t sigma, Double_t mean=0);
     19    Double_t GaussProb(Double_t x, Double_t sigma=1, Double_t mean=0);
    2020
    2121    Double_t Significance(Double_t s, Double_t b);
  • trunk/MagicSoft/Mars/mcamera/MCameraTD.cc

    r7446 r7719  
    1919!   Author(s): Florian Goebel 11/2005 <mailto:fgoebel@mppmu.mpg.de>
    2020!
    21 !   Copyright: MAGIC Software Development, 2000-2005
     21!   Copyright: MAGIC Software Development, 2000-2006
    2222!
    2323!
     
    2727//
    2828// MCameraTD
     29//
     30// Class Version 2:
     31// ----------------
     32//   + Bool_t  fIsValid; // fTD contains valid information
    2933//
    3034/////////////////////////////////////////////////////////////////////////////
     
    4549//
    4650MCameraTD::MCameraTD(Int_t size, const char *name, const char *title)
    47     : fTD(size)
     51    : fTD(size), fIsValid(kTRUE)
    4852{
    4953    fName  = name  ? name  : "MCameraTD";
  • trunk/MagicSoft/Mars/mcamera/MCameraTD.h

    r7489 r7719  
    1717    friend class MReportCC;
    1818private:
    19     TArrayC fTD; // [au] discriminator delays
     19    TArrayC fTD;      // [au] discriminator delays
     20    Bool_t  fIsValid; // fTD contains valid information
    2021
    2122public:
     
    2829
    2930    void Print(Option_t *opt=NULL) const;
     31
     32    void Invalidate() { fTD.Reset(); fIsValid=kFALSE; }
     33
     34    void SetValid(Bool_t v=kTRUE) { fIsValid=v; }
     35    Bool_t IsValid() const { return fIsValid; }
    3036
    3137    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
     
    4147    }
    4248
    43     ClassDef(MCameraTD, 1) // Storage Container for Discriminator Delays
     49    ClassDef(MCameraTD, 2) // Storage Container for Discriminator Delays
    4450};
    4551
  • trunk/MagicSoft/Mars/mcamera/MCameraTH.cc

    r7446 r7719  
    1919!   Author(s): Florian Goebel 11/2005 <mailto:fgoebel@mppmu.mpg.de>
    2020!
    21 !   Copyright: MAGIC Software Development, 2000-2005
     21!   Copyright: MAGIC Software Development, 2000-2006
    2222!
    2323!
     
    2626/////////////////////////////////////////////////////////////////////////////
    2727//
    28 // MCameraTH (PRELIMINARY)
     28// MCameraTH
     29//
     30// Class Version 2:
     31// ----------------
     32//   + Bool_t  fIsValid; // fTH contains valid information
    2933//
    3034/////////////////////////////////////////////////////////////////////////////
     
    4549//
    4650MCameraTH::MCameraTH(Int_t size, const char *name, const char *title)
    47     : fTH(size)
     51    : fTH(size), fIsValid(kTRUE)
    4852{
    4953    fName  = name  ? name  : "MCameraTH";
  • trunk/MagicSoft/Mars/mcamera/MCameraTH.h

    r7489 r7719  
    1717    friend class MReportCC;
    1818private:
    19     TArrayC fTH; // [au] discriminator thresholds
     19    TArrayC fTH;      // [au] discriminator thresholds
     20    Bool_t  fIsValid; // fTH contains valid information
    2021
    2122public:
     
    2829
    2930    void Print(Option_t *opt=NULL) const;
     31
     32    void Invalidate() { fTH.Reset(); fIsValid=kFALSE; }
     33
     34    void SetValid(Bool_t v=kTRUE) { fIsValid=v; }
     35    Bool_t IsValid() const { return fIsValid; }
    3036
    3137    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
     
    4147    }
    4248
    43     ClassDef(MCameraTH, 1) // Storage Container for the discriminator thresholds
     49    ClassDef(MCameraTH, 2) // Storage Container for the discriminator thresholds
    4450};
    4551
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.h

    r7712 r7719  
    102102    // Setter
    103103    void SetNameParameter(const char *name) { fNameParameter=name; }
    104     void SetOffData(const MHAlpha &h)
     104    virtual void SetOffData(const MHAlpha &h)
    105105    {
    106106        fOffData        = &h.fHist;
  • trunk/MagicSoft/Mars/mreport/MReport.cc

    r7639 r7719  
    3636//   Old Version | MjdMin  | MjdMax  | New Version
    3737//  -------------+---------+---------+-------------
    38 //   200504130   | 53548.0 | 53567.0 | 200506300
    39 //   200503170   | 53446.5 | 53447.5 | 200502240
    40 //
     38//    see MReport::Interprete()
    4139//
    4240//  Be carefull: The class name of all classes derived from this class
  • trunk/MagicSoft/Mars/mreport/MReportCC.cc

    r7487 r7719  
    136136// Interprete the TH (discriminator thresholds) part of the report
    137137//
    138 Bool_t MReportCC::InterpreteTH(TString &str)
     138Bool_t MReportCC::InterpreteTH(TString &str, Int_t ver)
    139139{
    140140    if (!CheckTag(str, "TH "))
    141141        return kFALSE;
     142
     143    // Skip the TH (discriminator thresholds) part of the report (for old
     144    // CC files with wrong or nonsense number of TH-Bytes)
     145    if (ver<200507190)
     146    {
     147        Ssiz_t pr = str.First(' ');
     148        if (pr<0)
     149        {
     150            *fLog << warn << "WARNING - No TH information found at all." << endl;
     151            return kFALSE;
     152        }
     153        if (pr!=1154)
     154        {
     155            fTD->Invalidate();
     156
     157            str.Remove(0, pr);
     158            str=str.Strip(TString::kLeading);
     159            return kTRUE;
     160        }
     161    }
    142162
    143163    const char *pos = str.Data();
     
    158178    }
    159179
     180    fTH->SetValid();
     181
    160182    str.Remove(0, end-str.Data()); // Remove TH
    161183    str=str.Strip(TString::kLeading);
     
    170192{
    171193    if (!CheckTag(str, "TD "))
    172         return kFALSE;
    173 
     194        return kTRUE;
     195
     196    // Skip the TD (discriminator delays) part of the report (for old
     197    // CC files with wrong or nonsense number of TD-Bytes)
     198    if (ver<200412210)
     199    {
     200        Ssiz_t pr = str.First(' ');
     201        if (pr<0)
     202        {
     203            *fLog << warn << "WARNING - No TD information found at all." << endl;
     204            return kFALSE;
     205        }
     206        if (pr!=1000)
     207        {
     208            fTD->Invalidate();
     209
     210            str.Remove(0, pr);
     211            str=str.Strip(TString::kLeading);
     212            return kTRUE;
     213        }
     214    }
     215
     216    // Older files have less bytes (pixels) stored
    174217    const Int_t numpix = ver<200510250 ? 500 : 577;
    175218
     
    191234    }
    192235
     236    fTD->SetValid();
     237
    193238    str.Remove(0, end-str.Data()); // Remove TD
    194239    str=str.Strip(TString::kLeading);
     240
    195241    return kTRUE;
    196242}
     
    238284        return kCONTINUE;
    239285
    240     if (!InterpreteTH(str))
    241         return kCONTINUE;
    242 
    243     if (!InterpreteTD(str, ver))
    244         return kCONTINUE;
     286    if (str.BeginsWith("RECEIVERS-COM-ERROR"))
     287    {
     288        fTD->Invalidate();
     289        fTH->Invalidate();
     290        str.Remove(0, 19);
     291    }
     292    else
     293    {
     294        if (!InterpreteTH(str, ver))
     295            return kCONTINUE;
     296
     297        if (!InterpreteTD(str, ver))
     298            return kCONTINUE;
     299    }
    245300
    246301    if (ver>=200510250)
  • trunk/MagicSoft/Mars/mreport/MReportCC.h

    r7430 r7719  
    3030
    3131    Bool_t InterpreteCC(TString &str, Int_t ver);
    32     Bool_t InterpreteTH(TString &str);
     32    Bool_t InterpreteTH(TString &str, Int_t ver);
    3333    Bool_t InterpreteTD(TString &str, Int_t ver);
    3434    Bool_t InterpreteRecTemp(TString &str);
  • trunk/MagicSoft/Mars/mreport/MReportFileReadCC.cc

    r4732 r7719  
    127127    const Int_t ver = atoi(str.Data());
    128128
    129     *fLog << dbg << "Report File version: <" << ver << ">" << endl;
     129    *fLog << all << "Report File version: <" << ver << ">" << endl;
    130130
    131131    SetVersion(ver);
Note: See TracChangeset for help on using the changeset viewer.