Universita' di GenovaINFN Sezione di Genova  
AIRWATCH / EUSO Genova

EMacroCell - source file

// ESAF : Euso Simulation and Analysis Framework
// $Id: EMacroCell.cc,v 1.6 2005/05/02 10:12:47 pesce Exp $
//  created May, 23 2004

#include "EMacroCell.hh"

ClassImp(EMacroCell)

//_____________________________________________________________________________
 EMacroCell::EMacroCell() {
    // ctor

    Clear();
}

//_____________________________________________________________________________
 EMacroCell::EMacroCell(const EMacroCell& other) : TObject() {
    // copy ctor

    other.Copy( *this );
}

//_____________________________________________________________________________
 EMacroCell::~EMacroCell() {
    // dtor

    //Clear();
}

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

    TObject::Copy( other );

    ((EMacroCell&)other).fMCId         = fMCId;
    ((EMacroCell&)other).fNumChips     = fNumChips;
    ((EMacroCell&)other).fNumPixels    = fNumPixels;
    ((EMacroCell&)other).fNumCounts    = fNumCounts;
    ((EMacroCell&)other).fNumFastOrs   = fNumFastOrs;
    ((EMacroCell&)other).fHasTriggered = fHasTriggered;
    ((EMacroCell&)other).fGtuTrigger   = fGtuTrigger;
    ((EMacroCell&)other).fTriggerWord  = fTriggerWord;
    ((EMacroCell&)other).fTrgWords     = fTrgWords;
    ((EMacroCell&)other).fTrgIds       = fTrgIds;

}

//_____________________________________________________________________________
 void EMacroCell::Clear( Option_t* opt ) {
    //clear
    fMCId           = 0; 
    fNumChips       = 0;
    fNumPixels      = 0;
    fNumCounts      = 0;
    fNumFastOrs     = 0; 
    fHasTriggered   = 0;
    fGtuTrigger     = 0;
    fTriggerWord    = 0;
    fTrgWords.Set(0);
    fTrgIds.Set(0);
}

//_____________________________________________________________________________
 Int_t EMacroCell::GetWord(ETriggerTypeIdentifier id) const {
    // get the word of a specific trigger
    if ( fTrgIds.GetSize()==0 ) return 0;
    for(Int_t i(0); i<fTrgIds.GetSize(); i++) {
        if ( fTrgIds.At(i) == (Int_t)id ) {
            return fTrgWords.At(i);
        }
    }
    return 0;
}
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