ROOT  6.06/09
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 //_____________________________________________________________________________
13 // TGeoAtt - visualization and tracking attributes for volumes and nodes
14 // ==========
15 // The TGeoAtt class is a utility for volume/node visibility and tracking
16 // activity. By default the attributes are set to visible/active
17 //_____________________________________________________________________________
18 
19 #include "TGeoManager.h"
20 #include "TGeoAtt.h"
21 
23 
24 ////////////////////////////////////////////////////////////////////////////////
25 /// Default constructor
26 
28 {
29  fGeoAtt = 0;
30  if (!gGeoManager) return;
31  SetActivity(kTRUE);
32  SetActiveDaughters(kTRUE);
33  SetVisibility(kTRUE);
34  SetVisDaughters(kTRUE);
35  SetVisStreamed(kFALSE);
36  SetVisTouched(kFALSE);
37  SetVisLeaves();
38 }
39 ////////////////////////////////////////////////////////////////////////////////
40 /// Constructor
41 
42 TGeoAtt::TGeoAtt(Option_t * /*vis_opt*/, Option_t * /*activity_opt*/, Option_t * /*optimization_opt*/)
43 {
44  fGeoAtt = 0;
51  SetVisLeaves();
52 }
53 ////////////////////////////////////////////////////////////////////////////////
54 /// Destructor
55 
57 {
58 }
59 
60 ////////////////////////////////////////////////////////////////////////////////
61 /// Set branch type visibility.
62 
64 {
68 }
69 
70 ////////////////////////////////////////////////////////////////////////////////
71 /// Set branch type visibility.
72 
74 {
75  SetVisLeaves(!flag);
76 }
77 
78 ////////////////////////////////////////////////////////////////////////////////
79 /// Set branch type visibility.
80 
82 {
84  SetAttBit(kVisContainers, !flag);
86 }
87 
88 ////////////////////////////////////////////////////////////////////////////////
89 /// Set branch type visibility.
90 
92 {
95  SetAttBit(kVisOnly, flag);
96 }
97 
98 ////////////////////////////////////////////////////////////////////////////////
99 /// Set visibility for this object
100 
102 {
103  if (vis) SetAttBit(kVisThis);
104  else ResetAttBit(kVisThis);
106 }
107 ////////////////////////////////////////////////////////////////////////////////
108 /// Set visibility for the daughters.
109 
111 {
112  if (vis) SetAttBit(kVisDaughters);
115 }
116 ////////////////////////////////////////////////////////////////////////////////
117 /// Mark attributes as "streamed to file".
118 
120 {
121  if (vis) SetAttBit(kVisStreamed);
123 }
124 ////////////////////////////////////////////////////////////////////////////////
125 /// Mark visualization attributes as "modified".
126 
128 {
129  if (vis) SetAttBit(kVisTouched);
130  else ResetAttBit(kVisTouched);
131 }
132 ////////////////////////////////////////////////////////////////////////////////
133 /// Set optimization flags.
134 
136 {
137 }
138 
void ResetAttBit(UInt_t f)
Definition: TGeoAtt.h:75
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set branch type visibility.
Definition: TGeoAtt.cxx:73
ClassImp(TGeoAtt) TGeoAtt
Default constructor.
Definition: TGeoAtt.cxx:22
const char Option_t
Definition: RtypesCore.h:62
virtual void SetVisibility(Bool_t vis=kTRUE)
Set visibility for this object.
Definition: TGeoAtt.cxx:101
void SetVisBranch()
Set branch type visibility.
Definition: TGeoAtt.cxx:63
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
void SetVisStreamed(Bool_t vis=kTRUE)
Mark attributes as "streamed to file".
Definition: TGeoAtt.cxx:119
Bool_t IsClosed() const
Definition: TGeoManager.h:283
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set branch type visibility.
Definition: TGeoAtt.cxx:81
void SetActivity(Bool_t flag=kTRUE)
Definition: TGeoAtt.h:87
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set branch type visibility.
Definition: TGeoAtt.cxx:91
virtual ~TGeoAtt()
Destructor.
Definition: TGeoAtt.cxx:56
void SetOptimization(Option_t *option)
Set optimization flags.
Definition: TGeoAtt.cxx:135
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:556
void SetActiveDaughters(Bool_t flag=kTRUE)
Definition: TGeoAtt.h:88
void SetAttBit(UInt_t f)
Definition: TGeoAtt.h:73
void SetVisDaughters(Bool_t vis=kTRUE)
Set visibility for the daughters.
Definition: TGeoAtt.cxx:110
UInt_t fGeoAtt
Definition: TGeoAtt.h:65
const Bool_t kTRUE
Definition: Rtypes.h:91
void SetVisTouched(Bool_t vis=kTRUE)
Mark visualization attributes as "modified".
Definition: TGeoAtt.cxx:127