<commit_before>// $Id$
// Author: <NAME> 2009

/**************************************************************************
 * Copyright(c) 1998-2009, ALICE Experiment at CERN, all rights reserved. *
 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
 * full copyright notice.                                                 *
 **************************************************************************/

#include "AliEveMultiView.h"
#include <TGPack.h>
#include <TBrowser.h>

//______________________________________________________________________________
// Full description of AliEveMultiView
//

ClassImp(AliEveMultiView)

AliEveMultiView* AliEveMultiView::fgInstance = 0;

AliEveMultiView* AliEveMultiView::Instance()
{
    // Return static instance.
    
    return fgInstance;
}

AliEveMultiView::AliEveMultiView(Bool_t setMuonView) :
fRPhiMgr(0), fRhoZMgr(0), fMuonMgr(0),
f3DView(0), fRPhiView(0), fRhoZView(0), fMuonView(0),
fRPhiGeomScene(0), fRhoZGeomScene(0), fMuonGeomScene(0),
fRPhiEventScene(0), fRhoZEventScene(0), fMuonEventScene(0),
fGeomGentle(0), fGeomGentleRPhi(0), fGeomGentleRhoZ(0),
fGeomGentleTrd(0), fGeomGentleMuon(0), fIsMuonView(kFALSE),
fPack(0)
{
    // Constructor --- creates required scenes, projection managers
    // and GL viewers.
    
    if (fgInstance)
        throw TEveException("AliEveMultiView::AliEveMultiView already instantiated.");
    fgInstance = this;
    
    // Scenes
    //========
    
    fRPhiGeomScene  = gEve->SpawnNewScene("RPhi Geometry",
                                          "Scene holding projected geometry for the RPhi view.");
    fRhoZGeomScene  = gEve->SpawnNewScene("RhoZ Geometry",
                                          "Scene holding projected geometry for the RhoZ view.");
    fMuonGeomScene  = gEve->SpawnNewScene("Muon Geometry",
                                          "Scene holding projected geometry for the Muon view.");
    fRPhiEventScene = gEve->SpawnNewScene("RPhi Event Data",
                                          "Scene holding projected event-data for the RPhi view.");
    fRhoZEventScene = gEve->SpawnNewScene("RhoZ Event Data",
                                          "Scene holding projected event-data for the RhoZ view.");
    fMuonEventScene = gEve->SpawnNewScene("Muon Event Data",
                                          "Scene holding projected event-data for the Muon view.");
    
    fIsMuonView = setMuonView;
    
    // Projection managers
    //=====================
    
    fRPhiMgr = new TEveProjectionManager();
    fRPhiMgr->SetProjection(TEveProjection::kPT_RPhi);
    gEve->AddToListTree(fRPhiMgr, kFALSE);
    {
        TEveProjectionAxes* a = new TEveProjectionAxes(fRPhiMgr);
        a->SetMainColor(kWhite);
        a->SetTitle("R-Phi");
        a->SetTitleSize(0.05);
        a->SetTitleFont(102);
        a->SetLabelSize(0.025);
        a->SetLabelFont(102);
        fRPhiGeomScene->AddElement(a);
    }
    
    fRhoZMgr = new TEveProjectionManager();
    fRhoZMgr->SetProjection(TEveProjection::kPT_RhoZ);
    gEve->AddToListTree(fRhoZMgr, kFALSE);
    {
        TEveProjectionAxes* a = new TEveProjectionAxes(fRhoZMgr);
        a->SetMainColor(kWhite);
        a->SetTitle("Rho-Z");
        a->SetTitleSize(0.05);
        a->SetTitleFont(102);
        a->SetLabelSize(0.025);
        a->SetLabelFont(102);
        fRhoZGeomScene->AddElement(a);
    }
    
    if(fIsMuonView)
    {
        fMuonMgr = new TEveProjectionManager();
        fMuonMgr->SetProjection(TEveProjection::kPT_RhoZ);
        gEve->AddToListTree(fMuonMgr, kFALSE);
        {
            TEveProjectionAxes* a = new TEveProjectionAxes(fMuonMgr);
            a->SetMainColor(kWhite);
            a->SetTitle("Rho-Z Muon");
            a->SetTitleSize(0.05);
            a->SetTitleFont(102);
            a->SetLabelSize(0.025);
            a->SetLabelFont(102);
            fMuonGeomScene->AddElement(a);
        }
    }
    
    // Viewers
    //=========
    
    TEveWindowSlot *slot = 0;
    TEveWindowPack *pack = 0;
    
    slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
    pack = slot->MakePack(); // slot is destroyed here
    pack->SetElementName("Multi View");
    pack->SetHorizontal();
    pack->SetShowTitleBar(kFALSE);
    
    pack->NewSlot()->MakeCurrent(); // new slot is created from pack
    f3DView = gEve->SpawnNewViewer("3D View", "");
    f3DView->AddScene(gEve->GetGlobalScene());
    f3DView->AddScene(gEve->GetEventScene());
    
    pack = pack->NewSlot()->MakePack(); // new slot created from pack, then slot is destroyed and new pack returned
    pack->SetShowTitleBar(kFALSE);
    pack->NewSlot()->MakeCurrent(); // new slot from pack
    fRPhiView = gEve->SpawnNewViewer("RPhi View", "");
    fRPhiView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
    fRPhiView->AddScene(fRPhiGeomScene);
    fRPhiView->AddScene(fRPhiEventScene);
    
    fPack = pack;<commit_msg>update of the ratio of the size of 3D view and RhoPhi, RhoZ views in MultiView mode from 1:1 to 2:1<commit_after>// $Id$
// Author: <NAME> 2009

/**************************************************************************
 * Copyright(c) 1998-2009, ALICE Experiment at CERN, all rights reserved. *
 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
 * full copyright notice.                                                 *
 **************************************************************************/

#include "AliEveMultiView.h"
#include <TGPack.h>
#include <TBrowser.h>

//______________________________________________________________________________
// Full description of AliEveMultiView
//

ClassImp(AliEveMultiView)

AliEveMultiView* AliEveMultiView::fgInstance = 0;

AliEveMultiView* AliEveMultiView::Instance()
{
    // Return static instance.
    
    return fgInstance;
}

AliEveMultiView::AliEveMultiView(Bool_t setMuonView) :
fRPhiMgr(0), fRhoZMgr(0), fMuonMgr(0),
f3DView(0), fRPhiView(0), fRhoZView(0), fMuonView(0),
fRPhiGeomScene(0), fRhoZGeomScene(0), fMuonGeomScene(0),
fRPhiEventScene(0), fRhoZEventScene(0), fMuonEventScene(0),
fGeomGentle(0), fGeomGentleRPhi(0), fGeomGentleRhoZ(0),
fGeomGentleTrd(0), fGeomGentleMuon(0), fIsMuonView(kFALSE),
fPack(0)
{
    // Constructor --- creates required scenes, projection managers
    // and GL viewers.
    
    if (fgInstance)
        throw TEveException("AliEveMultiView::AliEveMultiView already instantiated.");
    fgInstance = this;
    
    // Scenes
    //========
    
    fRPhiGeomScene  = gEve->SpawnNewScene("RPhi Geometry",
                                          "Scene holding projected geometry for the RPhi view.");
    fRhoZGeomScene  = gEve->SpawnNewScene("RhoZ Geometry",
                                          "Scene holding projected geometry for the RhoZ view.");
    fMuonGeomScene  = gEve->SpawnNewScene("Muon Geometry",
                                          "Scene holding projected geometry for the Muon view.");
    fRPhiEventScene = gEve->SpawnNewScene("RPhi Event Data",
                                          "Scene holding projected event-data for the RPhi view.");
    fRhoZEventScene = gEve->SpawnNewScene("RhoZ Event Data",
                                          "Scene holding projected event-data for the RhoZ view.");
    fMuonEventScene = gEve->SpawnNewScene("Muon Event Data",
                                          "Scene holding projected event-data for the Muon view.");
    
    fIsMuonView = setMuonView;
    
    // Projection managers
    //=====================
    
    fRPhiMgr = new TEveProjectionManager();
    fRPhiMgr->SetProjection(TEveProjection::kPT_RPhi);
    gEve->AddToListTree(fRPhiMgr, kFALSE);
    {
        TEveProjectionAxes* a = new TEveProjectionAxes(fRPhiMgr);
        a->SetMainColor(kWhite);
        a->SetTitle("R-Phi");
        a->SetTitleSize(0.05);
        a->SetTitleFont(102);
        a->SetLabelSize(0.025);
        a->SetLabelFont(102);
        fRPhiGeomScene->AddElement(a);
    }
    
    fRhoZMgr = new TEveProjectionManager();
    fRhoZMgr->SetProjection(TEveProjection::kPT_RhoZ);
    gEve->AddToListTree(fRhoZMgr, kFALSE);
    {
        TEveProjectionAxes* a = new TEveProjectionAxes(fRhoZMgr);
        a->SetMainColor(kWhite);
        a->SetTitle("Rho-Z");
        a->SetTitleSize(0.05);
        a->SetTitleFont(102);
        a->SetLabelSize(0.025);
        a->SetLabelFont(102);
        fRhoZGeomScene->AddElement(a);
    }
    
    if(fIsMuonView)
    {
        fMuonMgr = new TEveProjectionManager();
        fMuonMgr->SetProjection(TEveProjection::kPT_RhoZ);
        gEve->AddToListTree(fMuonMgr, kFALSE);
        {
            TEveProjectionAxes* a = new TEveProjectionAxes(fMuonMgr);
            a->SetMainColor(kWhite);
            a->SetTitle("Rho-Z Muon");
            a->SetTitleSize(0.05);
            a->SetTitleFont(102);
            a->SetLabelSize(0.025);
            a->SetLabelFont(102);
            fMuonGeomScene->AddElement(a);
        }
    }
    
    // Viewers
    //=========
    
    TEveWindowSlot *slot = 0;
    TEveWindowPack *pack = 0;
    
    slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
    pack = slot->MakePack(); // slot is destroyed here
    pack->SetElementName("Multi View");
    pack->SetHorizontal();
    pack->SetShowTitleBar(kFALSE);

    pack->NewSlotWithWeight(2)->MakeCurrent(); // new slot is created from pack
    f3DView = gEve->SpawnNewViewer("3D View", "");
    f3DView->AddScene(gEve->GetGlobalScene());
    f3DView->AddScene(gEve->GetEventScene());
    
    pack = pack->NewSlot()->MakePack(); // new slot created from pack, then slot is destroyed and new pack returned
    pack->SetShowTitleBar(kFALSE);
    pack->NewSlot()->MakeCurrent(); // new slot from pack
    fRPhiView = gEve->SpawnNewViewer("RPhi View", "");
    fRPhiView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
    fRPhiView->AddScene(fRPhiGeomScene);
    fRPhiView->AddScene(fRPhiEventScene);
    
    fPack = pack;
{'fraction_non_alphanumeric': 0.15494079012837098, 'fraction_numerical': 0.01612100706537964, 'mean_word_length': 2.740230740602903, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 121, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '947361', 'n_tokens_mistral': 3310, 'n_tokens_neox': 3184, 'n_words': 553}