]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RALICE/AliJet.cxx
added data origin kAliHLTDataOriginEMCAL {EMCL}
[u/mrichter/AliRoot.git] / RALICE / AliJet.cxx
index 9d610abd3000d7f5e40215b076016f07eb1857b5..25094231c80f3482e85969e618caaf92459300b1 100644 (file)
@@ -94,6 +94,7 @@
 //- Modified: NvE $Date$ UU-SAP Utrecht
 ///////////////////////////////////////////////////////////////////////////
 
+#include <cstdlib>
 #include "AliJet.h"
 #include "Riostream.h"
  
@@ -455,11 +456,28 @@ Int_t AliJet::GetNtracks(Int_t idmode,Int_t chmode,Int_t pcode)
  else
  {
   TObjArray* arr=GetTracks(idmode,chmode,pcode);
-  n=arr->GetEntries();
+  if (arr) n=arr->GetEntries();
   return n;
  }
 }
 ///////////////////////////////////////////////////////////////////////////
+Int_t AliJet::GetNtracks(TString name)
+{
+// Provide the number of tracks with the specified name.
+//
+// Note :
+// ------
+// This facility invokes the corresponding GetTracks memberfunction
+// and as such may result in overwriting existing track selection
+// arrays. Please refer to the docs of GetTracks for further details.
+  
+ Int_t n=0;
+
+ TObjArray* arr=GetTracks(name);
+ if (arr) n=arr->GetEntries();
+ return n;
+}
+///////////////////////////////////////////////////////////////////////////
 Double_t AliJet::GetEnergy(Float_t scale)
 {
 // Return the total energy of the jet.