Logo ROOT  
Reference Guide
TGeoAtt.h
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 #ifndef ROOT_TGeoAtt
13 #define ROOT_TGeoAtt
14 
15 #include "Rtypes.h"
16 
17 class TGeoAtt
18 {
19 public:
20  enum {
21  kBitMask = 0x00ffffff // bit mask
22  };
23 
25  kVisOverride = BIT(0), // volume's vis. attributes are overridden
26  kVisNone = BIT(1), // the volume/node is invisible, as well as daughters
27  kVisThis = BIT(2), // this volume/node is visible
28  kVisDaughters = BIT(3), // all leaves are visible
29  kVisOneLevel = BIT(4), // first level daughters are visible
30  kVisStreamed = BIT(5), // true if attributes have been streamed
31  kVisTouched = BIT(6), // true if attributes are changed after closing geom
32  kVisOnScreen = BIT(7), // true if volume is visible on screen
33  kVisContainers = BIT(12), // all containers visible
34  kVisOnly = BIT(13), // just this visible
35  kVisBranch = BIT(14), // only a given branch visible
36  kVisRaytrace = BIT(15) // raytracing flag
37  }; // visibility attributes
38 
40  kActOverride = BIT(8), // volume's activity attributes are overridden
41  kActNone = BIT(9), // the volume/node is ignored by tracking, as well as daughters
42  kActThis = BIT(10), // this volume/node is active for tracking
43  kActDaughters = BIT(11) // all leaves are active
44  }; // activity flags
45 
47  kUseBoundingBox = BIT(16), // use bounding box for tracking
48  kUseVoxels = BIT(17), // compute and use voxels
49  kUseGsord = BIT(18) // use slicing in G3 style
50  }; // tracking optimization attributes
53  kSaveNodesAtt = BIT(20)
54  }; // save primitive bits
55 protected :
56 // data members
57  UInt_t fGeoAtt; // option flags
58 public:
59  // constructors
60  TGeoAtt();
61  TGeoAtt(Option_t *vis_opt, Option_t *activity_opt="", Option_t *optimization_opt="");
62  // destructor
63  virtual ~TGeoAtt();
64  // methods
66  void SetAttBit(UInt_t f, Bool_t set) {(set)?SetAttBit(f):ResetAttBit(f);};
67  void ResetAttBit(UInt_t f) {fGeoAtt &= ~(f & kBitMask);}
68  Bool_t TestAttBit(UInt_t f) const {return (Bool_t)((fGeoAtt & f) != 0);}
69 
71  void SetVisBranch();
72  virtual void SetVisContainers(Bool_t flag=kTRUE);
73  virtual void SetVisLeaves(Bool_t flag=kTRUE);
74  virtual void SetVisOnly(Bool_t flag=kTRUE);
75  virtual void SetVisibility(Bool_t vis=kTRUE);
76  void SetVisDaughters(Bool_t vis=kTRUE);
77  void SetVisStreamed(Bool_t vis=kTRUE);
78  void SetVisTouched(Bool_t vis=kTRUE);
79  void SetActivity(Bool_t flag=kTRUE) {SetAttBit(kActThis, flag);}
81 
82  void SetOptimization(Option_t *option);
83 
84 
85  Bool_t IsActive() const {return TestAttBit(kActThis);}
88  Bool_t IsVisible() const {return TestAttBit(kVisThis);}
93  Bool_t IsVisOnly() const {return TestAttBit(kVisOnly);}
94 
97 
98  ClassDef(TGeoAtt, 1) // class for visibility, activity and optimization attributes for volumes/nodes
99 };
100 
101 #endif
102 
TGeoAtt::SetAttBit
void SetAttBit(UInt_t f)
Definition: TGeoAtt.h:65
TGeoAtt::kActDaughters
@ kActDaughters
Definition: TGeoAtt.h:43
TGeoAtt::SetVisibility
virtual void SetVisibility(Bool_t vis=kTRUE)
Set visibility for this object.
Definition: TGeoAtt.cxx:105
TGeoAtt::IsActive
Bool_t IsActive() const
Definition: TGeoAtt.h:85
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGeoAtt::IsVisContainers
Bool_t IsVisContainers() const
Definition: TGeoAtt.h:91
f
#define f(i)
Definition: RSha256.hxx:104
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
TGeoAtt::kUseBoundingBox
@ kUseBoundingBox
Definition: TGeoAtt.h:47
TGeoAtt::kActThis
@ kActThis
Definition: TGeoAtt.h:42
TGeoAtt::kUseGsord
@ kUseGsord
Definition: TGeoAtt.h:49
TGeoAtt::IsVisible
Bool_t IsVisible() const
Definition: TGeoAtt.h:88
TGeoAtt::IsActiveDaughters
Bool_t IsActiveDaughters() const
Definition: TGeoAtt.h:86
TGeoAtt::TestAttBit
Bool_t TestAttBit(UInt_t f) const
Definition: TGeoAtt.h:68
TGeoAtt::kUseVoxels
@ kUseVoxels
Definition: TGeoAtt.h:48
TGeoAtt::IsVisDaughters
Bool_t IsVisDaughters() const
Definition: TGeoAtt.h:89
TGeoAtt::EGeoActivityAtt
EGeoActivityAtt
Definition: TGeoAtt.h:39
TGeoAtt::IsVisRaytrace
Bool_t IsVisRaytrace() const
Definition: TGeoAtt.h:87
TGeoAtt::IsVisOnly
Bool_t IsVisOnly() const
Definition: TGeoAtt.h:93
TGeoAtt::~TGeoAtt
virtual ~TGeoAtt()
Destructor.
Definition: TGeoAtt.cxx:60
TGeoAtt::kVisTouched
@ kVisTouched
Definition: TGeoAtt.h:31
TGeoAtt::IsVisTouched
Bool_t IsVisTouched() const
Definition: TGeoAtt.h:96
TGeoAtt::SetActiveDaughters
void SetActiveDaughters(Bool_t flag=kTRUE)
Definition: TGeoAtt.h:80
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
bool
TGeoAtt::kSavePrimitiveAtt
@ kSavePrimitiveAtt
Definition: TGeoAtt.h:52
TGeoAtt::kVisDaughters
@ kVisDaughters
Definition: TGeoAtt.h:28
TGeoAtt::IsVisStreamed
Bool_t IsVisStreamed() const
Definition: TGeoAtt.h:95
TGeoAtt
Visualization and tracking attributes for volumes and nodes.
Definition: TGeoAtt.h:18
TGeoAtt::fGeoAtt
UInt_t fGeoAtt
Definition: TGeoAtt.h:57
TGeoAtt::IsVisLeaves
Bool_t IsVisLeaves() const
Definition: TGeoAtt.h:92
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
TGeoAtt::EGeoOptimizationAtt
EGeoOptimizationAtt
Definition: TGeoAtt.h:46
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
BIT
#define BIT(n)
Definition: Rtypes.h:85
TGeoAtt::SetVisBranch
void SetVisBranch()
Set branch type visibility.
Definition: TGeoAtt.cxx:67
TGeoAtt::kSaveNodesAtt
@ kSaveNodesAtt
Definition: TGeoAtt.h:53
TGeoAtt::SetVisRaytrace
void SetVisRaytrace(Bool_t flag=kTRUE)
Definition: TGeoAtt.h:70
TGeoAtt::kBitMask
@ kBitMask
Definition: TGeoAtt.h:21
TGeoAtt::kVisBranch
@ kVisBranch
Definition: TGeoAtt.h:35
TGeoAtt::EGeoSavePrimitiveAtt
EGeoSavePrimitiveAtt
Definition: TGeoAtt.h:51
unsigned int
TGeoAtt::SetActivity
void SetActivity(Bool_t flag=kTRUE)
Definition: TGeoAtt.h:79
TGeoAtt::SetVisOnly
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set branch type visibility.
Definition: TGeoAtt.cxx:95
TGeoAtt::kActOverride
@ kActOverride
Definition: TGeoAtt.h:40
TGeoAtt::EGeoVisibilityAtt
EGeoVisibilityAtt
Definition: TGeoAtt.h:24
TGeoAtt::kVisContainers
@ kVisContainers
Definition: TGeoAtt.h:33
TGeoAtt::kVisThis
@ kVisThis
Definition: TGeoAtt.h:27
TGeoAtt::IsVisBranch
Bool_t IsVisBranch() const
Definition: TGeoAtt.h:90
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGeoAtt::kVisNone
@ kVisNone
Definition: TGeoAtt.h:26
TGeoAtt::SetAttBit
void SetAttBit(UInt_t f, Bool_t set)
Definition: TGeoAtt.h:66
TGeoAtt::ResetAttBit
void ResetAttBit(UInt_t f)
Definition: TGeoAtt.h:67
TGeoAtt::kVisRaytrace
@ kVisRaytrace
Definition: TGeoAtt.h:36
Rtypes.h
TGeoAtt::SetVisStreamed
void SetVisStreamed(Bool_t vis=kTRUE)
Mark attributes as "streamed to file".
Definition: TGeoAtt.cxx:123
TGeoAtt::kActNone
@ kActNone
Definition: TGeoAtt.h:41
TGeoAtt::kVisOneLevel
@ kVisOneLevel
Definition: TGeoAtt.h:29
TGeoAtt::kVisOverride
@ kVisOverride
Definition: TGeoAtt.h:25
TGeoAtt::kVisOnScreen
@ kVisOnScreen
Definition: TGeoAtt.h:32