From 2e29a6587a3a8a1baf33824d7c0822969bad506a Mon Sep 17 00:00:00 2001 From: quark Date: Fri, 5 Jul 2013 08:30:38 +0000 Subject: [PATCH] First version of the new GUI in development. You can enable this UI with "alieve -dev". Not much functionality, but File->Open Url.. and Go->Next, Go->Previous --- EVE/CMakebinalieve.pkg | 1 + EVE/CMakelibEveBase.pkg | 6 +- EVE/EveBase/AliEveApplication.cxx | 32 +- EVE/EveBase/AliEveApplication.h | 3 +- EVE/EveBase/AliEveEventManager.cxx | 2636 +++++++++-------- EVE/EveBase/AliEveEventManager.h | 2 + EVE/EveBase/AliEveFileDialog.cxx | 391 +++ EVE/EveBase/AliEveFileDialog.h | 92 + EVE/EveBase/AliEveMainWindow.cxx | 462 +++ EVE/EveBase/AliEveMainWindow.h | 132 + EVE/EveBase/AliEveManager.cxx | 81 - EVE/EveBase/AliEveManager.h | 31 - EVE/EveBase/AliEveUtil.cxx | 36 + EVE/EveBase/AliEveUtil.h | 36 + EVE/EveBase/EveBaseLinkDef.h | 10 +- EVE/alieve_main/alieve_main.cxx | 140 +- EVE/icons/menu/application-exit.png | Bin 0 -> 842 bytes EVE/icons/menu/document-export.png | Bin 0 -> 614 bytes EVE/icons/menu/document-open-remote.png | Bin 0 -> 864 bytes EVE/icons/menu/document-open.png | Bin 0 -> 531 bytes EVE/icons/menu/document-properties.png | Bin 0 -> 668 bytes EVE/icons/menu/edit-copy.png | Bin 0 -> 514 bytes EVE/icons/menu/edit-cut.png | Bin 0 -> 368 bytes EVE/icons/menu/edit-delete.png | Bin 0 -> 641 bytes EVE/icons/menu/edit-paste.png | Bin 0 -> 529 bytes EVE/icons/menu/edit-redo.png | Bin 0 -> 813 bytes EVE/icons/menu/edit-undo.png | Bin 0 -> 866 bytes EVE/icons/menu/help-about.png | Bin 0 -> 734 bytes EVE/icons/menu/help-contents.png | Bin 0 -> 684 bytes EVE/icons/menu/network-connect.png | Bin 0 -> 1145 bytes EVE/icons/menu/view-fullscreen.png | Bin 0 -> 582 bytes EVE/icons/menu/view-history.png | Bin 0 -> 683 bytes EVE/icons/menu/view-refresh.png | Bin 0 -> 931 bytes EVE/icons/menu/view-restore.png | Bin 0 -> 586 bytes EVE/icons/menu/zoom-in.png | Bin 0 -> 791 bytes EVE/icons/menu/zoom-original.png | Bin 0 -> 781 bytes EVE/icons/menu/zoom-out.png | Bin 0 -> 786 bytes EVE/icons/navigation/media-playback-pause.png | Bin 0 -> 484 bytes EVE/icons/navigation/media-playback-start.png | Bin 0 -> 501 bytes EVE/icons/navigation/media-playback-stop.png | Bin 0 -> 499 bytes EVE/icons/navigation/media-seek-backward.png | Bin 0 -> 505 bytes EVE/icons/navigation/media-seek-forward.png | Bin 0 -> 506 bytes EVE/icons/navigation/media-skip-backward.png | Bin 0 -> 511 bytes EVE/icons/navigation/media-skip-forward.png | Bin 0 -> 506 bytes .../navigation/view-split-left-right.png | Bin 0 -> 507 bytes 45 files changed, 2577 insertions(+), 1514 deletions(-) create mode 100644 EVE/EveBase/AliEveFileDialog.cxx create mode 100644 EVE/EveBase/AliEveFileDialog.h create mode 100644 EVE/EveBase/AliEveMainWindow.cxx create mode 100644 EVE/EveBase/AliEveMainWindow.h delete mode 100644 EVE/EveBase/AliEveManager.cxx delete mode 100644 EVE/EveBase/AliEveManager.h create mode 100644 EVE/EveBase/AliEveUtil.cxx create mode 100644 EVE/EveBase/AliEveUtil.h create mode 100644 EVE/icons/menu/application-exit.png create mode 100644 EVE/icons/menu/document-export.png create mode 100644 EVE/icons/menu/document-open-remote.png create mode 100644 EVE/icons/menu/document-open.png create mode 100644 EVE/icons/menu/document-properties.png create mode 100644 EVE/icons/menu/edit-copy.png create mode 100644 EVE/icons/menu/edit-cut.png create mode 100644 EVE/icons/menu/edit-delete.png create mode 100644 EVE/icons/menu/edit-paste.png create mode 100644 EVE/icons/menu/edit-redo.png create mode 100644 EVE/icons/menu/edit-undo.png create mode 100644 EVE/icons/menu/help-about.png create mode 100644 EVE/icons/menu/help-contents.png create mode 100644 EVE/icons/menu/network-connect.png create mode 100644 EVE/icons/menu/view-fullscreen.png create mode 100644 EVE/icons/menu/view-history.png create mode 100644 EVE/icons/menu/view-refresh.png create mode 100644 EVE/icons/menu/view-restore.png create mode 100644 EVE/icons/menu/zoom-in.png create mode 100644 EVE/icons/menu/zoom-original.png create mode 100644 EVE/icons/menu/zoom-out.png create mode 100644 EVE/icons/navigation/media-playback-pause.png create mode 100644 EVE/icons/navigation/media-playback-start.png create mode 100644 EVE/icons/navigation/media-playback-stop.png create mode 100644 EVE/icons/navigation/media-seek-backward.png create mode 100644 EVE/icons/navigation/media-seek-forward.png create mode 100644 EVE/icons/navigation/media-skip-backward.png create mode 100644 EVE/icons/navigation/media-skip-forward.png create mode 100644 EVE/icons/navigation/view-split-left-right.png diff --git a/EVE/CMakebinalieve.pkg b/EVE/CMakebinalieve.pkg index fa8b50db5cf..7e267782918 100644 --- a/EVE/CMakebinalieve.pkg +++ b/EVE/CMakebinalieve.pkg @@ -87,3 +87,4 @@ install (DIRECTORY hlt-macros PATTERN "*_C.so" EXCLUDE) + diff --git a/EVE/CMakelibEveBase.pkg b/EVE/CMakelibEveBase.pkg index e361af875c9..b77cba2584f 100644 --- a/EVE/CMakelibEveBase.pkg +++ b/EVE/CMakelibEveBase.pkg @@ -35,6 +35,9 @@ set ( DHDR EveBase/EveBaseLinkDef.h) set ( EINCLUDE RAW ITS TPC TPC/Base TPC/Sim EVE/EveBase STEER/STEER STEER/AOD STEER/CDB STEER/ESD STEER/STEERBase) set ( EXPORT + EveBase/AliEveUtil.h + EveBase/AliEveFileDialog.h + EveBase/AliEveMainWindow.h EveBase/AliEveApplication.h EveBase/AliEveBeamsInfo.h EveBase/AliEveCascade.h @@ -49,9 +52,8 @@ set ( EXPORT EveBase/AliEveMacroExecutor.h EveBase/AliEveMacroExecutorWindow.h EveBase/AliEveMagField.h - EveBase/AliEveManager.h EveBase/AliEveMultiView.h - EveBase/AliEveTrack.h + EveBase/AliEveTrack.h EveBase/AliEveTrackCounter.h EveBase/AliEveTracklet.h EveDet/AliEveTRDData.h diff --git a/EVE/EveBase/AliEveApplication.cxx b/EVE/EveBase/AliEveApplication.cxx index 9cce3e843fc..bca0379820f 100644 --- a/EVE/EveBase/AliEveApplication.cxx +++ b/EVE/EveBase/AliEveApplication.cxx @@ -14,15 +14,13 @@ #include #include -#include - ClassImp(AliEveApplication) AliEveApplication::AliEveApplication(const char* appClassName, int* argc, char** argv, void* options, int numOptions, Bool_t noLogo) - : TRint(appClassName, argc, argv, options, numOptions, noLogo) + : TRint(appClassName, argc, argv, options, numOptions, noLogo) { - Init(); + Init(); } AliEveApplication::~AliEveApplication() @@ -31,24 +29,22 @@ AliEveApplication::~AliEveApplication() void AliEveApplication::Init() { - static const TEveException kEH("alieve::main"); + TString evedir(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); - TString evedir(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); + TString macPath(gROOT->GetMacroPath()); + macPath += Form(":%s/macros", evedir.Data()); + gInterpreter->AddIncludePath(evedir); - TString macPath(gROOT->GetMacroPath()); - macPath += Form(":%s/macros", evedir.Data()); - gInterpreter->AddIncludePath(evedir); + macPath += Form(":%s/alice-macros", evedir.Data()); + gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); + gInterpreter->AddIncludePath(Form("%s/PWG0", gSystem->Getenv("ALICE_ROOT"))); + gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT"))); + gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT")); - macPath += Form(":%s/alice-macros", evedir.Data()); - gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); - gInterpreter->AddIncludePath(Form("%s/PWG0", gSystem->Getenv("ALICE_ROOT"))); - gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT"))); - gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT")); - - gROOT->SetMacroPath(macPath); + gROOT->SetMacroPath(macPath); - // make sure logger is instantiated - AliLog::GetRootLogger(); + // make sure logger is instantiated + AliLog::GetRootLogger(); } diff --git a/EVE/EveBase/AliEveApplication.h b/EVE/EveBase/AliEveApplication.h index db1b5f8593c..33de01bb578 100644 --- a/EVE/EveBase/AliEveApplication.h +++ b/EVE/EveBase/AliEveApplication.h @@ -17,11 +17,10 @@ public: AliEveApplication(const char* appClassName, Int_t* argc, char** argv, void* options = 0, Int_t numOptions = 0, Bool_t noLogo = kFALSE); virtual ~AliEveApplication(); - void Init(); // Initialize AliEve & Rint Environment - private: AliEveApplication(const AliEveApplication&); // not implemented AliEveApplication& operator=(const AliEveApplication&); // not implemented + void Init(); // Initialize AliEve & Rint Environment public: diff --git a/EVE/EveBase/AliEveEventManager.cxx b/EVE/EveBase/AliEveEventManager.cxx index d93f104524d..8fe30e5abe1 100644 --- a/EVE/EveBase/AliEveEventManager.cxx +++ b/EVE/EveBase/AliEveEventManager.cxx @@ -96,7 +96,9 @@ Bool_t AliEveEventManager::fgAssertAOD = kFALSE; Bool_t AliEveEventManager::fgAssertRaw = kFALSE; TString AliEveEventManager::fgESDFileName("AliESDs.root"); +TString AliEveEventManager::fgESDfriendsFileName("AliESDfriends.root"); TString AliEveEventManager::fgAODFileName("AliAOD.root"); +TString AliEveEventManager::fgGAlice("galice.root"); TString AliEveEventManager::fgRawFileName("raw.root"); TString AliEveEventManager::fgCdbUri; @@ -114,892 +116,892 @@ AliEveEventManager* AliEveEventManager::fgCurrent = 0; void AliEveEventManager::InitInternals() { - // Initialize internal members. + // Initialize internal members. - static const TEveException kEH("AliEveEventManager::InitInternals "); + static const TEveException kEH("AliEveEventManager::InitInternals "); - if (fgCurrent != 0) - { - throw(kEH + "Dependent event-managers should be created via static method AddDependentManager()."); - } + if (fgCurrent != 0) + { + throw(kEH + "Dependent event-managers should be created via static method AddDependentManager()."); + } - if (fgMaster == 0) - { - fgMaster = this; - } + if (fgMaster == 0) + { + fgMaster = this; + } - fgCurrent = this; + fgCurrent = this; - fAutoLoadTimer = new TTimer; - fAutoLoadTimer->Connect("Timeout()", "AliEveEventManager", this, "AutoLoadNextEvent()"); - fAutoLoadTimer->Connect("Timeout()", "AliEveEventManager", this, "Timeout()"); + fAutoLoadTimer = new TTimer; + fAutoLoadTimer->Connect("Timeout()", "AliEveEventManager", this, "AutoLoadNextEvent()"); + fAutoLoadTimer->Connect("Timeout()", "AliEveEventManager", this, "Timeout()"); - fExecutor = new AliEveMacroExecutor; + fExecutor = new AliEveMacroExecutor; - fTransients = new TEveElementList("Transients", "Transient per-event elements."); - fTransients->IncDenyDestroy(); - gEve->AddToListTree(fTransients, kFALSE); + fTransients = new TEveElementList("Transients", "Transient per-event elements."); + fTransients->IncDenyDestroy(); + gEve->AddToListTree(fTransients, kFALSE); - fTransientLists = new TEveElementList("Transient Lists", "Containers of transient elements."); - fTransientLists->IncDenyDestroy(); - gEve->AddToListTree(fTransientLists, kFALSE); + fTransientLists = new TEveElementList("Transient Lists", "Containers of transient elements."); + fTransientLists->IncDenyDestroy(); + gEve->AddToListTree(fTransientLists, kFALSE); - fPEventSelector = new AliEveEventSelector(this); + fPEventSelector = new AliEveEventSelector(this); - fGlobal = new TMap; fGlobal->SetOwnerKeyValue(); + fGlobal = new TMap; fGlobal->SetOwnerKeyValue(); } AliEveEventManager::AliEveEventManager(const TString& name) : - TEveEventManager(name), - - fPath ( ), fEventId (-1), - fRunLoader (0), - fESDFile (0), fESDTree (0), fESD (0), - fESDfriend (0), fESDfriendExists(kFALSE), - fAODFile (0), fAODTree (0), fAOD (0), - fRawReader (0), fEventInfo(), - fAutoLoad (kFALSE), fAutoLoadTime (5.), fAutoLoadTimer(0), - fIsOpen (kFALSE), fHasEvent (kFALSE), fExternalCtrl (kFALSE), - fGlobal (0), fGlobalReplace (kTRUE), fGlobalUpdate (kTRUE), - fExecutor (0), fTransients(0), fTransientLists(0), - fPEventSelector(0), - fSubManagers (0), - fAutoLoadTimerRunning(kFALSE) + TEveEventManager(name), + + fPath ( ), fEventId (-1), + fRunLoader (0), + fESDFile (0), fESDTree (0), fESD (0), + fESDfriend (0), fESDfriendExists(kFALSE), + fAODFile (0), fAODTree (0), fAOD (0), + fRawReader (0), fEventInfo(), + fAutoLoad (kFALSE), fAutoLoadTime (5.), fAutoLoadTimer(0), + fIsOpen (kFALSE), fHasEvent (kFALSE), fExternalCtrl (kFALSE), + fGlobal (0), fGlobalReplace (kTRUE), fGlobalUpdate (kTRUE), + fExecutor (0), fTransients(0), fTransientLists(0), + fPEventSelector(0), + fSubManagers (0), + fAutoLoadTimerRunning(kFALSE) { - // Default constructor. + // Default constructor. - InitInternals(); + InitInternals(); } AliEveEventManager::AliEveEventManager(const TString& name, const TString& path, Int_t ev) : - TEveEventManager(name, path), - - fPath (path), fEventId(-1), - fRunLoader (0), - fESDFile (0), fESDTree (0), fESD (0), - fESDfriend (0), fESDfriendExists(kFALSE), - fAODFile (0), fAODTree (0), fAOD (0), - fRawReader (0), fEventInfo(), - fAutoLoad (kFALSE), fAutoLoadTime (5), fAutoLoadTimer(0), - fIsOpen (kFALSE), fHasEvent (kFALSE), fExternalCtrl (kFALSE), - fGlobal (0), fGlobalReplace (kTRUE), fGlobalUpdate (kTRUE), - fExecutor (0), fTransients(0), fTransientLists(0), - fPEventSelector(0), - fSubManagers (0), - fAutoLoadTimerRunning(kFALSE) + TEveEventManager(name, path), + + fPath (path), fEventId(-1), + fRunLoader (0), + fESDFile (0), fESDTree (0), fESD (0), + fESDfriend (0), fESDfriendExists(kFALSE), + fAODFile (0), fAODTree (0), fAOD (0), + fRawReader (0), fEventInfo(), + fAutoLoad (kFALSE), fAutoLoadTime (5), fAutoLoadTimer(0), + fIsOpen (kFALSE), fHasEvent (kFALSE), fExternalCtrl (kFALSE), + fGlobal (0), fGlobalReplace (kTRUE), fGlobalUpdate (kTRUE), + fExecutor (0), fTransients(0), fTransientLists(0), + fPEventSelector(0), + fSubManagers (0), + fAutoLoadTimerRunning(kFALSE) { - // Constructor with event-directory URL and event-id. + // Constructor with event-directory URL and event-id. - InitInternals(); + InitInternals(); - Open(); - if (ev >= 0) - { - GotoEvent(ev); - } + Open(); + if (ev >= 0) + { + GotoEvent(ev); + } } AliEveEventManager::~AliEveEventManager() { - // Destructor. - fAutoLoadTimer->Stop(); - fAutoLoadTimer->Disconnect("Timeout"); + // Destructor. + fAutoLoadTimer->Stop(); + fAutoLoadTimer->Disconnect("Timeout"); - delete fSubManagers; + delete fSubManagers; - if (fIsOpen) - { - Close(); - } + if (fIsOpen) + { + Close(); + } + + fTransients->DecDenyDestroy(); + fTransients->Destroy(); - fTransients->DecDenyDestroy(); - fTransients->Destroy(); + fTransientLists->DecDenyDestroy(); + fTransientLists->Destroy(); - fTransientLists->DecDenyDestroy(); - fTransientLists->Destroy(); - - //delete fExecutor; + //delete fExecutor; } /******************************************************************************/ void AliEveEventManager::SetESDFileName(const TString& esd) { - // Set file-name for opening ESD, default "AliESDs.root". + // Set file-name for opening ESD, default "AliESDs.root". - if ( ! esd.IsNull()) fgESDFileName = esd; + if ( ! esd.IsNull()) fgESDFileName = esd; } void AliEveEventManager::SetAODFileName(const TString& aod) { - // Set file-name for opening AOD, default "AliAOD.root". + // Set file-name for opening AOD, default "AliAOD.root". - if ( ! aod.IsNull()) fgAODFileName = aod; + if ( ! aod.IsNull()) fgAODFileName = aod; } void AliEveEventManager::AddAODfriend(const TString& friendFileName) { - // Add new AOD friend file-name to be attached when opening AOD. - // This should include '.root', as in 'AliAOD.VertexingHF.root'. - - if (fgAODfriends == 0) - { - fgAODfriends = new TList; - fgAODfriends->SetOwner(kTRUE); - } - if (fgAODfriends->FindObject(friendFileName) == 0) - { - fgAODfriends->Add(new TObjString(friendFileName)); - } + // Add new AOD friend file-name to be attached when opening AOD. + // This should include '.root', as in 'AliAOD.VertexingHF.root'. + + if (fgAODfriends == 0) + { + fgAODfriends = new TList; + fgAODfriends->SetOwner(kTRUE); + } + if (fgAODfriends->FindObject(friendFileName) == 0) + { + fgAODfriends->Add(new TObjString(friendFileName)); + } } void AliEveEventManager::SetRawFileName(const TString& raw) { - // Set file-name for opening of raw-data, default "raw.root" - if ( ! raw.IsNull()) fgRawFileName = raw; + // Set file-name for opening of raw-data, default "raw.root" + if ( ! raw.IsNull()) fgRawFileName = raw; } void AliEveEventManager::SetCdbUri(const TString& cdb) { - // Set path to CDB, there is no default. + // Set path to CDB, there is no default. - if ( ! cdb.IsNull()) fgCdbUri = cdb; + if ( ! cdb.IsNull()) fgCdbUri = cdb; } void AliEveEventManager::SetAssertElements(Bool_t assertRunloader, Bool_t assertEsd, - Bool_t assertAod, Bool_t assertRaw) + Bool_t assertAod, Bool_t assertRaw) { - // Set global flags that detrmine which parts of the event-data must - // be present when the event is opened. + // Set global flags that detrmine which parts of the event-data must + // be present when the event is opened. - fgAssertRunLoader = assertRunloader; - fgAssertESD = assertEsd; - fgAssertAOD = assertAod; - fgAssertRaw = assertRaw; + fgAssertRunLoader = assertRunloader; + fgAssertESD = assertEsd; + fgAssertAOD = assertAod; + fgAssertRaw = assertRaw; } void AliEveEventManager::SearchRawForCentralReconstruction() { - // Enable searching of raw data in standard location. The path passed to - // Open() is expected to point to a centrally reconstructed run, e.g.: - // "alien:///alice/data/2009/LHC09c/000101134/ESDs/pass1/09000101134018.10". + // Enable searching of raw data in standard location. The path passed to + // Open() is expected to point to a centrally reconstructed run, e.g.: + // "alien:///alice/data/2009/LHC09c/000101134/ESDs/pass1/09000101134018.10". - fgRawFromStandardLoc = kTRUE; + fgRawFromStandardLoc = kTRUE; } /******************************************************************************/ void AliEveEventManager::Open() { - // Open event-data from URL specified in fPath. - // Attempts to create AliRunLoader() and to open ESD with ESDfriends. - // Warning is reported if run-loader or ESD is not found. - // Global data-members fgAssertRunLoader and fgAssertESD can be set - // to throw exceptions instead. - - static const TEveException kEH("AliEveEventManager::Open "); - - if (fExternalCtrl) - { - throw (kEH + "Event-loop is under external control."); - } - if (fIsOpen) - { - throw (kEH + "Event-files already opened."); - } - - gSystem->ExpandPathName(fPath); - // The following magick is required for ESDfriends to be loaded properly - // from non-current directory. - if (fPath.IsNull() || fPath == ".") - { - fPath = gSystem->WorkingDirectory(); - } - else if ( ! fPath.BeginsWith("file:/")) - { - TUrl url(fPath, kTRUE); - TString protocol(url.GetProtocol()); - if (protocol == "file" && fPath[0] != '/') - fPath = Form("%s/%s", gSystem->WorkingDirectory(), fPath.Data()); - } - - Int_t runNo = -1; - - // Open ESD and ESDfriends - - TString esdPath(Form("%s/%s", fPath.Data(), fgESDFileName.Data())); - if (fPath.EndsWith(".zip")) esdPath.Form("%s#%s",fPath.Data(),fgESDFileName.Data()); - if ((fESDFile = TFile::Open(esdPath))) - { - fESD = new AliESDEvent(); - fESDTree = (TTree*) fESDFile->Get("esdTree"); - if (fESDTree != 0) - { - // Check if ESDfriends exists and attach the branch. - // We use TFile::Open() instead of gSystem->AccessPathName - // as it seems to work better when attachine alieve to a - // running reconstruction process with auto-save on. - TString p(Form("%s/AliESDfriends.root", fPath.Data())); - if (fPath.EndsWith(".zip")) p.Form("%s#AliESDfriends.root",fPath.Data()); - TFile *esdFriendFile = TFile::Open(p); - if (esdFriendFile) - { - if (!esdFriendFile->IsZombie()) - { - esdFriendFile->Close(); - fESDfriendExists = kTRUE; - fESDTree->SetBranchStatus ("ESDfriend*", 1); - } - delete esdFriendFile; - } - - fESD->ReadFromTree(fESDTree); - if (fESDfriendExists) - { - fESDfriend = (AliESDfriend*) fESD->FindListObject("AliESDfriend"); - Info(kEH, "found and attached ESD friend."); - } - else - { - Warning(kEH, "ESDfriend not found."); - } - - if (fESDTree->GetEntry(0) <= 0) - { - delete fESDFile; fESDFile = 0; - delete fESD; fESD = 0; - Warning(kEH, "failed getting the first entry from esdTree."); - } - else - { - if (runNo < 0) - runNo = fESD->GetESDRun()->GetRunNumber(); - } - } - else // esdtree == 0 - { - delete fESDFile; fESDFile = 0; - delete fESD; fESD = 0; - Warning(kEH, "failed getting the esdTree."); - } - } - else // esd not readable - { - Warning(kEH, "can not read ESD file '%s'.", esdPath.Data()); - } - if (fESDTree == 0) - { - if (fgAssertESD) - { - throw (kEH + "ESD not initialized. Its precence was requested."); - } else { - Warning(kEH, "ESD not initialized."); - } - } - - // Open AOD and registered friends - - TString aodPath(Form("%s/%s", fPath.Data(), fgAODFileName.Data())); - if (fPath.EndsWith(".zip")) aodPath.Form("%s#%s",fPath.Data(),fgAODFileName.Data()); - if ((fAODFile = TFile::Open(aodPath))) - { - fAOD = new AliAODEvent(); - fAODTree = (TTree*) fAODFile->Get("aodTree"); - if (fAODTree != 0) - { - // Check if AODfriends exist and attach them. - TIter friends(fgAODfriends); - TObjString *name; - while ((name = (TObjString*) friends()) != 0) - { - TString p(Form("%s/%s", fPath.Data(), name->GetName())); - if (fPath.EndsWith(".zip")) p.Form("%s#%s",fPath.Data(),name->GetName()); - if (gSystem->AccessPathName(p, kReadPermission) == kFALSE) - { - fAODTree->AddFriend("aodTree", name->GetName()); - } - } - - fAOD->ReadFromTree(fAODTree); - - if (fAODTree->GetEntry(0) <= 0) - { - delete fAODFile; fAODFile = 0; - delete fAOD; fAOD = 0; - Warning(kEH, "failed getting the first entry from addTree."); - } - else - { - if (runNo < 0) - runNo = fAOD->GetRunNumber(); - } - } - else // aodtree == 0 - { - delete fAODFile; fAODFile = 0; - delete fAOD; fAOD = 0; - Warning(kEH, "failed getting the aodTree."); - } - } - else // aod not readable - { - Warning(kEH, "can not read AOD file '%s'.", aodPath.Data()); - } - if (fAODTree == 0) - { - if (fgAssertAOD) - { - throw (kEH + "AOD not initialized. Its precence was requested."); - } else { - Warning(kEH, "AOD not initialized."); - } - } - - // Open RunLoader from galice.root - - TString gaPath(Form("%s/galice.root", fPath.Data())); - if (fPath.EndsWith(".zip")) gaPath.Form("%s#%s",fPath.Data(),"galice.root"); - // If i use open directly, we get fatal. - // Is AccessPathName check ok for xrootd / alien? Yes, not for http. - // Seems not to work for alien anymore. - // Fixed in ROOT on 27.10.2009, rev 30888. - // To revert after we move to root-5.26. - TFile *gafile = TFile::Open(gaPath); - if (gafile) - { - gafile->Close(); - delete gafile; - // if (gSystem->AccessPathName(gaPath, kReadPermission) == kFALSE) - // { - fRunLoader = AliRunLoader::Open(gaPath, GetName()); - if (fRunLoader) - { - TString alicePath = fPath + "/"; - fRunLoader->SetDirName(alicePath); - - if (fRunLoader->LoadgAlice() != 0) - Warning(kEH, "failed loading gAlice via run-loader."); - - if (fRunLoader->LoadHeader() == 0) - { - if (runNo < 0) - runNo = fRunLoader->GetHeader()->GetRun(); - } - else - { - Warning(kEH, "failed loading run-loader's header."); - delete fRunLoader; - fRunLoader = 0; - } - } - else // run-loader open failed - { - Warning(kEH, "failed opening ALICE run-loader from '%s'.", gaPath.Data()); - } - } - else // galice not readable - { - Warning(kEH, "can not read '%s'.", gaPath.Data()); - } - if (fRunLoader == 0) - { - if (fgAssertRunLoader) - throw (kEH + "Bootstraping of run-loader failed. Its precence was requested."); - else - Warning(kEH, "Bootstraping of run-loader failed."); - } - - // Open raw-data file - - TString rawPath; - if (fgRawFromStandardLoc) - { - if (!fPath.BeginsWith("alien:")) - throw kEH + "Standard raw search requested, but the directory is not in AliEn."; - if (!fPath.Contains("/ESDs/")) - throw kEH + "Standard raw search requested, but does not contain 'ESDs' directory."; - - TPMERegexp chunk("/([\\d\\.])+/?$"); - Int_t nm = chunk.Match(fPath); - if (nm != 2) - throw kEH + "Standard raw search requested, but the path does not end with chunk-id directory."; - - TPMERegexp esdstrip("/ESDs/.*"); - rawPath = fPath; - esdstrip.Substitute(rawPath, "/raw/"); - rawPath += chunk[0]; - rawPath += ".root"; - - Info(kEH, "Standard raw search requested, using the following path:\n %s\n", rawPath.Data()); - } - else - { - rawPath.Form("%s/%s", fPath.Data(), fgRawFileName.Data()); - } - // If i use open directly, raw-reader reports an error but i have - // no way to detect it. - // Is this (AccessPathName check) ok for xrootd / alien? Yes, not for http. - AliLog::EType_t oldLogLevel = (AliLog::EType_t) AliLog::GetGlobalLogLevel(); - if (fgAssertRaw == kFALSE) - { - AliLog::SetGlobalLogLevel(AliLog::kFatal); - } - if (gSystem->AccessPathName(rawPath, kReadPermission) == kFALSE) - { - fRawReader = AliRawReader::Create(rawPath); - } - else - { - fRawReader = AliRawReader::Create(fgRawFileName); - } - if (fgAssertRaw == kFALSE) - { - AliLog::SetGlobalLogLevel(oldLogLevel); - } - - if (fRawReader == 0) - { - if (fgAssertRaw) - { - throw (kEH + "raw-data not initialized. Its precence was requested."); + // Open event-data from URL specified in fPath. + // Attempts to create AliRunLoader() and to open ESD with ESDfriends. + // Warning is reported if run-loader or ESD is not found. + // Global data-members fgAssertRunLoader and fgAssertESD can be set + // to throw exceptions instead. + + static const TEveException kEH("AliEveEventManager::Open "); + + if (fExternalCtrl) + { + throw (kEH + "Event-loop is under external control."); } - else + if (fIsOpen) { - Warning(kEH, "raw-data not initialized."); + throw (kEH + "Event-files already opened."); } - } - if (runNo < 0) - { - if (fRawReader) + gSystem->ExpandPathName(fPath); + // The following magick is required for ESDfriends to be loaded properly + // from non-current directory. + if (fPath.IsNull() || fPath == ".") + { + fPath = gSystem->WorkingDirectory(); + } + else if ( ! fPath.BeginsWith("file:/")) + { + TUrl url(fPath, kTRUE); + TString protocol(url.GetProtocol()); + if (protocol == "file" && fPath[0] != '/') + fPath = Form("%s/%s", gSystem->WorkingDirectory(), fPath.Data()); + } + + Int_t runNo = -1; + + // Open ESD and ESDfriends + + TString esdPath(Form("%s", fgESDFileName.Data())); + if (fgESDFileName.EndsWith(".zip")) esdPath.Form("%s#AliESDs.root",fgESDFileName.Data()); + if ((fESDFile = TFile::Open(esdPath))) + { + fESD = new AliESDEvent(); + fESDTree = (TTree*) fESDFile->Get("esdTree"); + if (fESDTree != 0) + { + // Check if ESDfriends exists and attach the branch. + // We use TFile::Open() instead of gSystem->AccessPathName + // as it seems to work better when attachine alieve to a + // running reconstruction process with auto-save on. + TString p(fgESDfriendsFileName); + if (fgESDfriendsFileName.EndsWith(".zip")) p.Form("%s#AliESDfriends.root",fgESDfriendsFileName.Data()); + TFile *esdFriendFile = TFile::Open(p); + if (esdFriendFile) + { + if (!esdFriendFile->IsZombie()) + { + esdFriendFile->Close(); + fESDfriendExists = kTRUE; + fESDTree->SetBranchStatus ("ESDfriend*", 1); + } + delete esdFriendFile; + } + + fESD->ReadFromTree(fESDTree); + if (fESDfriendExists) + { + fESDfriend = (AliESDfriend*) fESD->FindListObject("AliESDfriend"); + Info(kEH, "found and attached ESD friend."); + } + else + { + Warning(kEH, "ESDfriend not found."); + } + + if (fESDTree->GetEntry(0) <= 0) + { + delete fESDFile; fESDFile = 0; + delete fESD; fESD = 0; + Warning(kEH, "failed getting the first entry from esdTree."); + } + else + { + if (runNo < 0) + runNo = fESD->GetESDRun()->GetRunNumber(); + } + } + else // esdtree == 0 + { + delete fESDFile; fESDFile = 0; + delete fESD; fESD = 0; + Warning(kEH, "failed getting the esdTree."); + } + } + else // esd not readable + { + Warning(kEH, "can not read ESD file '%s'.", esdPath.Data()); + } + if (fESDTree == 0) { - if ( ! fRawReader->NextEvent()) - { - throw (kEH + "can not go to first event in raw-reader to determine run-id."); - } - runNo = fRawReader->GetRunNumber(); - Info(kEH, "Determining run-no from raw ... run=%d.", runNo); - fRawReader->RewindEvents(); + if (fgAssertESD) + { + throw (kEH + "ESD not initialized. Its precence was requested."); + } else { + Warning(kEH, "ESD not initialized."); + } } - else + + // Open AOD and registered friends + + TString aodPath(Form("%s", fgAODFileName.Data())); + if (fgAODFileName.EndsWith(".zip")) aodPath.Form("%s#AliAOD.root",fgAODFileName.Data()); + if ((fAODFile = TFile::Open(aodPath))) { - throw (kEH + "unknown run number."); + fAOD = new AliAODEvent(); + fAODTree = (TTree*) fAODFile->Get("aodTree"); + if (fAODTree != 0) + { + // Check if AODfriends exist and attach them. + TIter friends(fgAODfriends); + TObjString *name; + while ((name = (TObjString*) friends()) != 0) + { + TString p(Form("%s/%s", fgAODFileName.Data(), name->GetName())); + if (fgAODFileName.EndsWith(".zip")) p.Form("%s#%s",fgAODFileName.Data(),name->GetName()); + if (gSystem->AccessPathName(p, kReadPermission) == kFALSE) + { + fAODTree->AddFriend("aodTree", name->GetName()); + } + } + + fAOD->ReadFromTree(fAODTree); + + if (fAODTree->GetEntry(0) <= 0) + { + delete fAODFile; fAODFile = 0; + delete fAOD; fAOD = 0; + Warning(kEH, "failed getting the first entry from addTree."); + } + else + { + if (runNo < 0) + runNo = fAOD->GetRunNumber(); + } + } + else // aodtree == 0 + { + delete fAODFile; fAODFile = 0; + delete fAOD; fAOD = 0; + Warning(kEH, "failed getting the aodTree."); + } + } + else // aod not readable + { + Warning(kEH, "can not read AOD file '%s'.", aodPath.Data()); + } + if (fAODTree == 0) + { + if (fgAssertAOD) + { + throw (kEH + "AOD not initialized. Its precence was requested."); + } else { + Warning(kEH, "AOD not initialized."); + } } - } - // Initialize OCDB ... only in master event-manager + // Open RunLoader from galice.root + + TString gaPath(Form("%s", fgGAlice.Data())); + if (fgGAlice.EndsWith(".zip")) gaPath.Form("%s#galice.root",fgGAlice.Data()); + // If i use open directly, we get fatal. + // Is AccessPathName check ok for xrootd / alien? Yes, not for http. + // Seems not to work for alien anymore. + // Fixed in ROOT on 27.10.2009, rev 30888. + // To revert after we move to root-5.26. + TFile *gafile = TFile::Open(gaPath); + if (gafile) + { + gafile->Close(); + delete gafile; + // if (gSystem->AccessPathName(gaPath, kReadPermission) == kFALSE) + // { + fRunLoader = AliRunLoader::Open(gaPath, GetName()); + if (fRunLoader) + { + TString alicePath = fPath + "/"; + fRunLoader->SetDirName(alicePath); + + if (fRunLoader->LoadgAlice() != 0) + Warning(kEH, "failed loading gAlice via run-loader."); - if (this == fgMaster) - { - AliCDBManager* cdb = AliCDBManager::Instance(); - if (cdb->IsDefaultStorageSet() == kTRUE) + if (fRunLoader->LoadHeader() == 0) + { + if (runNo < 0) + runNo = fRunLoader->GetHeader()->GetRun(); + } + else + { + Warning(kEH, "failed loading run-loader's header."); + delete fRunLoader; + fRunLoader = 0; + } + } + else // run-loader open failed + { + Warning(kEH, "failed opening ALICE run-loader from '%s'.", gaPath.Data()); + } + } + else // galice not readable + { + Warning(kEH, "can not read '%s'.", gaPath.Data()); + } + if (fRunLoader == 0) + { + if (fgAssertRunLoader) + throw (kEH + "Bootstraping of run-loader failed. Its precence was requested."); + else + Warning(kEH, "Bootstraping of run-loader failed."); + } + + // Open raw-data file + + TString rawPath; + if (fgRawFromStandardLoc) + { + if (!fPath.BeginsWith("alien:")) + throw kEH + "Standard raw search requested, but the directory is not in AliEn."; + if (!fPath.Contains("/ESDs/")) + throw kEH + "Standard raw search requested, but does not contain 'ESDs' directory."; + + TPMERegexp chunk("/([\\d\\.])+/?$"); + Int_t nm = chunk.Match(fPath); + if (nm != 2) + throw kEH + "Standard raw search requested, but the path does not end with chunk-id directory."; + + TPMERegexp esdstrip("/ESDs/.*"); + rawPath = fPath; + esdstrip.Substitute(rawPath, "/raw/"); + rawPath += chunk[0]; + rawPath += ".root"; + + Info(kEH, "Standard raw search requested, using the following path:\n %s\n", rawPath.Data()); + } + else + { + rawPath.Form("%s", fgRawFileName.Data()); + } + // If i use open directly, raw-reader reports an error but i have + // no way to detect it. + // Is this (AccessPathName check) ok for xrootd / alien? Yes, not for http. + AliLog::EType_t oldLogLevel = (AliLog::EType_t) AliLog::GetGlobalLogLevel(); + if (fgAssertRaw == kFALSE) + { + AliLog::SetGlobalLogLevel(AliLog::kFatal); + } + if (gSystem->AccessPathName(rawPath, kReadPermission) == kFALSE) { - Warning(kEH, "CDB already set - using the old storage:\n '%s'", - cdb->GetDefaultStorage()->GetURI().Data()); + fRawReader = AliRawReader::Create(rawPath); } else { - if (fgCdbUri.IsNull()) - { - gEnv->SetValue("Root.Stacktrace", "no"); - Fatal("Open()", "OCDB path was not specified."); - } - - // Handle some special cases for MC (should be in OCDBManager). - if (fgCdbUri == "mcideal://") - cdb->SetDefaultStorage("MC", "Ideal"); - else if (fgCdbUri == "mcresidual://") - cdb->SetDefaultStorage("MC", "Residual"); - else if (fgCdbUri == "mcfull://") - cdb->SetDefaultStorage("MC", "Full"); - else if (fgCdbUri == "local://") { - fgCdbUri = "local://$ALICE_ROOT/OCDB"; - cdb->SetDefaultStorage(fgCdbUri); - } else - cdb->SetDefaultStorage(fgCdbUri); - - cdb->SetRun(runNo); - - if (cdb->IsDefaultStorageSet() == kFALSE) - throw kEH + "CDB initialization failed for '" + fgCdbUri + "'."; - } - - if (fgCdbUri.BeginsWith("local://")) - { - TString grp = "GRP/GRP/Data"; - TString grppath = fPath + "/" + grp; - if (gSystem->AccessPathName(grppath, kReadPermission) == kFALSE) - { - if (cdb->GetSpecificStorage(grp)) - { - Warning(kEH, "Local GRP exists, but the specific storage is already set."); - } - else - { - Info(kEH, "Setting CDB specific-storage for GRP from event directory."); - TString lpath("local://"); - lpath += fPath; - cdb->SetSpecificStorage(grp, lpath); - } - } - } - } - - fIsOpen = kTRUE; + fRawReader = AliRawReader::Create(fgRawFileName); + } + if (fgAssertRaw == kFALSE) + { + AliLog::SetGlobalLogLevel(oldLogLevel); + } + + if (fRawReader == 0) + { + if (fgAssertRaw) + { + throw (kEH + "raw-data not initialized. Its precence was requested."); + } + else + { + Warning(kEH, "raw-data not initialized."); + } + } + + if (runNo < 0) + { + if (fRawReader) + { + if ( ! fRawReader->NextEvent()) + { + throw (kEH + "can not go to first event in raw-reader to determine run-id."); + } + runNo = fRawReader->GetRunNumber(); + Info(kEH, "Determining run-no from raw ... run=%d.", runNo); + fRawReader->RewindEvents(); + } + else + { + throw (kEH + "unknown run number."); + } + } + + // Initialize OCDB ... only in master event-manager + + if (this == fgMaster) + { + AliCDBManager* cdb = AliCDBManager::Instance(); + if (cdb->IsDefaultStorageSet() == kTRUE) + { + Warning(kEH, "CDB already set - using the old storage:\n '%s'", + cdb->GetDefaultStorage()->GetURI().Data()); + } + else + { + if (fgCdbUri.IsNull()) + { + gEnv->SetValue("Root.Stacktrace", "no"); + Fatal("Open()", "OCDB path was not specified."); + } + + // Handle some special cases for MC (should be in OCDBManager). + if (fgCdbUri == "mcideal://") + cdb->SetDefaultStorage("MC", "Ideal"); + else if (fgCdbUri == "mcresidual://") + cdb->SetDefaultStorage("MC", "Residual"); + else if (fgCdbUri == "mcfull://") + cdb->SetDefaultStorage("MC", "Full"); + else if (fgCdbUri == "local://") { + fgCdbUri = "local://$ALICE_ROOT/OCDB"; + cdb->SetDefaultStorage(fgCdbUri); + } else + cdb->SetDefaultStorage(fgCdbUri); + + cdb->SetRun(runNo); + + if (cdb->IsDefaultStorageSet() == kFALSE) + throw kEH + "CDB initialization failed for '" + fgCdbUri + "'."; + } + + if (fgCdbUri.BeginsWith("local://")) + { + TString grp = "GRP/GRP/Data"; + TString grppath = fPath + "/" + grp; + if (gSystem->AccessPathName(grppath, kReadPermission) == kFALSE) + { + if (cdb->GetSpecificStorage(grp)) + { + Warning(kEH, "Local GRP exists, but the specific storage is already set."); + } + else + { + Info(kEH, "Setting CDB specific-storage for GRP from event directory."); + TString lpath("local://"); + lpath += fPath; + cdb->SetSpecificStorage(grp, lpath); + } + } + } + } + + fIsOpen = kTRUE; } void AliEveEventManager::SetEvent(AliRunLoader *runLoader, AliRawReader *rawReader, AliESDEvent *esd, AliESDfriend *esdf) { - // Set an event from an external source. - // The method is used in the online visualisation. - // AOD is not supported. + // Set an event from an external source. + // The method is used in the online visualisation. + // AOD is not supported. - static const TEveException kEH("AliEveEventManager::SetEvent "); + static const TEveException kEH("AliEveEventManager::SetEvent "); - if (fIsOpen) - { - Warning(kEH, "Event-files were open. Closing and switching to external control."); - Close(); - } + if (fIsOpen) + { + Warning(kEH, "Event-files were open. Closing and switching to external control."); + Close(); + } - fRunLoader = runLoader; - fRawReader = rawReader; - fESD = esd; - fESDfriend = esdf; - fAOD = 0; + fRunLoader = runLoader; + fRawReader = rawReader; + fESD = esd; + fESDfriend = esdf; + fAOD = 0; - fEventId++; - fHasEvent = kTRUE; - fExternalCtrl = kTRUE; + fEventId++; + fHasEvent = kTRUE; + fExternalCtrl = kTRUE; - SetTitle("Online event in memory"); - SetName ("Online Event"); - ElementChanged(); + SetTitle("Online event in memory"); + SetName ("Online Event"); + ElementChanged(); - AfterNewEventLoaded(); + AfterNewEventLoaded(); - if (fAutoLoad) StartAutoLoadTimer(); + if (fAutoLoad) StartAutoLoadTimer(); } Int_t AliEveEventManager::GetMaxEventId(Bool_t refreshESD) const { - // Returns maximum available event id. - // If under external control or event is not opened -1 is returned. - // If raw-data is the only data-source this can not be known - // and 10,000,000 is returned. - // If neither data-source is initialised an exception is thrown. - // If refresh_esd is true and ESD is the primary event-data source - // its header is re-read from disk. - - static const TEveException kEH("AliEveEventManager::GetMaxEventId "); - - if (fExternalCtrl || fIsOpen == kFALSE) - { - return -1; - } - - if (fESDTree) - { - if (refreshESD) - { - fESDTree->Refresh(); - fPEventSelector->Update(); - } - return fESDTree->GetEntries() - 1; - } - else if (fAODTree) - { - return fAODTree->GetEntries() - 1; - } - else if (fRunLoader) - { - return fRunLoader->GetNumberOfEvents() - 1; - } - else if (fRawReader) - { - Int_t n = fRawReader->GetNumberOfEvents() - 1; - return n > -1 ? n : 10000000; - } - else - { - throw (kEH + "neither ESD, AOD, RunLoader nor Raw loaded."); - } + // Returns maximum available event id. + // If under external control or event is not opened -1 is returned. + // If raw-data is the only data-source this can not be known + // and 10,000,000 is returned. + // If neither data-source is initialised an exception is thrown. + // If refresh_esd is true and ESD is the primary event-data source + // its header is re-read from disk. + + static const TEveException kEH("AliEveEventManager::GetMaxEventId "); + + if (fExternalCtrl || fIsOpen == kFALSE) + { + return -1; + } + + if (fESDTree) + { + if (refreshESD) + { + fESDTree->Refresh(); + fPEventSelector->Update(); + } + return fESDTree->GetEntries() - 1; + } + else if (fAODTree) + { + return fAODTree->GetEntries() - 1; + } + else if (fRunLoader) + { + return fRunLoader->GetNumberOfEvents() - 1; + } + else if (fRawReader) + { + Int_t n = fRawReader->GetNumberOfEvents() - 1; + return n > -1 ? n : 10000000; + } + else + { + throw (kEH + "neither ESD, AOD, RunLoader nor Raw loaded."); + } } void AliEveEventManager::GotoEvent(Int_t event) { - // Load data for specified event. - // If event is out of range an exception is thrown and old state - // is preserved. - // After successful loading of event, the virtual function - // AfterNewEventLoaded() is called. This executes commands that - // were registered via TEveEventManager::AddNewEventCommand(). - // - // If event is negative, it is subtracted from the number of - // available events, thus passing -1 will load the last event. - // This is not supported when raw-data is the only data-source - // as the number of events is not known. - - static const TEveException kEH("AliEveEventManager::GotoEvent "); - - if (fAutoLoadTimerRunning) - { - throw (kEH + "Event auto-load timer is running."); - } - if (fExternalCtrl) - { - throw (kEH + "Event-loop is under external control."); - } - else if (!fIsOpen) - { - throw (kEH + "Event-files not opened."); - } - - fEventInfo.Reset(); - - fHasEvent = kFALSE; - - Int_t maxEvent = 0; - if (fESDTree) - { - if (event >= fESDTree->GetEntries()) - fESDTree->Refresh(); - maxEvent = fESDTree->GetEntries() - 1; - if (event < 0) - event = fESDTree->GetEntries() + event; - } - else if (fAODTree) - { - maxEvent = fAODTree->GetEntries() - 1; - if (event < 0) - event = fAODTree->GetEntries() + event; - } - else if (fRunLoader) - { - maxEvent = fRunLoader->GetNumberOfEvents() - 1; - if (event < 0) - event = fRunLoader->GetNumberOfEvents() + event; - } - else if (fRawReader) - { - maxEvent = fRawReader->GetNumberOfEvents() - 1; - if (maxEvent < 0) - { - maxEvent = 10000000; - if (event < 0) { - Error(kEH, "current raw-data source does not support direct event access."); - return; - } - Info(kEH, "number of events unknown for current raw-data source, setting max-event id to 10M."); + // Load data for specified event. + // If event is out of range an exception is thrown and old state + // is preserved. + // After successful loading of event, the virtual function + // AfterNewEventLoaded() is called. This executes commands that + // were registered via TEveEventManager::AddNewEventCommand(). + // + // If event is negative, it is subtracted from the number of + // available events, thus passing -1 will load the last event. + // This is not supported when raw-data is the only data-source + // as the number of events is not known. + + static const TEveException kEH("AliEveEventManager::GotoEvent "); + + if (fAutoLoadTimerRunning) + { + throw (kEH + "Event auto-load timer is running."); + } + if (fExternalCtrl) + { + throw (kEH + "Event-loop is under external control."); + } + else if (!fIsOpen) + { + throw (kEH + "Event-files not opened."); + } + + fEventInfo.Reset(); + + fHasEvent = kFALSE; + + Int_t maxEvent = 0; + if (fESDTree) + { + if (event >= fESDTree->GetEntries()) + fESDTree->Refresh(); + maxEvent = fESDTree->GetEntries() - 1; + if (event < 0) + event = fESDTree->GetEntries() + event; + } + else if (fAODTree) + { + maxEvent = fAODTree->GetEntries() - 1; + if (event < 0) + event = fAODTree->GetEntries() + event; + } + else if (fRunLoader) + { + maxEvent = fRunLoader->GetNumberOfEvents() - 1; + if (event < 0) + event = fRunLoader->GetNumberOfEvents() + event; + } + else if (fRawReader) + { + maxEvent = fRawReader->GetNumberOfEvents() - 1; + if (maxEvent < 0) + { + maxEvent = 10000000; + if (event < 0) { + Error(kEH, "current raw-data source does not support direct event access."); + return; + } + Info(kEH, "number of events unknown for current raw-data source, setting max-event id to 10M."); + } + else + { + if (event < 0) + event = fRawReader->GetNumberOfEvents() + event; + } } else { - if (event < 0) - event = fRawReader->GetNumberOfEvents() + event; - } - } - else - { - throw (kEH + "neither RunLoader, ESD nor Raw loaded."); - } - if (event < 0 || event > maxEvent) - { - throw (kEH + Form("event %d not present, available range [%d, %d].", - event, 0, maxEvent)); - } - - TString sysInfoHeader; - sysInfoHeader.Form("AliEveEventManager::GotoEvent(%d) - ", event); - AliSysInfo::AddStamp(sysInfoHeader + "Start"); - - TEveManager::TRedrawDisabler rd(gEve); - gEve->Redraw3D(kFALSE, kTRUE); // Enforce drop of all logicals. - - // !!! MT this is somewhat brutal; at least optionally, one could be - // a bit gentler, checking for objs owning their external refs and having - // additinal parents. - gEve->GetViewers()->DeleteAnnotations(); - fTransients->DestroyElements(); - for (TEveElement::List_i i = fTransientLists->BeginChildren(); - i != fTransientLists->EndChildren(); ++i) - { - (*i)->DestroyElements(); - } - DestroyElements(); - - AliSysInfo::AddStamp(sysInfoHeader + "PostDestroy"); - - if (fESDTree) { - if (fESDTree->GetEntry(event) <= 0) - throw (kEH + "failed getting required event from ESD."); - - if (fESDfriendExists) - fESD->SetESDfriend(fESDfriend); - } - - if (fAODTree) { - if (fAODTree->GetEntry(event) <= 0) - throw (kEH + "failed getting required event from AOD."); - } - - if (fRunLoader) { - if (fRunLoader->GetEvent(event) != 0) - throw (kEH + "failed getting required event."); - } - - if (fRawReader) - { - // AliRawReader::GotoEvent(Int_t) works for AliRawReaderRoot/Chain. - if (fRawReader->GotoEvent(event) == kFALSE) - { - // Use fallback method - iteration with NextEvent(). - Int_t rawEv = fEventId; - if (event < rawEv) - { - fRawReader->RewindEvents(); - rawEv = -1; - } - - while (rawEv < event) - { - if ( ! fRawReader->NextEvent()) + throw (kEH + "neither RunLoader, ESD nor Raw loaded."); + } + if (event < 0 || event > maxEvent) + { + throw (kEH + Form("event %d not present, available range [%d, %d].", + event, 0, maxEvent)); + } + + TString sysInfoHeader; + sysInfoHeader.Form("AliEveEventManager::GotoEvent(%d) - ", event); + AliSysInfo::AddStamp(sysInfoHeader + "Start"); + + TEveManager::TRedrawDisabler rd(gEve); + gEve->Redraw3D(kFALSE, kTRUE); // Enforce drop of all logicals. + + // !!! MT this is somewhat brutal; at least optionally, one could be + // a bit gentler, checking for objs owning their external refs and having + // additinal parents. + gEve->GetViewers()->DeleteAnnotations(); + fTransients->DestroyElements(); + for (TEveElement::List_i i = fTransientLists->BeginChildren(); + i != fTransientLists->EndChildren(); ++i) + { + (*i)->DestroyElements(); + } + DestroyElements(); + + AliSysInfo::AddStamp(sysInfoHeader + "PostDestroy"); + + if (fESDTree) { + if (fESDTree->GetEntry(event) <= 0) + throw (kEH + "failed getting required event from ESD."); + + if (fESDfriendExists) + fESD->SetESDfriend(fESDfriend); + } + + if (fAODTree) { + if (fAODTree->GetEntry(event) <= 0) + throw (kEH + "failed getting required event from AOD."); + } + + if (fRunLoader) { + if (fRunLoader->GetEvent(event) != 0) + throw (kEH + "failed getting required event."); + } + + if (fRawReader) + { + // AliRawReader::GotoEvent(Int_t) works for AliRawReaderRoot/Chain. + if (fRawReader->GotoEvent(event) == kFALSE) { - fRawReader->RewindEvents(); - fEventId = -1; - throw (kEH + Form("Error going to next raw-event from event %d.", rawEv)); + // Use fallback method - iteration with NextEvent(). + Int_t rawEv = fEventId; + if (event < rawEv) + { + fRawReader->RewindEvents(); + rawEv = -1; + } + + while (rawEv < event) + { + if ( ! fRawReader->NextEvent()) + { + fRawReader->RewindEvents(); + fEventId = -1; + throw (kEH + Form("Error going to next raw-event from event %d.", rawEv)); + } + ++rawEv; + } + Warning(kEH, "Loaded raw-event %d with fallback method.\n", rawEv); } - ++rawEv; - } - Warning(kEH, "Loaded raw-event %d with fallback method.\n", rawEv); } - } - fHasEvent = kTRUE; - fEventId = event; - if (this == fgMaster) - { - SetName(Form("Event %d", fEventId)); - ElementChanged(); - } + fHasEvent = kTRUE; + fEventId = event; + if (this == fgMaster) + { + SetName(Form("Event %d", fEventId)); + ElementChanged(); + } - AliSysInfo::AddStamp(sysInfoHeader + "PostLoadEvent"); + AliSysInfo::AddStamp(sysInfoHeader + "PostLoadEvent"); - AfterNewEventLoaded(); + AfterNewEventLoaded(); - AliSysInfo::AddStamp(sysInfoHeader + "PostUserActions"); + AliSysInfo::AddStamp(sysInfoHeader + "PostUserActions"); } void AliEveEventManager::Timeout() { - Emit("Timeout()"); + Emit("Timeout()"); } void AliEveEventManager::NextEvent() { - // Loads next event. - // Does magick needed for online display when under external event control. + // Loads next event. + // Does magick needed for online display when under external event control. - static const TEveException kEH("AliEveEventManager::NextEvent "); + static const TEveException kEH("AliEveEventManager::NextEvent "); - if (fAutoLoadTimerRunning) - { - throw (kEH + "Event auto-load timer is running."); - } + if (fAutoLoadTimerRunning) + { + throw (kEH + "Event auto-load timer is running."); + } - if (fExternalCtrl) - { - // !!! This should really go somewhere else. It is done in GotoEvent(), - // so here we should do it in SetEvent(). - DestroyElements(); - gSystem->ExitLoop(); + if (fExternalCtrl) + { + // !!! This should really go somewhere else. It is done in GotoEvent(), + // so here we should do it in SetEvent(). + DestroyElements(); + gSystem->ExitLoop(); - } - else if (fESDTree) - { - Int_t nextevent=0; - if (fPEventSelector->FindNext(nextevent)) + } + else if (fESDTree) { - GotoEvent(nextevent); + Int_t nextevent=0; + if (fPEventSelector->FindNext(nextevent)) + { + GotoEvent(nextevent); + } + } + else if (fEventId < GetMaxEventId(kTRUE)) + { + GotoEvent(fEventId + 1); } - } - else if (fEventId < GetMaxEventId(kTRUE)) - { - GotoEvent(fEventId + 1); - } } void AliEveEventManager::PrevEvent() { - // Loads previous event. - - static const TEveException kEH("AliEveEventManager::PrevEvent "); - - if (fAutoLoadTimerRunning) - { - throw (kEH + "Event auto-load timer is running."); - } - if (fExternalCtrl) - { - throw (kEH + "Event-loop is under external control."); - } - - if (fESDTree) - { - Int_t nextevent=0; - if (fPEventSelector->FindPrev(nextevent)) - { - GotoEvent(nextevent); - } - } - else if (fEventId > 0) - { - GotoEvent(fEventId - 1); - } + // Loads previous event. + + static const TEveException kEH("AliEveEventManager::PrevEvent "); + + if (fAutoLoadTimerRunning) + { + throw (kEH + "Event auto-load timer is running."); + } + if (fExternalCtrl) + { + throw (kEH + "Event-loop is under external control."); + } + + if (fESDTree) + { + Int_t nextevent=0; + if (fPEventSelector->FindPrev(nextevent)) + { + GotoEvent(nextevent); + } + } + else if (fEventId > 0) + { + GotoEvent(fEventId - 1); + } } void AliEveEventManager::Close() { - // Close the event data-files and delete ESD, ESDfriend, run-loader - // and raw-reader. + // Close the event data-files and delete ESD, ESDfriend, run-loader + // and raw-reader. - static const TEveException kEH("AliEveEventManager::Close "); + static const TEveException kEH("AliEveEventManager::Close "); - if (!fIsOpen) - { - throw (kEH + "Event-files not opened."); - } + if (!fIsOpen) + { + throw (kEH + "Event-files not opened."); + } - if (fAutoLoadTimerRunning) - StopAutoLoadTimer(); + if (fAutoLoadTimerRunning) + StopAutoLoadTimer(); - if (fESDTree) { - delete fESD; fESD = 0; - // delete fESDfriend; // friend tree is deleted with the tree - fESDfriend = 0; - fESDfriendExists = kFALSE; + if (fESDTree) { + delete fESD; fESD = 0; + // delete fESDfriend; // friend tree is deleted with the tree + fESDfriend = 0; + fESDfriendExists = kFALSE; - delete fESDTree; fESDTree = 0; - delete fESDFile; fESDFile = 0; - } + delete fESDTree; fESDTree = 0; + delete fESDFile; fESDFile = 0; + } - if (fAODTree) { - delete fAOD; fAOD = 0; + if (fAODTree) { + delete fAOD; fAOD = 0; - delete fAODTree; fAODTree = 0; - delete fAODFile; fAODFile = 0; - } + delete fAODTree; fAODTree = 0; + delete fAODFile; fAODFile = 0; + } - if (fRunLoader) { - delete fRunLoader; fRunLoader = 0; - } + if (fRunLoader) { + delete fRunLoader; fRunLoader = 0; + } - if (fRawReader) { - delete fRawReader; fRawReader = 0; - } + if (fRawReader) { + delete fRawReader; fRawReader = 0; + } - fEventId = -1; - fIsOpen = kFALSE; - fHasEvent = kFALSE; + fEventId = -1; + fIsOpen = kFALSE; + fHasEvent = kFALSE; } @@ -1009,300 +1011,300 @@ void AliEveEventManager::Close() Int_t AliEveEventManager::CurrentEventId() { - // Return current event-id. + // Return current event-id. - static const TEveException kEH("AliEveEventManager::CurrentEventId "); + static const TEveException kEH("AliEveEventManager::CurrentEventId "); - if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) - throw (kEH + "ALICE event not ready."); - return fgCurrent->GetEventId(); + if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) + throw (kEH + "ALICE event not ready."); + return fgCurrent->GetEventId(); } Bool_t AliEveEventManager::HasRunLoader() { - // Check if AliRunLoader is initialized. + // Check if AliRunLoader is initialized. - return fgCurrent && fgCurrent->fHasEvent && fgCurrent->fRunLoader; + return fgCurrent && fgCurrent->fHasEvent && fgCurrent->fRunLoader; } Bool_t AliEveEventManager::HasESD() { - // Check if AliESDEvent is initialized. + // Check if AliESDEvent is initialized. - return fgCurrent && fgCurrent->fHasEvent && fgCurrent->fESD; + return fgCurrent && fgCurrent->fHasEvent && fgCurrent->fESD; } Bool_t AliEveEventManager::HasESDfriend() { - // Check if AliESDfriend is initialized. + // Check if AliESDfriend is initialized. - return fgCurrent && fgCurrent->fHasEvent && fgCurrent->fESDfriend; + return fgCurrent && fgCurrent->fHasEvent && fgCurrent->fESDfriend; } Bool_t AliEveEventManager::HasAOD() { - // Check if AliESDEvent is initialized. + // Check if AliESDEvent is initialized. - return fgCurrent && fgCurrent->fHasEvent && fgCurrent->fAOD; + return fgCurrent && fgCurrent->fHasEvent && fgCurrent->fAOD; } Bool_t AliEveEventManager::HasRawReader() { - // Check if raw-reader is initialized. + // Check if raw-reader is initialized. - return fgCurrent && fgCurrent->fHasEvent && fgCurrent->fRawReader; + return fgCurrent && fgCurrent->fHasEvent && fgCurrent->fRawReader; } AliRunLoader* AliEveEventManager::AssertRunLoader() { - // Make sure AliRunLoader is initialized and return it. - // Throws exception in case run-loader is not available. - // Static utility for macros. + // Make sure AliRunLoader is initialized and return it. + // Throws exception in case run-loader is not available. + // Static utility for macros. - static const TEveException kEH("AliEveEventManager::AssertRunLoader "); + static const TEveException kEH("AliEveEventManager::AssertRunLoader "); - if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) - throw (kEH + "ALICE event not ready."); - if (fgCurrent->fRunLoader == 0) - throw (kEH + "AliRunLoader not initialised."); - return fgCurrent->fRunLoader; + if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) + throw (kEH + "ALICE event not ready."); + if (fgCurrent->fRunLoader == 0) + throw (kEH + "AliRunLoader not initialised."); + return fgCurrent->fRunLoader; } AliESDEvent* AliEveEventManager::AssertESD() { - // Make sure AliESDEvent is initialized and return it. - // Throws exception in case ESD is not available. - // Static utility for macros. + // Make sure AliESDEvent is initialized and return it. + // Throws exception in case ESD is not available. + // Static utility for macros. - static const TEveException kEH("AliEveEventManager::AssertESD "); + static const TEveException kEH("AliEveEventManager::AssertESD "); - if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) - throw (kEH + "ALICE event not ready."); - if (fgCurrent->fESD == 0) - throw (kEH + "AliESD not initialised."); - return fgCurrent->fESD; + if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) + throw (kEH + "ALICE event not ready."); + if (fgCurrent->fESD == 0) + throw (kEH + "AliESD not initialised."); + return fgCurrent->fESD; } AliESDfriend* AliEveEventManager::AssertESDfriend() { - // Make sure AliESDfriend is initialized and return it. - // Throws exception in case ESDfriend-loader is not available. - // Static utility for macros. + // Make sure AliESDfriend is initialized and return it. + // Throws exception in case ESDfriend-loader is not available. + // Static utility for macros. - static const TEveException kEH("AliEveEventManager::AssertESDfriend "); + static const TEveException kEH("AliEveEventManager::AssertESDfriend "); - if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) - throw (kEH + "ALICE event not ready."); - if (fgCurrent->fESDfriend == 0) - throw (kEH + "AliESDfriend not initialised."); - return fgCurrent->fESDfriend; + if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) + throw (kEH + "ALICE event not ready."); + if (fgCurrent->fESDfriend == 0) + throw (kEH + "AliESDfriend not initialised."); + return fgCurrent->fESDfriend; } AliAODEvent* AliEveEventManager::AssertAOD() { - // Make sure AliAODEvent is initialized and return it. - // Throws exception in case AOD is not available. - // Static utility for macros. + // Make sure AliAODEvent is initialized and return it. + // Throws exception in case AOD is not available. + // Static utility for macros. - static const TEveException kEH("AliEveEventManager::AssertAOD "); + static const TEveException kEH("AliEveEventManager::AssertAOD "); - if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) - throw (kEH + "ALICE event not ready."); - if (fgCurrent->fAOD == 0) - throw (kEH + "AliAOD not initialised."); - return fgCurrent->fAOD; + if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) + throw (kEH + "ALICE event not ready."); + if (fgCurrent->fAOD == 0) + throw (kEH + "AliAOD not initialised."); + return fgCurrent->fAOD; } AliRawReader* AliEveEventManager::AssertRawReader() { - // Make sure raw-reader is initialized and return it. + // Make sure raw-reader is initialized and return it. - static const TEveException kEH("AliEveEventManager::AssertRawReader "); + static const TEveException kEH("AliEveEventManager::AssertRawReader "); - if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) - throw (kEH + "ALICE event not ready."); - if (fgCurrent->fRawReader == 0) - throw (kEH + "RawReader not ready."); + if (fgCurrent == 0 || fgCurrent->fHasEvent == kFALSE) + throw (kEH + "ALICE event not ready."); + if (fgCurrent->fRawReader == 0) + throw (kEH + "RawReader not ready."); - return fgCurrent->fRawReader; + return fgCurrent->fRawReader; } //============================================================================== AliMagF* AliEveEventManager::AssertMagField() { - // Make sure AliMagF is initialized and returns it. - // Throws exception in case magnetic field is not available. - // Static utility for macros. + // Make sure AliMagF is initialized and returns it. + // Throws exception in case magnetic field is not available. + // Static utility for macros. - static const TEveException kEH("AliEveEventManager::AssertMagField "); - - if (fgMagField) - return fgMagField; + static const TEveException kEH("AliEveEventManager::AssertMagField "); + + if (fgMagField) + return fgMagField; + + if (TGeoGlobalMagField::Instance()->GetField()) + { + fgMagField = dynamic_cast(TGeoGlobalMagField::Instance()->GetField()); + if (fgMagField == 0) + throw kEH + "Global field set, but it is not AliMagF."; + return fgMagField; + } + + if (!fgGRPLoaded) + { + InitGRP(); + } + + if (TGeoGlobalMagField::Instance()->GetField()) + { + fgMagField = dynamic_cast(TGeoGlobalMagField::Instance()->GetField()); + if (fgMagField == 0) + throw kEH + "Global field set, but it is not AliMagF."; + } + else + { + throw kEH + "Could not initialize magnetic field."; + } - if (TGeoGlobalMagField::Instance()->GetField()) - { - fgMagField = dynamic_cast(TGeoGlobalMagField::Instance()->GetField()); - if (fgMagField == 0) - throw kEH + "Global field set, but it is not AliMagF."; return fgMagField; - } - - if (!fgGRPLoaded) - { - InitGRP(); - } - - if (TGeoGlobalMagField::Instance()->GetField()) - { - fgMagField = dynamic_cast(TGeoGlobalMagField::Instance()->GetField()); - if (fgMagField == 0) - throw kEH + "Global field set, but it is not AliMagF."; - } - else - { - throw kEH + "Could not initialize magnetic field."; - } - - return fgMagField; } TGeoManager* AliEveEventManager::AssertGeometry() { - // Make sure AliGeomManager is initialized and returns the - // corresponding TGeoManger. - // gGeoManager is set to the return value. - // Throws exception if geometry can not be loaded or if it is not - // available and the TGeoManager is locked. - // Static utility for macros. + // Make sure AliGeomManager is initialized and returns the + // corresponding TGeoManger. + // gGeoManager is set to the return value. + // Throws exception if geometry can not be loaded or if it is not + // available and the TGeoManager is locked. + // Static utility for macros. - static const TEveException kEH("AliEveEventManager::AssertGeometry "); + static const TEveException kEH("AliEveEventManager::AssertGeometry "); - if (AliGeomManager::GetGeometry() == 0) - { - if (TGeoManager::IsLocked()) - throw (kEH + "geometry is not loaded but TGeoManager is locked."); - - gGeoManager = 0; - AliGeomManager::LoadGeometry(); - if ( ! AliGeomManager::GetGeometry()) + if (AliGeomManager::GetGeometry() == 0) { - throw (kEH + "can not load geometry."); - } - if ( ! AliGeomManager::ApplyAlignObjsFromCDB("ITS TPC TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO ACORDE")) - { - ::Warning(kEH, "mismatch of alignable volumes. Proceeding."); - // throw (kEH + "could not apply align objs."); + if (TGeoManager::IsLocked()) + throw (kEH + "geometry is not loaded but TGeoManager is locked."); + + gGeoManager = 0; + AliGeomManager::LoadGeometry(); + if ( ! AliGeomManager::GetGeometry()) + { + throw (kEH + "can not load geometry."); + } + if ( ! AliGeomManager::ApplyAlignObjsFromCDB("ITS TPC TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO ACORDE")) + { + ::Warning(kEH, "mismatch of alignable volumes. Proceeding."); + // throw (kEH + "could not apply align objs."); + } + AliGeomManager::GetGeometry()->DefaultColors(); } - AliGeomManager::GetGeometry()->DefaultColors(); - } - gGeoManager = AliGeomManager::GetGeometry(); - return gGeoManager; + gGeoManager = AliGeomManager::GetGeometry(); + return gGeoManager; } AliRecoParam* AliEveEventManager::AssertRecoParams() { - if(!fgRecoParam) - InitRecoParam(); - - return fgRecoParam; + if(!fgRecoParam) + InitRecoParam(); + + return fgRecoParam; } Bool_t AliEveEventManager::InitRecoParam() { -// This is mostly a reap-off from reconstruction -// The method accesses OCDB and retrieves all -// the available reco-param objects from there. - - fgRecoParam = new AliRecoParam; - const Int_t kNDetectors = 14; - - static const TEveException kEH("AliEveEventManager::InitRecoParam "); - - Bool_t isOK = kTRUE; - - if (fgRecoParam->GetDetRecoParamArray(kNDetectors)) { - ::Info(kEH, "Using custom GRP reconstruction parameters"); - } - else { - ::Info(kEH, "Loading GRP reconstruction parameter objects"); - - AliCDBPath path("GRP","Calib","RecoParam"); - AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath()); - if(!entry){ - ::Warning(kEH, "Couldn't find GRP RecoParam entry in OCDB"); - isOK = kFALSE; + // This is mostly a reap-off from reconstruction + // The method accesses OCDB and retrieves all + // the available reco-param objects from there. + + fgRecoParam = new AliRecoParam; + const Int_t kNDetectors = 14; + + static const TEveException kEH("AliEveEventManager::InitRecoParam "); + + Bool_t isOK = kTRUE; + + if (fgRecoParam->GetDetRecoParamArray(kNDetectors)) { + ::Info(kEH, "Using custom GRP reconstruction parameters"); } else { - TObject *recoParamObj = entry->GetObject(); - if (dynamic_cast(recoParamObj)) { - // GRP has a normal TobjArray of AliDetectorRecoParam objects - // Registering them in AliRecoParam - fgRecoParam->AddDetRecoParamArray(kNDetectors,dynamic_cast(recoParamObj)); - } - else if (dynamic_cast(recoParamObj)) { - // GRP has only onse set of reco parameters - // Registering it in AliRecoParam - ::Info(kEH, "Single set of GRP reconstruction parameters found"); - dynamic_cast(recoParamObj)->SetAsDefault(); - fgRecoParam->AddDetRecoParam(kNDetectors,dynamic_cast(recoParamObj)); - } - else { - ::Error(kEH, "No valid GRP RecoParam object found in the OCDB"); - isOK = kFALSE; - } - entry->SetOwner(0); - } - } - - const char* fgkDetectorName[kNDetectors] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD", "ZDC", "PMD", "T0", "VZERO", "ACORDE" }; - - - for (Int_t iDet = 0; iDet < kNDetectors; iDet++) { - - if (fgRecoParam->GetDetRecoParamArray(iDet)) { - ::Info(kEH, Form("Using custom reconstruction parameters for detector %s",fgkDetectorName[iDet])); - continue; - } - - ::Info(kEH, Form("Loading reconstruction parameter objects for detector %s",fgkDetectorName[iDet])); - - AliCDBPath path(fgkDetectorName[iDet],"Calib","RecoParam"); - AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath()); - if(!entry){ - ::Warning(kEH, Form("Couldn't find RecoParam entry in OCDB for detector %s",fgkDetectorName[iDet])); - isOK = kFALSE; + ::Info(kEH, "Loading GRP reconstruction parameter objects"); + + AliCDBPath path("GRP","Calib","RecoParam"); + AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath()); + if(!entry){ + ::Warning(kEH, "Couldn't find GRP RecoParam entry in OCDB"); + isOK = kFALSE; + } + else { + TObject *recoParamObj = entry->GetObject(); + if (dynamic_cast(recoParamObj)) { + // GRP has a normal TobjArray of AliDetectorRecoParam objects + // Registering them in AliRecoParam + fgRecoParam->AddDetRecoParamArray(kNDetectors,dynamic_cast(recoParamObj)); + } + else if (dynamic_cast(recoParamObj)) { + // GRP has only onse set of reco parameters + // Registering it in AliRecoParam + ::Info(kEH, "Single set of GRP reconstruction parameters found"); + dynamic_cast(recoParamObj)->SetAsDefault(); + fgRecoParam->AddDetRecoParam(kNDetectors,dynamic_cast(recoParamObj)); + } + else { + ::Error(kEH, "No valid GRP RecoParam object found in the OCDB"); + isOK = kFALSE; + } + entry->SetOwner(0); + } } - else { - TObject *recoParamObj = entry->GetObject(); - if (dynamic_cast(recoParamObj)) { - // The detector has a normal TobjArray of AliDetectorRecoParam objects - // Registering them in AliRecoParam - fgRecoParam->AddDetRecoParamArray(iDet,dynamic_cast(recoParamObj)); - } - else if (dynamic_cast(recoParamObj)) { - // The detector has only onse set of reco parameters - // Registering it in AliRecoParam - ::Info(kEH, Form("Single set of reconstruction parameters found for detector %s",fgkDetectorName[iDet])); - dynamic_cast(recoParamObj)->SetAsDefault(); - fgRecoParam->AddDetRecoParam(iDet,dynamic_cast(recoParamObj)); - } - else { - ::Error(kEH, Form("No valid RecoParam object found in the OCDB for detector %s",fgkDetectorName[iDet])); - isOK = kFALSE; - } - entry->SetOwner(0); - - } - } - - if(!isOK) { - delete fgRecoParam; - fgRecoParam = 0; - } - - return isOK; + + const char* fgkDetectorName[kNDetectors] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD", "ZDC", "PMD", "T0", "VZERO", "ACORDE" }; + + + for (Int_t iDet = 0; iDet < kNDetectors; iDet++) { + + if (fgRecoParam->GetDetRecoParamArray(iDet)) { + ::Info(kEH, Form("Using custom reconstruction parameters for detector %s",fgkDetectorName[iDet])); + continue; + } + + ::Info(kEH, Form("Loading reconstruction parameter objects for detector %s",fgkDetectorName[iDet])); + + AliCDBPath path(fgkDetectorName[iDet],"Calib","RecoParam"); + AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath()); + if(!entry){ + ::Warning(kEH, Form("Couldn't find RecoParam entry in OCDB for detector %s",fgkDetectorName[iDet])); + isOK = kFALSE; + } + else { + TObject *recoParamObj = entry->GetObject(); + if (dynamic_cast(recoParamObj)) { + // The detector has a normal TobjArray of AliDetectorRecoParam objects + // Registering them in AliRecoParam + fgRecoParam->AddDetRecoParamArray(iDet,dynamic_cast(recoParamObj)); + } + else if (dynamic_cast(recoParamObj)) { + // The detector has only onse set of reco parameters + // Registering it in AliRecoParam + ::Info(kEH, Form("Single set of reconstruction parameters found for detector %s",fgkDetectorName[iDet])); + dynamic_cast(recoParamObj)->SetAsDefault(); + fgRecoParam->AddDetRecoParam(iDet,dynamic_cast(recoParamObj)); + } + else { + ::Error(kEH, Form("No valid RecoParam object found in the OCDB for detector %s",fgkDetectorName[iDet])); + isOK = kFALSE; + } + entry->SetOwner(0); + + } + } + + if(!isOK) { + delete fgRecoParam; + fgRecoParam = 0; + } + + return isOK; } @@ -1310,75 +1312,75 @@ Bool_t AliEveEventManager::InitRecoParam() AliEveEventManager* AliEveEventManager::AddDependentManager(const TString& name, const TString& path) { - // Create and attach a dependent event-manager. - // It is not added into eve list tree. - - static const TEveException kEH("AliEveEventManager::AddDependentManager "); - - if (fgMaster == 0) - throw(kEH + "Master event-manager must be instantiated first."); - - if (fgMaster->fSubManagers == 0) - { - fgMaster->fSubManagers = new TList; - fgMaster->fSubManagers->SetOwner(kTRUE); - } - - AliEveEventManager* new_mgr = 0; - fgCurrent = 0; - try - { - new_mgr = new AliEveEventManager(name, path, fgMaster->fEventId); - fgMaster->fSubManagers->Add(new_mgr); - } - catch (TEveException& exc) - { - ::Error(kEH, "Creation of new event-manager failed: '%s'.", exc.Data()); - } - fgCurrent = fgMaster; - - return new_mgr; + // Create and attach a dependent event-manager. + // It is not added into eve list tree. + + static const TEveException kEH("AliEveEventManager::AddDependentManager "); + + if (fgMaster == 0) + throw(kEH + "Master event-manager must be instantiated first."); + + if (fgMaster->fSubManagers == 0) + { + fgMaster->fSubManagers = new TList; + fgMaster->fSubManagers->SetOwner(kTRUE); + } + + AliEveEventManager* new_mgr = 0; + fgCurrent = 0; + try + { + new_mgr = new AliEveEventManager(name, path, fgMaster->fEventId); + fgMaster->fSubManagers->Add(new_mgr); + } + catch (TEveException& exc) + { + ::Error(kEH, "Creation of new event-manager failed: '%s'.", exc.Data()); + } + fgCurrent = fgMaster; + + return new_mgr; } AliEveEventManager* AliEveEventManager::GetDependentManager(const TString& name) { - // Get a dependant manager by name. - // This will not change the current manager, use helper class - // AliEveEventManager::CurrentChanger for that. + // Get a dependant manager by name. + // This will not change the current manager, use helper class + // AliEveEventManager::CurrentChanger for that. - static const TEveException kEH("AliEveEventManager::GetDependentManager "); + static const TEveException kEH("AliEveEventManager::GetDependentManager "); - if (fgMaster == 0) - throw(kEH + "Master event-manager must be instantiated first."); + if (fgMaster == 0) + throw(kEH + "Master event-manager must be instantiated first."); - if (fgMaster->fSubManagers == 0) - return 0; + if (fgMaster->fSubManagers == 0) + return 0; - return dynamic_cast(fgMaster->fSubManagers->FindObject(name)); + return dynamic_cast(fgMaster->fSubManagers->FindObject(name)); } AliEveEventManager* AliEveEventManager::GetMaster() { - // Get master event-manager. + // Get master event-manager. - return fgMaster; + return fgMaster; } AliEveEventManager* AliEveEventManager::GetCurrent() { - // Get current event-manager. + // Get current event-manager. - return fgCurrent; + return fgCurrent; } void AliEveEventManager::RegisterTransient(TEveElement* element) { - GetCurrent()->fTransients->AddElement(element); + GetCurrent()->fTransients->AddElement(element); } void AliEveEventManager::RegisterTransientList(TEveElement* element) { - GetCurrent()->fTransientLists->AddElement(element); + GetCurrent()->fTransientLists->AddElement(element); } //------------------------------------------------------------------------------ @@ -1387,87 +1389,87 @@ void AliEveEventManager::RegisterTransientList(TEveElement* element) void AliEveEventManager::SetAutoLoadTime(Float_t time) { - // Set the auto-load time in seconds + // Set the auto-load time in seconds - fAutoLoadTime = time; + fAutoLoadTime = time; } void AliEveEventManager::SetAutoLoad(Bool_t autoLoad) { - // Set the automatic event loading mode - - static const TEveException kEH("AliEveEventManager::SetAutoLoad "); - - if (fAutoLoad == autoLoad) - { - Warning(kEH, "Setting autoload to the same value as before - %s. Ignoring.", fAutoLoad ? "true" : "false"); - return; - } - - fAutoLoad = autoLoad; - if (fAutoLoad) - { - StartAutoLoadTimer(); - } - else - { - StopAutoLoadTimer(); - } + // Set the automatic event loading mode + + static const TEveException kEH("AliEveEventManager::SetAutoLoad "); + + if (fAutoLoad == autoLoad) + { + Warning(kEH, "Setting autoload to the same value as before - %s. Ignoring.", fAutoLoad ? "true" : "false"); + return; + } + + fAutoLoad = autoLoad; + if (fAutoLoad) + { + StartAutoLoadTimer(); + } + else + { + StopAutoLoadTimer(); + } } void AliEveEventManager::SetTrigSel(Int_t trig) { - static const TEveException kEH("AliEveEventManager::SetTrigSel "); - - if (!fRawReader) - { - Warning(kEH, "No Raw-reader exists. Ignoring the call."); - return; - } - else - { - ULong64_t trigMask = 0; - if (trig >= 0) trigMask = (1ull << trig); - Info(kEH,"Trigger selection: 0x%llx",trigMask); - fRawReader->SelectEvents(-1,trigMask,NULL); - } + static const TEveException kEH("AliEveEventManager::SetTrigSel "); + + if (!fRawReader) + { + Warning(kEH, "No Raw-reader exists. Ignoring the call."); + return; + } + else + { + ULong64_t trigMask = 0; + if (trig >= 0) trigMask = (1ull << trig); + Info(kEH,"Trigger selection: 0x%llx",trigMask); + fRawReader->SelectEvents(-1,trigMask,NULL); + } } void AliEveEventManager::StartAutoLoadTimer() { - // Start the auto-load timer. + // Start the auto-load timer. - fAutoLoadTimer->SetTime((Long_t)(1000*fAutoLoadTime)); - fAutoLoadTimer->Reset(); - fAutoLoadTimer->TurnOn(); - fAutoLoadTimerRunning = kTRUE; + fAutoLoadTimer->SetTime((Long_t)(1000*fAutoLoadTime)); + fAutoLoadTimer->Reset(); + fAutoLoadTimer->TurnOn(); + fAutoLoadTimerRunning = kTRUE; } void AliEveEventManager::StopAutoLoadTimer() { - // Stop the auto-load timer. + // Stop the auto-load timer. - fAutoLoadTimerRunning = kFALSE; - fAutoLoadTimer->TurnOff(); + fAutoLoadTimerRunning = kFALSE; + fAutoLoadTimer->TurnOff(); } void AliEveEventManager::AutoLoadNextEvent() { - // Called from auto-load timer, so it has to be public. - // Do NOT call it directly. + // Called from auto-load timer, so it has to be public. + // Do NOT call it directly. - static const TEveException kEH("AliEveEventManager::AutoLoadNextEvent "); + static const TEveException kEH("AliEveEventManager::AutoLoadNextEvent "); - if ( ! fAutoLoadTimerRunning || ! fAutoLoadTimer->HasTimedOut()) - { - Warning(kEH, "Called unexpectedly - ignoring the call. Should ONLY be called from an internal timer."); - return; - } + if ( ! fAutoLoadTimerRunning || ! fAutoLoadTimer->HasTimedOut()) + { + Warning(kEH, "Called unexpectedly - ignoring the call. Should ONLY be called from an internal timer."); + return; + } - StopAutoLoadTimer(); - NextEvent(); - if (fAutoLoad && !fExternalCtrl) - StartAutoLoadTimer(); + StopAutoLoadTimer(); + NextEvent(); + if (fAutoLoad && !fExternalCtrl) + StartAutoLoadTimer(); } //------------------------------------------------------------------------------ @@ -1476,56 +1478,56 @@ void AliEveEventManager::AutoLoadNextEvent() void AliEveEventManager::AfterNewEventLoaded() { - // Execute registered macros and commands. - // At the end emit NewEventLoaded signal. - // - // Virtual from TEveEventManager. + // Execute registered macros and commands. + // At the end emit NewEventLoaded signal. + // + // Virtual from TEveEventManager. - static const TEveException kEH("AliEveEventManager::AfterNewEventLoaded "); + static const TEveException kEH("AliEveEventManager::AfterNewEventLoaded "); - NewEventDataLoaded(); + NewEventDataLoaded(); - if (fExecutor) - fExecutor->ExecMacros(); + if (fExecutor) + fExecutor->ExecMacros(); - TEveEventManager::AfterNewEventLoaded(); + TEveEventManager::AfterNewEventLoaded(); - NewEventLoaded(); + NewEventLoaded(); - if (this == fgMaster && fSubManagers != 0) - { - TIter next(fSubManagers); - while ((fgCurrent = dynamic_cast(next())) != 0) + if (this == fgMaster && fSubManagers != 0) { - gEve->SetCurrentEvent(fgCurrent); - try - { - fgCurrent->GotoEvent(fEventId); - } - catch (TEveException& exc) - { - // !!! Should somehow tag / disable / remove it? - Error(kEH, "Getting event %d for sub-event-manager '%s' failed: '%s'.", - fEventId, fgCurrent->GetName(), exc.Data()); - } + TIter next(fSubManagers); + while ((fgCurrent = dynamic_cast(next())) != 0) + { + gEve->SetCurrentEvent(fgCurrent); + try + { + fgCurrent->GotoEvent(fEventId); + } + catch (TEveException& exc) + { + // !!! Should somehow tag / disable / remove it? + Error(kEH, "Getting event %d for sub-event-manager '%s' failed: '%s'.", + fEventId, fgCurrent->GetName(), exc.Data()); + } + } + fgCurrent = fgMaster; + gEve->SetCurrentEvent(fgMaster); } - fgCurrent = fgMaster; - gEve->SetCurrentEvent(fgMaster); - } } void AliEveEventManager::NewEventDataLoaded() { - // Emit NewEventDataLoaded signal. + // Emit NewEventDataLoaded signal. - Emit("NewEventDataLoaded()"); + Emit("NewEventDataLoaded()"); } void AliEveEventManager::NewEventLoaded() { - // Emit NewEventLoaded signal. + // Emit NewEventLoaded signal. - Emit("NewEventLoaded()"); + Emit("NewEventLoaded()"); } @@ -1535,206 +1537,206 @@ void AliEveEventManager::NewEventLoaded() const AliEventInfo* AliEveEventManager::GetEventInfo() { - // Fill the event info object - - AliCentralTrigger *aCTP = NULL; - if (fRawReader) { - fEventInfo.SetEventType(fRawReader->GetType()); - - ULong64_t mask = fRawReader->GetClassMask(); - fEventInfo.SetTriggerMask(mask); - UInt_t clmask = fRawReader->GetDetectorPattern()[0]; - fEventInfo.SetTriggerCluster(AliDAQ::ListOfTriggeredDetectors(clmask)); + // Fill the event info object + + AliCentralTrigger *aCTP = NULL; + if (fRawReader) { + fEventInfo.SetEventType(fRawReader->GetType()); + + ULong64_t mask = fRawReader->GetClassMask(); + fEventInfo.SetTriggerMask(mask); + UInt_t clmask = fRawReader->GetDetectorPattern()[0]; + fEventInfo.SetTriggerCluster(AliDAQ::ListOfTriggeredDetectors(clmask)); + + aCTP = new AliCentralTrigger(); + TString configstr(""); + if (!aCTP->LoadConfiguration(configstr)) { // Load CTP config from OCDB + AliError("No trigger configuration found in OCDB! The trigger configuration information will not be used!"); + delete aCTP; + return 0; + } + aCTP->SetClassMask(mask); + aCTP->SetClusterMask(clmask); + + if (fRunLoader) { + AliCentralTrigger* rlCTP = fRunLoader->GetTrigger(); + if (rlCTP) { + rlCTP->SetClassMask(mask); + rlCTP->SetClusterMask(clmask); + } + } + } + else { + fEventInfo.SetEventType(AliRawEventHeaderBase::kPhysicsEvent); + + if (fRunLoader && (!fRunLoader->LoadTrigger())) { + aCTP = fRunLoader->GetTrigger(); + fEventInfo.SetTriggerMask(aCTP->GetClassMask()); + // get inputs from actp - just get + AliESDHeader* esdheader = fESD->GetHeader(); + esdheader->SetL0TriggerInputs(aCTP->GetL0TriggerInputs()); + esdheader->SetL1TriggerInputs(aCTP->GetL1TriggerInputs()); + esdheader->SetL2TriggerInputs(aCTP->GetL2TriggerInputs()); + fEventInfo.SetTriggerCluster(AliDAQ::ListOfTriggeredDetectors(aCTP->GetClusterMask())); + } + else { + AliWarning("No trigger can be loaded! The trigger information will not be used!"); + return 0; + } + } - aCTP = new AliCentralTrigger(); - TString configstr(""); - if (!aCTP->LoadConfiguration(configstr)) { // Load CTP config from OCDB - AliError("No trigger configuration found in OCDB! The trigger configuration information will not be used!"); - delete aCTP; - return 0; + AliTriggerConfiguration *config = aCTP->GetConfiguration(); + if (!config) { + AliError("No trigger configuration has been found! The trigger configuration information will not be used!"); + if (fRawReader) delete aCTP; + return 0; } - aCTP->SetClassMask(mask); - aCTP->SetClusterMask(clmask); - if (fRunLoader) { - AliCentralTrigger* rlCTP = fRunLoader->GetTrigger(); - if (rlCTP) { - rlCTP->SetClassMask(mask); - rlCTP->SetClusterMask(clmask); - } - } - } - else { - fEventInfo.SetEventType(AliRawEventHeaderBase::kPhysicsEvent); - - if (fRunLoader && (!fRunLoader->LoadTrigger())) { - aCTP = fRunLoader->GetTrigger(); - fEventInfo.SetTriggerMask(aCTP->GetClassMask()); - // get inputs from actp - just get - AliESDHeader* esdheader = fESD->GetHeader(); - esdheader->SetL0TriggerInputs(aCTP->GetL0TriggerInputs()); - esdheader->SetL1TriggerInputs(aCTP->GetL1TriggerInputs()); - esdheader->SetL2TriggerInputs(aCTP->GetL2TriggerInputs()); - fEventInfo.SetTriggerCluster(AliDAQ::ListOfTriggeredDetectors(aCTP->GetClusterMask())); + TString declTriggerClasses; + + // Load trigger aliases and declare the trigger classes included in aliases + AliCDBEntry * entry = AliCDBManager::Instance()->Get("GRP/CTP/Aliases"); + if (entry) { + THashList * lst = dynamic_cast(entry->GetObject()); + if (lst) { + lst->Sort(kSortDescending); // to avoid problems with substrings + if (fRawReader) fRawReader->LoadTriggerAlias(lst); + // Now declare all the triggers present in the aliases + TIter iter(lst); + TNamed *nmd = 0; + while((nmd = dynamic_cast(iter.Next()))){ + declTriggerClasses += " "; + declTriggerClasses += nmd->GetName(); + } + } + else { + AliError("Cannot cast the object with trigger aliases to THashList!"); + } } else { - AliWarning("No trigger can be loaded! The trigger information will not be used!"); - return 0; + AliError("No OCDB entry for the trigger aliases!"); } - } - AliTriggerConfiguration *config = aCTP->GetConfiguration(); - if (!config) { - AliError("No trigger configuration has been found! The trigger configuration information will not be used!"); - if (fRawReader) delete aCTP; - return 0; - } - - TString declTriggerClasses; - - // Load trigger aliases and declare the trigger classes included in aliases - AliCDBEntry * entry = AliCDBManager::Instance()->Get("GRP/CTP/Aliases"); - if (entry) { - THashList * lst = dynamic_cast(entry->GetObject()); - if (lst) { - lst->Sort(kSortDescending); // to avoid problems with substrings - if (fRawReader) fRawReader->LoadTriggerAlias(lst); - // Now declare all the triggers present in the aliases - TIter iter(lst); - TNamed *nmd = 0; - while((nmd = dynamic_cast(iter.Next()))){ - declTriggerClasses += " "; - declTriggerClasses += nmd->GetName(); - } + // Load trigger classes for this run + UChar_t clustmask = 0; + TString trclasses; + ULong64_t trmask = fEventInfo.GetTriggerMask(); + const TObjArray& classesArray = config->GetClasses(); + Int_t nclasses = classesArray.GetEntriesFast(); + for( Int_t iclass=0; iclass < nclasses; iclass++ ) { + AliTriggerClass* trclass = (AliTriggerClass*)classesArray.At(iclass); + if (trclass && trclass->GetMask()>0) { + Int_t trindex = TMath::Nint(TMath::Log2(trclass->GetMask())); + if (fESD) fESD->SetTriggerClass(trclass->GetName(),trindex); + if (fRawReader) fRawReader->LoadTriggerClass(trclass->GetName(),trindex); + if (trmask & (1ull << trindex)) { + trclasses += " "; + trclasses += trclass->GetName(); + trclasses += " "; + clustmask |= trclass->GetCluster()->GetClusterMask(); + } + } + } + fEventInfo.SetTriggerClasses(trclasses); + + if (!aCTP->CheckTriggeredDetectors()) { + if (fRawReader) delete aCTP; + return 0; } - else { - AliError("Cannot cast the object with trigger aliases to THashList!"); - } - } - else { - AliError("No OCDB entry for the trigger aliases!"); - } - - // Load trigger classes for this run - UChar_t clustmask = 0; - TString trclasses; - ULong64_t trmask = fEventInfo.GetTriggerMask(); - const TObjArray& classesArray = config->GetClasses(); - Int_t nclasses = classesArray.GetEntriesFast(); - for( Int_t iclass=0; iclass < nclasses; iclass++ ) { - AliTriggerClass* trclass = (AliTriggerClass*)classesArray.At(iclass); - if (trclass && trclass->GetMask()>0) { - Int_t trindex = TMath::Nint(TMath::Log2(trclass->GetMask())); - if (fESD) fESD->SetTriggerClass(trclass->GetName(),trindex); - if (fRawReader) fRawReader->LoadTriggerClass(trclass->GetName(),trindex); - if (trmask & (1ull << trindex)) { - trclasses += " "; - trclasses += trclass->GetName(); - trclasses += " "; - clustmask |= trclass->GetCluster()->GetClusterMask(); - } - } - } - fEventInfo.SetTriggerClasses(trclasses); - - if (!aCTP->CheckTriggeredDetectors()) { - if (fRawReader) delete aCTP; - return 0; - } - if (fRawReader) delete aCTP; + if (fRawReader) delete aCTP; -// everything went ok, return pointer - return (&fEventInfo); + // everything went ok, return pointer + return (&fEventInfo); } TString AliEveEventManager::GetEventInfoHorizontal() const { - // Dumps the event-header contents in vertical formatting. - - TString rawInfo, esdInfo; - - if (!fRawReader) - { - rawInfo = "No raw-data event info is available!\n"; - } - else - { - const UInt_t* attr = fRawReader->GetAttributes(); - TTimeStamp ts(fRawReader->GetTimestamp()); - rawInfo.Form("RAW event info: Run#: %d Event type: %d (%s) Period: %x Orbit: %x BC: %x\n" - "Trigger: %llx\nDetectors: %x (%s)\nAttributes:%x-%x-%x Timestamp: %s\n", - fRawReader->GetRunNumber(),fRawReader->GetType(),AliRawEventHeaderBase::GetTypeName(fRawReader->GetType()), - fRawReader->GetPeriod(),fRawReader->GetOrbitID(),fRawReader->GetBCID(), - fRawReader->GetClassMask(), - *fRawReader->GetDetectorPattern(),AliDAQ::ListOfTriggeredDetectors(*fRawReader->GetDetectorPattern()), - attr[0],attr[1],attr[2], ts.AsString("s")); - } - - if (!fESD) - { - esdInfo = "No ESD event info is available!"; - } - else - { - TString acttrclasses = fESD->GetESDRun()->GetActiveTriggerClasses(); - TString firedtrclasses = fESD->GetFiredTriggerClasses(); - TTimeStamp ts(fESD->GetTimeStamp()); - esdInfo.Form("ESD event info: Run#: %d Event type: %d (%s) Period: %x Orbit: %x BC: %x\n" - "Active trigger classes: %s\nTrigger: %llx (%s)\nEvent# in file: %d Timestamp: %s, MagField: %.2e", - fESD->GetRunNumber(), - fESD->GetEventType(),AliRawEventHeaderBase::GetTypeName(fESD->GetEventType()), - fESD->GetPeriodNumber(),fESD->GetOrbitNumber(),fESD->GetBunchCrossNumber(), - acttrclasses.Data(), - fESD->GetTriggerMask(),firedtrclasses.Data(), - fESD->GetEventNumberInFile(), ts.AsString("s"), fESD->GetMagneticField()); - } - - return rawInfo + esdInfo; + // Dumps the event-header contents in vertical formatting. + + TString rawInfo, esdInfo; + + if (!fRawReader) + { + rawInfo = "No raw-data event info is available!\n"; + } + else + { + const UInt_t* attr = fRawReader->GetAttributes(); + TTimeStamp ts(fRawReader->GetTimestamp()); + rawInfo.Form("RAW event info: Run#: %d Event type: %d (%s) Period: %x Orbit: %x BC: %x\n" + "Trigger: %llx\nDetectors: %x (%s)\nAttributes:%x-%x-%x Timestamp: %s\n", + fRawReader->GetRunNumber(),fRawReader->GetType(),AliRawEventHeaderBase::GetTypeName(fRawReader->GetType()), + fRawReader->GetPeriod(),fRawReader->GetOrbitID(),fRawReader->GetBCID(), + fRawReader->GetClassMask(), + *fRawReader->GetDetectorPattern(),AliDAQ::ListOfTriggeredDetectors(*fRawReader->GetDetectorPattern()), + attr[0],attr[1],attr[2], ts.AsString("s")); + } + + if (!fESD) + { + esdInfo = "No ESD event info is available!"; + } + else + { + TString acttrclasses = fESD->GetESDRun()->GetActiveTriggerClasses(); + TString firedtrclasses = fESD->GetFiredTriggerClasses(); + TTimeStamp ts(fESD->GetTimeStamp()); + esdInfo.Form("ESD event info: Run#: %d Event type: %d (%s) Period: %x Orbit: %x BC: %x\n" + "Active trigger classes: %s\nTrigger: %llx (%s)\nEvent# in file: %d Timestamp: %s, MagField: %.2e", + fESD->GetRunNumber(), + fESD->GetEventType(),AliRawEventHeaderBase::GetTypeName(fESD->GetEventType()), + fESD->GetPeriodNumber(),fESD->GetOrbitNumber(),fESD->GetBunchCrossNumber(), + acttrclasses.Data(), + fESD->GetTriggerMask(),firedtrclasses.Data(), + fESD->GetEventNumberInFile(), ts.AsString("s"), fESD->GetMagneticField()); + } + + return rawInfo + esdInfo; } TString AliEveEventManager::GetEventInfoVertical() const { - // Dumps the event-header contents in vertical formatting. - - TString rawInfo, esdInfo; - - if (!fRawReader) - { - rawInfo = "No raw-data event info is available!\n"; - } - else - { - const UInt_t* attr = fRawReader->GetAttributes(); - rawInfo.Form("Raw-data event info:\nRun#: %d\nEvent type: %d (%s)\nPeriod: %x\nOrbit: %x BC: %x\nTrigger: %llx\nDetectors: %x (%s)\nAttributes:%x-%x-%x\nTimestamp: %x\n", - fRawReader->GetRunNumber(),fRawReader->GetType(),AliRawEventHeaderBase::GetTypeName(fRawReader->GetType()), - fRawReader->GetPeriod(),fRawReader->GetOrbitID(),fRawReader->GetBCID(), - fRawReader->GetClassMask(), - *fRawReader->GetDetectorPattern(),AliDAQ::ListOfTriggeredDetectors(*fRawReader->GetDetectorPattern()), - attr[0],attr[1],attr[2], - fRawReader->GetTimestamp()); - } - - if (!fESD) - { - esdInfo = "No ESD event info is available!\n"; - } - else - { - TString acttrclasses = fESD->GetESDRun()->GetActiveTriggerClasses(); - TString firedtrclasses = fESD->GetFiredTriggerClasses(); - esdInfo.Form("ESD event info:\nRun#: %d\nActive trigger classes: %s\nEvent type: %d (%s)\nPeriod: %x\nOrbit: %x BC: %x\nTrigger: %llx (%s)\nEvent# in file:%d\nTimestamp: %x\n", - fESD->GetRunNumber(), - acttrclasses.Data(), - fESD->GetEventType(),AliRawEventHeaderBase::GetTypeName(fESD->GetEventType()), - fESD->GetPeriodNumber(),fESD->GetOrbitNumber(),fESD->GetBunchCrossNumber(), - fESD->GetTriggerMask(),firedtrclasses.Data(), - fESD->GetEventNumberInFile(), - fESD->GetTimeStamp()); - } - - return rawInfo + "\n" + esdInfo; + // Dumps the event-header contents in vertical formatting. + + TString rawInfo, esdInfo; + + if (!fRawReader) + { + rawInfo = "No raw-data event info is available!\n"; + } + else + { + const UInt_t* attr = fRawReader->GetAttributes(); + rawInfo.Form("Raw-data event info:\nRun#: %d\nEvent type: %d (%s)\nPeriod: %x\nOrbit: %x BC: %x\nTrigger: %llx\nDetectors: %x (%s)\nAttributes:%x-%x-%x\nTimestamp: %x\n", + fRawReader->GetRunNumber(),fRawReader->GetType(),AliRawEventHeaderBase::GetTypeName(fRawReader->GetType()), + fRawReader->GetPeriod(),fRawReader->GetOrbitID(),fRawReader->GetBCID(), + fRawReader->GetClassMask(), + *fRawReader->GetDetectorPattern(),AliDAQ::ListOfTriggeredDetectors(*fRawReader->GetDetectorPattern()), + attr[0],attr[1],attr[2], + fRawReader->GetTimestamp()); + } + + if (!fESD) + { + esdInfo = "No ESD event info is available!\n"; + } + else + { + TString acttrclasses = fESD->GetESDRun()->GetActiveTriggerClasses(); + TString firedtrclasses = fESD->GetFiredTriggerClasses(); + esdInfo.Form("ESD event info:\nRun#: %d\nActive trigger classes: %s\nEvent type: %d (%s)\nPeriod: %x\nOrbit: %x BC: %x\nTrigger: %llx (%s)\nEvent# in file:%d\nTimestamp: %x\n", + fESD->GetRunNumber(), + acttrclasses.Data(), + fESD->GetEventType(),AliRawEventHeaderBase::GetTypeName(fESD->GetEventType()), + fESD->GetPeriodNumber(),fESD->GetOrbitNumber(),fESD->GetBunchCrossNumber(), + fESD->GetTriggerMask(),firedtrclasses.Data(), + fESD->GetEventNumberInFile(), + fESD->GetTimeStamp()); + } + + return rawInfo + "\n" + esdInfo; } @@ -1746,48 +1748,48 @@ TString AliEveEventManager::GetEventInfoVertical() const Bool_t AliEveEventManager::InitGRP() { - //------------------------------------ - // Initialization of the GRP entry - //------------------------------------ + //------------------------------------ + // Initialization of the GRP entry + //------------------------------------ - static const TEveException kEH("AliEveEventManager::InitGRP "); + static const TEveException kEH("AliEveEventManager::InitGRP "); - AliGRPManager grpMgr; - if (!grpMgr.ReadGRPEntry()) { - return kFALSE; - } - fgGRPLoaded = kTRUE; - if (!grpMgr.SetMagField()) { - throw kEH + "Setting of field failed!"; - } + AliGRPManager grpMgr; + if (!grpMgr.ReadGRPEntry()) { + return kFALSE; + } + fgGRPLoaded = kTRUE; + if (!grpMgr.SetMagField()) { + throw kEH + "Setting of field failed!"; + } - //*** Get the diamond profiles from OCDB - // Eventually useful. + //*** Get the diamond profiles from OCDB + // Eventually useful. - /* + /* entry = AliCDBManager::Instance()->Get("GRP/Calib/MeanVertexSPD"); if (entry) { - fDiamondProfileSPD = dynamic_cast (entry->GetObject()); + fDiamondProfileSPD = dynamic_cast (entry->GetObject()); } else { ::Error(kEH, "No SPD diamond profile found in OCDB!"); } entry = AliCDBManager::Instance()->Get("GRP/Calib/MeanVertex"); if (entry) { - fDiamondProfile = dynamic_cast (entry->GetObject()); + fDiamondProfile = dynamic_cast (entry->GetObject()); } else { ::Error(kEH, "No diamond profile found in OCDB!"); } entry = AliCDBManager::Instance()->Get("GRP/Calib/MeanVertexTPC"); if (entry) { - fDiamondProfileTPC = dynamic_cast (entry->GetObject()); + fDiamondProfileTPC = dynamic_cast (entry->GetObject()); } else { ::Error(kEH, "No TPC diamond profile found in OCDB!"); } */ - return kTRUE; + return kTRUE; } //------------------------------------ @@ -1796,53 +1798,53 @@ Bool_t AliEveEventManager::InitGRP() Bool_t AliEveEventManager::InsertGlobal(const TString& tag, TEveElement* model) { - // Insert a new visualization-parameter database entry with the default - return InsertGlobal(tag, model, fGlobalReplace, fGlobalUpdate); + // Insert a new visualization-parameter database entry with the default + return InsertGlobal(tag, model, fGlobalReplace, fGlobalUpdate); } Bool_t AliEveEventManager::InsertGlobal(const TString& tag, TEveElement* model, - Bool_t replace, Bool_t update) + Bool_t replace, Bool_t update) { - TPair* pair = (TPair*) fGlobal->FindObject(tag); - if (pair) - { - if (replace) - { - model->IncDenyDestroy(); - model->SetRnrChildren(kFALSE); - - TEveElement* old_model = dynamic_cast(pair->Value()); - if(!old_model) AliFatal("old_model == 0, dynamic cast failed\n"); - while (old_model->HasChildren()) - { - TEveElement *el = old_model->FirstChild(); - el->SetVizModel(model); - if (update) + TPair* pair = (TPair*) fGlobal->FindObject(tag); + if (pair) + { + if (replace) + { + model->IncDenyDestroy(); + model->SetRnrChildren(kFALSE); + + TEveElement* old_model = dynamic_cast(pair->Value()); + if(!old_model) AliFatal("old_model == 0, dynamic cast failed\n"); + while (old_model->HasChildren()) { - el->CopyVizParams(model); - el->PropagateVizParamsToProjecteds(); + TEveElement *el = old_model->FirstChild(); + el->SetVizModel(model); + if (update) + { + el->CopyVizParams(model); + el->PropagateVizParamsToProjecteds(); + } } - } - old_model->DecDenyDestroy(); - - pair->SetValue(dynamic_cast(model)); - return kTRUE; - } - else - { - return kFALSE; - } - } - else - { - model->IncDenyDestroy(); - model->SetRnrChildren(kFALSE); - fGlobal->Add(new TObjString(tag), dynamic_cast(model)); - return kTRUE; - } + old_model->DecDenyDestroy(); + + pair->SetValue(dynamic_cast(model)); + return kTRUE; + } + else + { + return kFALSE; + } + } + else + { + model->IncDenyDestroy(); + model->SetRnrChildren(kFALSE); + fGlobal->Add(new TObjString(tag), dynamic_cast(model)); + return kTRUE; + } } TEveElement* AliEveEventManager::FindGlobal(const TString& tag) { - return dynamic_cast(fGlobal->GetValue(tag)); + return dynamic_cast(fGlobal->GetValue(tag)); } diff --git a/EVE/EveBase/AliEveEventManager.h b/EVE/EveBase/AliEveEventManager.h index 956458a6727..50e1288373f 100644 --- a/EVE/EveBase/AliEveEventManager.h +++ b/EVE/EveBase/AliEveEventManager.h @@ -176,7 +176,9 @@ protected: TList *fSubManagers; // Dependent event-managers, used for event embedding. + static TString fgGAlice; // galice.root file static TString fgESDFileName; // Name by which to open ESD. + static TString fgESDfriendsFileName; static TString fgAODFileName; // Name by which to open AOD. static TString fgRawFileName; // Name by which to open raw-data file. static TString fgCdbUri; // Global URI to CDB. diff --git a/EVE/EveBase/AliEveFileDialog.cxx b/EVE/EveBase/AliEveFileDialog.cxx new file mode 100644 index 00000000000..233d7b12f61 --- /dev/null +++ b/EVE/EveBase/AliEveFileDialog.cxx @@ -0,0 +1,391 @@ +#include +#include +#include +#include +#include +#include + +#include + +#include "AliEveUtil.h" +#include "AliEveFileDialog.h" + +ClassImp(AliEveFileDialog) + +AliEveFileDialog::AliEveFileDialog(const TGWindow* p,const TGWindow* main, EAliEveFileDialogMode mode) + : TGTransientFrame(p, main, 100,50, kVerticalFrame) + +{ + SetCleanup(kDeepCleanup); + + /************************ + *** Local Files Frame *** + *************************/ + //ESD Frame + fESDFilesFrame = new TGHorizontalFrame(this, 100, 100); + TGLabel* esdLabel = new TGLabel(fESDFilesFrame, "ESD File:"); + esdLabel->Resize(110, esdLabel->GetDefaultHeight()); + esdLabel->SetMargins(0,0,0,0); + + fPathEntryESD= new TGTextEntry(fESDFilesFrame); + fPathEntryESD->Resize(250, fPathEntryESD->GetDefaultHeight()); + + TGTextButton* browseButtonESD = new TGTextButton(fESDFilesFrame, "Browse..."); + browseButtonESD->Connect("Clicked()", "AliEveFileDialog", this, "onBrowseESDFile()"); + + fESDFilesFrame->AddFrame(esdLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); + fESDFilesFrame->AddFrame(fPathEntryESD, new TGLayoutHints(kLHintsExpandX, 3, 3, 3, 3)); + fESDFilesFrame->AddFrame(browseButtonESD, new TGLayoutHints(kLHintsNormal, 3, 3, 3, 3)); + + AddFrame(fESDFilesFrame, new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 3, 3, 3, 3)); + + //Advanced Options Frame + fAdvancedOptsFrame = new TGHorizontalFrame(this, 100, 100); + fAdvancedOptsButton = new TGCheckButton(fAdvancedOptsFrame, "Advanced Options"); + fAdvancedOptsButton->Connect("Toggled(Bool_t)", "AliEveFileDialog", this, "showAdvancedOpts(Bool_t)"); + + fAdvancedOptsFrame->AddFrame(fAdvancedOptsButton, new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 3, 3, 3, 3)); + + AddFrame(fAdvancedOptsFrame,new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 3, 3, 3, 3)); + + // AOD Frame + fAODFilesFrame = new TGHorizontalFrame(this, 100, 100); + TGLabel* aodLabel = new TGLabel(fAODFilesFrame, "AOD File:"); + aodLabel->Resize(110, aodLabel->GetDefaultHeight()); + + fPathEntryAOD = new TGTextEntry(fAODFilesFrame); + fPathEntryAOD->Resize(250, fPathEntryAOD->GetDefaultHeight()); + + TGTextButton* browseButtonAOD = new TGTextButton(fAODFilesFrame, "Browse..."); + browseButtonAOD->Connect("Clicked()", "AliEveFileDialog", this, "onBrowseAODFile()"); + + fAODFilesFrame->AddFrame(aodLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); + fAODFilesFrame->AddFrame(fPathEntryAOD, new TGLayoutHints(kLHintsExpandX, 3, 3, 3, 3)); + fAODFilesFrame->AddFrame(browseButtonAOD, new TGLayoutHints(kLHintsNormal, 3, 3, 3, 3)); + + AddFrame(fAODFilesFrame, new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 3, 3, 3, 3)); + + // AODfriend Frame + fAODfriendFilesFrame = new TGHorizontalFrame(this, 100, 100); + TGLabel* aodFriendLabel = new TGLabel(fAODfriendFilesFrame, "AODfriend File:"); + aodFriendLabel->Resize(110, aodFriendLabel->GetDefaultHeight()); + + fPathEntryAODfriend = new TGTextEntry(fAODfriendFilesFrame); + fPathEntryAODfriend->Resize(250, fPathEntryAODfriend->GetDefaultHeight()); + + TGTextButton* browseButtonAODfriend = new TGTextButton(fAODfriendFilesFrame, "Browse..."); + browseButtonAODfriend->Connect("Clicked()", "AliEveFileDialog", this, "onBrowseAODfriendFile()"); + + fAODfriendFilesFrame->AddFrame(aodFriendLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); + fAODfriendFilesFrame->AddFrame(fPathEntryAODfriend, new TGLayoutHints(kLHintsExpandX, 3, 3, 3, 3)); + fAODfriendFilesFrame->AddFrame(browseButtonAODfriend, new TGLayoutHints(kLHintsNormal, 3, 3, 3, 3)); + + AddFrame(fAODfriendFilesFrame, new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 3, 3, 3, 3)); + + // Raw Frame + fRawFilesFrame = new TGHorizontalFrame(this, 100, 100); + TGLabel* rawLabel = new TGLabel(fRawFilesFrame, "Raw File:"); + rawLabel->Resize(110, rawLabel->GetDefaultHeight()); + + fPathEntryRawFile = new TGTextEntry(fRawFilesFrame); + fPathEntryRawFile->Resize(250, fPathEntryRawFile->GetDefaultHeight()); + + TGTextButton* browseButtonRawFile = new TGTextButton(fRawFilesFrame, "Browse..."); + browseButtonRawFile->Connect("Clicked()", "AliEveFileDialog", this, "onBrowseRawFile()"); + + fRawFilesFrame->AddFrame(rawLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3)); + fRawFilesFrame->AddFrame(fPathEntryRawFile, new TGLayoutHints(kLHintsExpandX, 3, 3, 3, 3)); + fRawFilesFrame->AddFrame(browseButtonRawFile, new TGLayoutHints(kLHintsNormal, 3, 3, 3, 3)); + + AddFrame(fRawFilesFrame, new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 3, 3, 3, 3)); + + + /**************** + *** Url Frame *** + *****************/ + fUrlFrame = new TGHorizontalFrame(this, 100, 100); + TGLabel* urlLabel = new TGLabel(fUrlFrame, "Url:"); + urlLabel->Resize(110, urlLabel->GetDefaultHeight()); + + fPathEntryUrl= new TGTextEntry(fUrlFrame, "alien:///alice/"); + fPathEntryUrl->Resize(250, fPathEntryUrl->GetDefaultHeight()); + + fUrlFrame->AddFrame(urlLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 3, 3, 3, 3)); + fUrlFrame->AddFrame(fPathEntryUrl, new TGLayoutHints(kLHintsExpandX, 3, 3, 3, 3)); + + AddFrame(fUrlFrame, new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 3, 3, 3, 3)); + + /**************** + *** CDB Frame *** + *****************/ + fCDBFrame = new TGHorizontalFrame(this, 100, 100); + TGLabel *cdbLabel = new TGLabel(fCDBFrame, "CDB Storage:"); + fCDBPathCB = new TGComboBox(fCDBFrame); + fCDBPathCB->SetEditable(kFALSE); + + fCDBPathCB->AddEntry("local", AliEveUtil::CDB_LOCAL); + fCDBPathCB->AddEntry("raw", AliEveUtil::CDB_RAW); + fCDBPathCB->AddEntry("mcideal", AliEveUtil::CDB_MCIDEAL); + fCDBPathCB->AddEntry("mcresidual", AliEveUtil::CDB_MCRESIDUAL); + fCDBPathCB->AddEntry("mcfull", AliEveUtil::CDB_MCFULL); + + fCDBPathCB->Resize(100, fPathEntryESD->GetDefaultHeight()); + fCDBPathCB->Select(0, kTRUE); + + fCDBFrame->AddFrame(cdbLabel, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 3, 3, 3) ); + fCDBFrame->AddFrame(fCDBPathCB, new TGLayoutHints(kLHintsNormal | kLHintsCenterY, 3, 3, 3, 3) ); + + AddFrame(fCDBFrame, new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 3, 3, 3, 3) ); + + /*************************** + *** Dialog Buttons Frame *** + ****************************/ + fDialogButtonsFrame = new TGHorizontalFrame(this, 100, 100); + + TGTextButton* okButton = new TGTextButton(fDialogButtonsFrame, "OK"); + okButton->Associate(this); + okButton->Resize(50, okButton->GetDefaultHeight()); + okButton->Connect("Clicked()", "AliEveFileDialog", this, "onAccept()"); + + TGTextButton* cancelButton = new TGTextButton(fDialogButtonsFrame, "Cancel"); + okButton->Associate(this); + cancelButton->Connect("Clicked()", "AliEveFileDialog", this, "onReject()"); + cancelButton->Resize(50, cancelButton->GetDefaultHeight()); + + fDialogButtonsFrame->AddFrame(new TGHorizontal3DLine, new TGLayoutHints(kLHintsExpandX, 3, 3, 3, 3)); + fDialogButtonsFrame->AddFrame(okButton, new TGLayoutHints(kLHintsExpandX | kLHintsCenterY, 3, 3, 3, 3)); + fDialogButtonsFrame->AddFrame(cancelButton,new TGLayoutHints(kLHintsExpandX | kLHintsCenterY, 3, 3, 3, 3)); + + AddFrame(fDialogButtonsFrame, new TGLayoutHints(kLHintsNormal | kLHintsExpandX , 3, 3, 3, 3) ); + + setMode(mode); + + TGDimension size = GetDefaultSize(); + + Resize(size); + SetWindowName("Open File..."); + + Layout(); + HideFrame(this); + UnmapWindow(); +} + +AliEveFileDialog::~AliEveFileDialog() +{ + +} + +const TString AliEveFileDialog::GetPathESD() const +{ + return TString(fPathEntryESD->GetText()); +} + +const TString AliEveFileDialog::GetPathAOD() const +{ + return TString(fPathEntryAOD->GetText()); +} + +const TString AliEveFileDialog::GetPathAODfriend() const +{ + return TString(fPathEntryAODfriend->GetText()); +} + +const TString AliEveFileDialog::GetPathRaw() const +{ + return TString(fPathEntryRawFile->GetText()); +} + +const TString AliEveFileDialog::GetUrl() const +{ + return TString(fPathEntryUrl->GetText()); +} + +const TString AliEveFileDialog::GetCDBStoragePath() const +{ + TString cdbSelected; + + switch(fCDBPathCB->GetSelected()){ + case AliEveUtil::CDB_LOCAL: + cdbSelected = "local://"; + break; + case AliEveUtil::CDB_MCFULL: + cdbSelected = "mcfull://"; + break; + case AliEveUtil::CDB_MCIDEAL: + cdbSelected = "mcideal://"; + break; + case AliEveUtil::CDB_MCRESIDUAL: + cdbSelected = "mcresidual://"; + break; + case AliEveUtil::CDB_RAW: + cdbSelected = "raw://"; + break; + default: + cdbSelected= "local://"; + } + + + return cdbSelected; +} + +void AliEveFileDialog::onBrowseESDFile() +{ + TGFileInfo* fileInfo = new TGFileInfo; + + const char* types[] = { "ALICE ESD file", "*.root", + "ROOT Archive", "*.zip", + 0, 0}; + + fileInfo->fFileTypes = types; + + new TGFileDialog(GetParent(), GetMain(), kFDOpen, fileInfo); + + fPathEntryESD->SetText(fileInfo->fFilename); + + delete fileInfo; + +} + +void AliEveFileDialog::onBrowseAODFile() +{ + TGFileInfo* fileInfo = new TGFileInfo; + + const char* types[] = { "ALICE AOD file", "*.root", + "ROOT Archive", "*.zip", + 0, 0}; + + fileInfo->fFileTypes = types; + + new TGFileDialog(GetParent(), GetMain(), kFDOpen, fileInfo); + + fPathEntryAOD->SetText(fileInfo->fFilename); + + delete fileInfo; + +} + +void AliEveFileDialog::onBrowseAODfriendFile() +{ + TGFileInfo* fileInfo = new TGFileInfo; + + const char* types[] = { "ALICE AODfriend file", "*.root", + "ROOT Archive", "*.zip", + 0, 0}; + + fileInfo->fFileTypes = types; + + new TGFileDialog(GetParent(), GetMain(), kFDOpen, fileInfo); + + fPathEntryAODfriend->SetText(fileInfo->fFilename); + + delete fileInfo; + +} + +void AliEveFileDialog::onBrowseRawFile() +{ + TGFileInfo* fileInfo = new TGFileInfo; + + const char* types[] = { "ALICE RAW file", "*.root", + "ROOT Archive", "*.zip", + 0, 0}; + + fileInfo->fFileTypes = types; + + new TGFileDialog(GetParent(), GetMain(), kFDOpen, fileInfo); + + fPathEntryRawFile->SetText(fileInfo->fFilename); + + delete fileInfo; + +} + +void AliEveFileDialog::onAccept() +{ + fIsAccepted = kTRUE; + UnmapWindow(); +} + +void AliEveFileDialog::onReject() +{ + fIsAccepted = kFALSE; + UnmapWindow(); +} + +void AliEveFileDialog::setMode(EAliEveFileDialogMode mode) +{ + fMode = mode; +} + +void AliEveFileDialog::MapWindow() +{ + if(IsMapped()) return; + + MapSubwindows(); + TGTransientFrame::MapWindow(); + Layout(); + + gClient->WaitFor(this); +} + +void AliEveFileDialog::UnmapWindow() +{ + TGTransientFrame::UnmapWindow(); + gClient->ResetWaitFor(this); +} + +void AliEveFileDialog::MapSubwindows() +{ + TGTransientFrame::MapSubwindows(); + + // Show/Hide Widgets according to the current Mode + if(fMode==kAliEveFDLocal){ + ShowFrame(fESDFilesFrame); + showAdvancedOpts(fAdvancedOptsButton->IsDown()); + + HideFrame(fUrlFrame); + } + else{ // remote file + HideFrame(fESDFilesFrame); + HideFrame(fAdvancedOptsFrame); + HideFrame(fAODFilesFrame); + HideFrame(fAODfriendFilesFrame); + HideFrame(fRawFilesFrame); + + ShowFrame(fUrlFrame); + } + +} + +void AliEveFileDialog::showAdvancedOpts(Bool_t shown) +{ + UInt_t w, h; + if(shown){ + ShowFrame(fAODFilesFrame); + ShowFrame(fAODfriendFilesFrame); + ShowFrame(fRawFilesFrame); + Layout(); + + h = fESDFilesFrame->GetSize().fHeight+fAdvancedOptsFrame->GetSize().fHeight+fAODFilesFrame->GetSize().fHeight; + h+= fAODfriendFilesFrame->GetSize().fHeight+fRawFilesFrame->GetSize().fHeight+fCDBFrame->GetSize().fHeight+fDialogButtonsFrame->GetSize().fHeight; + }else{ + HideFrame(fAODFilesFrame); + HideFrame(fAODfriendFilesFrame); + HideFrame(fRawFilesFrame); + Layout(); + + h = fESDFilesFrame->GetSize().fHeight+fAdvancedOptsFrame->GetSize().fHeight+fCDBFrame->GetSize().fHeight+fDialogButtonsFrame->GetSize().fHeight; + } + + TGDimension size = GetSize(); + w = size.fWidth; + + + Resize(w,h+40); + +} + +void AliEveFileDialog::CloseWindow() +{ + onReject(); +} diff --git a/EVE/EveBase/AliEveFileDialog.h b/EVE/EveBase/AliEveFileDialog.h new file mode 100644 index 00000000000..fa27f9d161a --- /dev/null +++ b/EVE/EveBase/AliEveFileDialog.h @@ -0,0 +1,92 @@ +// Author: Mihai Niculescu 2013 + +/************************************************************************** + * Copyright(c) 1998-2009, ALICE Experiment at CERN, all rights reserved. * + * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * + * full copyright notice. * + **************************************************************************/ + +#ifndef AliEveFileDialog_H +#define AliEveFileDialog_H + +#include +#include + +class TGLabel; +class TGFileInfo; +class TGTextButton; +class TGTextEntry; +class TGComboBox; + +//______________________________________________________________________________ +// AliEveMainWindow +// +enum EAliEveFileDialogMode +{ + kAliEveFDLocal, + kAliEveFDRemote +}; + +class AliEveFileDialog : public TGTransientFrame +{ +public: + AliEveFileDialog(const TGWindow* p = 0, const TGWindow* main = 0, EAliEveFileDialogMode mode= kAliEveFDLocal); + ~AliEveFileDialog(); + + //const TString GetDirectory(); // directory where the ESD resides + const TString GetPathESD() const; + const TString GetPathAOD() const; + const TString GetPathAODfriend() const; + const TString GetPathRaw() const; + const TString GetUrl() const; + UInt_t GetMode() const { return fMode; } + + const TString GetCDBStoragePath() const; + + void onBrowseESDFile(); + void onBrowseAODFile(); + void onBrowseAODfriendFile(); + void onBrowseRawFile(); + + Bool_t accepted() const { return fIsAccepted; } // true if clicked the OK button, false otherwise + + void onAccept();// ok button was clicked + void onReject();// cancel button was clicked + + void setMode(EAliEveFileDialogMode mode); + void showAdvancedOpts(Bool_t shown=kTRUE); + + void CloseWindow(); + void MapWindow(); + void UnmapWindow(); + void MapSubwindows(); +private: + AliEveFileDialog(const AliEveFileDialog&); // not implemented + AliEveFileDialog& operator=(const AliEveFileDialog&); // not implemented + + TGHorizontalFrame* fESDFilesFrame; + TGHorizontalFrame* fAdvancedOptsFrame; + TGCheckButton* fAdvancedOptsButton; + TGHorizontalFrame* fAODFilesFrame; + TGHorizontalFrame* fAODfriendFilesFrame; + TGHorizontalFrame* fRawFilesFrame; + TGHorizontalFrame* fUrlFrame; + TGHorizontalFrame* fCDBFrame; + TGHorizontalFrame* fDialogButtonsFrame; + TGTextEntry* fPathEntryESD; + TGTextEntry* fPathEntryAOD; + TGTextEntry* fPathEntryAODfriend; + TGTextEntry* fPathEntryRawFile; + TGTextEntry* fPathEntryUrl; // remote file + TGComboBox* fCDBPathCB; + + Bool_t fIsAccepted; // true if clicked OK, false otherwise + EAliEveFileDialogMode fMode; + +public: + + ClassDef(AliEveFileDialog, 0) +}; + +#endif + diff --git a/EVE/EveBase/AliEveMainWindow.cxx b/EVE/EveBase/AliEveMainWindow.cxx new file mode 100644 index 00000000000..264a1c48bf7 --- /dev/null +++ b/EVE/EveBase/AliEveMainWindow.cxx @@ -0,0 +1,462 @@ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "../alice-macros/geom_gentle.C" +#include "../alice-macros/geom_gentle_trd.C" +#include "../alice-macros/geom_gentle_muon.C" + + +#include "AliEveMainWindow.h" +#include "AliEveUtil.h" +#include "AliEveFileDialog.h" + +#include +using namespace std; + +AliEveMainWindow::AliEveMainWindow(const char* title, UInt_t width, UInt_t height) + : TGMainFrame(gClient->GetRoot(), width, height), + fEve(0), + fFileDialog(0) +{ + + AliEveUtil::Init(); + fPicturePool = AliEveUtil::GetPicturePool(); + + static const TEveException kEH("AliEveMainWindow::AliEveMainWindow"); + + if(!fPicturePool) cout<< "Couldnt get a PicturePool"<GetDefaultViewer()->SetElementName("3D View"); + gEve->GetSelection()->SetPickToSelect(TEveSelection::kPS_PableCompound); + gEve->GetHighlight()->SetPickToSelect(TEveSelection::kPS_PableCompound); + + TString evedir(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); + gEve->RegisterGeometryAlias("Default", Form("%s/alice-data/default_geo.root", evedir.Data())); + + setupMenus(); + setupToolbars(); + + TGFrame* viewFrame = gEve->GetDefaultViewer()->GetGUIFrame(); + viewFrame->MapWindow(); + viewFrame->ReparentWindow(this); + + AddFrame(viewFrame, new TGLayoutHints(kLHintsNormal | kLHintsExpandX | kLHintsExpandY , 3, 3, 3, 3)); + + SetWindowName(title); + Resize(width,height); + MapSubwindows(); + MapWindow(); + Layout(); + + gEve->Redraw3D(kTRUE); + gSystem->ProcessEvents(); +} + +AliEveMainWindow::~AliEveMainWindow() +{ + if(fEve) delete fEve; +} + +void AliEveMainWindow::onMenuFileItem(UInt_t id) +{ + switch(id){ + case MENU_FILE_OPEN: + { + if(!fFileDialog) fFileDialog = new AliEveFileDialog( gClient->GetRoot(), this, kAliEveFDLocal); + + fFileDialog->setMode(kAliEveFDLocal); + fFileDialog->MapWindow(); + if(fFileDialog->accepted()) openFile(fFileDialog->GetPathESD()); + break; + } + case MENU_FILE_OPEN_URL: + { + if(!fFileDialog) fFileDialog = new AliEveFileDialog( gClient->GetRoot(), this, kAliEveFDRemote); + + fFileDialog->setMode(kAliEveFDRemote); + fFileDialog->MapWindow(); + if(fFileDialog->accepted()) openFile(fFileDialog->GetUrl()); + + break; + } + default: + { + break; + } + } +} + +void AliEveMainWindow::onMenuEditItem(UInt_t id) +{ + +} + +void AliEveMainWindow::onMenuViewItem(UInt_t id) +{ + +} + +void AliEveMainWindow::onMenuGoItem(UInt_t id) +{ + switch(id){ + case MENU_GO_NEXT_EVENT: + { + AliEveEventManager::GetMaster()->NextEvent(); + break; + } + case MENU_GO_PREV_EVENT: + { + AliEveEventManager::GetMaster()->PrevEvent(); + break; + } + default: + { + break; + } + } + + TEveElement* top = gEve->GetCurrentEvent(); + + AliEveMultiView *mv = AliEveMultiView::Instance(); + + //mv->DestroyEventRPhi(); + mv->ImportEventRPhi(top); + //mv->DestroyEventRhoZ(); + mv->ImportEventRhoZ(top); + + gEve->Redraw3D(kTRUE); +} + +void AliEveMainWindow::setupMenus() +{ + fMenuBar = new TGMenuBar(this); + + // File Menu + fMenuFile = new TGPopupMenu(gClient->GetRoot()); + fMenuFile->AddEntry("&Open...", MENU_FILE_OPEN, 0, fPicturePool->GetPicture("menu/document-open.png")); + fMenuFile->AddEntry("&Open URL...", MENU_FILE_OPEN_URL, 0, fPicturePool->GetPicture("menu/document-open-remote.png")); + fMenuFile->AddSeparator(); + fMenuFile->AddEntry("&Connect To Server...", MENU_FILE_OPEN_CONNECTION, 0, fPicturePool->GetPicture("menu/network-connect.png")); + fMenuFile->AddSeparator(); + fMenuFile->AddEntry("Export View(s)...", MENU_FILE_EXPORT_VIEWS, 0, fPicturePool->GetPicture("menu/document-export.png")); + fMenuFile->AddSeparator(); + fMenuFile->AddEntry("E&xit", MENU_FILE_EXIT, 0, fPicturePool->GetPicture("menu/application-exit.png")); + // -- + + // Edit Menu + fMenuEdit = new TGPopupMenu(gClient->GetRoot()); + fMenuEdit->AddEntry("&Undo", MENU_EDIT_UNDO, 0, fPicturePool->GetPicture("menu/edit-undo.png")); + fMenuEdit->AddEntry("&Redo", MENU_EDIT_REDO, 0, fPicturePool->GetPicture("menu/edit-redo.png")); + fMenuEdit->AddSeparator(); + fMenuEdit->AddEntry("&Cut", MENU_EDIT_CUT, 0, fPicturePool->GetPicture("menu/edit-cut.png")); + fMenuEdit->AddEntry("C&opy", MENU_EDIT_COPY, 0, fPicturePool->GetPicture("menu/edit-copy.png")); + fMenuEdit->AddEntry("&Paste", MENU_EDIT_PASTE, 0, fPicturePool->GetPicture("menu/edit-paste.png")); + fMenuEdit->AddEntry("&Delete",MENU_EDIT_DELETE, 0, fPicturePool->GetPicture("menu/edit-delete.png")); + fMenuEdit->AddSeparator(); + fMenuEdit->AddEntry("P&references", MENU_EDIT_PROP, 0, fPicturePool->GetPicture("menu/document-properties.png")); + // -- + + // View Menu + fMenuView = new TGPopupMenu(gClient->GetRoot()); + + fMenuViewToolbars = new TGPopupMenu(gClient->GetRoot()); + fMenuViewToolbars->AddEntry("&Main Toolbar", MENU_VIEW_TOOLBAR_MAIN); + fMenuViewToolbars->AddEntry("&Navigation Toolbar", MENU_VIEW_TOOLBAR_NAV); + fMenuView->AddPopup("Toolbars", fMenuViewToolbars); + + fMenuViewSidebars = new TGPopupMenu(gClient->GetRoot()); + fMenuViewSidebars->AddEntry("Hi&story", MENU_VIEW_TOOLBAR_HIST); + fMenuViewSidebars->AddEntry("&Properties", MENU_VIEW_TOOLBAR_NAV); + fMenuView->AddPopup("Sidebars", fMenuViewSidebars); + + fMenuView->AddSeparator(); + fMenuView->AddEntry("&Reload", MENU_VIEW_RELOAD, 0, fPicturePool->GetPicture("menu/view-refresh.png")); + fMenuView->AddSeparator(); + fMenuView->AddEntry("Zoom &In", MENU_VIEW_ZOOM_IN, 0, fPicturePool->GetPicture("menu/zoom-in.png")); + fMenuView->AddEntry("Zoom &Out",MENU_VIEW_ZOOM_OUT, 0, fPicturePool->GetPicture("menu/zoom-out.png")); + fMenuView->AddEntry("Zoom &Reset",MENU_VIEW_ZOOM_RESET, 0, fPicturePool->GetPicture("menu/zoom-original.png")); + // -- + + // Go Menu + fMenuGo = new TGPopupMenu(gClient->GetRoot()); + fMenuGo->AddEntry("&Next Event", MENU_GO_NEXT_EVENT, 0, fPicturePool->GetPicture("navigation/media-seek-forward.png")); + fMenuGo->AddEntry("P&revious Event", MENU_GO_PREV_EVENT, 0, fPicturePool->GetPicture("navigation/media-seek-backward.png")); + fMenuGo->AddSeparator(); + fMenuGo->AddEntry("&First Event", MENU_GO_FIRST_EVENT,0, fPicturePool->GetPicture("navigation/media-skip-backward.png")); + fMenuGo->AddEntry("&Last Event", MENU_GO_LAST_EVENT, 0, fPicturePool->GetPicture("navigation/media-skip-forward.png")); + fMenuGo->AddSeparator(); + fMenuGo->AddEntry("&Play", MENU_GO_PLAY, 0, fPicturePool->GetPicture("navigation/media-playback-start.png")); + // -- + + // Tools Menu + fMenuTools = new TGPopupMenu(gClient->GetRoot()); + fMenuTools->AddEntry("&QA Histograms", MENU_TOOLS_QA); + fMenuTools->AddEntry("&Macros", MENU_TOOLS_MACROS); + // -- + + // Help Menu + fMenuHelp = new TGPopupMenu(gClient->GetRoot()); + fMenuHelp->AddEntry("&Contents", MENU_HELP_CONTENTS, 0, fPicturePool->GetPicture("menu/help-contents.png")); + fMenuHelp->AddEntry("&About", MENU_HELP_ABOUT, 0, fPicturePool->GetPicture("menu/help-about.png")); + // -- + + // Add popupmenus to MenuBar + fMenuBar->AddPopup("&File", fMenuFile, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0)); + fMenuBar->AddPopup("&Edit", fMenuEdit, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0)); + fMenuBar->AddPopup("&View", fMenuView, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0)); + fMenuBar->AddPopup("&Go", fMenuGo, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0)); + fMenuBar->AddPopup("&Tools", fMenuTools, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0)); + fMenuBar->AddPopup("&Help", fMenuHelp, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0)); + + // MenuBar to the window + AddFrame(fMenuBar, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX)); + + // Menu signals + fMenuFile->Connect("Activated(Int_t)", "AliEveMainWindow", this, "onMenuFileItem(Int_t)"); + fMenuEdit->Connect("Activated(Int_t)", "AliEveMainWindow", this, "onMenuEditItem(Int_t)"); + fMenuView->Connect("Activated(Int_t)", "AliEveMainWindow", this, "onMenuViewItem(Int_t)"); + fMenuGo->Connect("Activated(Int_t)", "AliEveMainWindow", this, "onMenuGoItem(Int_t)"); +} + +void AliEveMainWindow::setupToolbars() +{ + TGMenuEntry* tmpMenuEntry; + + fToolBar = new TGToolBar(this); + + tmpMenuEntry = fMenuFile->GetEntry("Open..."); + fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() )); + tmpMenuEntry = fMenuFile->GetEntry("Open URL..."); + fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() )); + tmpMenuEntry = fMenuFile->GetEntry("Connect To Server..."); + fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() )); + tmpMenuEntry = fMenuFile->GetEntry("Export View(s)..."); + fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() )); + + fToolBar->AddFrame(new TGVertical3DLine(fToolBar), new TGLayoutHints(kLHintsExpandY)); + + tmpMenuEntry = fMenuView->GetEntry("Reload"); + fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() )); + tmpMenuEntry = fMenuView->GetEntry("Zoom In"); + fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() )); + tmpMenuEntry = fMenuView->GetEntry("Zoom Out"); + fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() )); + tmpMenuEntry = fMenuView->GetEntry("Zoom Reset"); + fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() )); + + + + + AddFrame(new TGHorizontal3DLine(this), new TGLayoutHints(kLHintsExpandX)); + AddFrame(fToolBar, new TGLayoutHints(kLHintsNormal)); + AddFrame(new TGHorizontal3DLine(this), new TGLayoutHints(kLHintsExpandX)); + + + + //fToolBar->Connect("Clicked(Int_t)", "RCMainWindow", this, "openFile()"); +} + +void AliEveMainWindow::openFile(const TString& path) +{ + Info("AliEveMainWindow::openFile", "Trying to open the file [%s]", path.Data()); + + TString esdFile = fFileDialog->GetPathESD(); + TString aodFile = fFileDialog->GetPathAOD(); + TString aodFriendFile = fFileDialog->GetPathAODfriend(); + TString rawFile = fFileDialog->GetPathRaw(); + TString cdbUri = fFileDialog->GetCDBStoragePath(); + + Info("AliEveMainWindow::openFile", "ESD:%s AOD:%s AODfriend:%s RAW:%s CDB:%s", esdFile.Data(), aodFile.Data(), aodFriendFile.Data(), rawFile.Data(), cdbUri.Data()); + + TEveUtil::AssertMacro("VizDB_scan.C"); + + AliEveEventManager::SetESDFileName(esdFile); + AliEveEventManager::SetAODFileName(aodFile); + AliEveEventManager::AddAODfriend(aodFriendFile); + AliEveEventManager::SetRawFileName(rawFile); + AliEveEventManager::SetCdbUri(cdbUri); + + // Open event + if (path.BeginsWith("alien:")) + { + if (gGrid != 0) + { + Info("AliEveMainWindow::openFile", "TGrid already initializied. Skiping checks and initialization."); + } + else + { + Info("AliEveMainWindow::openFile", "AliEn requested - connecting."); + if (gSystem->Getenv("GSHELL_ROOT") == 0) + { + Error("AliEveMainWindow::openFile", "AliEn environment not initialized. Aborting."); + new TGMsgBox(gClient->GetRoot(), this, "AliEve", "AliEn environment not initialized. Aborting.", kMBIconStop); + return; + } + if (TGrid::Connect("alien") == 0) + { + Error("AliEveMainWindow::openFile", "TGrid::Connect() failed. Aborting."); + new TGMsgBox(gClient->GetRoot(), this, "AliEve", "TGrid::Connect() failed. Aborting.", kMBIconStop); + return; + } + } + } + + TString name("Event"); // CINT has trouble with direct "Event". + new AliEveEventManager(name, path, 0); + gEve->AddEvent(AliEveEventManager::GetMaster()); + + TEveUtil::AssertMacro("VizDB_scan.C"); + + AliEveMacroExecutor *exec = AliEveEventManager::GetMaster()->GetExecutor(); + //============================================================================== + // Geometry, scenes, projections and viewers + //============================================================================== + + AliEveMultiView *mv = new AliEveMultiView; + + mv->SetDepth(-10); + + TEveUtil::LoadMacro("geom_gentle.C"); + mv->InitGeomGentle(geom_gentle(), geom_gentle_rphi(), geom_gentle_rhoz(), 0); + + + TEveUtil::LoadMacro("geom_gentle_trd.C"); + mv->InitGeomGentleTrd(geom_gentle_trd()); + + TEveUtil::LoadMacro("geom_gentle_muon.C"); + mv->InitGeomGentleMuon(geom_gentle_muon(kFALSE), kTRUE, kTRUE, kFALSE); + + mv->SetDepth(0); + + //============================================================================== + // Registration of per-event macros + //============================================================================== + + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Track", "kine_tracks.C", "kine_tracks", "", kFALSE)); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits ITS", "its_hits.C", "its_hits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits TPC", "tpc_hits.C", "tpc_hits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits T0", "t0_hits.C", "t0_hits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits FMD", "fmd_hits.C", "fmd_hits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits ACORDE", "acorde_hits.C", "acorde_hits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits EMCAL", "emcal_hits.C", "emcal_hits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits TOF", "tof_hits.C", "tof_hits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits TRD", "trd_hits.C", "trd_hits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits VZERO", "vzero_hits.C", "vzero_hits", "", kFALSE)); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG ITS", "its_digits.C", "its_digits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG TPC", "tpc_digits.C", "tpc_digits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG TOF", "tof_digits.C", "tof_digits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG HMPID", "hmpid_digits.C","hmpid_digits","", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG FMD", "fmd_digits.C", "fmd_digits", "", kFALSE)); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW ITS", "its_raw.C", "its_raw", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW TPC", "tpc_raw.C", "tpc_raw", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW TOF", "tof_raw.C", "tof_raw", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW HMPID", "hmpid_raw.C", "hmpid_raw", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW T0", "t0_raw.C", "t0_raw", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW FMD", "fmd_raw.C", "fmd_raw", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW VZERO", "vzero_raw.C", "vzero_raw", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW ACORDE", "acorde_raw.C", "acorde_raw", "", kFALSE)); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX", "primary_vertex.C", "primary_vertex", "", kTRUE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse", "primary_vertex.C", "primary_vertex_ellipse", "", kTRUE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box", "primary_vertex.C", "primary_vertex_box", "kFALSE, 3, 3, 3", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX SPD", "primary_vertex.C", "primary_vertex_spd", "", kTRUE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse SPD", "primary_vertex.C", "primary_vertex_ellipse_spd", "", kTRUE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box SPD", "primary_vertex.C", "primary_vertex_box_spd", "kFALSE, 3, 3, 3", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX TPC", "primary_vertex.C", "primary_vertex_tpc", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse TPC", "primary_vertex.C", "primary_vertex_ellipse_tpc", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box TPC", "primary_vertex.C", "primary_vertex_box_tpc", "kFALSE, 3, 3, 3", kFALSE)); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC V0", "esd_V0_points.C", "esd_V0_points_onfly")); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC V0", "esd_V0_points.C", "esd_V0_points_offline")); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC V0", "esd_V0.C", "esd_V0")); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC CSCD", "esd_cascade_points.C", "esd_cascade_points")); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC CSCD", "esd_cascade.C", "esd_cascade")); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC KINK", "esd_kink_points.C", "esd_kink_points")); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC KINK", "esd_kink.C", "esd_kink")); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks", "esd_tracks.C", "esd_tracks", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks ITS standalone", "esd_tracks.C", "esd_tracks_ITS_standalone", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks ITS", "esd_tracks.C", "esd_tracks_ITS", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks TPC", "esd_tracks.C", "esd_tracks_TPC", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks MI", "esd_tracks.C", "esd_tracks_MI", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks by category", "esd_tracks.C", "esd_tracks_by_category", "", kTRUE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks by anal cuts", "esd_tracks.C", "esd_tracks_by_anal_cuts", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks Lego", "lego.C", "lego", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks Beams Info", "beams_info.C", "beams_info", "", kFALSE)); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracklets SPD", "esd_spd_tracklets.C", "esd_spd_tracklets", "", kTRUE)); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC ZDC", "esd_zdc.C", "esd_zdc", "", kFALSE)); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters", "clusters.C", "clusters", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters ITS", "its_clusters.C", "its_clusters")); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters TPC", "tpc_clusters.C", "tpc_clusters")); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters TRD", "trd_clusters.C", "trd_clusters")); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters TOF", "tof_clusters.C", "tof_clusters")); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters HMPID", "hmpid_clusters.C", "hmpid_clusters")); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters PHOS", "phos_clusters.C", "phos_clusters")); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters TPC", "vplot_tpc.C", "vplot_tpc", "", kFALSE)); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kAOD, "ANA HF", "aod_HF.C", "aod_HF", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kAOD, "ANA Jets", "jetplane.C", "jetplane", "", kFALSE)); + + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "DUMP VZERO", "vzero_dump.C", "vzero_dump", "", kFALSE)); + + + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM TrackRef MUON", "muon_trackRefs.C", "muon_trackRefs", "kTRUE", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW MUON", "muon_raw.C", "muon_raw", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG MUON", "muon_digits.C", "muon_digits", "", kFALSE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters MUON", "muon_clusters.C", "muon_clusters", "", kTRUE)); + exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks MUON", "esd_muon_tracks.C", "esd_muon_tracks", "kTRUE,kFALSE", kTRUE)); + + + //============================================================================== + // AliEve objects - global tools + //============================================================================== + + AliEveTrackFitter* fitter = new AliEveTrackFitter(); + gEve->AddToListTree(fitter, 1); + gEve->AddElement(fitter, gEve->GetEventScene()); + + AliEveTrackCounter* g_trkcnt = new AliEveTrackCounter("Primary Counter"); + gEve->AddToListTree(g_trkcnt, kFALSE); + + // A refresh to show proper window. + //gEve->GetViewers()->SwitchColorSet(); + gEve->Redraw3D(kTRUE); + gSystem->ProcessEvents(); + + // Register command to call on each event. + // AliEveEventManager::GetMaster()->AddNewEventCommand("on_new_event();"); + AliEveEventManager::GetMaster()->GotoEvent(0); + + gEve->Redraw3D(kTRUE); +} + diff --git a/EVE/EveBase/AliEveMainWindow.h b/EVE/EveBase/AliEveMainWindow.h new file mode 100644 index 00000000000..90acf9ad3f1 --- /dev/null +++ b/EVE/EveBase/AliEveMainWindow.h @@ -0,0 +1,132 @@ +// Author: Mihai Niculescu 2013 + +/************************************************************************** + * Copyright(c) 1998-2009, ALICE Experiment at CERN, all rights reserved. * + * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * + * full copyright notice. * + **************************************************************************/ + +#ifndef AliEveMainWindow_H +#define AliEveMainWindow_H + +#include + +class TEveManager; +class TGMenuBar; +class TGPicturePool; +class TGPopupMenu; +class TGToolBar; +class AliEveMainWindow; +class AliEveFileDialog; + +// Items IDs for MenuBar +enum AliEveMainWindow::MENU_FILE +{ + MENU_FILE_OPEN, + MENU_FILE_OPEN_URL, + MENU_FILE_OPEN_CONNECTION, + MENU_FILE_EXPORT_VIEWS, + MENU_FILE_EXIT +}; + +enum AliEveMainWindow::MENU_EDIT +{ + MENU_EDIT_UNDO, + MENU_EDIT_REDO, + MENU_EDIT_CUT, + MENU_EDIT_COPY, + MENU_EDIT_PASTE, + MENU_EDIT_DELETE, + MENU_EDIT_PROP +}; + +enum AliEveMainWindow::MENU_VIEW +{ + MENU_VIEW_TOOLBAR_MAIN, + MENU_VIEW_TOOLBAR_NAV, // event navigation toolbar + MENU_VIEW_TOOLBAR_PROP, // Properties Sidebar - event info, objects list, etc... + MENU_VIEW_TOOLBAR_HIST, // History sidebar + MENU_VIEW_RELOAD, + MENU_VIEW_ZOOM_IN, + MENU_VIEW_ZOOM_OUT, + MENU_VIEW_ZOOM_RESET +}; + +enum AliEveMainWindow::MENU_GO +{ + MENU_GO_NEXT_EVENT, + MENU_GO_PREV_EVENT, + MENU_GO_FIRST_EVENT, + MENU_GO_LAST_EVENT, + MENU_GO_PLAY +}; + +enum AliEveMainWindow::MENU_HIST +{ + MENU_HIST_SHOW_ALL, + MENU_HIST_CLEAR_RECENT +}; + +enum AliEveMainWindow::MENU_TOOLS +{ + MENU_TOOLS_MACROS, + MENU_TOOLS_QA +}; + +enum AliEveMainWindow::MENU_HELP +{ + MENU_HELP_CONTENTS, + MENU_HELP_ABOUT +}; + +//______________________________________________________________________________ +// AliEveMainWindow +// + +class AliEveMainWindow : public TGMainFrame +{ +public: + AliEveMainWindow(const char* title, UInt_t width=800, UInt_t height=600); + ~AliEveMainWindow(); + +public: // SLOTS + void onMenuFileItem(UInt_t id); + void onMenuEditItem(UInt_t id); + void onMenuViewItem(UInt_t id); + void onMenuGoItem(UInt_t id); + +protected: + void setupMenus(); + void setupToolbars(); + + void openFile(const TString &path); + +private: + AliEveMainWindow(const AliEveMainWindow& other);// Not implemented + AliEveMainWindow& operator=(const AliEveMainWindow& other); + + + // Menubar + TGMenuBar* fMenuBar; + TGPopupMenu *fMenuFile; + TGPopupMenu *fMenuEdit; + TGPopupMenu *fMenuView; + TGPopupMenu *fMenuViewToolbars; + TGPopupMenu *fMenuViewSidebars; + TGPopupMenu *fMenuGo; + TGPopupMenu *fMenuTools; + TGPopupMenu *fMenuHelp; + + // Toolbar + TGToolBar *fToolBar; + + TGPicturePool* fPicturePool; + + TEveManager* fEve; + AliEveFileDialog* fFileDialog; + + ClassDef(AliEveMainWindow, 0); // Short description. +}; + +#endif + diff --git a/EVE/EveBase/AliEveManager.cxx b/EVE/EveBase/AliEveManager.cxx deleted file mode 100644 index d92918aa643..00000000000 --- a/EVE/EveBase/AliEveManager.cxx +++ /dev/null @@ -1,81 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "AliEveManager.h" - -//______________________________________________________________________________ -// AliEveManager -// -// Central aplication manager for AliEve. -// Manages environment, gEve, elements, GUI, GL scenes and GL viewers. -// -// ALICE_ROOT must be defined prior creating this object -ClassImp(AliEveManager); - -AliEveManager::AliEveManager(UInt_t w, UInt_t h, Bool_t map_window, Option_t* opt) - : TEveManager(w, h, map_window, opt) -{ - - Init(); - -} - -AliEveManager* AliEveManager::Create(Bool_t map_window, Option_t* opt) -{ - Int_t w = 1024; - Int_t h = 768; - - if(gEve == 0){ - gEve = new AliEveManager(w, h, map_window, opt); - } - - return (AliEveManager*)gEve; -} - -AliEveManager::~AliEveManager() -{ - AliEveMultiView* mv = AliEveMultiView::Instance(); - - delete mv; - mv = 0; -} - -void AliEveManager::Init() -{ - GetDefaultViewer()->SetElementName("3D View"); - GetSelection()->SetPickToSelect(TEveSelection::kPS_PableCompound); - GetHighlight()->SetPickToSelect(TEveSelection::kPS_PableCompound); - - RegisterGeometryAlias("Default", Form("%s/EVE/alice-data/default_geo.root", gSystem->Getenv("ALICE_ROOT")) ); - - AliEveConfigManager::InitializeMaster(); // initializes menus -} - -void AliEveManager::CloseEveWindow() -{ - // Close button haas been clicked on EVE main window (browser). - // Cleanup and terminate application. - - TEveBrowser *eb = dynamic_cast( GetMainWindow() ); - eb->DontCallClose(); - - TEveGedEditor::DestroyEditors(); - -} - -void AliEveManager::Terminate() -{ - -} diff --git a/EVE/EveBase/AliEveManager.h b/EVE/EveBase/AliEveManager.h deleted file mode 100644 index 5e4b3103370..00000000000 --- a/EVE/EveBase/AliEveManager.h +++ /dev/null @@ -1,31 +0,0 @@ -// Author: Mihai Niculescu 2012 - -/************************************************************************** - * Copyright(c) 1998-2012, ALICE Experiment at CERN, all rights reserved. * - * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * - * full copyright notice. * - **************************************************************************/ - -#ifndef AliEveManager_H -#define AliEveManager_H - -#include - -class AliEveManager : public TEveManager -{ -public: - AliEveManager(UInt_t w, UInt_t h, Bool_t map_window=kTRUE, Option_t* opt="FI"); - ~AliEveManager(); - - static AliEveManager* Create(Bool_t map_window=kTRUE, Option_t* opt="FIV"); - - void CloseEveWindow(); - void Terminate(); -protected: - void Init(); - -public: - - ClassDef(AliEveManager, 0); // Eve application manager -}; -#endif diff --git a/EVE/EveBase/AliEveUtil.cxx b/EVE/EveBase/AliEveUtil.cxx new file mode 100644 index 00000000000..f4077d6ce70 --- /dev/null +++ b/EVE/EveBase/AliEveUtil.cxx @@ -0,0 +1,36 @@ +#include +#include +#include +#include + +#include "AliEveUtil.h" + +TGPicturePool* gAliEvePicturePool=0; +AliEveUtil* AliEveUtil::fgAliEveUtil=0; + +ClassImp(AliEveUtil) +AliEveUtil::AliEveUtil() +{ + gAliEvePicturePool = GetPicturePool(); +} + +void AliEveUtil::Init() +{ + if(fgAliEveUtil) return; + + fgAliEveUtil = new AliEveUtil; +} + + +TGPicturePool* AliEveUtil::GetPicturePool() +{ + if(gAliEvePicturePool) return gAliEvePicturePool; + + TString iconSearchPath(gSystem->Getenv("ALICE_ROOT") ); + iconSearchPath.Append("/EVE/icons/"); + + gAliEvePicturePool = new TGPicturePool(gClient, iconSearchPath.Data() ); + + return gAliEvePicturePool; +} + diff --git a/EVE/EveBase/AliEveUtil.h b/EVE/EveBase/AliEveUtil.h new file mode 100644 index 00000000000..efa1ac79c0c --- /dev/null +++ b/EVE/EveBase/AliEveUtil.h @@ -0,0 +1,36 @@ +#ifndef ALIEVEUTIL_H +#define ALIEVEUTIL_H + +class TGPicturePool; + +class AliEveUtil +{ +public: +// used by a TGComboBox for selecting CDB Path +enum CDB_PATH_TYPE +{ + CDB_LOCAL, + CDB_RAW, + CDB_MCIDEAL, + CDB_MCRESIDUAL, + CDB_MCFULL +}; + + static void Init(); // init utils - run this once before any call to any method + static TGPicturePool* GetPicturePool(); + +private: + AliEveUtil(); + ~AliEveUtil(); + + AliEveUtil(const AliEveUtil& other); // Not Implemented + AliEveUtil operator=(const AliEveUtil& other); // Not Implemented + + static AliEveUtil* fgAliEveUtil; + + + ClassDef(AliEveUtil, 0); +}; + +R__EXTERN TGPicturePool* gAliEvePicturePool; +#endif // ALIEVEUTIL_H diff --git a/EVE/EveBase/EveBaseLinkDef.h b/EVE/EveBase/EveBaseLinkDef.h index a63ff7aee76..85f4d0dbf8b 100644 --- a/EVE/EveBase/EveBaseLinkDef.h +++ b/EVE/EveBase/EveBaseLinkDef.h @@ -11,15 +11,21 @@ #pragma link off all globals; #pragma link off all classes; +// AliEveFileDialog +#pragma link C++ class AliEveFileDialog+; + // AliEveApplication #pragma link C++ class AliEveApplication+; -// AliEveManager -#pragma link C++ class AliEveManager+; +// AliEveMainWindow +#pragma link C++ class AliEveMainWindow+; // AliEveConfigManager #pragma link C++ class AliEveConfigManager+; +// AliEveConfigManager +#pragma link C++ class AliEveUtil+; + // AliEveEventManager #pragma link C++ class AliEveEventManager+; #pragma link C++ class AliEveEventManagerEditor+; diff --git a/EVE/alieve_main/alieve_main.cxx b/EVE/alieve_main/alieve_main.cxx index cf878fe1814..91e8d06db0f 100644 --- a/EVE/alieve_main/alieve_main.cxx +++ b/EVE/alieve_main/alieve_main.cxx @@ -6,7 +6,6 @@ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * * full copyright notice. * **************************************************************************/ - #include #include @@ -27,78 +26,97 @@ #include +// DEV Version includes +#include +#include + int main(int argc, char **argv) { - static const TEveException kEH("alieve::main"); - - if (gSystem->Getenv("ALICE_ROOT") == 0) - { - Error(kEH.Data(), "ALICE_ROOT is not defined, aborting."); - gSystem->Exit(1); - } - - TString evedir(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); - - if (gSystem->AccessPathName(evedir) == kTRUE) - { - Error(kEH.Data(), "Directory $ALICE_ROOT/EVE does not exist."); - gSystem->Exit(1); - } - - TString macPath(gROOT->GetMacroPath()); - macPath += Form(":%s/macros", evedir.Data()); - gInterpreter->AddIncludePath(evedir); - if (gSystem->Getenv("ALICE_ROOT") != 0) - { - macPath += Form(":%s/alice-macros", evedir.Data()); - gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); - gInterpreter->AddIncludePath(Form("%s/PWG0", gSystem->Getenv("ALICE_ROOT"))); - gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT"))); - gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT")); - } - { - // TabCom fails on double-colon in macro-path. - // I fixed this in ROOT sometime ago ... could be removed - // when we go to 5.26. - TPMERegexp doubleColon(":{2,}", "og"); - doubleColon.Substitute(macPath, ":"); - } - gROOT->SetMacroPath(macPath); - - // make sure logger is instantiated - AliLog::GetRootLogger(); - TRint *app = new TRint("App", &argc, argv); + + if(argc>1) + { + if(strcmp(argv[1],"-dev")==0 ){ + + AliEveApplication app("AliEve", &argc, argv); + AliEveMainWindow alieve("ALICE Event Display"); + + app.Connect(&alieve, "CloseWindow()", "TApplication", &app, "Terminate(=0)" ); + app.Run(); + + return 0; + } + } + + + static const TEveException kEH("alieve::main"); + + if (gSystem->Getenv("ALICE_ROOT") == 0) + { + Error(kEH.Data(), "ALICE_ROOT is not defined, aborting."); + gSystem->Exit(1); + } + + TString evedir(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); + + if (gSystem->AccessPathName(evedir) == kTRUE) + { + Error(kEH.Data(), "Directory $ALICE_ROOT/EVE does not exist."); + gSystem->Exit(1); + } + + TString macPath(gROOT->GetMacroPath()); + macPath += Form(":%s/macros", evedir.Data()); + gInterpreter->AddIncludePath(evedir); + if (gSystem->Getenv("ALICE_ROOT") != 0) + { + macPath += Form(":%s/alice-macros", evedir.Data()); + gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); + gInterpreter->AddIncludePath(Form("%s/PWG0", gSystem->Getenv("ALICE_ROOT"))); + gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT"))); + gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT")); + } + { + // TabCom fails on double-colon in macro-path. + // I fixed this in ROOT sometime ago ... could be removed + // when we go to 5.26. + TPMERegexp doubleColon(":{2,}", "og"); + doubleColon.Substitute(macPath, ":"); + } + gROOT->SetMacroPath(macPath); + + // make sure logger is instantiated + AliLog::GetRootLogger(); + TRint *app = new TRint("App", &argc, argv); #if ROOT_VERSION_CODE >= ROOT_VERSION(5,25,4) || defined XXX_LATEST_ROOT - // Waiting for update by Pawel. Now GED in ROOT is better again :) - // Uncomment when fixed in AliEveGedXXX. - // TEveGListTreeEditorFrame::SetEditorClass("AliEveGedEditor"); + // Waiting for update by Pawel. Now GED in ROOT is better again :) + // Uncomment when fixed in AliEveGedXXX. + // TEveGListTreeEditorFrame::SetEditorClass("AliEveGedEditor"); #endif - TEveManager::Create(); - gEve->GetDefaultViewer()->SetElementName("3D View"); - gEve->GetSelection()->SetPickToSelect(TEveSelection::kPS_PableCompound); - gEve->GetHighlight()->SetPickToSelect(TEveSelection::kPS_PableCompound); + TEveManager::Create(); + gEve->GetDefaultViewer()->SetElementName("3D View"); + gEve->GetSelection()->SetPickToSelect(TEveSelection::kPS_PableCompound); + gEve->GetHighlight()->SetPickToSelect(TEveSelection::kPS_PableCompound); + + gEve->RegisterGeometryAlias("Default", Form("%s/alice-data/default_geo.root", evedir.Data())); - gEve->RegisterGeometryAlias("Default", Form("%s/alice-data/default_geo.root", evedir.Data())); + try {AliEveConfigManager::InitializeMaster();} + catch (TEveException exc) { + AliErrorGeneral("alieve_main",exc.Data()); + } - try {AliEveConfigManager::InitializeMaster();} - catch (TEveException exc) { - AliErrorGeneral("alieve_main",exc.Data()); - } - - app->Connect( "TEveBrowser", "CloseWindow()", "TRint", app, "Terminate(=0)"); + app->Connect( "TEveBrowser", "CloseWindow()", "TRint", app, "Terminate(=0)"); - app->Run(kTRUE); + app->Run(kTRUE); - if (gEve && gEve->GetBrowser()) gEve->GetBrowser()->UnmapWindow(); + if (gEve && gEve->GetBrowser()) gEve->GetBrowser()->UnmapWindow(); - TEveManager::Terminate(); - app->Terminate(0); - - if(gEve) {delete gEve; gEve = 0;} + TEveManager::Terminate(); + app->Terminate(0); + if(gEve) {delete gEve; gEve = 0;} - return 0; + return 0; } diff --git a/EVE/icons/menu/application-exit.png b/EVE/icons/menu/application-exit.png new file mode 100644 index 0000000000000000000000000000000000000000..4839c614294e7f16637751bdfd0b80064641a574 GIT binary patch literal 842 zcmV-Q1GW5#P)0b000McNliru*9;pL3I!7>cy9mz0@q1I zK~#9!jgrr6R96(oKli>jZ(e3Hlc^*fCy5YsTr{;m)T)1h3l$fk=qk`fZ5M$q+LgOX zc3l+&L5ntBbdh4|9}tLcT!^5k*piTRh#`}xGchyc%gnrA_j!19A<~5h4(Go6?)P)Q z=WtbPe*S3h?%kWMg@t_p$y*6vfOq$uy?gD-^tAVCW#x>jU%GTJJaFJ-S1H~%5~a|s z7B8<~yQ3Dg-qo;zUHAS2oAj-K^&YfehSR@X^^o+N*MkIg`u%nEf zIzWWa@82if_1ORQMcjOz(eoGNHiMJPVMJV;yGiru-+&@p8cG4yR5tTN;AD%j0F;R_ z%{uW$jr?cFFj|AQ&|-P#k6-CLc}TC>q`khu`r;yfzyI2fEQ|Kz$CxChSac}uaq0E9 zQD?qnu=D|ufOlSPv$^mW$?`vVUGVyv*mem49orU(0_lXT4p95XnYes~((nit1}iaS z2Mc`o<5e<~hmn!sW)-%rNdd-I3axN#a1VdV$5-bW85_sZkh?y^(A;;jRtyPn;-}xp zesToI0V|{abCA&}4MlkaU)=bUkx>y_!o2bg?(%I4|K4Hv_wOm@a}1A;@%gn|6sm`? z1rVhUgbv_08aS;67BaBeukar(k^m-w_|a|5&)+iOWXQCdgxd|21qM(zj#i)dYV~qX z$8y6EmB}h@x(D+F4fp+wCOtqmTKE|+b!>3H$hZZ-3~ny^I~n+a07*qoM6N<$g1mZ)LjV8( literal 0 HcmV?d00001 diff --git a/EVE/icons/menu/document-export.png b/EVE/icons/menu/document-export.png new file mode 100644 index 0000000000000000000000000000000000000000..ebcc0fa9a6049100b3aeaf385bf3fe89fb8243dd GIT binary patch literal 614 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfLzW3kH}&M z2FBeW%xLxI@gtz1WQl7;NpOBzNqJ&XDnogBxn5>oc5!lIL8@MUQTpt6Hc~)EKLdP1 zT>t<74`c#CN=gcZ0U>j9bCJ3B_Vz#pSFc{}>7Ouh%9QKZuQzwJw{&&p<>ggWRGdD2 z`rZ5Y-@bpJI(6#InKNh2nl)$6oVj!7u2`{R<;s;CH*VarWy{vBTlekTci_N*qeqXP zIC0|CsZ(dqp1pMG(v>S$fX3bdg1dJgJbd`z(ZffN9=&+^^2N(nAn^M2>o;%Syaj`I z?|` z_4G@NZGk?NDhcunW?*EJl2KIA(KQVS3~F3;;P~+yH*Y@t08|*nydD%jJ3U<-LnI_w z4{r225+LGwvG&~F$tN3Lu3Xec8`sH`j1;C_Nv5gTfeknqpl~9)qHUSA%>@q zUzx0#z`^kEQ)Yx&$KCg>6aW0NJtG?Mj@2Rd8t()7;3JOZ?yLNlgCf(@)z4*}Q$iB} D=(Rq> literal 0 HcmV?d00001 diff --git a/EVE/icons/menu/document-open-remote.png b/EVE/icons/menu/document-open-remote.png new file mode 100644 index 0000000000000000000000000000000000000000..ce628ca3ae6e08bdaa4cf7e4f5d164a24d7e971b GIT binary patch literal 864 zcmV-m1E2hfP)o_zM>1x@a*J{%&dj5se zN96n)AI?wDG!9>1X%$zluKqaD*uPOJ4b;-li)@oJ0D>zD5CX5C`3My9`)})T?9!*7 zJ@#%oQF-~&FYD!AUO*9AS$Fu}7oWWH&V_FaEM8tA)-hJMydO=V@0&7bY^0_K1D7Ss z3(p-rI`?R0a*RLwauGJx)Lh%<@ifsJ%gqbNpM2Ih(CSs zp5&Q9bN#8*__<>z@8w$qR-3t33)gPa%FPbiokA4wFsk)>GJoKa&%fI~(l~kQC!-aC zMLaX(@()X{K2g#GCT+{HB-I#s$qJ2E6@+E_?!6|p{@epIO8vR6HZLs~ADdbkx<6#o z>J-@N4E0hoQwM)-;+7Noqgx=ot44hxiG?XH#pq>SH*`*oK22h1RVkHxUa+(Wf+#5= z>*VLymgIo(%-t5pzBRtQ?~{Wn)gw9%~|qc>z-w$|(UQ!l**@sDq1gVdvaUq*^&J8JW zM}k0@-0rER7jfvZ7ZHd;?f-0a{P}bE2M~WwzS`Dx2D?NY%?PN(TTo*alb-Q_5Tb0000-L1P+nfHmzkGcoSayYs+V7sKKq@G6j0HV0G|-o z|Ns93nQ-9LaT|o%Z#%Z%R!rHXoV{N;=b&cc5yP})hUKTM>dphjom;PZ)a>)_xfL?` zL1@dtj0s2brk*HT`lMpTv&t1u>ZWb3o4%!W*5>YQZ>B8WK6U%U8GBwYIQnVfp|?wp zzFB(g&9Y-}Rvv%1_SD<;r-A7G#xo!GT>iNK+Lr@2K0bc(^x5+l&tJTF`ReuSH*em& zef##^yLa#3zyAORAHm?$r%#{3;LDdUU%}uT2z>wk{l||VKY#xG_3PK~-@pI-`SbVh z-+%x90X@i}$DaW7A!kXDUoeBbjh+3kKY#ym=`)D|1$#VQ977}|Sr0mTF$apU9C-Cl zzp1lBVaFF6xtq+KP1ekLB}U1i9-K1Y4qq^5cyC_3>rTxQ-%05{ar?Kv&3d$_=YFhp z_Sz3$K3Lu?n>%yrhWkEF&#$N@sHAQ6RC_J%|MqFV7uRE!|Ni!!d&litp4W03 xB2RwV@}1{G@bb&@4By{A;bNGi!c-u0+T6hRb*|LUG4ipy2(4j2_h1WCNe;6X2X7X%do zV(?;M)I{Slc*r3}BN&7X2BHMqz+m(uxI|I#Af7zvXpe!w2qw53oWa4dt9#~IujopX zG2mj3(Zjm~2>bxsHxg#NWw7H( z^m+3gm;()ZGC7Eq{$uow{KT3t)-Xa+bDm2FIB5m3W9*bFeDYAMx#N6LP2}2R-;_*%uN6`gR>nQ@P7BM zo#DH;uP8rwfGU*=sZI+3TnylF-|3SRJiWPxRYHi_E$dUCuU24!A&6m0000fOQdZcB@P3sI60o!O*FJByFDWg*&cyMexBl@9zEhyq7=(0GyD{;C~h);>T{F z!_D7W79j$7o&+fb2q{6ZXK@vINwLFjH>BGh08~wDS(d?Kxnz)v3x4SPDc$>E?27vWj3|OsJH*`ilaWov>wg92lmTGmbkUUW5j3n&5RgjTFcQuo-~zju>ifXqg5GmMS9SNv7EVbl&nEeUN5?Ue{@M z0cHa$sW)&NU5Ej=rh$Jz5D}`Xg0iY`{yt9_fRsTh7K-jpvYL}50pCA>yYcvC`Y@ev z{+M)5x?uH#;JzpdEXxvU5^gpd+-|qnG!3rTYfRG=2UpjxRC~lgrdkTaaG(KoU0Z;k zJZ~-?)JUISV`@i-D@I zgD|6$#_S59pk#?_L`iUdT1k0gQ7S`udAVL@UUqSEVnM22eo^}DcQ#T$MejXb978H@ z<@Oq8F$Ida_AlUg=iqzbmh20?rl|@>J}bFBvZddo?kbdj=ip)NEYWoIwxfrjspE&I zf7kzXeO5gCv;OnD{r8;bw;$;L!puHH-#BVsl-uWB6J%O8F5eg^B)IOC*`2?k$%mE* zZGZSqJ26OnS7zPD-qf;-Cd;FRd6qBT6YZ6_>Ilp2AJ^pTp`U_QHfz-`{!$52l`)9UY%*8-9&1?@*h#)SHUM zk6ZgL_O)%DJ$u9RPC53rhxZrmt-AK^znEXmL=D9W5yeH^`@hV2(!JrW#zdgk89ZJ6 KT-G@yGywp$wU*=n literal 0 HcmV?d00001 diff --git a/EVE/icons/menu/edit-delete.png b/EVE/icons/menu/edit-delete.png new file mode 100644 index 0000000000000000000000000000000000000000..d04a554ee17853a053c7c6a795d6aa20ed32aa9d GIT binary patch literal 641 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfLzW3kH}&M z2FBeW%xLxI@gtz1WQl7;NpOBzNqJ&XDnogBxn5>oc5!lIL8@MUQTpt6Hc~*<;sHJ( zuK)l4Z(v|p!N9PVfuWs&p^JfGA_Kz=28KBd467IzAX4jDSb*GiKE6H%hCBv_Tn2_L z28Klp4AZo=>*d6nRHQFelpgl-Jed$XS6*hniPlkf`z7+iOXNkDC`v6+mRl+(v`kK5 zwTk$9b?ME9YMZs?_j%bL_HsDk<9sU2r$Je2`?nP^4n zy$lTd7#Q|j8XpwoI%I5o$k*ermDN#8qhmrm$Ax%K+S#3Uu|MtSb;ix@0t3SZA)d=& zVVA>0E~h43Ns7Cc5PLm2@wTwQZ4try!urld@myOUR3yfXZwfVuCELX$$gHBz;HAv3GxeOFfuao00U1?PcLu(fWV*& z*YDnY^6b^8FJFJbz;6)v0|bBn{{8pwYTmshp#C|YE{-7*lD!9A#hMrxSP$@P+)yej zFHd4mDu4d>{K5|<=Xn;eJT-f8`oR(f<-O;7#4aq4w-XY2{jJDX@@(tpr)jM&lV@~v z*Ho&Vn=Ex=#*GE`IlapY+3ZWUT+T69GWmBUabMW;!&!e;{7GJTTlg5GXv(e!RomBu zh3)n|!O~g#f1h~dx-S*-ITHltB~N4Bap$D7gPVoUk4G^qQ+_ZwZx+t3%CQ#%x|6}v L)z4*}Q$iB}L2Ua6 literal 0 HcmV?d00001 diff --git a/EVE/icons/menu/edit-paste.png b/EVE/icons/menu/edit-paste.png new file mode 100644 index 0000000000000000000000000000000000000000..a4e0a02fdadfe5f865ba960d84025ab991ae92bb GIT binary patch literal 529 zcmV+s0`C2ZP)j6lR&1TgAAr&ZD!k+qP}W%jJ@CJRS#CRRM9ND9TBQ-xjmkjMQ-h5{U#%r&Fla zYOo82VSMr$Ij3T=SddLTjly+Z+O#GUI#oqsWi!YTYX~Mp1c=N6n29LEN`M@2&z|S8 zz?K6UxCItq2SjA@zXAxJ_(ltgM1XRn1uCLIxCJIj9r$!Vb_lQ|29qtzg5l3_{kb(5 zjm9I~{uX%RpAOcb`;j_K(Y$)So_lkBnZvay{frS1X+EDb*~^{h3eETC3$-v9491ub zaDdSvvJ-f{HKXqXOVUsMh>g{Fm38Z8Qn zsEFDGZQ8UhvUNerpno7-6$Ig?O-OCZAcUYVBpM^NPct)}nS1ZtxpU7wZ`0MvMd6|c z-o-iReV_ANoI}ivrO-8MC!*7qA@>qQmmn!jDPFpPe?QXt2KV#F#lAKGIuXP^yGsPkXpA4yj=jcrVLkFMzX$T>)v3>(A z0>~ho*mKZ;7WkFisNKFpkhrij*O{2|zQvJWJL8xw&4A{a>&!ajSBw!16Wh}5NEvoK zC|NED0G!F#E0YD`0s-*O|Ag{eN4u^cfG|`#|c1v ziImB6L9trVfmeq9Q3zc~B|y*%2^gG<()vw7mA-q* zn-jCqDiA;73-NFcz(CLT4OYO+hBg329O)`pX$59wphhVyj=2=fYSzViZCdz){8=N< zC(U@J5kR4Ys8$LEL>MptjEXsSqf9goz_BydL^&Uxrz_OLmv|IFGin?d+-yuWmB^1m zHF;>Bv50{JZnCBHbo1MP;Wz0EAXK54)Pxl|$9E2%NB?_cZp~4ajOyOqe zsAJ8W?5|$3;xAGF|HrM{0LOS~m0q^oYKY8h@9Y|M83@4XWHY zECcUdwx+H6y0*Dw@~Eb3Ei2<|uWan=tLI~$=WkaMu7g5T-YL9`nX{*XHh^>zs;}ePFs;~PxDud5m0G&V*hkWWOq-{Z?)8y0!<{$YI z7r*@s>}^cUXuG+C)`o3N1Ja_=m{~5(AJK>aoLmxwTLg&?1e;r-aTQ>59ZIIjTm9#~ zgRxd;wbh0^^W*DuIh9Cxwq0xrGblT3hvqIi;?wMeJM;dfOn#h{3u#W0A{6fonT)ZU z>dY=xR+cewR|NHc>YXa-q=Fc3yA!i#|2ks!VJ?SiT6A(Uni zHXU1_w?nHjV-s`BcBHMbmRZOfk@FBb-29pMYNm4HwrR?~s$eHL%3}H?zh4$V6F{d!s7&8>3Hq5QWDof7Tt33K<8dCg)0ru5k&9s^DKt sKJG!8&0+f;K8PVh9!*!(H4p;$7};_ilHbUDwTN z?EK+lhc`R_y!UuRN-6x01pX48Suv4qP7`BO!vpET0O+gyXuns$BFJ1;k4`)2(jOVn zLP&)@|>CnmbvB7Sn((ujcbPt6Ul@NW0;qQtu$2F_1Pn zdL+kCE`>_XhusKJI@B)-#kg}{W z9&uoQx@d3IrvW^O3=C;bfeTc%K`7r3&~Sa+c={CK54R{p0ZhOU=EcOIP2%vo zY8yFAz%)4AmW%4$u+JEjmSXz;(N?9I}Yocf`GGok!G?x%fYd3ANf{pVvMA_*YXg{cv7nZBm2@ieWNras&G3D272l_l(i Qb^rhX07*qoM6N<$g0$m2kN^Mx literal 0 HcmV?d00001 diff --git a/EVE/icons/menu/help-contents.png b/EVE/icons/menu/help-contents.png new file mode 100644 index 0000000000000000000000000000000000000000..b3fbea8c5ae0d1f401f4ab31105107d711bfe35e GIT binary patch literal 684 zcmV;d0#p5oP)OpZD(l(H1DJfC`I=!Gu9V!r)}0rt07# zi-W<$82{6Jl0F5e$N49I?XE4}pO7?(2G18Ra__-o{)ZRE6`oHo zjsd>~>vPr5^W9v#a)GdKl+4Ht8ezn4U}>YJ6W=2M!k~d_)cXM>Ek5RY`>!sScgUJN z>Fz!*59Js=nI#A<*^EnPN-{OQ!d$5iz|ZpPGJwNAq9DL^9C96+ht~&LSoL`Nro^L{ zOMLy|^W@eL8KW>tqLkvWAPR9^m$5U)$Y>`Hx)`m{aro7T3deJrOCvqayHpwg$v&*L z$hg7lnJT?qn%N~kJ`FW5q%fQZ0ZZ#atAR`qfQ=hC1d+?L_hkT#bm-}l+&p(QUT2N9 zT0~0kHBg5I4j`pVCZ*ZW_}M(upSE~6?=_zZAyC>R2%NpWHJ#}cZ90v^z!Agb+bY?3 z9svT-34&&=Ts}`n+R)}iuVl6q#&1pmmdIK_pmoAGP_85$2Q$X}ok@q4iY28ruGkX@ zEEc7b8c2y_Eoq}^(}=(dXqOVgHU}!Hfh%2nzmAMgfDQw93WAMom@L|s;7>N;FCZNJ z9iN@uMk@rADk@$fif7@$sBjMmzHQa2c-xzlH#S-LvPhemc@D7~2Gl+8JHRiy*|}Cj SeHG>a0000tH5kGSn%nbCPM4W3n>ZNdZd-;xN%{AXm6;Gi9t`gfXTt z7&^unU`j(f7_qRB%2`V(M+@aFcT16@+_W48itK$jv%P%(_ulvZ@A&;*@_p&P-kw&L zc9sYsD=LLd2m3a5@TQ>k;lJ+(V;b*HW#IAn;c*`|yzY;o1ja*@i5=W`eJL^s+9r5h zOYn;hNnqWI3q~v!ixd_W5&!kAm|#+L-0l2DXFG&Uj{15rJa+d4O4w{RxZt2tL?V&+ zd_F`P8yiDPLtY0l&A}8Vxd;_vHY+O&GrwU96Nvv`_HwYmn?grNN9Z3L8~a~YIYI(d zTU*=G(t@f{PfySA@Gz=H*i(&NMMp>D%5adNP$-}lm7|=ToQ8%5a9UeiVWLnd1OV;r z?J}7R5;{6M1Oh=yXLi za^TY0*$K#jPIq@VET^}(7kB}rfq?;lH!?CZIywrYRVtNQtsWmA*Jv~o6BCn@lT%Yu z)6>&4Gc#JPc6N4lZfg!gB~v*$Inb#-+O4I3QN*QTkN} zo1oSWpEUcT`L00K*7l~qb!Z?-BNiSs{`kdb7m4TZY6j*xjP-90)f<|I z(8ULLyqaWu^NA-jLg7co_f8#la`8Lx)xO&SgeCT;-=AR-Puzolzye{A8UFANclRas O2~s`0$$z=uO!)_nMK!$u literal 0 HcmV?d00001 diff --git a/EVE/icons/menu/view-fullscreen.png b/EVE/icons/menu/view-fullscreen.png new file mode 100644 index 0000000000000000000000000000000000000000..eb5864d04e902e61e4d50fc5673561b4b179f403 GIT binary patch literal 582 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfLzW3kH}&M z2FBeW%xLxI@gtz1WQl7;NpOBzNqJ&XDnogBxn5>oc5!lIL8@MUQTpt6Hc~)E-vWF> zT>t<74`d<(X=!OWIXOi|MKv|GSFc`OzI{@Y4Rw+9653=Q2G7PdPoYHxh}-h_mGNl6FN(hj7jA3AjCRDJ!~_V&vg zHe3UN8#fm(zPWqP%{_Z>-n@Bh>C#)vmfgB_=l1gDw{PFM2Lku+-+%C6|A7Y&9zJ~d z=+UFc&!4||as2p;Yu8>pe)8(<*;mh=0Uh@0)oUPl^XARRmoGoQdiC}B^RHjOeS7iZ z+sl{VUcLJM=FN|H?|y#x@ayBpU!On!{`&RL_wRpy{`~vF!spqc?H5rJwUQE#N+8q97ulAx93SE1r|M`F3 zgNfhb-Eq_MXJ=R&xPB~RXoxu>&dzu?+AK3UdbO%Qvs-SD+Ah1E4$pF_|>&*+_N z(MI(P;>rFz>sxLp1#oG<^Rf#nXb`hHcI$Kow@E|J1##~G_x>|g`>C2u6J7Hb6oa0w KelF{r5}E+u0v$~N literal 0 HcmV?d00001 diff --git a/EVE/icons/menu/view-history.png b/EVE/icons/menu/view-history.png new file mode 100644 index 0000000000000000000000000000000000000000..516d5002138845757f0d87f9d2ecc38cdabff1ba GIT binary patch literal 683 zcmV;c0#yBpP)>LHMW5TWFvi2(^7EG>BI(H<0ywzeupY%yUMtl53rWb5ns@LlQ3!leVcew=UIpqa{;Dr=L0aZN&HT4hBbq#b)6PSIv{fv(> z4+u8!4{xj0R7e)~zU(xcO@n6HDVjX!cBexdMx$xfM8Bk1+Cfu)f&u=sQdL$eVk(uo zv2<_g$;zXZ_Z-xb;GO$wv|69i>GZo$FjOt?m&HL31S1HC!&gK}EG3i4)oHHmhW7KV z<>ab=NH*S}SS)U`EL(|0B4oxkz4t?95JLN-v^Fq;LZNW5zP=`DTI~#KK*zJ^`RkcX zW_#iZED$<+sjBi?qd^O`nto@T&Ni-)&*$~6tq*TLmOk%hvswAX2C-OdHV_bN!3(E< zMWfM6Co-T2@p%04;^NJns|&$HpU-zIkx1AkHpu02cO^+8pVs#FC>VGUzrU*}%C(6< zk>i;8()Q*;@Z80RfSrQ!?{8txwDSciy`9M5)$5Io%OP=DscO*4^Wf(}`L#lc4TMNw)Y6{994!H+hHY0`A;By%&J`*F@a z_jpGPX3-x!yYsx~<$2$ij4{{`Jx5hAT(G*VCr2tHljW{5TiIM$s&CaVL*qm9nfdd- zcS8Vpr@)?(f$&OswEV{T6X)GZe+7emgRq!|AP8{d_6^Kjor$;Cwl5*WkEKfSlO#yu zPJw^T%%N|mPMw-MGx?NYHpBhUQse5v74_@-FLd$gm-u@hzYC5WVtBPS_VCn+vByLZ z2B478Xf&{Kdjn($)!{0<9uFNRj@HCPwT8?XFc5hD`-A-hJ(rFi85fOa13J~1|9KvN zto#l~3wXAND|6qYw^GK*<0sKu>;(*984HXUI1yf`l!lyk+(t)>*B9}3ebW?NAw#Jy zCz;Yd6K9)o!=7E8rRni$xW)xZf<*-G_~MMwpzY>1c7t7P+**h4i)c4W9_=KacQ^?P z&zMJu9yojuE#5+OFG8>rfHD{^99E09LK+09->t*a3~i~t-Wyk!=k|#r^F*(Q^iG1c z;3iskS}^SlX{^5_|ALTN+Y;b_aukFjNU3M_Om=qPZnywS0v3Uc&T?sEl=;-Om`wCF zgehVXLzgwoDB!r(bSGT=&ml(i5lv8^u4P;dTdKS0#K_^P%)W4K@i-2oggzka&QLB2 zhnCn+?0NbeMC91~Txr;yONX-4iK5lGlx|wfY>O_^CgE8;twq17uc8msD$B!Kj$-w?zax~(J9FoG0Riq43dd}+ zCK$>7OcZ>(+U3~eCEFiM7W8ZJR(b?EdprA1V=Mfo=cb$VFb}Q}paNm{V2qtZ5t@TB zTKx%%+^I&_<>{~~mjHZ+oc+f{0AB7s;J)RJa<4L0Wbv^S?XrY*i{b8E+vsaq7~WHF z0(d*`Tq5Uw=X@Bzi@Bb#7#%kTlo_)C;D=oA=f-vH;~!CSYaU5(-z)$C002ovPDHLk FV1l!GvY-F} literal 0 HcmV?d00001 diff --git a/EVE/icons/menu/view-restore.png b/EVE/icons/menu/view-restore.png new file mode 100644 index 0000000000000000000000000000000000000000..df15efe9921084839e99f9a6a1817894359b67f3 GIT binary patch literal 586 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfLzW3kH}&M z2FBeW%xLxI@gtz1WQl7;NpOBzNqJ&XDnogBxn5>oc5!lIL8@MUQTpt6Hc~)Ee*%0$ zT>t<74`d<(X=!OWIXOi|MKv|GSFc`OzI>%LP^uU6x@$%6?v;IeR!!Kmdg7r&hmLNWe{B1L<2x6h*tz)3 zzEx)rtiEt$%zfXx9;4&c=-11 zJ9n=hzjyV-JrKBm|Hg&;_a8jCb@9Q2hYue$e}@zWn<6{qLXOfB*jZ_wVn&fB%3UpHL(p z3G_KnNswPK10$1SU{HK~O3I(Vu8X|?0>xK&x;TbZ+)6!vRj4UI#Np!VDNIT??soRJ zva)GtJ^T5;UT|jP!9x3W+j}RRe}A%Fz>U>5P~uSL*$vi`w-UV{cTBLJymV2{wa zOr6N-Qc}Ok!Dv1A<-AfuRql`(ty#GY8_)GRZe`@kVNy8y>|kTooccX25l0zUe|}rX zQm{~l*Z#iKk|$1mzD!GQu3-*dr^xhW)}I&L7K`8i-gP%&xv|Be6AkJ@zip@A6^g+~yr4T(3bu-rza>ca$fvG!nPTk$+*6ojXmxK`5D)If~^WY0Fz7W_6 zMN#lZtIHyA;v$T|hggg($q;2-@0T3W84jZIB`W;@;X#X-Xi2k|J+f|Kcq zd|?iz(P_1}2L}hDe*>WBFZwm3=FoLUBHOG|=EH1!+!hjv@Ka+Jj#;!PsftAXt*tlO z008`M0J+)TUO-2ZG9!U_|LP~Hn=1)0MplgYgs zfH8?g{e2Y*pr?*aEehhMT|8o;0|;0Gh@BJ&zink_7_I9Fg<+T)#7Mw#9KpqlX(UNZ zy?Z>|AxJq6Sf2>=UF~UL18z{!{oqMJB%uIUB4PsJaF|RH!*Om1MAZ))?xZImp=Wn( zPj9{K>R1kQ!UgAsl)wZ+h6$0e0N8B)I+QEr4*Zy3#e-3nhhQj75IjHxaEM`fo*~y$ z@}z9)%*@PCEC6vjooj`8IpPv|+GUG}_e8Kne?e9L5E+PyJhRJLD#WWUk|zi=Gvu#y zIvx230JfW)G)$b%Nkdf`2e09wErrMzI3eHkR+R9|#j}RDbF`1nK6k#lQB_-O(d+eA zzu*5G*jd(K&`*qyei%qaqw}oWKEGi8IMVm1`<~5a)j$9wcs!n}(z3Ek+sK;DW}9}o zTwu@1<#MRGx%qx)XD4g?Wa5lQV~<*`hIc;re>6>lU@$mN5X8E7W1|Kqh_gziGHv_x z9szrdqA1{SI6f;Bin&NQT!*4)ad~-pE(G>bZ*Olkj^nR=K3^BuZWdP)Fe|P6?o_}^~>fM~ZP*b5avtYUet#pXS+=~JQO^}Mvd{>|^EQ$mn ze7!g3OMO*}kr2L+bhFJBxe5NeE&Q`hr%vxSw{E-bertsgn3ni?@jNe{FCQNGBH$1l z$HBXi(F-(1-$pT1E{fvTw%a}4(4et{fACw-(sB=PY-;Ma+PIE6JBRWRiQ-WaTs)r` zy;?}>Mn^`T4i687PZA&lZw7Uf*5CtPrZ}ilm!Oc4M$nKDHGW!v{Dv*H{u(jZ-u|c~ zmW>`2V2?XHOF1D`XM^;HN>lFqKL1T_(i=&oTE$4I49EHw9~9XA8dYiD2eaAiJ}N*- znM}L9jrj3P`Nq{a$t+AsojW)Xqb`6ks~B#H6y%y#JQz!oq!t_l3L&Ind@={gBu{{l zI?i1$8*}YRfIkAQJRxY;wNx4 zj9{oplW`KB4?2$(SgrG8#hEaLU)!co5lROizIZL{E+YeNPx>%HNZ_5G^vjuIhQ(qT zJF$hXuI@g0an1b+Bx^LUM6r>cB=NI9A_>gmR#vs(zEeU)5;tAW+Sb-q<6kZO8Z$G7 z=_`fVcwKH7<-hBEN*n&`Hzty@2j_xHW*W|$Qn0zksf&Q4XiN_96T*<~2!tHa>{rzR&S2Wf6@ ze%{m5BbsK-&}1^b(rUHn;RpYR<2Voq1g2=3_U!NN)lxKlL#4N}rx3{;PN@iQV0WXUO5bt?Ax z`Ny6~jUI+*60o5~z-*Dg`0&9CTB3*nuugy@LRpse=gMJm5QezMdoBIAR76XVa~#7p zppm_lG_aXa5lU3VFbV%r0PJ@E94plbs=bvE&S3~Ek)!cEbyh^ClErzclx6&zxn&wY zZ*FdG>?i`&g|uun}+d>YQfxD`I=U0HR19Upx5YAGC86@KIcz%#1367mk zr-M2>JNx_k`grFzm*8|dpIR&yc>f3gkD@3*)AS@k5S!7ht!p?zG?+}L{LIq_1RS$i zECzf&-*07*qoM6N<$f>N$(i2wiq literal 0 HcmV?d00001 diff --git a/EVE/icons/navigation/media-playback-pause.png b/EVE/icons/navigation/media-playback-pause.png new file mode 100644 index 0000000000000000000000000000000000000000..a9b3113fb0b3067163f8186bc42d66151b6f7b73 GIT binary patch literal 484 zcmVMzCV_|S* zE^l&Yo9;Xs0004FNklB9I38p(Iz6IO^dEMQjt>}>^t3llMXiwcw)!{H|)}++uwH(K|-~|IrqGh@yQpO zH=a3ThfpD++=dBxU5K?1eFDKBVp?BowuED$I} zkR>PRm)K&!hzw1}kQOC^{*qJ33LIZ~rbLxp_E@EaXM7bn6PpN9cKz5(7SqMlOZ>Pz a(ftDwiElIZXxcXb0000MzCV_|S* zE^l&Yo9;Xs0004WNkl zYnIH1=*_xx>SF|Ngh5}Rs6lxM@#19}#d-$sFy8p}`-Kof9M%r9Ebou{qbxtj4r@XP z5kmBny|h<$Z0qaW*3m2X(taXDh~1<&*z(MYp&!nCcVfqu-e5NoA-d^?SHAga?8-ld zU(Oxd&`m|8wav2Y)E}jHu1r-X3KzC*mT4{4vt=LsR+>6?KYoWuxj3n8IOEc8GB)A6pN#dQ-vvRyY8A>?)zk_@Y3Qa+WC^9 zu?lzGbVJ8qRK}iY=h4m@-n%rxJ$HQoOq^+G@5jShvwZ4Yq4Guns1&-I<-=NtRyya% zg~CK-sxnb{YfdW_Ar_L>VAh(UOJjwxGaa*9gM~zd5Ur$<*2`Ioc0Bjkta{lYIBdh20qxn%iZ)DAy5JLP1do6CCFD*BW00000NkvXXu0mjf%^}{d literal 0 HcmV?d00001 diff --git a/EVE/icons/navigation/media-playback-stop.png b/EVE/icons/navigation/media-playback-stop.png new file mode 100644 index 0000000000000000000000000000000000000000..180280e8ba359d2a4389e93284454cf943b27dbd GIT binary patch literal 499 zcmVMzCV_|S* zE^l&Yo9;Xs0004UNklyX+scBW;@{ixB;GHteD? zi4zVk%KMm2d+-vpg@ZO1m$9PhNBs_CwvU6gp6B-T^cklp z%LPGv>rmBAl^Q-iHLBFjq4KSMp<&gV+w9V!%@Z9SXtBdK^=89D1o6}c7u@qo%qL%H z-gxGm4LpU2vNw&#BOe&P>Cq!4LGwb5O`~jC4;H!Q9m5r89H7`jk)mm{$oi2~!WHh& zq+HUVf=iBBAfd||l~Br&N1K?GJ(kHa#W>SIO3XgxNJ>$aM>IXMj535U#3;~1b3iGQ zVp#4kxJ)p@Fe6O#7nUi8QVbk!=#sF+43ms8$qbOt!J&90^LD|k@{A_sUnv@of|<7k zaaER6UeF|@gCDNR;wnUtIm>NkSffps7)?xvDjD47oYjZrT8_$_3?+8hV}T5L<0#h} p&_s}e?F9KS7v-XS=mdoU?jMapX0!E+{+R#(002ovPDHLkV1o6$+0Fm} literal 0 HcmV?d00001 diff --git a/EVE/icons/navigation/media-seek-backward.png b/EVE/icons/navigation/media-seek-backward.png new file mode 100644 index 0000000000000000000000000000000000000000..6b7632706d7b2cb5d1332dbecb73c7faf34ef8b5 GIT binary patch literal 505 zcmVMzCV_|S* zE^l&Yo9;Xs0004aNklEaX+%P?;$Kvd*GRS1 z5<{t*egGFi(7{b1K|~#NbC7~MNO5tA6{SSs4Kd|s2|+IRaJd`~_nsq2tFG5v*K-0V zaJ`ya*GcyYI9gSfRgrZZoGunAtEzOglu*&i{u&!x(%^+APu;1+8fCwtB?Mcpu+Jm! zwE5#QoNi)D9)8$MBVxMLFlpO}yaGc50j zd2fLSLSpVIF$-K`01+*gnD;~>uxZfdiY+WgxhBsL5Yz5%3W3N6MV<*cV}b#CIcJ0( zphL(u`9N4+AyJ4qWspALnEq5@4$BjkYj8n}2smUIfFmHHiGj5vru3XzbJ z!X~Gtbb&DC7`wa?5)uFVaKIR*Oq`t5Oh3aC4O+AbyWONn2GgI^(y&a;kXe->Pl-*Y v$&gisG}Exs%ISui^~QtoAnO@!?mzB76^d>}5T;jt00000NkvXXu0mjf(OJw5 literal 0 HcmV?d00001 diff --git a/EVE/icons/navigation/media-seek-forward.png b/EVE/icons/navigation/media-seek-forward.png new file mode 100644 index 0000000000000000000000000000000000000000..6c3b1c45643c612bae09a60e0b42fd2cb7382371 GIT binary patch literal 506 zcmVMzCV_|S* zE^l&Yo9;Xs0004bNkleeL)p+oS72=)Ow#GpKcc=57~V!VQPSa1CL{Xz&K4$Axee%c%LM*VcZ ze^3@eh!CPz+D*E7+oqnLO>NzLH|dpx2(ex24mLb-V(7bb-<;U8p*z?vi4dJ+%}ZbX zF!sk^nV&Aau%?rUNXqMZ$C=-9|4f}KOk^%?TF;YmwED|F`6c%m?D&X6W@uS!FILh= zzQ_~~oucKQcbK@cY9)=OQOD3&p{4HFeYeawQW)E@G>XMh+nLPNjBDPSaotVtO=X^0 z97Qu-GBj4W;}Eyq@Ct>ohni_L`!&a|OdNr`UW18qHO;+PDA)7HE@TSu0TePF^?acm zqLIvc?owu=FjbhyyfLehh!FFo#-L)=(3P>w*txcf#$diALWoAGmQ?eKMO&VFprV@B wl15305JHH0xz?|ybECOYHLdmQWg&$452k)?+rkR07XSbN07*qoM6N<$g3ib1wEzGB literal 0 HcmV?d00001 diff --git a/EVE/icons/navigation/media-skip-backward.png b/EVE/icons/navigation/media-skip-backward.png new file mode 100644 index 0000000000000000000000000000000000000000..1de5dbacf00bd8584fbc67c67881bb9eda5458f1 GIT binary patch literal 511 zcmVMzCV_|S* zE^l&Yo9;Xs0004gNklX} zw~01O<`6psdFfWC=r?SHhx!8{gOUjG;$<1t`i#EA+IV`N5JHH(WVhY!wEC@nyR+Ng zON0<2glHAE(`H_`uBByNT{GWKTLmFPY!#Z_HJc9fe0A)z0~^*fyITbjqLHrH_sKT{ z=l;licjAQ=jZ{RMtmX|ze#-qbHa7ChOQ+VY=4lek?FH}s@YZv{p=C2NJqwn1VzKkk zq0DQW`0I_kZnaM4)i zskwgCI`eu4N-pEvo~tgoVr1ZfS|@7lvUkqha}Dspr0a%`mDP4)HmT%~oXCs-{PtX? zp_0!gA*$(=XHI2?M#e^lGOtXjrXs{lq1r84(sO1YGjOb~sM?(=h!CP$D5s^oXwHVm z?kg(g<+NH5B7_j4l9bz}&UAmeU+R?Gl|%?3{sTMTW?MzCV_|S* zE^l&Yo9;Xs0004bNklPHu8N*UY6P4s` zVoj6z5W7`$3L^Rz8)eWJ2x3qkLcDl+8P$3TJFJagzh4L;#9`?m%etMslV{z7?64$+ z5Ftb-*-P8QrY#*ETbkO#y|j}E5n?B4_clFpr0<&(Ume-DsomR2M2J?p?zu0%8~E!& z;fGVttZStr($dDT<=A__{4+5zHc~jVWn-9@Vl7+p(NAx^atzp1SLj=^wjayg6`vJe z+V#*I7g#ZEabo4 zQA=k%b*3;fHZe9*cx_fK6(Q!6T5raxzHqLoy+I)a<`IIOF{_oABo&%w-$tV_5c6?07*qoM6N<$g1p4kZvX%Q literal 0 HcmV?d00001 diff --git a/EVE/icons/navigation/view-split-left-right.png b/EVE/icons/navigation/view-split-left-right.png new file mode 100644 index 0000000000000000000000000000000000000000..c107eb6031309679a65b321132d37f163fafeb8a GIT binary patch literal 507 zcmV;dEx>AHT)#(B^4<#6ag2nkKounj>FP#)JI5QZT%rQkH1DAnt*Diz6|e4(I% zqF}H04$t#q(khnxbMH}ZfKI2w^YIIub{qcl6WR~=aU9FODizX%LaB5Dsvf(*wkuS* z!f5mjIaZV37%YZqu&4k002ovPDHLkV1i?a*|-1z literal 0 HcmV?d00001 -- 2.39.3