Loading [MathJax]/extensions/tex2jax.js
ROOT
Version v6.24
master
v6.34
v6.32
v6.30
v6.28
v6.26
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
Reference Guide
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
REveTableProxyBuilder.cxx
Go to the documentation of this file.
1
// @(#)root/eve7:$Id$
2
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2020
3
4
/*************************************************************************
5
* Copyright (C) 1995-2020, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
#include "
TClass.h
"
13
#include <
ROOT/REveTableProxyBuilder.hxx
>
14
#include <
ROOT/REveTableInfo.hxx
>
15
#include <
ROOT/REveViewContext.hxx
>
16
#include <
ROOT/REveDataCollection.hxx
>
17
#include <
ROOT/REveDataTable.hxx
>
18
#include <
ROOT/REveManager.hxx
>
19
20
using namespace
ROOT::Experimental
;
21
22
REveTableProxyBuilder::REveTableProxyBuilder
() :
REveDataProxyBuilderBase
(), fTable(nullptr)
23
{
24
fTable
=
new
REveDataTable
(
"ProxyTable"
);
25
}
26
27
REveTableProxyBuilder::~REveTableProxyBuilder
()
28
{
29
fTable
->
Destroy
();
30
fTable
=
nullptr
;
31
}
32
33
// reuse table product
34
void
REveTableProxyBuilder::Clean
()
35
{
36
}
37
38
void
REveTableProxyBuilder::Build
(
const
REveDataCollection
* collection,
REveElement
* product,
const
REveViewContext
* context)
39
{
40
REveTableViewInfo
* info = context->
GetTableViewInfo
();
41
if
(info->
GetDisplayedCollection
() !=
Collection
()->GetElementId())
42
{
43
return
;
44
}
45
46
if
(product->
NumChildren
() == 0) {
47
product->
AddElement
(
fTable
);
48
}
49
50
// printf("-----REveTableProxyBuilder::Build() body for %s (%p, %p)\n",collection->GetCName(), collection, Collection() );
51
52
if
(info->
GetConfigChanged
() ||
fTable
->
NumChildren
() == 0) {
53
fTable
->
DestroyElements
();
54
REveTableHandle::Entries_t
& tableEntries = context->
GetTableViewInfo
()->
RefTableEntries
(collection->
GetItemClass
()->
GetName
());
55
for
(
const
REveTableEntry
& spec : tableEntries) {
56
auto
c
=
new
REveDataColumn
(spec.fName.c_str());
57
fTable
->
AddElement
(
c
);
58
using namespace
std::string_literals;
59
std::string
exp
= spec.fExpression;
60
c
->SetExpressionAndType(
exp
.c_str(), spec.fType);
61
c
->SetPrecision(spec.fPrecision);
62
}
63
}
64
fTable
->
StampObjProps
();
65
}
66
67
68
69
void
REveTableProxyBuilder::SetCollection
(
REveDataCollection
* collection)
70
{
71
REveDataProxyBuilderBase::SetCollection
(collection);
72
fTable
->
SetCollection
(collection);
73
}
74
75
void
REveTableProxyBuilder::ModelChanges
(
const
REveDataCollection::Ids_t
&,
REveDataProxyBuilderBase::Product
*)
76
{
77
// printf("REveTableProxyBuilder::ModelChanges\n");
78
if
(
fTable
)
fTable
->
StampObjProps
();
79
}
80
81
void
REveTableProxyBuilder::ConfigChanged
() {
82
Build
();
83
}
REveDataCollection.hxx
REveDataTable.hxx
REveManager.hxx
REveTableInfo.hxx
REveTableProxyBuilder.hxx
REveViewContext.hxx
c
#define c(i)
Definition
RSha256.hxx:101
TClass.h
exp
double exp(double)
ROOT::Experimental::REveDataCollection
Definition
REveDataCollection.hxx:110
ROOT::Experimental::REveDataCollection::Ids_t
std::vector< int > Ids_t
Definition
REveDataCollection.hxx:115
ROOT::Experimental::REveDataCollection::GetItemClass
TClass * GetItemClass() const
Definition
REveDataCollection.hxx:134
ROOT::Experimental::REveDataColumn
Definition
REveDataTable.hxx:44
ROOT::Experimental::REveDataProxyBuilderBase
Definition
REveDataProxyBuilderBase.hxx:26
ROOT::Experimental::REveDataProxyBuilderBase::SetCollection
virtual void SetCollection(REveDataCollection *)
Definition
REveDataProxyBuilderBase.cxx:61
ROOT::Experimental::REveDataProxyBuilderBase::Collection
REveDataCollection * Collection() const
Definition
REveDataProxyBuilderBase.hxx:41
ROOT::Experimental::REveDataTable
Definition
REveDataTable.hxx:24
ROOT::Experimental::REveDataTable::SetCollection
void SetCollection(const REveDataCollection *col)
Definition
REveDataTable.hxx:32
ROOT::Experimental::REveElement
Definition
REveElement.hxx:41
ROOT::Experimental::REveElement::Destroy
virtual void Destroy()
Destroy this element.
Definition
REveElement.cxx:1234
ROOT::Experimental::REveElement::AddElement
virtual void AddElement(REveElement *el)
Add el to the list of children.
Definition
REveElement.cxx:853
ROOT::Experimental::REveElement::StampObjProps
void StampObjProps()
Definition
REveElement.hxx:341
ROOT::Experimental::REveElement::DestroyElements
virtual void DestroyElements()
Destroy all children of this element.
Definition
REveElement.cxx:1265
ROOT::Experimental::REveElement::NumChildren
Int_t NumChildren() const
Definition
REveElement.hxx:164
ROOT::Experimental::REveTableEntry
REveTableEntry.
Definition
REveTableInfo.hxx:26
ROOT::Experimental::REveTableHandle::Entries_t
std::vector< REveTableEntry > Entries_t
Definition
REveTableInfo.hxx:56
ROOT::Experimental::REveTableProxyBuilder::Clean
void Clean() override
Definition
REveTableProxyBuilder.cxx:34
ROOT::Experimental::REveTableProxyBuilder::REveTableProxyBuilder
REveTableProxyBuilder()
Definition
REveTableProxyBuilder.cxx:22
ROOT::Experimental::REveTableProxyBuilder::ConfigChanged
void ConfigChanged()
Definition
REveTableProxyBuilder.cxx:81
ROOT::Experimental::REveTableProxyBuilder::fTable
REveDataTable * fTable
Definition
REveTableProxyBuilder.hxx:26
ROOT::Experimental::REveTableProxyBuilder::SetCollection
void SetCollection(REveDataCollection *) override
Definition
REveTableProxyBuilder.cxx:69
ROOT::Experimental::REveTableProxyBuilder::~REveTableProxyBuilder
virtual ~REveTableProxyBuilder()
Definition
REveTableProxyBuilder.cxx:27
ROOT::Experimental::REveTableProxyBuilder::ModelChanges
virtual void ModelChanges(const REveDataCollection::Ids_t &, REveDataProxyBuilderBase::Product *p) override
Definition
REveTableProxyBuilder.cxx:75
ROOT::Experimental::REveTableProxyBuilder::Build
void Build()
Definition
REveDataProxyBuilderBase.cxx:68
ROOT::Experimental::REveTableViewInfo
REveTableViewInfo.
Definition
REveTableInfo.hxx:88
ROOT::Experimental::REveTableViewInfo::GetDisplayedCollection
ElementId_t GetDisplayedCollection() const
Definition
REveTableInfo.hxx:95
ROOT::Experimental::REveTableViewInfo::GetConfigChanged
bool GetConfigChanged() const
Definition
REveTableInfo.hxx:113
ROOT::Experimental::REveTableViewInfo::RefTableEntries
REveTableHandle::Entries_t & RefTableEntries(std::string cname)
Find column definitions for given class name.
Definition
REveTableInfo.cxx:83
ROOT::Experimental::REveViewContext
Definition
REveViewContext.hxx:21
ROOT::Experimental::REveViewContext::GetTableViewInfo
REveTableViewInfo * GetTableViewInfo() const
Definition
REveViewContext.hxx:40
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition
TNamed.h:47
ROOT::Experimental
Definition
RDirectory.hxx:30
ROOT::Experimental::REveDataProxyBuilderBase::Product
Definition
REveDataProxyBuilderBase.hxx:29
graf3d
eve7
src
REveTableProxyBuilder.cxx
ROOT v6-24 - Reference Guide Generated on Tue Aug 22 2023 03:06:24 (GVA Time) using Doxygen 1.9.8