00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "TGeoManager.h"
00020 #include "TGeoAtt.h"
00021
00022 ClassImp(TGeoAtt)
00023
00024
00025 TGeoAtt::TGeoAtt()
00026 {
00027
00028 fGeoAtt = 0;
00029 if (!gGeoManager) return;
00030 SetActivity(kTRUE);
00031 SetActiveDaughters(kTRUE);
00032 SetVisibility(kTRUE);
00033 SetVisDaughters(kTRUE);
00034 SetVisStreamed(kFALSE);
00035 SetVisTouched(kFALSE);
00036 SetVisLeaves();
00037 }
00038
00039 TGeoAtt::TGeoAtt(Option_t * , Option_t * , Option_t * )
00040 {
00041
00042 fGeoAtt = 0;
00043 SetActivity(kTRUE);
00044 SetActiveDaughters(kTRUE);
00045 SetVisibility(kTRUE);
00046 SetVisDaughters(kTRUE);
00047 SetVisStreamed(kFALSE);
00048 SetVisTouched(kFALSE);
00049 SetVisLeaves();
00050 }
00051
00052 TGeoAtt::~TGeoAtt()
00053 {
00054
00055 }
00056
00057
00058 void TGeoAtt::SetVisBranch()
00059 {
00060
00061 SetAttBit(kVisBranch, kTRUE);
00062 SetAttBit(kVisContainers, kFALSE);
00063 SetAttBit(kVisOnly, kFALSE);
00064 }
00065
00066
00067 void TGeoAtt::SetVisContainers(Bool_t flag)
00068 {
00069
00070 SetVisLeaves(!flag);
00071 }
00072
00073
00074 void TGeoAtt::SetVisLeaves(Bool_t flag)
00075 {
00076
00077 SetAttBit(kVisBranch, kFALSE);
00078 SetAttBit(kVisContainers, !flag);
00079 SetAttBit(kVisOnly, kFALSE);
00080 }
00081
00082
00083 void TGeoAtt::SetVisOnly(Bool_t flag)
00084 {
00085
00086 SetAttBit(kVisBranch, kFALSE);
00087 SetAttBit(kVisContainers, kFALSE);
00088 SetAttBit(kVisOnly, flag);
00089 }
00090
00091
00092 void TGeoAtt::SetVisibility(Bool_t vis)
00093 {
00094
00095 if (vis) SetAttBit(kVisThis);
00096 else ResetAttBit(kVisThis);
00097 if (gGeoManager && gGeoManager->IsClosed()) SetVisTouched(kTRUE);
00098 }
00099
00100 void TGeoAtt::SetVisDaughters(Bool_t vis)
00101 {
00102
00103 if (vis) SetAttBit(kVisDaughters);
00104 else ResetAttBit(kVisDaughters);
00105 if (gGeoManager && gGeoManager->IsClosed()) SetVisTouched(kTRUE);
00106 }
00107
00108 void TGeoAtt::SetVisStreamed(Bool_t vis)
00109 {
00110
00111 if (vis) SetAttBit(kVisStreamed);
00112 else ResetAttBit(kVisStreamed);
00113 }
00114
00115 void TGeoAtt::SetVisTouched(Bool_t vis)
00116 {
00117
00118 if (vis) SetAttBit(kVisTouched);
00119 else ResetAttBit(kVisTouched);
00120 }
00121
00122 void TGeoAtt::SetOptimization(Option_t * )
00123 {
00124
00125 }
00126