Changeset 8266 for trunk


Ignore:
Timestamp:
01/25/07 09:35:40 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mreflector
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc

    r2229 r8266  
    6464}
    6565
     66// --------------------------------------------------------------------------
     67//
     68// Copy constructor which copies the contents of dat into the new object
     69//
     70MRflEvtData::MRflEvtData(const MRflEvtData &dat)
     71   : fList("MRflSinglePhoton", 0), fPos(0)
     72{
     73    MRflSinglePhoton *ph=NULL;
     74
     75    TIter Next(&dat.fList);
     76    while ((ph=(MRflSinglePhoton*)Next()))
     77        new (fList[fPos++]) MRflSinglePhoton(*ph);
     78}
     79
     80// --------------------------------------------------------------------------
     81//
     82// Clone function producing a clone of this. A pointer to the clone is
     83// returned.
     84//
     85TObject *MRflEvtData::Clone(Option_t *) const
     86{
     87    return new MRflEvtData(*this);
     88}
     89
     90// --------------------------------------------------------------------------
     91//
     92// Return the i-th MRflSinglePhoton. Be carefull the result is not
     93// range checked!
     94//
    6695const MRflSinglePhoton &MRflEvtData::GetPhoton(Int_t i) const
    6796{
  • trunk/MagicSoft/Mars/mreflector/MRflEvtData.h

    r2958 r8266  
    2323public:
    2424    MRflEvtData(const char *name=NULL, const char *title=NULL);
     25    MRflEvtData(const MRflEvtData &dat);
     26
     27    TObject *Clone(Option_t *) const;
    2528
    2629    void Reset() { fPos = 0; }
  • trunk/MagicSoft/Mars/mreflector/MRflSinglePhoton.h

    r2135 r8266  
    1717    Float_t fPhi;    // [rad] camera inc. angle (rad)
    1818public:
     19    MRflSinglePhoton() { }
     20    MRflSinglePhoton(const MRflSinglePhoton &ph)
     21        : fX(ph.fX), fY(ph.fY), fCosU(ph.fCosU), fCosV(ph.fCosV),
     22        fTime(ph.fTime), fHeight(ph.fHeight), fPhi(ph.fPhi)
     23    {
     24    }
     25
    1926    void SetXY(Float_t x, Float_t y) { fX = x; fY=y; }
    2027    void SetCosUV(Float_t u, Float_t v) { fCosU = u; fCosV=v; }
Note: See TracChangeset for help on using the changeset viewer.