Logo ROOT  
Reference Guide
REveCompound.hxx
Go to the documentation of this file.
1 // @(#)root/eve7:$Id$
2 // Author: Matevz Tadel 2007
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_REveCompound
13 #define ROOT7_REveCompound
14 
15 #include <ROOT/REveElement.hxx>
17 
18 namespace ROOT {
19 namespace Experimental {
20 
21 //==============================================================================
22 // REveCompound
23 // Container for managing compounds of EveElements.
24 //==============================================================================
25 
26 class REveCompound : public REveElement,
27  public REveProjectable
28 {
29 private:
30  REveCompound(const REveCompound &) = delete;
31  REveCompound &operator=(const REveCompound &) = delete;
32 
33 protected:
34  Short_t fCompoundOpen{0}; // If more than zero, tag new children as compound members.
37 
38 public:
39  REveCompound(const std::string& n = "REveCompound", const std::string& t = "",
40  Bool_t doColor = kTRUE, Bool_t doTransparency = kFALSE);
41  virtual ~REveCompound() {}
42 
45  Bool_t IsCompoundOpen() const { return fCompoundOpen > 0; }
46 
47  void SetMainColor(Color_t color) override;
48  void SetMainTransparency(Char_t t) override;
49 
50  void AddElement(REveElement *el) override;
51  void RemoveElementLocal(REveElement *el) override;
52  void RemoveElementsLocal() override;
53 
54  void FillImpliedSelectedSet(Set_t &impSelSet) override;
55 
56  TClass *ProjectedClass(const REveProjection *p) const override;
57 };
58 
59 //==============================================================================
60 // REveCompoundProjected
61 // Projected EveCompund container.
62 //==============================================================================
63 
65  public REveProjected
66 {
67 private:
70 
71 public:
74 
75  virtual void SetMainColor(Color_t color);
76 
77  virtual void UpdateProjection() {}
78  virtual REveElement *GetProjectedAsElement() { return this; }
79 };
80 
81 } // namespace Experimental
82 } // namespace ROOT
83 
84 #endif
ROOT::Experimental::REveProjected
Definition: REveProjectionBases.hxx:81
n
const Int_t n
Definition: legend1.C:16
ROOT::Experimental::REveCompound::FillImpliedSelectedSet
void FillImpliedSelectedSet(Set_t &impSelSet) override
Recurse on all children that are in this compound and call the base-class version.
Definition: REveCompound.cxx:146
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
ROOT::Experimental::REveCompound::ProjectedClass
TClass * ProjectedClass(const REveProjection *p) const override
Virtual from REveProjectable, returns REveCompoundProjected class.
Definition: REveCompound.cxx:163
REveProjectionBases.hxx
ROOT::Experimental::REveCompound::REveCompound
REveCompound(const REveCompound &)=delete
ROOT::Experimental::REveCompound::fCompoundOpen
Short_t fCompoundOpen
Definition: REveCompound.hxx:34
ROOT::Experimental::REveCompoundProjected::UpdateProjection
virtual void UpdateProjection()
Definition: REveCompound.hxx:77
ROOT::Experimental::REveCompoundProjected::REveCompoundProjected
REveCompoundProjected(const REveCompoundProjected &)=delete
ROOT::Experimental::REveCompound::fDoTransparency
Bool_t fDoTransparency
Definition: REveCompound.hxx:36
ROOT::Experimental::REveCompoundProjected::REveCompoundProjected
REveCompoundProjected()
Constructor.
Definition: REveCompound.cxx:177
ROOT::Experimental::REveCompound::OpenCompound
void OpenCompound()
Definition: REveCompound.hxx:43
ROOT::Experimental::REveElement
Definition: REveElement.hxx:41
ROOT::Experimental::REveCompound::RemoveElementLocal
void RemoveElementLocal(REveElement *el) override
Decompoundofy el, call base-class version.
Definition: REveCompound.cxx:116
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
Color_t
short Color_t
Definition: RtypesCore.h:83
ROOT::Experimental::REveCompound::CloseCompound
void CloseCompound()
Definition: REveCompound.hxx:44
bool
ROOT::Experimental::REveCompound::~REveCompound
virtual ~REveCompound()
Definition: REveCompound.hxx:41
ROOT::Experimental::REveProjection
REveProjection Base for specific classes that implement non-linear projections.
Definition: REveProjections.hxx:30
ROOT::Experimental::REveCompoundProjected::~REveCompoundProjected
virtual ~REveCompoundProjected()
Definition: REveCompound.hxx:73
REveElement.hxx
ROOT::Experimental::REveCompound::SetMainColor
void SetMainColor(Color_t color) override
SetMainColor for the compound.
Definition: REveCompound.cxx:49
ROOT::Experimental::REveCompound::RemoveElementsLocal
void RemoveElementsLocal() override
Decompoundofy children, call base-class version.
Definition: REveCompound.cxx:127
ROOT::Experimental::REveCompoundProjected::GetProjectedAsElement
virtual REveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to REveElement.
Definition: REveCompound.hxx:78
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
ROOT::Experimental::REveProjectable
Definition: REveProjectionBases.hxx:38
ROOT::Experimental::REveCompound::fDoColor
Bool_t fDoColor
Definition: REveCompound.hxx:35
ROOT::Experimental::REveCompound::AddElement
void AddElement(REveElement *el) override
Call base-class implementation.
Definition: REveCompound.cxx:106
Short_t
short Short_t
Definition: RtypesCore.h:39
ROOT::Experimental::REveElement::Set_t
std::set< REveElement * > Set_t
Definition: REveElement.hxx:50
ROOT::Experimental::REveCompoundProjected
Definition: REveCompound.hxx:66
ROOT::Experimental::REveCompound::operator=
REveCompound & operator=(const REveCompound &)=delete
ROOT::Experimental::REveCompound::SetMainTransparency
void SetMainTransparency(Char_t t) override
SetMainTransparency for the compound.
Definition: REveCompound.cxx:80
ROOT::Experimental::REveCompoundProjected::SetMainColor
virtual void SetMainColor(Color_t color)
Revert back to the behaviour of REveElement as color is propagated:
Definition: REveCompound.cxx:190
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
ROOT::Experimental::REveCompoundProjected::operator=
REveCompoundProjected & operator=(const REveCompoundProjected &)=delete
Char_t
char Char_t
Definition: RtypesCore.h:33
ROOT::Experimental::REveCompound
Definition: REveCompound.hxx:28
ROOT
VSD Structures.
Definition: StringConv.hxx:21
ROOT::Experimental::REveCompound::IsCompoundOpen
Bool_t IsCompoundOpen() const
Definition: REveCompound.hxx:45