Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
15Visualization and tracking attributes for volumes and nodes.
16
17The TGeoAtt class is an utility for volume/node visibility and tracking
18activity. 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;
42}
43////////////////////////////////////////////////////////////////////////////////
44/// Constructor
45
46TGeoAtt::TGeoAtt(Option_t * /*vis_opt*/, Option_t * /*activity_opt*/, Option_t * /*optimization_opt*/)
47{
48 fGeoAtt = 0;
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{
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);
135}
136////////////////////////////////////////////////////////////////////////////////
137/// Set optimization flags.
138
140{
141}
142
const Bool_t kFALSE
Definition RtypesCore.h:101
const Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:364
R__EXTERN TGeoManager * gGeoManager
Visualization and tracking attributes for volumes and nodes.
Definition TGeoAtt.h:18
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set branch type visibility.
Definition TGeoAtt.cxx:95
void SetActivity(Bool_t flag=kTRUE)
Definition TGeoAtt.h:79
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set branch type visibility.
Definition TGeoAtt.cxx:85
virtual ~TGeoAtt()
Destructor.
Definition TGeoAtt.cxx:60
void SetVisStreamed(Bool_t vis=kTRUE)
Mark attributes as "streamed to file".
Definition TGeoAtt.cxx:123
void SetVisDaughters(Bool_t vis=kTRUE)
Set visibility for the daughters.
Definition TGeoAtt.cxx:114
@ kVisThis
Definition TGeoAtt.h:27
@ kVisContainers
Definition TGeoAtt.h:33
@ kVisOnly
Definition TGeoAtt.h:34
@ kVisDaughters
Definition TGeoAtt.h:28
@ kVisTouched
Definition TGeoAtt.h:31
@ kVisBranch
Definition TGeoAtt.h:35
@ kVisStreamed
Definition TGeoAtt.h:30
TGeoAtt()
Default constructor.
Definition TGeoAtt.cxx:31
void SetActiveDaughters(Bool_t flag=kTRUE)
Definition TGeoAtt.h:80
void ResetAttBit(UInt_t f)
Definition TGeoAtt.h:67
virtual void SetVisibility(Bool_t vis=kTRUE)
Set visibility for this object.
Definition TGeoAtt.cxx:105
UInt_t fGeoAtt
Definition TGeoAtt.h:57
void SetOptimization(Option_t *option)
Set optimization flags.
Definition TGeoAtt.cxx:139
void SetAttBit(UInt_t f)
Definition TGeoAtt.h:65
void SetVisTouched(Bool_t vis=kTRUE)
Mark visualization attributes as "modified".
Definition TGeoAtt.cxx:131
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set branch type visibility.
Definition TGeoAtt.cxx:77
void SetVisBranch()
Set branch type visibility.
Definition TGeoAtt.cxx:67
Bool_t IsClosed() const