Logo ROOT  
Reference Guide
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
75#ifndef __RUN_ALICE_ESD_SPLIT__
76
77void alice_esd_split()
78{
79 TString dir = gSystem->UnixPathName(__FILE__);
80 dir.ReplaceAll("alice_esd_split.C","");
81 dir.ReplaceAll("/./","/");
82 gROOT->LoadMacro(dir +"SplitGLView.C+");
83 const char* esd_file_name = "http://root.cern.ch/files/alice_ESDs.root";
85 TString lib(Form("aliesd/aliesd.%s", gSystem->GetSoExt()));
86
88 TFile* f = TFile::Open(esd_file_name, "CACHEREAD");
89 if (f == 0) return;
90 TTree *tree = (TTree*) f->Get("esdTree");
91 tree->SetBranchStatus ("ESDfriend*", 1);
92 f->MakeProject("aliesd", "*", "++");
93 f->Close();
94 delete f;
95 }
96 gSystem->Load(lib);
97 gROOT->ProcessLine("#define __RUN_ALICE_ESD_SPLIT__ 1");
98 gROOT->ProcessLine("#include \"alice_esd_split.C\"");
99 gROOT->ProcessLine("run_alice_esd_split()");
100 gROOT->ProcessLine("#undef __RUN_ALICE_ESD_SPLIT__");
101}
102
103#else
104
107TEveGeoShape *gGeoShape;
108
109// Forward declarations.
110
111class AliESDEvent;
112class AliESDfriend;
113class AliESDtrack;
114class AliExternalTrackParam;
115
116void make_gui();
117void load_event();
118void update_projections();
119
120void alice_esd_read();
121TEveTrack* esd_make_track(TEveTrackPropagator* trkProp, Int_t index, AliESDtrack* at,
122 AliExternalTrackParam* tp=0);
123Bool_t trackIsOn(AliESDtrack* t, Int_t mask);
124void trackGetPos(AliExternalTrackParam* tp, Double_t r[3]);
125void trackGetMomentum(AliExternalTrackParam* tp, Double_t p[3]);
126Double_t trackGetP(AliExternalTrackParam* tp);
127
128
129// Configuration and global variables.
130
131const char* esd_file_name = "http://root.cern.ch/files/alice_ESDs.root";
132const char* esd_friends_file_name = "http://root.cern.ch/files/alice_ESDfriends.root";
133const char* esd_geom_file_name = "http://root.cern.ch/files/alice_ESDgeometry.root";
134
135TFile *esd_file = 0;
136TFile *esd_friends_file = 0;
137
138TTree *esd_tree = 0;
139
140AliESDEvent *esd = 0;
141AliESDfriend *esd_friend = 0;
142
143Int_t esd_event_id = 0; // Current event id.
144
145TEveTrackList *track_list = 0;
146
147TGTextEntry *gTextEntry;
148TGHProgressBar *gProgress;
149
150/******************************************************************************/
151// Initialization and steering functions
152/******************************************************************************/
153
154//______________________________________________________________________________
155void run_alice_esd_split(Bool_t auto_size=kFALSE)
156{
157 // Main function, initializes the application.
158 //
159 // 1. Load the auto-generated library holding ESD classes and ESD dictionaries.
160 // 2. Open ESD data-files.
161 // 3. Load cartoon geometry.
162 // 4. Spawn simple GUI.
163 // 5. Load first event.
164
166
167 printf("*** Opening ESD ***\n");
168 esd_file = TFile::Open(esd_file_name, "CACHEREAD");
169 if (!esd_file)
170 return;
171
172 printf("*** Opening ESD-friends ***\n");
173 esd_friends_file = TFile::Open(esd_friends_file_name, "CACHEREAD");
174 if (!esd_friends_file)
175 return;
176
177 esd_tree = (TTree*) esd_file->Get("esdTree");
178
179 esd = (AliESDEvent*) esd_tree->GetUserInfo()->FindObject("AliESDEvent");
180
181 // Set the branch addresses.
182 {
183 TIter next(esd->fESDObjects);
184 TObject *el;
185 while ((el=(TNamed*)next()))
186 {
187 TString bname(el->GetName());
188 if(bname.CompareTo("AliESDfriend")==0)
189 {
190 // AliESDfriend needs some '.' magick.
191 esd_tree->SetBranchAddress("ESDfriend.", esd->fESDObjects->GetObjectRef(el));
192 }
193 else
194 {
195 esd_tree->SetBranchAddress(bname, esd->fESDObjects->GetObjectRef(el));
196 }
197 }
198 }
199
201
202 // Adapt the main frame to the screen size...
203 if (auto_size)
204 {
205 Int_t qq;
206 UInt_t ww, hh;
207 gVirtualX->GetWindowSize(gVirtualX->GetDefaultRootWindow(), qq, qq, ww, hh);
208 Float_t screen_ratio = (Float_t)ww/(Float_t)hh;
209 if (screen_ratio > 1.5) {
210 gEve->GetBrowser()->MoveResize(100, 50, ww - 300, hh - 100);
211 } else {
212 gEve->GetBrowser()->Move(50, 50);
213 }
214 }
215
216 { // Simple geometry
217 TFile* geom = TFile::Open(esd_geom_file_name, "CACHEREAD");
218 if (!geom)
219 return;
220 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) geom->Get("Gentle");
221 gGeoShape = TEveGeoShape::ImportShapeExtract(gse, 0);
222 geom->Close();
223 delete geom;
224 gEve->AddGlobalElement(gGeoShape);
225 }
226
227 make_gui();
228
229 // import the geometry in the projection managers
230 if (gRPhiMgr) {
231 TEveProjectionAxes* a = new TEveProjectionAxes(gRPhiMgr);
232 a->SetNdivisions(3);
233 gEve->GetScenes()->FindChild("R-Phi Projection")->AddElement(a);
234 gRPhiMgr->ImportElements(gGeoShape);
235 }
236 if (gRhoZMgr) {
237 TEveProjectionAxes* a = new TEveProjectionAxes(gRhoZMgr);
238 a->SetNdivisions(3);
239 gEve->GetScenes()->FindChild("Rho-Z Projection")->AddElement(a);
240 gRhoZMgr->ImportElements(gGeoShape);
241 }
242
243 load_event();
244
245 update_projections();
246
247 gEve->Redraw3D(kTRUE); // Reset camera after the first event has been shown.
248}
249
250//______________________________________________________________________________
251void load_event()
252{
253 // Load event specified in global esd_event_id.
254 // The contents of previous event are removed.
255
256 printf("Loading event %d.\n", esd_event_id);
257 gTextEntry->SetTextColor(0xff0000);
258 gTextEntry->SetText(Form("Loading event %d...",esd_event_id));
260
261 if (track_list)
262 track_list->DestroyElements();
263
264 esd_tree->GetEntry(esd_event_id);
265
266 alice_esd_read();
267
269 gTextEntry->SetTextColor((Pixel_t)0x000000);
270 gTextEntry->SetText(Form("Event %d loaded",esd_event_id));
271 gROOT->ProcessLine("SplitGLView::UpdateSummary()");
272}
273
274//______________________________________________________________________________
275void update_projections()
276{
277 // cleanup then import geometry and event
278 // in the projection managers
279
281 if (gRPhiMgr && top) {
282 gRPhiMgr->DestroyElements();
283 gRPhiMgr->ImportElements(gGeoShape);
284 gRPhiMgr->ImportElements(top);
285 }
286 if (gRhoZMgr && top) {
287 gRhoZMgr->DestroyElements();
288 gRhoZMgr->ImportElements(gGeoShape);
289 gRhoZMgr->ImportElements(top);
290 }
291}
292
293/******************************************************************************/
294// GUI
295/******************************************************************************/
296
297//______________________________________________________________________________
298//
299// EvNavHandler class is needed to connect GUI signals.
300
301class EvNavHandler
302{
303public:
304 void Fwd()
305 {
306 if (esd_event_id < esd_tree->GetEntries() - 1) {
307 ++esd_event_id;
308 load_event();
309 update_projections();
310 } else {
311 gTextEntry->SetTextColor(0xff0000);
312 gTextEntry->SetText("Already at last event");
313 printf("Already at last event.\n");
314 }
315 }
316 void Bck()
317 {
318 if (esd_event_id > 0) {
319 --esd_event_id;
320 load_event();
321 update_projections();
322 } else {
323 gTextEntry->SetTextColor(0xff0000);
324 gTextEntry->SetText("Already at first event");
325 printf("Already at first event.\n");
326 }
327 }
328};
329
330//______________________________________________________________________________
331void make_gui()
332{
333 // Create minimal GUI for event navigation.
334
335 gROOT->ProcessLine(".L SplitGLView.C+");
336
337 TEveBrowser* browser = gEve->GetBrowser();
338
339 browser->ShowCloseTab(kFALSE);
340 browser->ExecPlugin("SplitGLView", 0, "new SplitGLView(gClient->GetRoot(), 600, 450, kTRUE)");
341 browser->ShowCloseTab(kTRUE);
342
344
345 TGMainFrame* frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);
346 frmMain->SetWindowName("XX GUI");
347 frmMain->SetCleanup(kDeepCleanup);
348
349 TGHorizontalFrame* hf = new TGHorizontalFrame(frmMain);
350 {
351
352 TString icondir( Form("%s/icons/", gSystem->Getenv("ROOTSYS")) );
353 TGPictureButton* b = 0;
354 EvNavHandler *fh = new EvNavHandler;
355
356 b = new TGPictureButton(hf, gClient->GetPicture(icondir + "GoBack.gif"));
357 hf->AddFrame(b, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 10, 2, 10, 10));
358 b->Connect("Clicked()", "EvNavHandler", fh, "Bck()");
359
360 b = new TGPictureButton(hf, gClient->GetPicture(icondir + "GoForward.gif"));
361 hf->AddFrame(b, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 10, 10, 10));
362 b->Connect("Clicked()", "EvNavHandler", fh, "Fwd()");
363
364 gTextEntry = new TGTextEntry(hf);
365 gTextEntry->SetEnabled(kFALSE);
366 hf->AddFrame(gTextEntry, new TGLayoutHints(kLHintsLeft | kLHintsCenterY |
367 kLHintsExpandX, 2, 10, 10, 10));
368 }
369 frmMain->AddFrame(hf, new TGLayoutHints(kLHintsTop | kLHintsExpandX,0,0,20,0));
370
371 gProgress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100);
372 gProgress->ShowPosition(kTRUE, kFALSE, "%.0f tracks");
373 gProgress->SetBarColor("green");
374 frmMain->AddFrame(gProgress, new TGLayoutHints(kLHintsExpandX, 10, 10, 5, 5));
375
376 frmMain->MapSubwindows();
377 frmMain->Resize();
378 frmMain->MapWindow();
379
380 browser->StopEmbedding();
381 browser->SetTabTitle("Event Control", 0);
382}
383
384
385/******************************************************************************/
386// Code for reading AliESD and creating visualization objects
387/******************************************************************************/
388
389enum ESDTrackFlags {
390 kITSin=0x0001,kITSout=0x0002,kITSrefit=0x0004,kITSpid=0x0008,
391 kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080,
392 kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800,
393 kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFpid=0x8000,
394 kHMPIDpid=0x20000,
395 kEMCALmatch=0x40000,
396 kTRDbackup=0x80000,
397 kTRDStop=0x20000000,
398 kESDpid=0x40000000,
399 kTIME=0x80000000
400};
401
402//______________________________________________________________________________
403void alice_esd_read()
404{
405 // Read tracks and associated clusters from current event.
406
407 AliESDRun *esdrun = (AliESDRun*) esd->fESDObjects->FindObject("AliESDRun");
408 TClonesArray *tracks = (TClonesArray*) esd->fESDObjects->FindObject("Tracks");
409
410 // This needs further investigation. Clusters not shown.
411 // AliESDfriend *frnd = (AliESDfriend*) esd->fESDObjects->FindObject("AliESDfriend");
412 // printf("Friend %p, n_tracks:%d\n", frnd, frnd->fTracks.GetEntries());
413
414 if (track_list == 0) {
415 track_list = new TEveTrackList("ESD Tracks");
416 track_list->SetMainColor(6);
417 //track_list->SetLineWidth(2);
418 track_list->SetMarkerColor(kYellow);
419 track_list->SetMarkerStyle(4);
420 track_list->SetMarkerSize(0.5);
421
422 gEve->AddElement(track_list);
423 }
424
425 TEveTrackPropagator* trkProp = track_list->GetPropagator();
426 trkProp->SetMagField( 0.1 * esdrun->fMagneticField ); // kGaus to Tesla
427
428 gProgress->Reset();
429 gProgress->SetMax(tracks->GetEntriesFast());
430 for (Int_t n=0; n<tracks->GetEntriesFast(); ++n)
431 {
432 AliESDtrack* at = (AliESDtrack*) tracks->At(n);
433
434 // If ITS refit failed, take track parameters at inner TPC radius.
435 AliExternalTrackParam* tp = at;
436 if (! trackIsOn(at, kITSrefit)) {
437 tp = at->fIp;
438 }
439
440 TEveTrack* track = esd_make_track(trkProp, n, at, tp);
441 track->SetAttLineAttMarker(track_list);
442 track_list->AddElement(track);
443
444 // This needs further investigation. Clusters not shown.
445 // if (frnd)
446 // {
447 // AliESDfriendTrack* ft = (AliESDfriendTrack*) frnd->fTracks->At(n);
448 // printf("%d friend = %p\n", ft);
449 // }
450 gProgress->Increment(1);
451 }
452
453 track_list->MakeTracks();
454}
455
456//______________________________________________________________________________
457TEveTrack* esd_make_track(TEveTrackPropagator* trkProp,
458 Int_t index,
459 AliESDtrack* at,
460 AliExternalTrackParam* tp)
461{
462 // Helper function creating TEveTrack from AliESDtrack.
463 //
464 // Optionally specific track-parameters (e.g. at TPC entry point)
465 // can be specified via the tp argument.
466
467 Double_t pbuf[3], vbuf[3];
468 TEveRecTrack rt;
469
470 if (tp == 0) tp = at;
471
472 rt.fLabel = at->fLabel;
473 rt.fIndex = index;
474 rt.fStatus = (Int_t) at->fFlags;
475 rt.fSign = (tp->fP[4] > 0) ? 1 : -1;
476
477 trackGetPos(tp, vbuf); rt.fV.Set(vbuf);
478 trackGetMomentum(tp, pbuf); rt.fP.Set(pbuf);
479
480 Double_t ep = trackGetP(at);
481 Double_t mc = 0.138; // at->GetMass(); - Complicated function, requiring PID.
482
483 rt.fBeta = ep/TMath::Sqrt(ep*ep + mc*mc);
484
485 TEveTrack* track = new TEveTrack(&rt, trkProp);
486 track->SetName(Form("TEveTrack %d", rt.fIndex));
487 track->SetStdTitle();
488
489 return track;
490}
491
492//______________________________________________________________________________
493Bool_t trackIsOn(AliESDtrack* t, Int_t mask)
494{
495 // Check is track-flag specified by mask are set.
496
497 return (t->fFlags & mask) > 0;
498}
499
500//______________________________________________________________________________
501void trackGetPos(AliExternalTrackParam* tp, Double_t r[3])
502{
503 // Get global position of starting point of tp.
504
505 r[0] = tp->fX; r[1] = tp->fP[0]; r[2] = tp->fP[1];
506
507 Double_t cs=TMath::Cos(tp->fAlpha), sn=TMath::Sin(tp->fAlpha), x=r[0];
508 r[0] = x*cs - r[1]*sn; r[1] = x*sn + r[1]*cs;
509}
510
511//______________________________________________________________________________
512void trackGetMomentum(AliExternalTrackParam* tp, Double_t p[3])
513{
514 // Return global momentum vector of starting point of tp.
515
516 p[0] = tp->fP[4]; p[1] = tp->fP[2]; p[2] = tp->fP[3];
517
518 Double_t pt=1./TMath::Abs(p[0]);
519 Double_t cs=TMath::Cos(tp->fAlpha), sn=TMath::Sin(tp->fAlpha);
520 Double_t r=TMath::Sqrt(1 - p[1]*p[1]);
521 p[0]=pt*(r*cs - p[1]*sn); p[1]=pt*(p[1]*cs + r*sn); p[2]=pt*p[2];
522}
523
524//______________________________________________________________________________
525Double_t trackGetP(AliExternalTrackParam* tp)
526{
527 // Return magnitude of momentum of tp.
528
529 return TMath::Sqrt(1.+ tp->fP[3]*tp->fP[3])/TMath::Abs(tp->fP[4]);
530}
531
532#endif
#define R__EXTERN
Definition: DllImport.h:27
ULong_t Pixel_t
Definition: GuiTypes.h:39
ROOT::R::TRInterface & r
Definition: Object.C:4
#define b(i)
Definition: RSha256.hxx:100
#define f(i)
Definition: RSha256.hxx:104
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
float Float_t
Definition: RtypesCore.h:53
const Bool_t kTRUE
Definition: RtypesCore.h:87
@ kYellow
Definition: Rtypes.h:64
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
#define gClient
Definition: TGClient.h:166
@ kDeepCleanup
Definition: TGFrame.h:51
@ 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:415
char * Form(const char *fmt,...)
@ kReadPermission
Definition: TSystem.h:48
R__EXTERN TSystem * gSystem
Definition: TSystem.h:560
#define gVirtualX
Definition: TVirtualX.h:345
An array of clone (identical) objects.
Definition: TClonesArray.h:32
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
Specialization of TRootBrowser for Eve.
Definition: TEveBrowser.h:130
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:34
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...
Definition: TEveGeoShape.h:24
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
Definition: TEveManager.h:144
void AddGlobalElement(TEveElement *element, TEveElement *parent=0)
Add a global element, i.e.
TEveBrowser * GetBrowser() const
Definition: TEveManager.h:137
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)
Definition: TEveManager.h:168
TEveEventManager * GetCurrentEvent() const
Definition: TEveManager.h:149
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.
Definition: TEveTrack.cxx:901
virtual void SetMarkerColor(Color_t c)
Set marker color for the list and the elements.
Definition: TEveTrack.cxx:933
void MakeTracks(Bool_t recurse=kTRUE)
Regenerate the visual representations of tracks.
Definition: TEveTrack.cxx:639
virtual void SetMainColor(Color_t c)
Set main (line) color for the list and the elements.
Definition: TEveTrack.cxx:805
TEveTrackPropagator * GetPropagator()
Definition: TEveTrack.h:175
virtual void SetMarkerSize(Size_t s)
Set marker size for the list and the elements.
Definition: TEveTrack.cxx:965
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.
Definition: TEveTrack.cxx:322
virtual void SetStdTitle()
Set standard track title based on most data-member values.
Definition: TEveTrack.cxx:268
void Set(const Float_t *v)
Definition: TEveVector.h:81
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:48
static Bool_t SetCacheFileDir(ROOT::Internal::TStringView cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Definition: TFile.h:319
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:3923
void Close(Option_t *option="") override
Close a file.
Definition: TFile.cxx:856
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition: TGFrame.cxx:1054
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1146
virtual void Move(Int_t x, Int_t y)
Move frame.
Definition: TGFrame.cxx:575
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
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:611
virtual void MapWindow()
Definition: TGFrame.h:251
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:1746
void Increment(Float_t inc)
Increment progress position.
virtual void SetBarColor(Pixel_t color)
Set progress bar color.
void SetMax(Float_t max)
Definition: TGProgressBar.h:94
virtual void Reset()
Reset progress bar (i.e. set pos to 0).
void SetEnabled(Bool_t flag=kTRUE)
Definition: TGTextEntry.h:164
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:575
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Mother of all ROOT objects.
Definition: TObject.h:37
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:357
virtual void SetName(const char *name)
Change (i.e.
void SetTabTitle(const char *title, Int_t pos=kRight, Int_t subpos=-1)
Set text "title" of Tab "subpos" in TGTab "pos".
virtual void ShowCloseTab(Bool_t show)
Definition: TRootBrowser.h:174
virtual void StopEmbedding(const char *name=0)
Definition: TRootBrowser.h:152
virtual void StartEmbedding(Int_t pos=kRight, Int_t subpos=-1)
Start embedding external frame in the tab "pos" and tab element "subpos".
virtual Long_t ExecPlugin(const char *name=0, const char *fname=0, const char *cmd=0, Int_t pos=kRight, Int_t subpos=-1)
Execute a macro and embed the created frame in the tab "pos" and tab element "subpos".
Basic string class.
Definition: TString.h:131
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition: TString.h:687
virtual const char * Getenv(const char *env)
Get environment variable.
Definition: TSystem.cxx:1653
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
Definition: TSystem.cxx:1845
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Definition: TSystem.cxx:1287
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
Definition: TSystem.cxx:1054
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition: TSystem.cxx:426
virtual const char * GetSoExt() const
Get the shared library extension.
Definition: TSystem.cxx:3995
A TTree represents a columnar dataset.
Definition: TTree.h:72
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
Definition: TTree.cxx:8127
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:5497
virtual TList * GetUserInfo()
Return a pointer to the list containing user objects associated to this tree.
Definition: TTree.cxx:6212
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:681
Double_t Cos(Double_t)
Definition: TMath.h:631
Double_t Sin(Double_t)
Definition: TMath.h:627
Short_t Abs(Short_t d)
Definition: TMathBase.h:120
Definition: tree.py:1
auto * a
Definition: textangle.C:12
void tracks()
Definition: tracks.C:47