|
14 | 14 | //
|
15 | 15 | //
|
16 | 16 | #include "FairFileSource.h"
|
| 17 | +#include "FairRootManager.h" // for FairRootManager |
17 | 18 | #include "TString.h"
|
18 | 19 | #include "FairFileHeader.h"
|
19 | 20 | #include "FairLogger.h"
|
@@ -139,14 +140,25 @@ Bool_t FairFileSource::Init()
|
139 | 140 | // with a different branch structure but the same tree name. ROOT
|
140 | 141 | // probably only checks if the name of the tree is the same.
|
141 | 142 | TList* list= dynamic_cast <TList*> (fRootFile->Get("BranchList"));
|
142 |
| - if(list==0)fLogger->Fatal(MESSAGE_ORIGIN, "No Branch list in input file"); |
| 143 | + if(list==0){ |
| 144 | + // special FairShip case of stripped down root file, create list instead of doing core dump |
| 145 | + list = new TList(); |
| 146 | + TTree* sTree = dynamic_cast <TTree*> (fRootFile->Get("cbmsim")); |
| 147 | + for(Int_t i =0; i< sTree->GetListOfBranches()->GetEntries(); i++) { |
| 148 | + TObjString* Obj = new TObjString( sTree->GetListOfBranches()->At(i)->GetName() ); |
| 149 | + list->Add( Obj ); |
| 150 | + } |
| 151 | + FairRootManager* fManager = FairRootManager::Instance(); |
| 152 | + fManager->SetBranchNameList(list); |
| 153 | + } |
| 154 | + if(list==0){ fLogger->Fatal(MESSAGE_ORIGIN, "No Branch list in input file"); }; |
143 | 155 | TString chainName = fInputTitle;
|
144 | 156 | TString ObjName;
|
145 | 157 | fInputLevel.push_back(chainName);
|
146 | 158 | fCheckInputBranches[chainName] = new std::list<TString>;
|
147 | 159 | if(list) {
|
148 | 160 | TObjString* Obj=0;
|
149 |
| - fLogger->Info(MESSAGE_ORIGIN, "Enteries in the list %i", list->GetEntries()); |
| 161 | + fLogger->Info(MESSAGE_ORIGIN, "Entries in the list %i", list->GetEntries()); |
150 | 162 | for(Int_t i =0; i< list->GetEntries(); i++) {
|
151 | 163 | Obj=dynamic_cast <TObjString*> (list->At(i));
|
152 | 164 | if(Obj!=0){
|
|
0 commit comments