Logo ROOT  
Reference Guide
TGeoAtt.cxx
Go to the documentation of this file.
1 // @(#)root/geom:$Id$
2 // Author: Andrei Gheata 01/11/01
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, 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 /** \class TGeoAtt
13 \ingroup Geometry_classes
14 
15 Visualization and tracking attributes for volumes and nodes.
16 
17 The TGeoAtt class is an utility for volume/node visibility and tracking
18 activity. By default the attributes are set to visible/active
19 */
20 
21 #include "TGeoAtt.h"
22 
23 #include "TGeoManager.h"
24 #include "Rtypes.h"
25 
27 
28 ////////////////////////////////////////////////////////////////////////////////
29 /// Default constructor
30 
32 {
33  fGeoAtt = 0;
34  if (!gGeoManager) return;
41  SetVisLeaves();
42 }
43 ////////////////////////////////////////////////////////////////////////////////
44 /// Constructor
45 
46 TGeoAtt::TGeoAtt(Option_t * /*vis_opt*/, Option_t * /*activity_opt*/, Option_t * /*optimization_opt*/)
47 {
48  fGeoAtt = 0;
55  SetVisLeaves();
56 }
57 ////////////////////////////////////////////////////////////////////////////////
58 /// Destructor
59 
61 {
62 }
63 
64 ////////////////////////////////////////////////////////////////////////////////
65 /// Set branch type visibility.
66 
68 {
72 }
73 
74 ////////////////////////////////////////////////////////////////////////////////
75 /// Set branch type visibility.
76 
78 {
79  SetVisLeaves(!flag);
80 }
81 
82 ////////////////////////////////////////////////////////////////////////////////
83 /// Set branch type visibility.
84 
86 {
88  SetAttBit(kVisContainers, !flag);
90 }
91 
92 ////////////////////////////////////////////////////////////////////////////////
93 /// Set branch type visibility.
94 
96 {
99  SetAttBit(kVisOnly, flag);
100 }
101 
102 ////////////////////////////////////////////////////////////////////////////////
103 /// Set visibility for this object
104 
106 {
107  if (vis) SetAttBit(kVisThis);
108  else ResetAttBit(kVisThis);
110 }
111 ////////////////////////////////////////////////////////////////////////////////
112 /// Set visibility for the daughters.
113 
115 {
116  if (vis) SetAttBit(kVisDaughters);
119 }
120 ////////////////////////////////////////////////////////////////////////////////
121 /// Mark attributes as "streamed to file".
122 
124 {
125  if (vis) SetAttBit(kVisStreamed);
127 }
128 ////////////////////////////////////////////////////////////////////////////////
129 /// Mark visualization attributes as "modified".
130 
132 {
133  if (vis) SetAttBit(kVisTouched);
134  else ResetAttBit(kVisTouched);
135 }
136 ////////////////////////////////////////////////////////////////////////////////
137 /// Set optimization flags.
138 
140 {
141 }
142 
TGeoAtt::SetAttBit
void SetAttBit(UInt_t f)
Definition: TGeoAtt.h:65
TGeoAtt::SetVisibility
virtual void SetVisibility(Bool_t vis=kTRUE)
Set visibility for this object.
Definition: TGeoAtt.cxx:105
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGeoManager::IsClosed
Bool_t IsClosed() const
Definition: TGeoManager.h:305
TGeoAtt::SetVisContainers
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set branch type visibility.
Definition: TGeoAtt.cxx:77
Option_t
const char Option_t
Definition: RtypesCore.h:66
gGeoManager
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:602
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TGeoAtt::~TGeoAtt
virtual ~TGeoAtt()
Destructor.
Definition: TGeoAtt.cxx:60
TGeoAtt::kVisTouched
@ kVisTouched
Definition: TGeoAtt.h:31
TGeoAtt::SetActiveDaughters
void SetActiveDaughters(Bool_t flag=kTRUE)
Definition: TGeoAtt.h:80
bool
TGeoAtt::kVisDaughters
@ kVisDaughters
Definition: TGeoAtt.h:28
TGeoAtt
Visualization and tracking attributes for volumes and nodes.
Definition: TGeoAtt.h:18
TGeoAtt::fGeoAtt
UInt_t fGeoAtt
Definition: TGeoAtt.h:57
TGeoAtt::SetOptimization
void SetOptimization(Option_t *option)
Set optimization flags.
Definition: TGeoAtt.cxx:139
TGeoAtt::SetVisDaughters
void SetVisDaughters(Bool_t vis=kTRUE)
Set visibility for the daughters.
Definition: TGeoAtt.cxx:114
TGeoAtt::SetVisTouched
void SetVisTouched(Bool_t vis=kTRUE)
Mark visualization attributes as "modified".
Definition: TGeoAtt.cxx:131
TGeoAtt::kVisStreamed
@ kVisStreamed
Definition: TGeoAtt.h:30
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
TGeoAtt::SetVisLeaves
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set branch type visibility.
Definition: TGeoAtt.cxx:85
TGeoAtt::kVisOnly
@ kVisOnly
Definition: TGeoAtt.h:34
TGeoAtt::TGeoAtt
TGeoAtt()
Default constructor.
Definition: TGeoAtt.cxx:31
TGeoAtt::SetVisBranch
void SetVisBranch()
Set branch type visibility.
Definition: TGeoAtt.cxx:67
TGeoAtt::kVisBranch
@ kVisBranch
Definition: TGeoAtt.h:35
TGeoAtt::SetActivity
void SetActivity(Bool_t flag=kTRUE)
Definition: TGeoAtt.h:79
TGeoManager.h
TGeoAtt::SetVisOnly
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set branch type visibility.
Definition: TGeoAtt.cxx:95
TGeoAtt::kVisContainers
@ kVisContainers
Definition: TGeoAtt.h:33
TGeoAtt::kVisThis
@ kVisThis
Definition: TGeoAtt.h:27
TGeoAtt::ResetAttBit
void ResetAttBit(UInt_t f)
Definition: TGeoAtt.h:67
Rtypes.h
TGeoAtt::SetVisStreamed
void SetVisStreamed(Bool_t vis=kTRUE)
Mark attributes as "streamed to file".
Definition: TGeoAtt.cxx:123
TGeoAtt.h