6 #include <FairLogger.h>
7 #include <FairRootManager.h>
17 const char* branchname,
18 const std::vector<std::list<TString>>& fileList)
20 , fLegacyObject(nullptr)
21 , fBranchName(branchname)
27 list<TString>::const_iterator p;
29 Int_t s = fileList.size();
36 for (
i = 0;
i < s;
i++) {
40 if (fileList[
i].size() == 0)
continue;
42 for (p = fileList[
i].begin(); p != fileList[
i].end(); ++p)
49 for (
i = 0;
i < s;
i++)
56 LOG(error) <<
"AddFriend method should not be called in legacy mode";
59 if (chainNum1 < 0 || chainNum1 >=
static_cast<Int_t
>(
fChains.size())
60 ||
fChains[chainNum1] ==
nullptr) {
61 LOG(error) <<
"chainNum1=" << chainNum1
62 <<
" is not a correct chain number.";
65 if (chainNum2 < 0 || chainNum2 >=
static_cast<Int_t
>(
fChains.size())
66 ||
fChains[chainNum2] ==
nullptr) {
67 LOG(error) <<
"chainNum2=" << chainNum2
68 <<
" is not a correct chain number.";
77 , fLegacyObject(nullptr)
78 , fBranchName(branchname)
84 FairRootManager* fManager = FairRootManager::Instance();
86 LOG(fatal) <<
"CbmMCDataObject(): Can't find a Root Manager.";
91 LOG(fatal) <<
"CbmMCDataObject(): Can't find " <<
fBranchName
100 LOG(debug1) <<
"LegacyGet: Trying to get object with fileNum="
102 <<
" in legacy mode.";
111 if (fileNumber < 0 || fileNumber >=
fSize)
return nullptr;
112 if (eventNumber < 0 || eventNumber >=
fN[fileNumber])
return nullptr;
115 map<Int_t, TObject*>& arr =
fArrays[fileNumber];
121 TChain* ch =
fChains[fileNumber];
134 map<Int_t, TObject*>::const_iterator p;