Universita' di GenovaINFN Sezione di Genova  
AIRWATCH / EUSO Genova

EHeader - source file

// $Id: EHeader.cc,v 1.4 2005/06/05 14:09:23 thea Exp $
// Author: M.Pallavicini

/*****************************************************************************
 * ESAF: Euso Simulation and Analysis Framework                              *
 *                                                                           *
 *  Id: EHeader                                                              *
 *  Package: SimuEvent                                                       *
 *  Coordinator: Alessandro.Thea                                             *
 *                                                                           *
 *****************************************************************************/

//______________________________________________________________________________
//
//  EHeader
//  

#include "EHeader.hh"

ClassImp(EHeader)

//_____________________________________________________________________________
 EHeader::EHeader() : fNum(-1), fRun(-1), fRandom(0) {
    //
    // Constructor
    //

}

//_____________________________________________________________________________
 EHeader::EHeader(const EHeader& other) : TObject(other) {
    // 
    // Copy ctor
    //

   other.Copy( *this );
}

//_____________________________________________________________________________
 EHeader::~EHeader() {
    // 
    // Destructor
    // 

    Clear();
}

//_____________________________________________________________________________
 void EHeader::Copy( TObject& other ) const {
    //
    // Copy
    //

    TObject::Copy(other);

    ((EHeader&)other).fNum = fNum;
    ((EHeader&)other).fRun = fRun;


    ((EHeader&)other).SetRandom(fRandom); 
}


//_____________________________________________________________________________
 void EHeader::Clear( Option_t * ) {
    //
    // Clear object
    //

    fNum = -1;
    fRun = -1;

    SafeDelete(fRandom);
}

//______________________________________________________________________________
 void EHeader::SetRandom( const TRandom* rndm ) { 
    //
    // Set random number generator
    //

    if ( fRandom ) delete fRandom;

    fRandom = (TRandom*)rndm->Clone();
}
About Us | EUSO Official Website | Web pages created by Roberto Pesce and Alessandro Thea - Last Update Wed Nov 16 16:57:39 2005 Wed Nov 16 16:29:22 2005