ROOT
v6-20
Reference Guide
REveTableProxyBuilder.cxx
Go to the documentation of this file.
1
#include "
TClass.h
"
2
#include <
ROOT/REveTableProxyBuilder.hxx
>
3
#include <
ROOT/REveTableInfo.hxx
>
4
#include <
ROOT/REveViewContext.hxx
>
5
#include <
ROOT/REveDataClasses.hxx
>
6
#include <
ROOT/REveManager.hxx
>
7
8
using namespace
ROOT::Experimental
;
9
10
REveTableProxyBuilder::REveTableProxyBuilder() :
REveDataProxyBuilderBase
(
"Table"
), fTable(nullptr)
11
{
12
fTable
=
new
REveDataTable
(
"ProxyTable"
);
13
}
14
15
REveTableProxyBuilder::~REveTableProxyBuilder
()
16
{
17
fTable
->
Destroy
();
18
fTable
=
nullptr
;
19
}
20
21
// reuse table product
22
void
REveTableProxyBuilder::Clean
()
23
{
24
}
25
26
void
REveTableProxyBuilder::Build
(
const
REveDataCollection
* collection,
REveElement
* product,
const
REveViewContext
* context)
27
{
28
REveTableViewInfo
* info = context->
GetTableViewInfo
();
29
if
(info->
GetDisplayedCollection
() !=
Collection
()->GetElementId())
30
{
31
return
;
32
}
33
34
if
(product->
NumChildren
() == 0) {
35
product->
AddElement
(
fTable
);
36
}
37
38
// printf("-----REveTableProxyBuilder::Build() body for %s (%p, %p)\n",collection->GetCName(), collection, Collection() );
39
40
if
(info->
GetConfigChanged
() ||
fTable
->
NumChildren
() == 0) {
41
fTable
->
DestroyElements
();
42
auto
tableEntries = context->
GetTableViewInfo
()->
RefTableEntries
(collection->
GetItemClass
()->
GetName
());
43
for
(
const
REveTableEntry
& spec : tableEntries) {
44
auto
c
=
new
REveDataColumn
(spec.fName.c_str());
45
fTable
->
AddElement
(
c
);
46
using namespace
std::string_literals;
47
std::string
exp
= spec.fExpression;
48
c
->SetExpressionAndType(
exp
.c_str(), spec.fType);
49
c
->SetPrecision(spec.fPrecision);
50
}
51
}
52
fTable
->
StampObjProps
();
53
}
54
55
56
57
void
REveTableProxyBuilder::SetCollection
(
REveDataCollection
* collection)
58
{
59
REveDataProxyBuilderBase::SetCollection
(collection);
60
fTable
->
SetCollection
(collection);
61
}
62
63
void
REveTableProxyBuilder::ModelChanges
(
const
REveDataCollection::Ids_t
&,
REveDataProxyBuilderBase::Product
*)
64
{
65
// printf("REveTableProxyBuilder::ModelChanges\n");
66
if
(
fTable
)
fTable
->
StampObjProps
();
67
}
68
69
void
REveTableProxyBuilder::ConfigChanged
() {
70
Build
();
71
}
REveDataClasses.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:
REveDataClasses.hxx:32
ROOT::Experimental::REveDataCollection::Ids_t
std::vector< int > Ids_t
Definition:
REveDataClasses.hxx:34
ROOT::Experimental::REveDataCollection::GetItemClass
TClass * GetItemClass() const
Definition:
REveDataClasses.hxx:62
ROOT::Experimental::REveDataColumn
Definition:
REveDataClasses.hxx:138
ROOT::Experimental::REveDataProxyBuilderBase
Definition:
REveDataProxyBuilderBase.hxx:26
ROOT::Experimental::REveDataProxyBuilderBase::SetCollection
virtual void SetCollection(REveDataCollection *)
Definition:
REveDataProxyBuilderBase.cxx:65
ROOT::Experimental::REveDataProxyBuilderBase::Collection
const REveDataCollection * Collection() const
Definition:
REveDataProxyBuilderBase.hxx:41
ROOT::Experimental::REveDataTable
Definition:
REveDataClasses.hxx:118
ROOT::Experimental::REveDataTable::SetCollection
void SetCollection(const REveDataCollection *col)
Definition:
REveDataClasses.hxx:126
ROOT::Experimental::REveElement
Definition:
REveElement.hxx:70
ROOT::Experimental::REveElement::Destroy
virtual void Destroy()
Destroy this element.
Definition:
REveElement.cxx:1223
ROOT::Experimental::REveElement::AddElement
virtual void AddElement(REveElement *el)
Add el to the list of children.
Definition:
REveElement.cxx:842
ROOT::Experimental::REveElement::StampObjProps
void StampObjProps()
Definition:
REveElement.hxx:368
ROOT::Experimental::REveElement::DestroyElements
virtual void DestroyElements()
Destroy all children of this element.
Definition:
REveElement.cxx:1254
ROOT::Experimental::REveElement::NumChildren
Int_t NumChildren() const
Definition:
REveElement.hxx:193
ROOT::Experimental::REveTableEntry
REveTableEntry.
Definition:
REveTableInfo.hxx:25
ROOT::Experimental::REveTableProxyBuilder::Clean
void Clean() override
Definition:
REveTableProxyBuilder.cxx:22
ROOT::Experimental::REveTableProxyBuilder::ConfigChanged
void ConfigChanged()
Definition:
REveTableProxyBuilder.cxx:69
ROOT::Experimental::REveTableProxyBuilder::fTable
REveDataTable * fTable
Definition:
REveTableProxyBuilder.hxx:15
ROOT::Experimental::REveTableProxyBuilder::SetCollection
void SetCollection(REveDataCollection *) override
Definition:
REveTableProxyBuilder.cxx:57
ROOT::Experimental::REveTableProxyBuilder::~REveTableProxyBuilder
virtual ~REveTableProxyBuilder()
Definition:
REveTableProxyBuilder.cxx:15
ROOT::Experimental::REveTableProxyBuilder::ModelChanges
virtual void ModelChanges(const REveDataCollection::Ids_t &, REveDataProxyBuilderBase::Product *p) override
Definition:
REveTableProxyBuilder.cxx:63
ROOT::Experimental::REveTableProxyBuilder::Build
void Build()
Definition:
REveDataProxyBuilderBase.cxx:84
ROOT::Experimental::REveTableViewInfo
REveTableViewInfo.
Definition:
REveTableInfo.hxx:87
ROOT::Experimental::REveTableViewInfo::RefTableEntries
REveTableHandle::Entries_t & RefTableEntries(std::string cname)
Definition:
REveTableInfo.hxx:103
ROOT::Experimental::REveTableViewInfo::GetDisplayedCollection
ElementId_t GetDisplayedCollection() const
Definition:
REveTableInfo.hxx:94
ROOT::Experimental::REveTableViewInfo::GetConfigChanged
bool GetConfigChanged() const
Definition:
REveTableInfo.hxx:112
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-20 - Reference Guide Generated on Fri Apr 1 2022 00:20:33 (GVA Time) using Doxygen 1.9.4