Complex example showing ALICE VSD visualization.
No ALICE code is needed – the VSD file is exported from AliRoot into VSD format – see TEveVSDStructs.h and TEveVSD.h.
A simple geometry of 10KB, extracted from the full TGeo-geometry, is used to outline the central detectors of ALICE.
All files are access from the web by using the "CACHEREAD" option.
public:
public:
: fFile(nullptr),
fDirectory(nullptr),
{
if (!fFile) {
Error(
"VSD_Reader",
"Can not open file '%s' ... terminating.", file_name);
}
}
}
Error(
"VSD_Reader",
"No events to show ... terminating.");
}
}
{
delete fFile;
}
{
fVSD->SetBranchAddresses();
}
{
delete fDirectory;
fDirectory = nullptr;
}
void NextEvent() { GotoEvent(
fCurEv + 1); }
void PrevEvent() { GotoEvent(
fCurEv - 1); }
{
Warning(
"GotoEvent",
"Invalid event id %d.",
ev);
}
fVSD->SetDirectory(fDirectory);
}
{
if (ps == nullptr) {
} else {
}
}
};
{
}
{
} else {
}
fVSD->fTreeR->GetEntry(
n);
}
}
};
{
{
auto geom =
TFile::Open(
"http://mtadel.home.cern.ch/mtadel/root/alice_mini_geom.root",
"CACHEREAD");
return;
}
}
{
{
b->Connect(
"Clicked()",
"TVSDReader",
gVSDReader,
"PrevEvent()");
b->Connect(
"Clicked()",
"TVSDReader",
gVSDReader,
"NextEvent()");
}
browser->SetTabTitle(
"Event Control", 0);
}
Multi-view (3d, rphi, rhoz) service class using EVE Window Manager.
#define ClassDef(name, id)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
R__EXTERN TEveManager * gEve
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
R__EXTERN TSystem * gSystem
TList * GetListOfKeys() const override
Describe directory structure in memory.
virtual void SetMainColor(Color_t color)
Set main color of the element.
void IncDenyDestroy()
Increases the deny-destroy count of the element.
virtual void DestroyElements()
Destroy all children of this element.
Base class for event management and navigation.
Wrapper for TGeoShape with absolute positioning and color attributes allowing display of extracted TG...
static TEveGeoShape * ImportShapeExtract(TEveGeoShapeExtract *gse, TEveElement *parent=nullptr)
Import a shape extract 'gse' under element 'parent'.
void AddElement(TEveElement *element, TEveElement *parent=nullptr)
Add an element.
void AddGlobalElement(TEveElement *element, TEveElement *parent=nullptr)
Add a global element, i.e.
TEveViewerList * GetViewers() const
TGLViewer * GetDefaultGLViewer() const
Get TGLViewer of the default TEveViewer.
TEveBrowser * GetBrowser() const
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
TGListTreeItem * AddEvent(TEveEventManager *event)
Add a new event and make it the current event.
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
TEveEventManager * GetCurrentEvent() const
TEvePointSelector is a sub-class of TSelectorDraw for direct extraction of point-like data from a Tre...
TEvePointSet is a render-element holding a collection of 3D points with optional per-point TRef and a...
virtual void SetTitle(const char *t)
void Reset(Int_t n_points=0, Int_t n_int_ids=0)
Drop all data and set-up the data structures to recive new data.
void SetMarkerStyle(Style_t mstyle=1) override
Set marker style, propagate to projecteds.
void SetMarkerSize(Size_t msize=1) override
Set marker size, propagate to projecteds.
A list of tracks supporting change of common attributes and selection based on track parameters.
Visual representation of a track.
Visualization Summary Data - a collection of trees holding standard event data in experiment independ...
static void DisableTObjectStreamersForVSDStruct()
Disable TObject streamers for those VSD structs that inherit from TObject directly.
void SwitchColorSet()
Switch background color.
void DeleteAnnotations()
Delete annotations from all viewers.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
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.
static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Sets the directory where to locally stage/cache remote files.
void Close(Option_t *option="") override
Close a file.
A composite frame that layout their children in horizontal way.
void SetStyle(Short_t st)
Defines top level windows that interact with the system Window Manager.
virtual Bool_t SetTab(Int_t tabIndex, Bool_t emit=kTRUE)
Brings the composite frame with the index tabIndex to the front and generate the following event if t...
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual TObjLink * FirstLink() const
Wrapper around a TObject so it can be stored in a TList.
Wrapper for PCRE library (Perl Compatible Regular Expressions).
virtual Int_t Size() const
TGTab * GetTabRight() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual void Exit(int code, Bool_t mode=kTRUE)
Exit the application.