Skip to content

Commit 5fe0508

Browse files
committed
fix some issue affecting using python on Ubuntu 14.04
1 parent 72950c8 commit 5fe0508

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

eventdisplay/FairEventManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class FairEventManager : public TEveEventManager
3636
virtual void DisplaySettings(); // *Menu*
3737
virtual Int_t Color(Int_t pdg);
3838
void AddTask(FairTask* t) {fRunAna->AddTask(t);}
39+
FairRootManager* GetFairRootManager(){ return fRootManager ;};
3940
virtual void Init( Int_t visopt = 1, Int_t vislvl = 3, Int_t maxvisnds = 10000);
4041
virtual Int_t GetCurrentEvent() {return fEntry;}
4142
virtual void SetPriOnly(Bool_t Pri) {fPriOnly=Pri;}

eventdisplay/FairEventManagerEditor.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ FairEventManagerEditor::FairEventManagerEditor(const TGWindow* p, Int_t width, I
5555

5656
void FairEventManagerEditor::Init()
5757
{
58-
59-
FairRootManager* fRootManager=FairRootManager::Instance();
58+
FairRootManager* fRootManager=fManager->GetFairRootManager();
59+
if (fRootManager==0){return;};
60+
if (fRootManager==0){fRootManager=new FairRootManager();};
6061
TChain* chain =fRootManager->GetInChain();
6162
Int_t Entries= chain->GetEntriesFast();
6263

@@ -65,10 +66,10 @@ void FairEventManagerEditor::Init()
6566
TGCompositeFrame* title1 = new TGCompositeFrame(fInfoFrame, 250, 10,
6667
kVerticalFrame | kLHintsExpandX |
6768
kFixedWidth | kOwnBackground);
68-
69+
6970
TString Infile= "Input file : ";
7071
// TFile* file =FairRunAna::Instance()->GetInputFile();
71-
TFile* file =FairRootManager::Instance()->GetInChain()->GetFile();
72+
TFile* file =fRootManager->GetInChain()->GetFile();
7273
Infile+=file->GetName();
7374
TGLabel* TFName=new TGLabel(title1, Infile.Data());
7475
title1->AddFrame(TFName);
@@ -186,7 +187,7 @@ void FairEventManagerEditor::SelectEvent()
186187

187188
TString time;
188189
// time+=(FairRootManager::Instance()->GetEventTime());
189-
time.Form("%.2f", FairRootManager::Instance()->GetEventTime());
190+
time.Form("%.2f", fManager->GetFairRootManager()->GetEventTime());
190191
time += " ns";
191192
fEventTime->SetText(time.Data());
192193

0 commit comments

Comments
 (0)