Changeset 7444


Ignore:
Timestamp:
12/06/05 14:24:59 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7442 r7444  
    3030     - added a function to calc upper limits
    3131     - exchaged some GetListOfFunctions()-Remove() with SetName
     32
     33   * mcamera/Makefile, mcamera/CameraLinkDef.h:
     34     - added MCameraTD, MCameraTH and MCameraRecTemp
     35
     36   * showplot.cc:
     37     - fixed a bug which caused trouble if only a filename was given
     38
     39   * mastro/MAstro.h:
     40     - added conversion constant to convert parsec to meter
     41
     42   * mcamera/MCameraHV.h:
     43     - only layout changes
     44
     45   * mcamera/MCameraRecTemp.[h,cc], mcamera/MCameraTD.[h,cc],
     46     mcamera/MCameraTH.[h,cc]:
     47     - removed weired obsolste operators (which won't work at all)
     48     - fixed calculation of max and min value
     49     - replaced the nonsense TArrayS by TArrayC because the contents is
     50       just a byte
     51
     52   * ganymed.cc:
     53     - fixed compilation of path to datasets
    3254
    3355
  • trunk/MagicSoft/Mars/ganymed.cc

    r7432 r7444  
    173173    {
    174174        const Int_t numseq = kSequences.Atoi();
    175         kSequences = Form("/magic/datasets/%04d/dataset%08d.txt", numseq/10000, numseq);
     175        kSequences = Form("/magic/datasets/%05d/dataset%08d.txt", numseq/1000, numseq);
    176176        gLog << inf << "inflated dataset file: " << kSequences << endl;
    177177    }
  • trunk/MagicSoft/Mars/mastro/MAstro.h

    r7432 r7444  
    2121
    2222public:
     23    // Unit conversion
     24    static Double_t Parsec2Meter() { return 3.0856776e+16; }
     25
     26
    2327    // Angle/Time conversion functions
    2428    static Double_t Hms2Sec(Int_t deg, UInt_t min, Double_t sec, char sgn='+');
  • trunk/MagicSoft/Mars/mcamera/MCameraHV.h

    r7202 r7444  
    4848    Float_t GetMean() const { return fHV.GetSum()/fHV.GetSize(); }
    4949
     50    Double_t operator[](const UInt_t idx) { return fHV[idx]; }
     51
     52    void   DrawPixelContent(Int_t num) const { }
    5053    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
    5154    {
     
    5457    }
    5558
    56     Double_t operator[](const UInt_t idx) { return fHV[idx]; }
    57 
    58     void DrawPixelContent(Int_t num) const
    59     {
    60     }
    61 
    6259    ClassDef(MCameraHV, 2) // Container storing information about the Camera HV
    6360};
  • trunk/MagicSoft/Mars/mcamera/MCameraRecTemp.cc

    r7430 r7444  
    2626/////////////////////////////////////////////////////////////////////////////
    2727//
    28 // MCameraRecTemp (PRELIMINARY)
     28// MCameraRecTemp
    2929//
    3030/////////////////////////////////////////////////////////////////////////////
     
    5959    *fLog << all << underline << GetDescriptor() << endl;
    6060    for (int i=0; i<fRecTemp.GetSize(); i++)
    61         *fLog << " " << GetRecTemp(i);
     61        *fLog << " " << fRecTemp[i];
    6262    *fLog << endl;
    6363}
     
    6969Float_t MCameraRecTemp::GetMin() const
    7070{
    71     Float_t val = (UInt_t)-1;
     71    Float_t val = FLT_MAX;
    7272    for (int i=0; i<fRecTemp.GetSize(); i++)
    73         val = TMath::Min(val, GetRecTemp(i));
     73        val = TMath::Min(val, fRecTemp[i]);
    7474    return val;
    7575}
     
    8181Float_t MCameraRecTemp::GetMax() const
    8282{
    83     Float_t val = 0;
     83    Float_t val = -FLT_MAX;
    8484    for (int i=0; i<fRecTemp.GetSize(); i++)
    85         val = TMath::Max(val, GetRecTemp(i));
     85        val = TMath::Max(val, fRecTemp[i]);
    8686    return val;
    8787}
  • trunk/MagicSoft/Mars/mcamera/MCameraRecTemp.h

    r7430 r7444  
    1919    MCameraRecTemp(Int_t size=76, const char *name=NULL, const char *title=NULL);
    2020
    21     void SetRecTemp(Int_t i, Float_t val) { fRecTemp[i] = (Int_t)val; }
    22     Float_t GetRecTemp(Int_t i) const { return (*this)[i]; }
    23     Float_t &operator[](Int_t i) { return (Float_t&)fRecTemp[i]; }
    24     const Float_t &operator[](Int_t i) const { return (*const_cast<MCameraRecTemp*>(this))[i]; }
     21    Float_t operator[](Int_t i) const { return fRecTemp[i]; }
    2522
    2623    Float_t GetMin() const;
  • trunk/MagicSoft/Mars/mcamera/MCameraTD.cc

    r7430 r7444  
    2626/////////////////////////////////////////////////////////////////////////////
    2727//
    28 // MCameraTD (PRELIMINARY)
     28// MCameraTD
    2929//
    3030/////////////////////////////////////////////////////////////////////////////
     
    5353// --------------------------------------------------------------------------
    5454//
    55 // Print the dc currents
     55// Print the discrimintaor delays
    5656//
    5757void MCameraTD::Print(Option_t *) const
     
    5959    *fLog << all << underline << GetDescriptor() << endl;
    6060    for (int i=0; i<fTD.GetSize(); i++)
    61         *fLog << " " << GetDelay(i);
     61        *fLog << " " << (int)fTD[i];
    6262    *fLog << endl;
    6363}
     
    6565// --------------------------------------------------------------------------
    6666//
    67 // Return the minimum discriminator delays
     67// Return the discrimintaor delays
    6868//
    69 Float_t MCameraTD::GetMin() const
     69Byte_t MCameraTD::GetMin() const
    7070{
    71     Float_t val = (UInt_t)-1;
     71    Byte_t val = 0xff;
    7272    for (int i=0; i<fTD.GetSize(); i++)
    73         val = TMath::Min(val, GetDelay(i));
     73        val = TMath::Min(val, fTD[i]);
    7474    return val;
    7575}
     
    7777// --------------------------------------------------------------------------
    7878//
    79 // Return the maximum discriminator delays
     79// Return the discrimintaor delays
    8080//
    81 Float_t MCameraTD::GetMax() const
     81Byte_t MCameraTD::GetMax() const
    8282{
    83     Float_t val = 0;
     83    Byte_t val = 0;
    8484    for (int i=0; i<fTD.GetSize(); i++)
    85         val = TMath::Max(val, GetDelay(i));
     85        val = TMath::Max(val, fTD[i]);
    8686    return val;
    8787}
  • trunk/MagicSoft/Mars/mcamera/MCameraTD.h

    r7430 r7444  
    99#endif
    1010
    11 #ifndef ROOT_TArrayS
    12 #include <TArrayS.h>
     11#ifndef ROOT_TArrayC
     12#include <TArrayC.h>
    1313#endif
    1414
     
    1717    friend class MReportCC;
    1818private:
    19     TArrayS fTD; // [au] discriminator delays
     19    TArrayC fTD; // [au] discriminator delays
    2020
    2121public:
    2222    MCameraTD(Int_t size=577, const char *name=NULL, const char *title=NULL);
    2323
    24     void SetDelay(Int_t i, Float_t val) { fTD[i] = (Int_t)val; }
    25     Float_t GetDelay(Int_t i) const { return (*this)[i]; }
    26     Float_t &operator[](Int_t i) { return (Float_t&)fTD[i]; }
    27     const Float_t &operator[](Int_t i) const { return (*const_cast<MCameraTD*>(this))[i]; }
     24    Byte_t operator[](Int_t i) { return fTD[i]; }
    2825
    29     Float_t GetMin() const;
    30     Float_t GetMax() const;
     26    Byte_t GetMin() const;
     27    Byte_t GetMax() const;
    3128
    3229    void Print(Option_t *opt=NULL) const;
  • trunk/MagicSoft/Mars/mcamera/MCameraTH.cc

    r7430 r7444  
    5353// --------------------------------------------------------------------------
    5454//
    55 // Print the dc currents
     55// Print the discriminator thresholds
    5656//
    5757void MCameraTH::Print(Option_t *) const
     
    5959    *fLog << all << underline << GetDescriptor() << endl;
    6060    for (int i=0; i<fTH.GetSize(); i++)
    61         *fLog << " " << GetThreshold(i);
     61        *fLog << " " << (int)fTH[i];
    6262    *fLog << endl;
    6363}
     
    6565// --------------------------------------------------------------------------
    6666//
    67 // Return the minimum dc current
     67// Return the discriminator thresholds
    6868//
    69 Float_t MCameraTH::GetMin() const
     69Byte_t MCameraTH::GetMin() const
    7070{
    71     Float_t val = (UInt_t)-1;
     71    Byte_t val = 0xff;
    7272    for (int i=0; i<fTH.GetSize(); i++)
    73         val = TMath::Min(val, GetThreshold(i));
     73        val = TMath::Min(val, fTH[i]);
    7474    return val;
    7575}
     
    7777// --------------------------------------------------------------------------
    7878//
    79 // Return the maximum dc current
     79// Return the discriminator thresholds
    8080//
    81 Float_t MCameraTH::GetMax() const
     81Byte_t MCameraTH::GetMax() const
    8282{
    83     Float_t val = 0;
     83    Byte_t val = 0;
    8484    for (int i=0; i<fTH.GetSize(); i++)
    85         val = TMath::Max(val, GetThreshold(i));
     85        val = TMath::Max(val, fTH[i]);
    8686    return val;
    8787}
  • trunk/MagicSoft/Mars/mcamera/MCameraTH.h

    r7430 r7444  
    99#endif
    1010
    11 #ifndef ROOT_TArrayS
    12 #include <TArrayS.h>
     11#ifndef ROOT_TArrayC
     12#include <TArrayC.h>
    1313#endif
    1414
     
    1717    friend class MReportCC;
    1818private:
    19     TArrayS fTH; // [au] discriminator thresholds
     19    TArrayC fTH; // [au] discriminator thresholds
    2020
    2121public:
    2222    MCameraTH(Int_t size=577, const char *name=NULL, const char *title=NULL);
    2323
    24     void SetThreshold(Int_t i, Float_t val) { fTH[i] = (Int_t)val; }
    25     Float_t GetThreshold(Int_t i) const { return (*this)[i]; }
    26     Float_t &operator[](Int_t i) { return (Float_t&)fTH[i]; }
    27     const Float_t &operator[](Int_t i) const { return (*const_cast<MCameraTH*>(this))[i]; }
     24    Byte_t operator[](Int_t i) { return fTH[i]; }
    2825
    29     Float_t GetMin() const;
    30     Float_t GetMax() const;
     26    Byte_t GetMin() const;
     27    Byte_t GetMax() const;
    3128
    3229    void Print(Option_t *opt=NULL) const;
  • trunk/MagicSoft/Mars/showplot.cc

    r7436 r7444  
    137137        return 3;
    138138    }
    139     if (arg.GetNumArguments()<1 || arg.GetNumArguments()>2 || !arg.GetArgumentStr(1).IsDigit())
     139    if (arg.GetNumArguments()<1 || arg.GetNumArguments()>2)
     140    {
     141        Usage();
     142        return 2;
     143    }
     144    if (arg.GetNumArguments()==2 && !arg.GetArgumentStr(1).IsDigit())
    140145    {
    141146        Usage();
Note: See TracChangeset for help on using the changeset viewer.