Changeset 3379


Ignore:
Timestamp:
03/02/04 13:39:02 (21 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3377 r3379  
    44
    55                                                 -*-*- END OF LINE -*-*-
     6
     7 2004/03/02: Abelardo Moralejo
     8
     9   * mmc/MMcCorsikaRunHeader.[h,cc]
     10     - Added operator [] to get references to the objects in
     11       TObjArray fTelescopes.
     12     - Added Print() function.
     13
     14   * mgeom/MGeomCorsikaCT.[h,cc]
     15     - Added getter functions for telescope coordinates.
     16     - Added Print() function.
     17
    618
    719 2004/03/02: Thomas Bretz
  • trunk/MagicSoft/Mars/mgeom/MGeomCorsikaCT.cc

    r2521 r3379  
    6565  fCTfocal=ctfocal;
    6666}
     67// --------------------------------------------------------------------------
     68//
     69// Print the geometry information of one pixel.
     70//
     71void MGeomCorsikaCT::Print(Option_t *opt) const
     72{
     73    //   information about a telescope
     74  *fLog << all << "x = " << fCTx << ", y = " << fCTy << ", z = "
     75        << fCTz << " cm " << endl;
     76}
  • trunk/MagicSoft/Mars/mgeom/MGeomCorsikaCT.h

    r2283 r3379  
    1818    Float_t fCTtheta; //
    1919    Float_t fCTphi;   //
    20     Float_t fCTdiam;  // Diamiter where the Cph are stored at MMCs level
     20    Float_t fCTdiam;  // Diameter where the Cph are stored at MMCs level
    2121    Float_t fCTfocal; // Focal of the CT
    2222
     
    2525    MGeomCorsikaCT(const char *name=NULL, const char *title=NULL);
    2626
     27    void Print(Option_t *opt=NULL) const;
     28
    2729    void Fill(Float_t ctx, Float_t cty, Float_t ctz,
    2830              Float_t cttheta, Float_t ctphi,
    2931              Float_t ctdiam, Float_t ctfocal);
     32
     33    Float_t GetCTx() { return fCTx; }
     34    Float_t GetCTy() { return fCTy; }
     35    Float_t GetCTz() { return fCTz; }
    3036
    3137    ClassDef(MGeomCorsikaCT, 1)  // class containing information about CTelescope
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.cc

    r2283 r3379  
    3535#include "MGeomCorsikaCT.h"
    3636#include "MMcCorsikaRunHeader.h"
     37#include "MLog.h"
     38#include "MLogManip.h"
    3739
    3840ClassImp(MMcCorsikaRunHeader);
     
    4749MMcCorsikaRunHeader::MMcCorsikaRunHeader(const char *name, const char *title,
    4850                                         int NumCT)
     51  : fTelescopes(NumCT)
    4952{
    5053    fName  = name  ? name  : "MMcCorsikaRunHeader";
     
    8891
    8992    fNumCT=NumCT;
     93
     94    fTelescopes.SetOwner();
     95
    9096    for  (int i=0;i<NumCT;i++)
    9197      fTelescopes[i]= new MGeomCorsikaCT;
    9298
     99    SetReadyToSave();
    93100}
    94101
     
    176183}
    177184
    178 
    179 
    180 
    181 
    182 
    183 
    184 
    185 
    186 
     185// -------------------------------------------------------------------------
     186//
     187// Returns a reference of the i-th entry (the telescope with the index i)
     188//
     189MGeomCorsikaCT &MMcCorsikaRunHeader::operator[](Int_t i) const
     190{
     191    return *static_cast<MGeomCorsikaCT*>(fTelescopes.UncheckedAt(i));
     192}
     193
     194// --------------------------------------------------------------------------
     195//
     196//  Prints the information of all telescopes
     197//
     198void MMcCorsikaRunHeader::Print(Option_t *) const
     199{
     200    //
     201    //   Print Information about the Geometry of the camera
     202    //
     203  *fLog << all << GetTitle() <<". Number of Telescopes: " << fNumCT << endl;
     204
     205  fTelescopes.Print();
     206}
     207
     208
     209
     210
     211
     212
     213
     214
     215
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.h

    r2283 r3379  
    101101                Int_t CTnum);
    102102
     103    MGeomCorsikaCT &operator[](Int_t i) const;
     104
     105    virtual void Print(Option_t *opt=NULL) const;
     106
    103107    ClassDef(MMcCorsikaRunHeader, 3) // storage container for corsika setup information
    104108};
Note: See TracChangeset for help on using the changeset viewer.