]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDv0Analysis.C
Removing obsolete macros
[u/mrichter/AliRoot.git] / STEER / AliESDv0Analysis.C
index c5967693a6c43d51c9880581be996529a4d2c935..b5d94b49a4a34256ad7f9a6ac4d806366d33a136 100644 (file)
@@ -14,8 +14,8 @@
   #include <TH1F.h>
   #include <TCanvas.h>
 
-  #include "AliESD.h"
-
+  #include "AliESDEvent.h"
+  #include "AliESDv0.h"
 #endif
 
 extern TROOT *gROOT;
@@ -32,12 +32,12 @@ Int_t AliESDv0Analysis(const Char_t *dir=".") {
    if (!ef||!ef->IsOpen()) {cerr<<"Can't AliESDs.root !\n"; return 1;}
    cerr<<"\n****** "<<fname<<" ******\n";
 
-   AliESD* event = new AliESD;
+   AliESDEvent* event = new AliESDEvent();
 
 
    TTree* tree = (TTree*) ef->Get("esdTree");
    if (!tree) {cerr<<"no ESD tree found\n"; return 1;};
-   tree->SetBranchAddress("ESD", &event);
+   event->ReadFromTree(tree);
 
    Int_t rc=0,n=0;
 
@@ -56,6 +56,7 @@ Int_t AliESDv0Analysis(const Char_t *dir=".") {
 
      while (nv0--) {
        AliESDv0 *v0=event->GetV0(nv0);
+       if (v0->GetOnFlyStatus()) continue;
 
        Int_t protonIdx=v0->GetPindex();
        Int_t pionIdx  =v0->GetNindex();
@@ -102,6 +103,7 @@ Int_t AliESDv0Analysis(const Char_t *dir=".") {
    }
 
    delete event;
+   delete tree;
    ef->Close();
 
    TCanvas *c1=(TCanvas*)gROOT->FindObject("c1");