// =====================================================================
//  $Id: TMatrixElement.cc,v 1.1.1.1 2003/06/27 02:56:41 goiwai Exp $
//  $Name: CLDAQ-1-06-02 $
// =====================================================================
#include "TMatrixElement.hh"

TMatrixElement::TMatrixElement( const Tstring& idstr, Tobject_t objecttype, Tint ndata, Tint ntuple )
  : TDataMultiplicity( ndata, ntuple ), theMatrixID( idstr ), 
    theObjectType( objecttype )
{;}

TMatrixElement::TMatrixElement( const TMatrixElement& right )
  : TDataMultiplicity( right ), theMatrixID( right.theMatrixID ),
    theObjectType( right.theObjectType )
{;}

TMatrixElement::~TMatrixElement()
{;}

const TMatrixElement& TMatrixElement::operator=( const TMatrixElement& right )
{
  *( (TDataMultiplicity*)this ) = *( (TDataMultiplicity*)(&right) );
  theMatrixID = right.theMatrixID;
  theObjectType = right.theObjectType;
  return( *this );
}

Tbool TMatrixElement::operator==( const TMatrixElement& right ) const
{
  Tbool retval = Ttrue;
  retval &= ( *( (TDataMultiplicity*)this ) == *( (TDataMultiplicity*)(&right) ) );
  retval &= ( theMatrixID == right.theMatrixID );
  retval &= ( theObjectType == right.theObjectType );
  return( retval );
}

Tbool TMatrixElement::operator!=( const TMatrixElement& right ) const
{
  Tbool retval = Tfalse;
  retval |= !( ( *( (TDataMultiplicity*)this ) == *( (TDataMultiplicity*)(&right) ) ) );
  retval |= ( theMatrixID != right.theMatrixID );
  retval |= ( theObjectType != right.theObjectType );
  return( retval );
}
