73 FairRootManager* rootManager = FairRootManager::Instance();
74 TChain* chain = rootManager->GetInChain();
75 fNbTs = chain->GetEntriesFast();
77 MakeTitle(
"CbmTimesliceManager Editor");
78 TGVerticalFrame* fInfoFrame = CreateEditorTabSubFrame(
"Info TS");
79 TGCompositeFrame* title1 =
80 new TGCompositeFrame(fInfoFrame, fWidth, 10, kVerticalFrame | kLHintsExpandX | kFixedWidth | kOwnBackground);
82 TString Infile =
"Input file : ";
83 TFile* file = FairRootManager::Instance()->GetInChain()->GetFile();
84 Infile += file->GetName();
85 TGLabel* TFName =
new TGLabel(title1, Infile.Data());
86 title1->AddFrame(TFName);
88 Int_t nodes = gGeoManager->GetNNodes();
89 TString NNodes =
"No. of Nodes : ";
91 TGLabel* NoNode =
new TGLabel(title1, NNodes.Data());
92 title1->AddFrame(NoNode);
94 UInt_t RunId = FairRunAna::Instance()->getRunId();
95 TString run =
"Run Id : ";
97 TGLabel* TRunId =
new TGLabel(title1, run.Data());
98 title1->AddFrame(TRunId);
100 TString ntimeslices =
"No of timeslices : ";
101 ntimeslices +=
fNbTs;
102 TGLabel* TNbTimeslices =
new TGLabel(title1, ntimeslices.Data());
103 title1->AddFrame(TNbTimeslices);
105 TGHorizontalFrame* fTsIdx =
new TGHorizontalFrame(title1);
106 TGLabel* lTsIdx =
new TGLabel(fTsIdx,
"Current TS:");
107 fTsIdx->AddFrame(lTsIdx,
new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 2, 1, 1));
108 fCurrentTimeslice =
new TGNumberEntry(fTsIdx, 0., 6, -1, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative,
109 TGNumberFormat::kNELLimitMinMax, 0,
fNbTs);
111 fCurrentTimeslice->Connect(
"ValueSet(Long_t)",
"CbmTimesliceManagerEditor",
this,
"SelectSingleTimeslice()");
112 title1->AddFrame(fTsIdx);
114 TGHorizontalFrame* fTsTime =
new TGHorizontalFrame(title1);
115 TGLabel* TsTimeLabel =
new TGLabel(fTsTime,
"TS Time: ");
117 fTsTime->AddFrame(TsTimeLabel);
119 title1->AddFrame(fTsTime);
121 TString nevent =
"No of events in TS : ";
122 nevent += (Int_t)(-1);
123 fEventNb =
new TGLabel(title1, nevent.Data());
126 fSelTs =
new TGTextButton(title1,
"Select TS");
127 fSelTs->Connect(
"Clicked()",
"CbmTimesliceManagerEditor",
this,
"SelectSingleTimeslice()");
128 title1->AddFrame(
fSelTs,
new TGLayoutHints(kLHintsRight | kLHintsExpandX, 5, 5, 1, 1));
130 fPrevTs =
new TGTextButton(title1,
"Prev TS");
131 fPrevTs->Connect(
"Clicked()",
"CbmTimesliceManagerEditor",
this,
"PrevTimeslice()");
132 title1->AddFrame(
fPrevTs,
new TGLayoutHints(kLHintsRight | kLHintsExpandX, 5, 5, 1, 1));
134 fNextTs =
new TGTextButton(title1,
"Next TS");
135 fNextTs->Connect(
"Clicked()",
"CbmTimesliceManagerEditor",
this,
"NextTimeslice()");
136 title1->AddFrame(
fNextTs,
new TGLayoutHints(kLHintsRight | kLHintsExpandX, 5, 5, 1, 1));
139 TGHorizontalFrame* fEvtIdx =
new TGHorizontalFrame(title1);
140 TGLabel* lEvtIdx =
new TGLabel(fEvtIdx,
"Current Event:");
141 fEvtIdx->AddFrame(lEvtIdx,
new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 1, 2, 1, 1));
142 fCurrentEvent =
new TGNumberEntry(fEvtIdx, 0., 6, -1, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative,
143 TGNumberFormat::kNELLimitMinMax, 0, -1);
144 fEvtIdx->AddFrame(
fCurrentEvent,
new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
145 fCurrentTimeslice->Connect(
"ValueSet(Long_t)",
"CbmTimesliceManagerEditor",
this,
"SelectSingleTimeslice()");
146 title1->AddFrame(fEvtIdx);
149 TGHorizontalFrame* fEvtTime =
new TGHorizontalFrame(title1);
150 TGLabel* EventTimeLabel =
new TGLabel(fEvtTime,
"Event Time: ");
152 fEvtTime->AddFrame(EventTimeLabel);
154 title1->AddFrame(fEvtTime);
156 fUpdateEvent =
new TGTextButton(title1,
"Update Event");
157 fUpdateEvent->Connect(
"Clicked()",
"CbmTimesliceManagerEditor",
this,
"SelectSingleEvent()");
158 title1->AddFrame(
fUpdateEvent,
new TGLayoutHints(kLHintsRight | kLHintsExpandX, 5, 5, 1, 1));
160 fPrevEvent =
new TGTextButton(title1,
"Prev Event");
161 fPrevEvent->Connect(
"Clicked()",
"CbmTimesliceManagerEditor",
this,
"PrevEvent()");
162 title1->AddFrame(
fPrevEvent,
new TGLayoutHints(kLHintsRight | kLHintsExpandX, 5, 5, 1, 1));
164 fNextEvent =
new TGTextButton(title1,
"Next Event");
165 fNextEvent->Connect(
"Clicked()",
"CbmTimesliceManagerEditor",
this,
"NextEvent()");
166 title1->AddFrame(
fNextEvent,
new TGLayoutHints(kLHintsRight | kLHintsExpandX, 5, 5, 1, 1));
178 fInfoFrame->AddFrame(title1,
new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
181 TGVerticalFrame* scene_conf = CreateEditorTabSubFrame(
"Graphics");
184 std::unique_ptr<CbmTsEveTransparencyControl> transparency(
186 scene_conf->AddFrame(transparency.release(),
new TGLayoutHints(kLHintsNormal, 5, 5, 1, 1));
188 TGCheckButton* backgroundButton =
new TGCheckButton(scene_conf,
"Light background");
189 scene_conf->AddFrame(backgroundButton,
new TGLayoutHints(kLHintsRight | kLHintsExpandX, 5, 5, 1, 1));
190 backgroundButton->Connect(
"Toggled(Bool_t)", this->ClassName(),
this,
"SwitchBackground(Bool_t)");
192 TGCheckButton* pdgColorTrackButton =
new TGCheckButton(scene_conf,
"Track w/ PDG color");
193 scene_conf->AddFrame(pdgColorTrackButton,
new TGLayoutHints(kLHintsRight | kLHintsExpandX, 5, 5, 1, 1));
194 pdgColorTrackButton->Connect(
"Toggled(Bool_t)", this->ClassName(),
this,
"SwitchPdgColorTrack(Bool_t)");
196 TGGroupFrame* frame_screenshot =
new TGGroupFrame(scene_conf,
"Screenshot");
197 frame_screenshot->SetTitlePos(TGGroupFrame::kCenter);
199 frame_screenshot->SetLayoutManager(
new TGHorizontalLayout(frame_screenshot));
201 TGTextButton* Screen =
new TGTextButton(frame_screenshot,
"Make");
202 frame_screenshot->AddFrame(Screen,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 20, 2, 2, 2));
203 Screen->Connect(
"Clicked()", this->ClassName(),
this,
"MakeScreenshot()");
218 frame_screenshot->AddFrame(
fScreenshotOpt,
new TGLayoutHints(kLHintsRight | kLHintsExpandX));
219 scene_conf->AddFrame(frame_screenshot,
new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 2, 1));
230 fCbmEvents =
dynamic_cast<TClonesArray*
>(rootManager->GetObject(
"CbmEvent"));
233 LOG(fatal) <<
"CbmTimesliceManager::Init() => CbmEvents branch not found! Task will be deactivated";