X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=PWG2%2FFLOW%2FAliFlowCommon%2FAliFlowEventSimple.cxx;h=c7abab3363548f75ef0c6f7a4261c15de876ffd9;hp=2c03bdf9233cfff1d8b950965bb910a6b55a9c7f;hb=46bec39c472d4f5a781ed983095137d7b9c1a099;hpb=ba5e52fb3a395d4a04b21aec111ab80b9f280aea diff --git a/PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx b/PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx index 2c03bdf9233..c7abab33635 100644 --- a/PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx +++ b/PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx @@ -39,10 +39,20 @@ ClassImp(AliFlowEventSimple) //----------------------------------------------------------------------- - AliFlowEventSimple::AliFlowEventSimple(Int_t aLenght): - fTrackCollection(NULL), - fNumberOfTracks(0), - fEventNSelTracksIntFlow(0) +AliFlowEventSimple::AliFlowEventSimple(): + fTrackCollection(NULL), + fNumberOfTracks(0), + fEventNSelTracksIntFlow(0) +{ + cout << "AliFlowEventSimple: Default constructor to be used only by root for io" << endl; +} + +//----------------------------------------------------------------------- + +AliFlowEventSimple::AliFlowEventSimple(Int_t aLenght): + fTrackCollection(NULL), + fNumberOfTracks(0), + fEventNSelTracksIntFlow(0) { //constructor fTrackCollection = new TObjArray(aLenght) ; @@ -75,7 +85,12 @@ AliFlowEventSimple& AliFlowEventSimple::operator=(const AliFlowEventSimple& anEv AliFlowEventSimple::~AliFlowEventSimple() { //destructor - fTrackCollection->Delete() ; delete fTrackCollection ; + if (fTrackCollection) { + fTrackCollection->Delete() ; delete fTrackCollection ; + } + else { + cout << "AliFlowEventSimple: Warning trying to delete track collections NULL pointer" << endl; + } } //-----------------------------------------------------------------------