Logo ROOT  
Reference Guide
REveDataProxyBuilderBase.hxx
Go to the documentation of this file.
1// @(#)root/eve7:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel, 2018
3
4/*************************************************************************
5 * Copyright (C) 1995-2019, 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#ifndef ROOT7_REveDataProxyBuilderBase
13#define ROOT7_REveDataProxyBuilderBase
14
15#include <ROOT/REveElement.hxx>
16#include <ROOT/REveCompound.hxx>
18
19namespace ROOT {
20namespace Experimental {
21
22class REveViewContext;
24
26{
27public:
28 struct Product
29 {
30 std::string m_viewType;
33
34 Product(std::string viewType, const REveViewContext* c);
35 virtual ~Product();
36 };
37
38 // ---------- const member functions ---------------------
39
40 const REveViewContext& Context() const;
42
43 // ---------- constructor/destructor ---------------------
44
47
48 virtual void SetCollection(REveDataCollection*);
49 // virtual void SetInteractionList(REveDataInteractionList*, const std::string&);
50
52
53 void Build();
54 // virtual void Build(REveElement* product);
55
56 virtual REveElement* CreateProduct(const std::string& viewType, const REveViewContext*);
57 // void removePerViewProduct(const REveViewContext* vc);
58
62
63 virtual void ScaleChanged();
64
65 void SetupElement(REveElement* el, bool color = true);
66 void SetupAddElement(REveElement* el, REveElement* parent, bool set_color = true);
67
68 bool GetHaveAWindow() const { return m_haveWindow; }
69 void SetHaveAWindow(bool);
70
71 // const member functions
72 virtual bool HaveSingleProduct() const { return true; }
73
74protected:
75 // Override this if visibility changes can cause (re)-creation of proxies.
76 // Returns true if new proxies were created.
77 virtual bool VisibilityModelChanges(int idx, REveElement*, const std::string& viewType, const REveViewContext*);
78
79 virtual void Build(const REveDataCollection* iItem, REveElement* product, const REveViewContext*);
80 virtual void BuildViewType(const REveDataCollection* iItem, REveElement* product, const std::string& viewType, const REveViewContext*);
81
83 virtual void FillImpliedSelected( REveElement::Set_t& /*impSet*/, Product*) {};
84 virtual void LocalModelChanges(int idx, REveElement* el, const REveViewContext* ctx);
85
86 virtual void ScaleProduct(REveElement*, const std::string&) {};
87
88 virtual void Clean();
89 virtual void CleanLocal();
90
91 std::vector<Product*> m_products;
92
93private:
95
96 float m_layer{0.};
97 bool m_haveWindow{false};
98 bool m_modelsChanged{false};
99};
100
101} // namespace Experimental
102} // namespace ROOT
103#endif
#define c(i)
Definition: RSha256.hxx:101
Holding structure for a number of track rendering parameters.
virtual void ScaleProduct(REveElement *, const std::string &)
virtual void ModelChanges(const REveDataCollection::Ids_t &, Product *)=0
virtual void SetCollection(REveDataCollection *)
virtual void BuildViewType(const REveDataCollection *iItem, REveElement *product, const std::string &viewType, const REveViewContext *)
const REveViewContext & Context() const
virtual bool VisibilityModelChanges(int idx, REveElement *, const std::string &viewType, const REveViewContext *)
virtual void LocalModelChanges(int idx, REveElement *el, const REveViewContext *ctx)
virtual REveElement * CreateProduct(const std::string &viewType, const REveViewContext *)
virtual void CollectionBeingDestroyed(const REveDataCollection *)
void ModelChanges(const REveDataCollection::Ids_t &)
void SetupElement(REveElement *el, bool color=true)
This method is invoked to setup the per element properties of the various objects being drawn.
void SetupAddElement(REveElement *el, REveElement *parent, bool set_color=true)
virtual void FillImpliedSelected(REveElement::Set_t &, Product *)
std::set< REveElement * > Set_t
Definition: REveElement.hxx:64
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Product(std::string viewType, const REveViewContext *c)