From 71d45463f4522f97e11ef5a40bb2a126b24f2bbb Mon Sep 17 00:00:00 2001
From: Enrico Guiraud <enrico.guiraud@cern.ch>
Date: Thu, 7 Jun 2018 15:47:02 +0200
Subject: [PATCH] [TREEPROCMT] Faster check for TTree/TChain

---
 tree/treeplayer/src/TTreeProcessorMT.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tree/treeplayer/src/TTreeProcessorMT.cxx b/tree/treeplayer/src/TTreeProcessorMT.cxx
index 52a75afe5ba..62852f1341e 100644
--- a/tree/treeplayer/src/TTreeProcessorMT.cxx
+++ b/tree/treeplayer/src/TTreeProcessorMT.cxx
@@ -120,7 +120,7 @@ Internal::FriendInfo TTreeProcessorMT::GetFriendInfo(TTree &tree)
       // Store the file names of the friend tree
       friendFileNames.emplace_back();
       auto &fileNames = friendFileNames.back();
-      const bool isChain = tree.IsA() == TClassRef("TChain");
+      const bool isChain = tree.IsA() == TChain::Class();
       if (isChain) {
          const auto frChain = static_cast<TChain *>(frTree);
          for (auto f : *(frChain->GetListOfFiles())) {
@@ -194,7 +194,7 @@ std::vector<std::string> GetFilesFromTree(TTree &tree)
 {
    std::vector<std::string> filenames;
 
-   const bool isChain = tree.IsA() == TClassRef("TChain");
+   const bool isChain = tree.IsA() == TChain::Class();
    if (isChain) {
       TObjArray *filelist = static_cast<TChain &>(tree).GetListOfFiles();
       const auto nFiles = filelist->GetEntries();
-- 
GitLab