#include "StO97Event.h"

ClassImp(StO97Event)


//_________________
StO97Event::StO97Event() :
mEventNumber(0), mNTracks(0), mImpactPar(0.), 
  mEventPlaneRot(0.) {
  mTrack = new TClonesArray("StO97Track", 1500);
}


//_________________
StO97Event::~StO97Event() {
  if (mTrack) {
    delete mTrack;
    mTrack = 0;
  }
}


//_________________
StO97Event &StO97Event::operator=(const StO97Event &event) {
  if (this != &event) {
    mEventNumber = event.mEventNumber;
    mNTracks = event.mNTracks;
    mImpactPar = event.mImpactPar;
    mEventPlaneRot = event.mEventPlaneRot;

    mTrack = event.mTrack;
  }

  return *this;
}


//_________________
StO97Track *StO97Event::AddTrack(Int_t trackNum) {
  //
  // Add a new track
  //
  return new ((*mTrack)[trackNum]) StO97Track;
}



//_________________
void StO97Event::Clear(Option_t* option) {
  mEventNumber = 0;
  mNTracks = 0;
  mImpactPar = 0.;
  mEventPlaneRot = 0.;
  mTrack->Delete();
}
