8 using namespace ROOT::Experimental;
10 REveTableProxyBuilder::REveTableProxyBuilder() : REveDataProxyBuilderBase(
"Table"), fTable(nullptr)
12 fTable =
new REveDataTable(
"ProxyTable");
15 REveTableProxyBuilder::~REveTableProxyBuilder()
22 void REveTableProxyBuilder::Clean()
26 void REveTableProxyBuilder::Build(
const REveDataCollection* collection, REveElement* product,
const REveViewContext* context)
28 REveTableViewInfo* info = context->GetTableViewInfo();
29 if (info->GetDisplayedCollection() != Collection()->GetElementId())
34 if (product->NumChildren() == 0) {
35 product->AddElement(fTable);
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);
52 fTable->StampObjProps();
57 void REveTableProxyBuilder::SetCollection(REveDataCollection* collection)
59 REveDataProxyBuilderBase::SetCollection(collection);
60 fTable->SetCollection(collection);
63 void REveTableProxyBuilder::ModelChanges(
const REveDataCollection::Ids_t&, REveDataProxyBuilderBase::Product*)
66 if (fTable) fTable->StampObjProps();
69 void REveTableProxyBuilder::ConfigChanged() {