Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
run_alice_esd_split.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_eve
3/// Complex example showing ALICE ESD visualization in several views.
4/// alice_esd_split.C - a simple event-display for ALICE ESD tracks and clusters
5/// version with several windows in the same workspace
6///
7///
8/// Only standard ROOT is used to process the ALICE ESD files.
9///
10/// No ALICE code is needed, only four simple coordinate-transformation
11/// functions declared in this macro.
12///
13/// A simple geometry of 10KB, extracted from the full TGeo-geometry, is
14/// used to outline the central detectors of ALICE.
15///
16/// All files are access from the web by using the "CACHEREAD" option.
17///
18///
19/// ### Automatic building of ALICE ESD class declarations and dictionaries.
20///
21/// ALICE ESD is a TTree containing tracks and other event-related
22/// information with one entry per event. All these classes are part of
23/// the AliROOT offline framework and are not available to standard
24/// ROOT.
25///
26/// To be able to access the event data in a natural way, by using
27/// data-members of classes and object containers, the header files and
28/// class dictionaries are automatically generated from the
29/// TStreamerInfo classes stored in the ESD file by using the
30/// TFile::MakeProject() function. The header files and a shared library
31/// is created in the aliesd/ directory and can be loaded dynamically
32/// into the ROOT session.
33///
34/// See the run_alice_esd.C macro.
35///
36///
37/// ### Creation of simple GUI for event navigation.
38///
39/// Most common use of the event-display is to browse through a
40/// collection of events. Thus a simple GUI allowing this is created in
41/// the function make_gui().
42///
43/// Eve uses the configurable ROOT-browser as its main window and so we
44/// create an extra tab in the left working area of the browser and
45/// provide backward/forward buttons.
46///
47///
48/// ### Event-navigation functions.
49///
50/// As this is a simple macro, we store the information about the
51/// current event in the global variable 'Int_t esd_event_id'. The
52/// functions for event-navigation simply modify this variable and call
53/// the load_event() function which does the following:
54/// 1. drop the old visualization objects;
55/// 2. retrieve given event from the ESD tree;
56/// 3. call alice_esd_read() function to create visualization objects
57/// for the new event.
58///
59///
60/// ### Reading of ALICE data and creation of visualization objects.
61///
62/// This is performed in alice_esd_read() function, with the following
63/// steps:
64/// 1. create the track container object - TEveTrackList;
65/// 2. iterate over the ESD tracks, create TEveTrack objects and append
66/// them to the container;
67/// 3. instruct the container to extrapolate the tracks and set their
68/// visual attributes.
69///
70/// \image html eve_alice_esd_split.png
71/// \macro_code
72///
73/// \author Bertrand Bellenot
74
76#include "aliesd/AliESDEvent.h"
77#include "aliesd/AliESDRun.h"
78#include "aliesd/AliESDtrack.h"
79
82TEveGeoShape *gGeoShape;
83
84class AliESDEvent;
85class AliESDfriend;
86class AliESDtrack;
87class AliExternalTrackParam;
88
89void make_gui();
90void load_event();
91void update_projections();
92
93void alice_esd_read();
94TEveTrack* esd_make_track(TEveTrackPropagator* trkProp, Int_t index, AliESDtrack* at,
95 AliExternalTrackParam* tp=0);
96Bool_t trackIsOn(AliESDtrack* t, Int_t mask);
97void trackGetPos(AliExternalTrackParam* tp, Double_t r[3]);
98void trackGetMomentum(AliExternalTrackParam* tp, Double_t p[3]);
99Double_t trackGetP(AliExternalTrackParam* tp);
100
101
102// Configuration and global variables.
103
104const char* esd_file_name = "http://root.cern.ch/files/alice_ESDs.root";
105const char* esd_friends_file_name = "http://root.cern.ch/files/alice_ESDfriends.root";
106const char* esd_geom_file_name = "http://root.cern.ch/files/alice_ESDgeometry.root";
107
108TFile *esd_file = nullptr;
109TFile *esd_friends_file = nullptr;
110
111TTree *esd_tree = nullptr;
112
113AliESDEvent *esd = nullptr;
114AliESDfriend *esd_friend = nullptr;
115
116Int_t esd_event_id = 0; // Current event id.
117
118TEveTrackList *track_list = nullptr;
119
120TGTextEntry *gTextEntry = nullptr;
121TGHProgressBar *gProgress = nullptr;
122
123/******************************************************************************/
124// Initialization and steering functions
125/******************************************************************************/
126
127//______________________________________________________________________________
128void run_alice_esd_split(Bool_t auto_size=kFALSE)
129{
130 // Main function, initializes the application.
131 //
132 // 1. Load the auto-generated library holding ESD classes and ESD dictionaries.
133 // 2. Open ESD data-files.
134 // 3. Load cartoon geometry.
135 // 4. Spawn simple GUI.
136 // 5. Load first event.
137
139
140 printf("*** Opening ESD ***\n");
141 esd_file = TFile::Open(esd_file_name, "CACHEREAD");
142 if (!esd_file)
143 return;
144
145 printf("*** Opening ESD-friends ***\n");
146 esd_friends_file = TFile::Open(esd_friends_file_name, "CACHEREAD");
147 if (!esd_friends_file)
148 return;
149
150 esd_tree = (TTree*) esd_file->Get("esdTree");
151
152 esd = (AliESDEvent*) esd_tree->GetUserInfo()->FindObject("AliESDEvent");
153
154 // Set the branch addresses.
155 {
156 TIter next(esd->fESDObjects);
157 TObject *el;
158 while ((el=(TNamed*)next()))
159 {
160 TString bname(el->GetName());
161 if(bname.CompareTo("AliESDfriend")==0)
162 {
163 // AliESDfriend needs some '.' magick.
164 esd_tree->SetBranchAddress("ESDfriend.", esd->fESDObjects->GetObjectRef(el));
165 }
166 else
167 {
168 esd_tree->SetBranchAddress(bname, esd->fESDObjects->GetObjectRef(el));
169 }
170 }
171 }
172
174
175 // Adapt the main frame to the screen size...
176 if (auto_size)
177 {
178 Int_t qq;
179 UInt_t ww, hh;
180 gVirtualX->GetWindowSize(gVirtualX->GetDefaultRootWindow(), qq, qq, ww, hh);
181 Float_t screen_ratio = (Float_t)ww/(Float_t)hh;
182 if (screen_ratio > 1.5) {
183 gEve->GetBrowser()->MoveResize(100, 50, ww - 300, hh - 100);
184 } else {
185 gEve->GetBrowser()->Move(50, 50);
186 }
187 }
188
189 { // Simple geometry
190 TFile* geom = TFile::Open(esd_geom_file_name, "CACHEREAD");
191 if (!geom)
192 return;
193 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) geom->Get("Gentle");
194 gGeoShape = TEveGeoShape::ImportShapeExtract(gse, 0);
195 geom->Close();
196 delete geom;
197 gEve->AddGlobalElement(gGeoShape);
198 }
199
200 make_gui();
201
202 // import the geometry in the projection managers
203 if (gRPhiMgr) {
204 TEveProjectionAxes* a = new TEveProjectionAxes(gRPhiMgr);
205 a->SetNdivisions(3);
206 gEve->GetScenes()->FindChild("R-Phi Projection")->AddElement(a);
207 gRPhiMgr->ImportElements(gGeoShape);
208 }
209 if (gRhoZMgr) {
210 TEveProjectionAxes* a = new TEveProjectionAxes(gRhoZMgr);
211 a->SetNdivisions(3);
212 gEve->GetScenes()->FindChild("Rho-Z Projection")->AddElement(a);
213 gRhoZMgr->ImportElements(gGeoShape);
214 }
215
216 load_event();
217
218 update_projections();
219
220 gEve->Redraw3D(kTRUE); // Reset camera after the first event has been shown.
221}
222
223//______________________________________________________________________________
224void load_event()
225{
226 // Load event specified in global esd_event_id.
227 // The contents of previous event are removed.
228
229 printf("Loading event %d.\n", esd_event_id);
230 gTextEntry->SetTextColor(0xff0000);
231 gTextEntry->SetText(Form("Loading event %d...",esd_event_id));
233
234 if (track_list)
235 track_list->DestroyElements();
236
237 esd_tree->GetEntry(esd_event_id);
238
239 alice_esd_read();
240
242 gTextEntry->SetTextColor((Pixel_t)0x000000);
243 gTextEntry->SetText(Form("Event %d loaded",esd_event_id));
244 gROOT->ProcessLine("SplitGLView::UpdateSummary()");
245}
246
247//______________________________________________________________________________
248void update_projections()
249{
250 // cleanup then import geometry and event
251 // in the projection managers
252
254 if (gRPhiMgr && top) {
255 gRPhiMgr->DestroyElements();
256 gRPhiMgr->ImportElements(gGeoShape);
257 gRPhiMgr->ImportElements(top);
258 }
259 if (gRhoZMgr && top) {
260 gRhoZMgr->DestroyElements();
261 gRhoZMgr->ImportElements(gGeoShape);
262 gRhoZMgr->ImportElements(top);
263 }
264}
265
266/******************************************************************************/
267// GUI
268/******************************************************************************/
269
270//______________________________________________________________________________
271//
272// EvNavHandler class is needed to connect GUI signals.
273
274class EvNavHandler
275{
276public:
277 void Fwd()
278 {
279 if (esd_event_id < esd_tree->GetEntries() - 1) {
280 ++esd_event_id;
281 load_event();
282 update_projections();
283 } else {
284 gTextEntry->SetTextColor(0xff0000);
285 gTextEntry->SetText("Already at last event");
286 printf("Already at last event.\n");
287 }
288 }
289 void Bck()
290 {
291 if (esd_event_id > 0) {
292 --esd_event_id;
293 load_event();
294 update_projections();
295 } else {
296 gTextEntry->SetTextColor(0xff0000);
297 gTextEntry->SetText("Already at first event");
298 printf("Already at first event.\n");
299 }
300 }
301};
302
303//______________________________________________________________________________
304void make_gui()
305{
306 // Create minimal GUI for event navigation.
307
308 gROOT->ProcessLine(".L SplitGLView.C+");
309
310 TEveBrowser* browser = gEve->GetBrowser();
311
312 browser->ShowCloseTab(kFALSE);
313 browser->ExecPlugin("SplitGLView", 0, "new SplitGLView(gClient->GetRoot(), 600, 450, kTRUE)");
314 browser->ShowCloseTab(kTRUE);
315
317
318 TGMainFrame* frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);
319 frmMain->SetWindowName("XX GUI");
320 frmMain->SetCleanup(kDeepCleanup);
321
322 TGHorizontalFrame* hf = new TGHorizontalFrame(frmMain);
323 {
324
325 TString icondir( Form("%s/icons/", gSystem->Getenv("ROOTSYS")) );
326 TGPictureButton* b = 0;
327 EvNavHandler *fh = new EvNavHandler;
328
329 b = new TGPictureButton(hf, gClient->GetPicture(icondir + "GoBack.gif"));
330 hf->AddFrame(b, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 10, 2, 10, 10));
331 b->Connect("Clicked()", "EvNavHandler", fh, "Bck()");
332
333 b = new TGPictureButton(hf, gClient->GetPicture(icondir + "GoForward.gif"));
334 hf->AddFrame(b, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 10, 10, 10));
335 b->Connect("Clicked()", "EvNavHandler", fh, "Fwd()");
336
337 gTextEntry = new TGTextEntry(hf);
338 gTextEntry->SetEnabled(kFALSE);
339 hf->AddFrame(gTextEntry, new TGLayoutHints(kLHintsLeft | kLHintsCenterY |
340 kLHintsExpandX, 2, 10, 10, 10));
341 }
342 frmMain->AddFrame(hf, new TGLayoutHints(kLHintsTop | kLHintsExpandX,0,0,20,0));
343
344 gProgress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100);
345 gProgress->ShowPosition(kTRUE, kFALSE, "%.0f tracks");
346 gProgress->SetBarColor("green");
347 frmMain->AddFrame(gProgress, new TGLayoutHints(kLHintsExpandX, 10, 10, 5, 5));
348
349 frmMain->MapSubwindows();
350 frmMain->Resize();
351 frmMain->MapWindow();
352
353 browser->StopEmbedding();
354 browser->SetTabTitle("Event Control", 0);
355}
356
357
358/******************************************************************************/
359// Code for reading AliESD and creating visualization objects
360/******************************************************************************/
361
362enum ESDTrackFlags {
363 kITSin=0x0001,kITSout=0x0002,kITSrefit=0x0004,kITSpid=0x0008,
364 kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080,
365 kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800,
366 kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFpid=0x8000,
367 kHMPIDpid=0x20000,
368 kEMCALmatch=0x40000,
369 kTRDbackup=0x80000,
370 kTRDStop=0x20000000,
371 kESDpid=0x40000000,
372 kTIME=0x80000000
373};
374
375//______________________________________________________________________________
376void alice_esd_read()
377{
378 // Read tracks and associated clusters from current event.
379
380 AliESDRun *esdrun = (AliESDRun*) esd->fESDObjects->FindObject("AliESDRun");
381 TClonesArray *tracks = (TClonesArray*) esd->fESDObjects->FindObject("Tracks");
382
383 // This needs further investigation. Clusters not shown.
384 // AliESDfriend *frnd = (AliESDfriend*) esd->fESDObjects->FindObject("AliESDfriend");
385 // printf("Friend %p, n_tracks:%d\n", frnd, frnd->fTracks.GetEntries());
386
387 if (track_list == 0) {
388 track_list = new TEveTrackList("ESD Tracks");
389 track_list->SetMainColor(6);
390 //track_list->SetLineWidth(2);
391 track_list->SetMarkerColor(kYellow);
392 track_list->SetMarkerStyle(4);
393 track_list->SetMarkerSize(0.5);
394
395 gEve->AddElement(track_list);
396 }
397
398 TEveTrackPropagator* trkProp = track_list->GetPropagator();
399 trkProp->SetMagField( 0.1 * esdrun->fMagneticField ); // kGaus to Tesla
400
401 gProgress->Reset();
402 gProgress->SetMax(tracks->GetEntriesFast());
403 for (Int_t n=0; n<tracks->GetEntriesFast(); ++n)
404 {
405 AliESDtrack* at = (AliESDtrack*) tracks->At(n);
406
407 // If ITS refit failed, take track parameters at inner TPC radius.
408 AliExternalTrackParam* tp = at;
409 if (! trackIsOn(at, kITSrefit)) {
410 tp = at->fIp;
411 }
412
413 TEveTrack* track = esd_make_track(trkProp, n, at, tp);
414 track->SetAttLineAttMarker(track_list);
415 track_list->AddElement(track);
416
417 // This needs further investigation. Clusters not shown.
418 // if (frnd)
419 // {
420 // AliESDfriendTrack* ft = (AliESDfriendTrack*) frnd->fTracks->At(n);
421 // printf("%d friend = %p\n", ft);
422 // }
423 gProgress->Increment(1);
424 }
425
426 track_list->MakeTracks();
427}
428
429//______________________________________________________________________________
430TEveTrack* esd_make_track(TEveTrackPropagator* trkProp,
431 Int_t index,
432 AliESDtrack* at,
433 AliExternalTrackParam* tp)
434{
435 // Helper function creating TEveTrack from AliESDtrack.
436 //
437 // Optionally specific track-parameters (e.g. at TPC entry point)
438 // can be specified via the tp argument.
439
440 Double_t pbuf[3], vbuf[3];
441 TEveRecTrack rt;
442
443 if (tp == 0) tp = at;
444
445 rt.fLabel = at->fLabel;
446 rt.fIndex = index;
447 rt.fStatus = (Int_t) at->fFlags;
448 rt.fSign = (tp->fP[4] > 0) ? 1 : -1;
449
450 trackGetPos(tp, vbuf); rt.fV.Set(vbuf);
451 trackGetMomentum(tp, pbuf); rt.fP.Set(pbuf);
452
453 Double_t ep = trackGetP(at);
454 Double_t mc = 0.138; // at->GetMass(); - Complicated function, requiring PID.
455
456 rt.fBeta = ep/TMath::Sqrt(ep*ep + mc*mc);
457
458 TEveTrack* track = new TEveTrack(&rt, trkProp);
459 track->SetName(Form("TEveTrack %d", rt.fIndex));
460 track->SetStdTitle();
461
462 return track;
463}
464
465//______________________________________________________________________________
466Bool_t trackIsOn(AliESDtrack* t, Int_t mask)
467{
468 // Check is track-flag specified by mask are set.
469
470 return (t->fFlags & mask) > 0;
471}
472
473//______________________________________________________________________________
474void trackGetPos(AliExternalTrackParam* tp, Double_t r[3])
475{
476 // Get global position of starting point of tp.
477
478 r[0] = tp->fX; r[1] = tp->fP[0]; r[2] = tp->fP[1];
479
480 Double_t cs=TMath::Cos(tp->fAlpha), sn=TMath::Sin(tp->fAlpha), x=r[0];
481 r[0] = x*cs - r[1]*sn; r[1] = x*sn + r[1]*cs;
482}
483
484//______________________________________________________________________________
485void trackGetMomentum(AliExternalTrackParam* tp, Double_t p[3])
486{
487 // Return global momentum vector of starting point of tp.
488
489 p[0] = tp->fP[4]; p[1] = tp->fP[2]; p[2] = tp->fP[3];
490
491 Double_t pt=1./TMath::Abs(p[0]);
492 Double_t cs=TMath::Cos(tp->fAlpha), sn=TMath::Sin(tp->fAlpha);
493 Double_t r=TMath::Sqrt(1 - p[1]*p[1]);
494 p[0]=pt*(r*cs - p[1]*sn); p[1]=pt*(p[1]*cs + r*sn); p[2]=pt*p[2];
495}
496
497//______________________________________________________________________________
498Double_t trackGetP(AliExternalTrackParam* tp)
499{
500 // Return magnitude of momentum of tp.
501
502 return TMath::Sqrt(1.+ tp->fP[3]*tp->fP[3])/TMath::Abs(tp->fP[4]);
503}
#define R__EXTERN
Definition DllImport.h:27
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
ROOT::R::TRInterface & r
Definition Object.C:4
#define b(i)
Definition RSha256.hxx:100
#define a(i)
Definition RSha256.hxx:99
int Int_t
Definition RtypesCore.h:45
unsigned int UInt_t
Definition RtypesCore.h:46
const Bool_t kFALSE
Definition RtypesCore.h:92
bool Bool_t
Definition RtypesCore.h:63
double Double_t
Definition RtypesCore.h:59
float Float_t
Definition RtypesCore.h:57
const Bool_t kTRUE
Definition RtypesCore.h:91
@ kYellow
Definition Rtypes.h:66
R__EXTERN TEveManager * gEve
#define gClient
Definition TGClient.h:166
@ kDeepCleanup
Definition TGFrame.h:50
@ kLHintsLeft
Definition TGLayout.h:31
@ kLHintsCenterY
Definition TGLayout.h:35
@ kLHintsTop
Definition TGLayout.h:34
@ kLHintsExpandX
Definition TGLayout.h:37
#define gROOT
Definition TROOT.h:406
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
Definition TSystem.h:559
#define gVirtualX
Definition TVirtualX.h:338
An array of clone (identical) objects.
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
Specialization of TRootBrowser for Eve.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition TEveElement.h:36
virtual void AddElement(TEveElement *el)
Add el to the list of children.
virtual void DestroyElements()
Destroy all children of this element.
TEveElement * FindChild(const TString &name, const TClass *cls=0)
Find the first child with given name.
Globally positioned TGeoShape with rendering attributes and an optional list of daughter shape-extrac...
Wrapper for TGeoShape with absolute positioning and color attributes allowing display of extracted TG...
static TEveGeoShape * ImportShapeExtract(TEveGeoShapeExtract *gse, TEveElement *parent=0)
Import a shape extract 'gse' under element 'parent'.
void AddElement(TEveElement *element, TEveElement *parent=0)
Add an element.
TEveSceneList * GetScenes() const
void AddGlobalElement(TEveElement *element, TEveElement *parent=0)
Add a global element, i.e.
TEveBrowser * GetBrowser() const
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
TEveEventManager * GetCurrentEvent() const
Axes for non-linear projections.
Manager class for steering of projections and managing projected objects.
TEveVectorT< TT > fP
TEveVectorT< TT > fV
A list of tracks supporting change of common attributes and selection based on track parameters.
Definition TEveTrack.h:140
virtual void SetMarkerStyle(Style_t s)
Set marker style for the list and the elements.
virtual void SetMarkerColor(Color_t c)
Set marker color for the list and the elements.
void MakeTracks(Bool_t recurse=kTRUE)
Regenerate the visual representations of tracks.
virtual void SetMainColor(Color_t c)
Set main (line) color for the list and the elements.
TEveTrackPropagator * GetPropagator()
Definition TEveTrack.h:175
virtual void SetMarkerSize(Size_t s)
Set marker size for the list and the elements.
Holding structure for a number of track rendering parameters.
void SetMagField(Double_t bX, Double_t bY, Double_t bZ)
Set constant magnetic field and rebuild tracks.
Visual representation of a track.
Definition TEveTrack.h:33
void SetAttLineAttMarker(TEveTrackList *tl)
Set line and marker attributes from TEveTrackList.
virtual void SetStdTitle()
Set standard track title based on most data-member values.
void Set(const Float_t *v)
Definition TEveVector.h:82
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition TFile.h:54
static Bool_t SetCacheFileDir(ROOT::Internal::TStringView cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Definition TFile.h:324
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Definition TFile.cxx:3997
void Close(Option_t *option="") override
Close a file.
Definition TFile.cxx:879
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1102
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition TGFrame.cxx:1057
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition TGFrame.cxx:1149
virtual void Move(Int_t x, Int_t y)
Move frame.
Definition TGFrame.cxx:578
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition TGFrame.cxx:590
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
Definition TGFrame.cxx:614
virtual void MapWindow()
map window
Definition TGFrame.h:228
void ShowPosition(Bool_t set=kTRUE, Bool_t percent=kTRUE, const char *format="%.2f")
Show postion text, either in percent or formatted according format.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition TGFrame.cxx:1749
void Increment(Float_t inc)
Increment progress position.
virtual void SetBarColor(Pixel_t color)
Set progress bar color.
void SetMax(Float_t max)
virtual void Reset()
Reset progress bar (i.e. set pos to 0).
void SetEnabled(Bool_t flag=kTRUE)
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Definition TList.cxx:578
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Mother of all ROOT objects.
Definition TObject.h:37
virtual const char * GetName() const
Returns name of object.
Definition TObject.cxx:359
virtual void SetName(const char *name)
Change (i.e.
void StartEmbedding(Int_t pos=kRight, Int_t subpos=-1) override
Start embedding external frame in the tab "pos" and tab element "subpos".
void SetTabTitle(const char *title, Int_t pos=kRight, Int_t subpos=-1)
Set text "title" of Tab "subpos" in TGTab "pos".
void StopEmbedding(const char *name=nullptr) override
virtual void ShowCloseTab(Bool_t show)
Long_t ExecPlugin(const char *name=nullptr, const char *fname=nullptr, const char *cmd=nullptr, Int_t pos=kRight, Int_t subpos=-1) override
Execute a macro and embed the created frame in the tab "pos" and tab element "subpos".
Basic string class.
Definition TString.h:136
virtual const char * Getenv(const char *env)
Get environment variable.
Definition TSystem.cxx:1661
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition TSystem.cxx:417
A TTree represents a columnar dataset.
Definition TTree.h:79
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
Definition TTree.cxx:8349
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
Definition TTree.cxx:5618
virtual TList * GetUserInfo()
Return a pointer to the list containing user objects associated to this tree.
Definition TTree.cxx:6337
TPaveText * pt
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Double_t Sqrt(Double_t x)
Definition TMath.h:691
Double_t Cos(Double_t)
Definition TMath.h:643
Double_t Sin(Double_t)
Definition TMath.h:639
Short_t Abs(Short_t d)
Definition TMathBase.h:120
void tracks()
Definition tracks.C:49