#include "TH1F.h"
#include "TH1D.h"
#include "TProfile.h"
+#include "TBrowser.h"
#include "AliFlowVector.h"
#include "AliFlowTrackSimple.h"
#include "AliFlowEventSimple.h"
AliFlowEventSimple::AliFlowEventSimple():
fTrackCollection(NULL),
fNumberOfTracks(0),
- fEventNSelTracksIntFlow(0)
+ fEventNSelTracksIntFlow(0),
+ fNumberOfTracksWrap(NULL),
+ fEventNSelTracksIntFlowWrap(NULL)
{
cout << "AliFlowEventSimple: Default constructor to be used only by root for io" << endl;
}
AliFlowEventSimple::AliFlowEventSimple(Int_t aLenght):
fTrackCollection(NULL),
fNumberOfTracks(0),
- fEventNSelTracksIntFlow(0)
+ fEventNSelTracksIntFlow(0),
+ fNumberOfTracksWrap(NULL),
+ fEventNSelTracksIntFlowWrap(NULL)
{
//constructor
fTrackCollection = new TObjArray(aLenght) ;
TObject(),
fTrackCollection(anEvent.fTrackCollection),
fNumberOfTracks(anEvent.fNumberOfTracks),
- fEventNSelTracksIntFlow(anEvent.fEventNSelTracksIntFlow)
+ fEventNSelTracksIntFlow(anEvent.fEventNSelTracksIntFlow),
+ fNumberOfTracksWrap(anEvent.fNumberOfTracksWrap),
+ fEventNSelTracksIntFlowWrap(anEvent.fEventNSelTracksIntFlowWrap)
{
//copy constructor
}
*fTrackCollection = *anEvent.fTrackCollection ;
fNumberOfTracks = anEvent.fNumberOfTracks;
fEventNSelTracksIntFlow = anEvent.fEventNSelTracksIntFlow;
-
+ fNumberOfTracksWrap = anEvent.fNumberOfTracksWrap;
+ fEventNSelTracksIntFlowWrap = anEvent.fEventNSelTracksIntFlowWrap;
+
return *this;
}
AliFlowEventSimple::~AliFlowEventSimple()
{
//destructor
- if (fTrackCollection) {
- fTrackCollection->Delete() ; delete fTrackCollection ;
- }
- else {
- cout << "AliFlowEventSimple: Warning trying to delete track collections NULL pointer" << endl;
- }
+ if (fTrackCollection) fTrackCollection->Delete(); delete fTrackCollection;
+ if (fNumberOfTracksWrap) delete fNumberOfTracksWrap;
+ if (fEventNSelTracksIntFlowWrap) delete fEventNSelTracksIntFlowWrap;
}
//-----------------------------------------------------------------------
}
+//-----------------------------------------------------------------------
+void AliFlowEventSimple::Print(Option_t *option) const
+{
+ // -*-*-*-*-*Print some global quantities for this histogram collection class *-*-*-*-*-*-*-*
+ // ===============================================
+ // printf( "TH1.Print Name = %s, Entries= %d, Total sum= %g\n",GetName(),Int_t(fEntries),GetSumOfWeights());
+ printf( "Class.Print Name = %s, Total number of tracks= %d, Number of selected tracks= %d",
+ GetName(),fNumberOfTracks, fEventNSelTracksIntFlow );
+
+ if (fTrackCollection) {
+ fTrackCollection->Print(option);
+ }
+ else {
+ printf( "Empty track collection \n");
+ }
+}
+
+//-----------------------------------------------------------------------
+ void AliFlowEventSimple::Browse(TBrowser *b)
+{
+ if (!b) return;
+ if (!fNumberOfTracksWrap) {
+ fNumberOfTracksWrap = new TParameter<int>("fNumberOfTracks", fNumberOfTracks);
+ b->Add(fNumberOfTracksWrap);
+ }
+ if (!fEventNSelTracksIntFlowWrap) {
+ fEventNSelTracksIntFlowWrap = new TParameter<int>("fEventNSelTracksIntFlow", fEventNSelTracksIntFlow);
+ b->Add(fEventNSelTracksIntFlowWrap);
+ }
+ if (fTrackCollection) b->Add(fTrackCollection,"AliFlowTracksSimple");
+}
+
+
#include "TH1F.h"
#include "TH1D.h"
#include "TFile.h"
+#include "TParameter.h"
class AliFlowTrackSimple;
/**************************************
AliFlowEventSimple(const AliFlowEventSimple& anEvent);
AliFlowEventSimple& operator=(const AliFlowEventSimple& anEvent);
virtual ~AliFlowEventSimple();
+
+ Bool_t IsFolder() const {return kTRUE;};
+ void Browse(TBrowser *b);
+ void Print(Option_t* option = "") const; //method to print stats
Int_t NumberOfTracks() const { return this->fNumberOfTracks; }
Int_t GetEventNSelTracksIntFlow() const { return this->fEventNSelTracksIntFlow; }
TObjArray* fTrackCollection; // collection of tracks
Int_t fNumberOfTracks; // number of tracks
Int_t fEventNSelTracksIntFlow; // number of tracks selected for integrated flow calculation
-
- ClassDef(AliFlowEventSimple,1) // macro for rootcint
+ TParameter<Int_t>* fNumberOfTracksWrap; //! number of tracks in TBrowser
+ TParameter<Int_t>* fEventNSelTracksIntFlowWrap; //! number of tracks selected for integrated flow calculation in TBrowser
+
+ ClassDef(AliFlowEventSimple,1) // track collection used in flow analysis
};
#endif