Logo ROOT   6.12/07
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 
void ResetAttBit(UInt_t f)
Definition: TGeoAtt.h:67
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set branch type visibility.
Definition: TGeoAtt.cxx:77
const char Option_t
Definition: RtypesCore.h:62
Visualization and tracking attributes for volumes and nodes.
Definition: TGeoAtt.h:17
virtual void SetVisibility(Bool_t vis=kTRUE)
Set visibility for this object.
Definition: TGeoAtt.cxx:105
void SetVisBranch()
Set branch type visibility.
Definition: TGeoAtt.cxx:67
bool Bool_t
Definition: RtypesCore.h:59
void SetVisStreamed(Bool_t vis=kTRUE)
Mark attributes as "streamed to file".
Definition: TGeoAtt.cxx:123
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set branch type visibility.
Definition: TGeoAtt.cxx:85
void SetActivity(Bool_t flag=kTRUE)
Definition: TGeoAtt.h:79
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set branch type visibility.
Definition: TGeoAtt.cxx:95
virtual ~TGeoAtt()
Destructor.
Definition: TGeoAtt.cxx:60
void SetOptimization(Option_t *option)
Set optimization flags.
Definition: TGeoAtt.cxx:139
const Bool_t kFALSE
Definition: RtypesCore.h:88
#define ClassImp(name)
Definition: Rtypes.h:359
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:559
void SetActiveDaughters(Bool_t flag=kTRUE)
Definition: TGeoAtt.h:80
void SetAttBit(UInt_t f)
Definition: TGeoAtt.h:65
void SetVisDaughters(Bool_t vis=kTRUE)
Set visibility for the daughters.
Definition: TGeoAtt.cxx:114
UInt_t fGeoAtt
Definition: TGeoAtt.h:57
Bool_t IsClosed() const
Definition: TGeoManager.h:282
void SetVisTouched(Bool_t vis=kTRUE)
Mark visualization attributes as "modified".
Definition: TGeoAtt.cxx:131
const Bool_t kTRUE
Definition: RtypesCore.h:87
TGeoAtt()
Default constructor.
Definition: TGeoAtt.cxx:31