Changeset 842


Ignore:
Timestamp:
06/12/01 13:01:20 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.h

    r716 r842  
    1313{
    1414private:
    15     TString       fFileName;    // the file name of the string
    1615    ifstream     *fIn;          // the inputfile
    1716    MCerPhotEvt  *fNphot;       // the data container for all data.
  • trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc

    r764 r842  
    113113    }
    114114
     115    fCerPhotEvt->SetHasChanged();
     116
    115117    return kTRUE;
    116118}
  • trunk/MagicSoft/Mars/manalysis/MHillas.cc

    r765 r842  
    3636
    3737#include <math.h>
     38#include <fstream.h>
    3839
    3940#include <TEllipse.h>
     
    5152// Default constructor.
    5253//
    53 MHillas::MHillas(const char *name, const char *title) :
    54     fAlpha(0), fTheta(0), fWidth(0), fLength(0), fSize(0), fDist(0), fEllipse(NULL)
     54MHillas::MHillas(const char *name, const char *title) : fEllipse(NULL)
    5555{
    5656    *fName  = name  ? name  : "MHillas";
    5757    *fTitle = title ? title : "Storage container for Hillas parameter of one event";
    5858
     59    Reset();
    5960    // FIXME: Initialization of values missing
    6061}
     
    6667MHillas::~MHillas()
    6768{
     69    Clear();
     70}
     71
     72void MHillas::Reset()
     73{
     74    fAlpha  = 0;
     75    fTheta  = 0;
     76    fWidth  = 0;
     77    fLength = 0;
     78    fSize   = 0;
     79    fDist   = 0;
     80
    6881    Clear();
    6982}
     
    271284    if (xmean<0) fTheta += kPI;                      // [rad]
    272285
     286    SetHasChanged();
     287
    273288    return kTRUE;
    274289}
     290
     291void MHillas::AsciiRead(ifstream &fin)
     292{
     293    fin >> fAlpha;
     294    fin >> fTheta;
     295    fin >> fWidth;
     296    fin >> fLength;
     297    fin >> fSize;
     298    fin >> fDist;
     299}
     300
     301void MHillas::AsciiWrite(ofstream &fout) const
     302{
     303    fout << fAlpha << " ";
     304    fout << fTheta << " ";
     305    fout << fWidth << " ";
     306    fout << fLength << " ";
     307    fout << fSize << " ";
     308    fout << fDist << endl;
     309}
  • trunk/MagicSoft/Mars/manalysis/MHillas.h

    r749 r842  
    2727    ~MHillas();
    2828
     29    void Reset();
     30
    2931    Bool_t Calc(MGeomCam &geom, MCerPhotEvt &pix);
    3032
     
    4244    Float_t GetTheta() const  { return fTheta; }
    4345
     46    void AsciiRead(ifstream &fin);
     47    void AsciiWrite(ofstream &fout) const;
     48
    4449    ClassDef(MHillas, 1) // Storage Container for Hillas Parameter
    4550};
Note: See TracChangeset for help on using the changeset viewer.