]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliAnalysisManager.cxx
- move AliTRDTriggerAnalysis from ANALYSIS to PWG/TRD
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisManager.cxx
index cba6ce046440709e77b2855dedabc993674a8972..b7267c22b4e9741755d65aa44092d4a465602c74 100644 (file)
@@ -301,7 +301,16 @@ void AliAnalysisManager::CreateReadCache()
    if (fAsyncReading) gEnv->SetValue("TFile.AsyncReading",1);
    fTree->SetCacheSize(fCacheSize);
    TTreeCache::SetLearnEntries(1);  //<<< we can take the decision after 1 entry
-   fTree->AddBranchToCache("*",kTRUE);    //<<< add all branches to the cache
+   if (!fAutoBranchHandling && !fRequestedBranches.IsNull()) {
+      TObjArray *arr = fRequestedBranches.Tokenize(",");
+      TIter next(arr);
+      TObject *obj;
+      while ((obj=next()))
+         fTree->AddBranchToCache(obj->GetName(),kTRUE);  //<<< add requested branches to cache
+      delete arr;   
+   } else {
+      fTree->AddBranchToCache("*", kTRUE);  //<<< add all branches to cache
+   }   
    if (fDebug) {
       Info("CreateReadCache","Read cache enabled %lld bytes with async reading=%d",fCacheSize, (Int_t)fAsyncReading);
    }
@@ -2850,7 +2859,7 @@ void AliAnalysisManager::ApplyDebugOptions()
 }
 
 //______________________________________________________________________________
-Bool_t AliAnalysisManager::IsMacroLoaded(const char filename)
+Bool_t AliAnalysisManager::IsMacroLoaded(const char filename)
 {
 // Check if a macro was loaded.
    return fgMacroNames.Contains(filename);