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;
23class REveTrackPropagator;
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;
41 const REveDataCollection* Collection() const { return m_collection; }
42
43 // ---------- constructor/destructor ---------------------
44
45 REveDataProxyBuilderBase(const std::string &type);
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 REveElement* CreateProduct(std::string viewType, const REveViewContext*);
57 // void removePerViewProduct(const REveViewContext* vc);
58
61
62 void SetupElement(REveElement* el, bool color = true) const;
63 void SetupAddElement(REveElement* el, REveElement* parent, bool set_color = true) const;
64
65 bool GetHaveAWindow() const { return m_haveWindow; }
66 void SetHaveAWindow(bool);
67
68 std::string Type() const { return m_type; }
69
70 // const member functions
71 virtual bool HaveSingleProduct() const { return true; }
72
73protected:
74 // Override this if visibility changes can cause (re)-creation of proxies.
75 // Returns true if new proxies were created.
76 virtual bool VisibilityModelChanges(int idx, REveElement*, const REveViewContext*);
77
78 virtual void Build(const REveDataCollection* iItem, REveElement* product, const REveViewContext*);
79 virtual void BuildViewType(const REveDataCollection* iItem, REveElement* product, std::string viewType, const REveViewContext*);
80
81 virtual void ModelChanges(const REveDataCollection::Ids_t&, Product*);
82 virtual void LocalModelChanges(int idx, REveElement* el, const REveViewContext* ctx);
83
84 // Utility
85 REveCompound* CreateCompound(bool set_color=true, bool propagate_color_to_all_children=false) const;
86 virtual void Clean();
87 virtual void CleanLocal();
88
89 std::vector<Product*> m_products;
90
91private:
92 std::string m_type;
94
95 float m_layer;
96 // REveDataInteractionList* m_interactionList;
99};
100
101} // namespace Experimental
102} // namespace ROOT
103#endif
#define c(i)
Definition: RSha256.hxx:101
static Double_t Product(const Double_t *x, const Float_t *y)
Product.
Definition: TCTUB.cxx:102
int type
Definition: TGX11.cxx:120
virtual void SetCollection(REveDataCollection *)
const REveViewContext & Context() const
REveCompound * CreateCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
virtual void BuildViewType(const REveDataCollection *iItem, REveElement *product, std::string viewType, const REveViewContext *)
virtual void LocalModelChanges(int idx, REveElement *el, const REveViewContext *ctx)
virtual void CollectionBeingDestroyed(const REveDataCollection *)
void ModelChanges(const REveDataCollection::Ids_t &)
void SetupElement(REveElement *el, bool color=true) const
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) const
virtual bool VisibilityModelChanges(int idx, REveElement *, const REveViewContext *)
REveElement * CreateProduct(std::string viewType, const REveViewContext *)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: StringConv.hxx:21
Product(std::string viewType, const REveViewContext *c)