Skip to content

Commit 0429691

Browse files
ChristianTackeGSIkarabowi
authored andcommitted
chore(FRM): Drop private never set member variable
`FairRootManager::fOutFolder` is a private member variable. It is initialized to nullptr and never set to another value later on. So drop this member variable and any code that depends on it being non-nullptr.
1 parent e4ecb3c commit 0429691

2 files changed

Lines changed: 2 additions & 27 deletions

File tree

fairroot/base/steer/FairRootManager.cxx

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ FairRootManager* FairRootManager::Instance()
7272

7373
FairRootManager::FairRootManager()
7474
: TObject()
75-
, fOutFolder(0)
7675
, fCurrentTime(0)
7776
, fBranchSeqId(0)
7877
, fBranchNameList(new TList())
@@ -483,19 +482,9 @@ Bool_t FairRootManager::ReadNextEvent(Double_t)
483482
TObject* FairRootManager::GetObject(const char* BrName)
484483
{
485484
/**Get Data object by name*/
486-
TObject* Obj = nullptr;
487485
LOG(debug2) << " Try to find if the object " << BrName << " is already activated by another task or call";
488-
/**Try to find the object in the folder structure, object already activated by other task or call*/
489-
if (fOutFolder) {
490-
Obj = fOutFolder->FindObjectAny(BrName);
491-
if (Obj) {
492-
LOG(debug2) << "Object " << BrName << " was already activated by another task";
493-
}
494-
}
495486
/**Get object from memory or source*/
496-
if (!Obj) {
497-
Obj = ActivateBranch(BrName);
498-
}
487+
TObject* Obj = ActivateBranch(BrName);
499488
if (Obj != nullptr)
500489
FairMonitor::GetMonitor()->RecordGetting(BrName);
501490
return Obj;
@@ -773,19 +762,7 @@ Int_t FairRootManager::CheckBranchSt(const char* BrName)
773762
{
774763
// cout <<"FairRootManager::CheckBranchSt : " << BrName << endl;
775764

776-
if (fListFolder == 0) {
777-
fListFolder = new TObjArray(16);
778-
}
779-
780-
TObject* Obj1 = nullptr;
781-
if (fOutFolder) {
782-
fListFolder->Add(fOutFolder);
783-
Obj1 = fOutFolder->FindObjectAny(BrName); // Branch in output folder
784-
}
785-
if (!Obj1) {
786-
Obj1 = ListFolderSearch(BrName);
787-
}
788-
765+
TObject* Obj1 = ListFolderSearch(BrName);
789766
TObject* Obj2 = GetMemoryBranch(BrName); // Branch in Memory
790767

791768
Int_t returnvalue = 0;

fairroot/base/steer/FairRootManager.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,6 @@ class FairRootManager : public TObject
337337

338338
/**private Members*/
339339

340-
/**folder structure of output*/
341-
TFolder* fOutFolder;
342340
/** current time in ns*/
343341
Double_t fCurrentTime;
344342
std::vector<TObject*> fObj2{}; //!

0 commit comments

Comments
 (0)