#include "AliAnalysisTaskScalarProduct.h"
#include "AliFlowEventSimpleMaker.h"
#include "AliFlowAnalysisWithScalarProduct.h"
+#include "AliFlowCommonHist.h"
// AliAnalysisTaskScalarProduct:
//
if (fListHistos)
{
fListHistos->Print();
+// AliFlowCommonHist *SDHistClass = dynamic_cast<AliFlowCommonHist*>
+// (fListHistos->FindObject("SP"));
+// if (SDHistClass)
+// {
+// // open a file and write the CLASS to the file
+// TFile *f = new TFile("mytest.root","recreate");
+// SDHistClass->Write();
+// SDHistClass->Print();
+// f->Close();
+// }
+// else
+// {
+// cout << "SD class pointer is NULL" << endl;
+// }
}
else
{
fHistProUQ->SetYTitle("<uQ>");
fHistList->Add(fHistProUQ);
- fCommonHists = new AliFlowCommonHist("SP");
+ fCommonHists = new AliFlowCommonHist("AliFlowCommonHistSP");
// fHistList->Add(fCommonHists->GetHistList());
fHistList->Add(fCommonHists);
// commented for test writing full object
- fHistList->Add(fCommonHists->GetHistMultOrig());
- fHistList->Add(fCommonHists->GetHistMultInt());
- fHistList->Add(fCommonHists->GetHistMultDiff());
- fHistList->Add(fCommonHists->GetHistPtInt());
- fHistList->Add(fCommonHists->GetHistPtDiff());
- fHistList->Add(fCommonHists->GetHistPhiInt());
- fHistList->Add(fCommonHists->GetHistPhiDiff());
- fHistList->Add(fCommonHists->GetHistEtaInt());
- fHistList->Add(fCommonHists->GetHistEtaDiff());
- fHistList->Add(fCommonHists->GetHistProMeanPtperBin());
- fHistList->Add(fCommonHists->GetHistQ());
+ // fHistList->Add(fCommonHists->GetHistMultOrig());
+ // fHistList->Add(fCommonHists->GetHistMultInt());
+ // fHistList->Add(fCommonHists->GetHistMultDiff());
+ // fHistList->Add(fCommonHists->GetHistPtInt());
+ // fHistList->Add(fCommonHists->GetHistPtDiff());
+ // fHistList->Add(fCommonHists->GetHistPhiInt());
+ // fHistList->Add(fCommonHists->GetHistPhiDiff());
+ // fHistList->Add(fCommonHists->GetHistEtaInt());
+ // fHistList->Add(fCommonHists->GetHistEtaDiff());
+ // fHistList->Add(fCommonHists->GetHistProMeanPtperBin());
+ // fHistList->Add(fCommonHists->GetHistQ());
// end test
//fCommonHistsRes = new AliFlowCommonHistResults("SP");
#include "TMath.h" //needed as include
#include "TList.h"
#include "AliFlowVector.h"
+#include "TBrowser.h"
class TH1F;
class TH1D;
}
-AliFlowCommonHist& AliFlowCommonHist::operator=(const AliFlowCommonHist& a)
-{
- *fHistMultOrig = *a.fHistMultOrig;
- *fHistMultInt = *a.fHistMultInt;
- *fHistMultDiff = *a.fHistMultDiff;
- *fHistPtInt = *a.fHistPtInt;
- *fHistPtDiff = *a.fHistPtDiff;
- *fHistPhiInt = *a.fHistPhiInt;
- *fHistPhiDiff = *a.fHistPhiDiff;
- *fHistEtaInt = *a.fHistEtaInt;
- *fHistEtaDiff = *a.fHistEtaDiff;
- *fHistProMeanPtperBin = *a.fHistProMeanPtperBin;
- *fHistQ = *a.fHistQ;
- // *fHistList = *a.fHistList;
- fHistList = NULL;
+// AliFlowCommonHist& AliFlowCommonHist::operator=(const AliFlowCommonHist& a)
+// {
+// *fHistMultOrig = *a.fHistMultOrig;
+// *fHistMultInt = *a.fHistMultInt;
+// *fHistMultDiff = *a.fHistMultDiff;
+// *fHistPtInt = *a.fHistPtInt;
+// *fHistPtDiff = *a.fHistPtDiff;
+// *fHistPhiInt = *a.fHistPhiInt;
+// *fHistPhiDiff = *a.fHistPhiDiff;
+// *fHistEtaInt = *a.fHistEtaInt;
+// *fHistEtaDiff = *a.fHistEtaDiff;
+// *fHistProMeanPtperBin = *a.fHistProMeanPtperBin;
+// *fHistQ = *a.fHistQ;
+// // *fHistList = *a.fHistList;
+// fHistList = NULL;
- return *this;
-}
+// return *this;
+// }
//-----------------------------------------------------------------------
}
}
+//-----------------------------------------------------------------------
+ void AliFlowCommonHist::Browse(TBrowser *b)
+{
+ if (!b) return;
+ if (fHistList) b->Add(fHistList,"AliFlowCommonHistList");
+}
class TProfile;
class TCollection;
class TList;
+class TBrowser;
class AliFlowCommonHist: public TNamed {
AliFlowCommonHist();
AliFlowCommonHist(const char *name,const char *title = "AliFlowCommonHist");
virtual ~AliFlowCommonHist();
+ AliFlowCommonHist(const AliFlowCommonHist& aSetOfHists);
+ Bool_t IsFolder() const {return kTRUE;};
//make fill methods here
Bool_t FillControlHistograms(AliFlowEventSimple* anEvent);
-
+ void Browse(TBrowser *b);
//make get methods here
Double_t GetEntriesInPtBin(Int_t iBin); //gets entries from fHistPtDiff
Double_t GetMeanPt(Int_t iBin); //gets the mean pt for this bin from fHistProMeanPtperBin
private:
- AliFlowCommonHist(const AliFlowCommonHist& aSetOfHists);
AliFlowCommonHist& operator=(const AliFlowCommonHist& aSetOfHists);
//define histograms here
TList* fHistList; //list to hold all histograms
- ClassDef(AliFlowCommonHist,0); // macro for rootcint
+ ClassDef(AliFlowCommonHist,1) // macro for rootcint
};
#endif