UgliPlnHandle Class Reference

#include <UgliPlnHandle.h>

Inheritance diagram for UgliPlnHandle:
UgliPlnABC UgliScintPlnHandle UgliSteelPlnHandle

List of all members.

Public Member Functions

 UgliPlnHandle (UgliPlnNode *plnNode)
 UgliPlnHandle (GeoPlnNode *plnNode)
 UgliPlnHandle (const UgliPlnHandle &that)
UgliPlnHandleoperator= (const UgliPlnHandle &that)
 UgliPlnHandle ()
virtual ~UgliPlnHandle ()
virtual Bool_t IsValid () const
virtual Bool_t IsGeo () const
virtual PlexPlaneId GetPlexPlaneId () const
virtual Int_t GetPlaneNumber () const
virtual PlaneView::PlaneView_t GetPlaneView () const
virtual
PlaneCoverage::PlaneCoverage_t 
GetPlaneCoverage () const
virtual Float_t GetHalfThickness () const
virtual TVector3 GetCenter () const
virtual Float_t GetX0 () const
virtual Float_t GetY0 () const
virtual Float_t GetZ0 () const

Protected Attributes

UgliPlnNodefUgliPlnNode
GeoPlnNodefGeoPlnNode

Detailed Description

Definition at line 20 of file UgliPlnHandle.h.


Constructor & Destructor Documentation

UgliPlnHandle::UgliPlnHandle ( UgliPlnNode plnNode  ) 

Definition at line 62 of file UgliPlnHandle.cxx.

References fUgliPlnNode, GetPlexPlaneId(), UgliPlnNode::IncrementRef(), Msg::kVerbose, and MSG.

00063   : fUgliPlnNode(node),fGeoPlnNode(0)
00064 {
00065    //  ctor keeps reference count up-to-date
00066 
00067    if (fUgliPlnNode) {
00068      fUgliPlnNode->IncrementRef();
00069 #ifdef VERBOSE_MSG
00070      MSG("Ugli",Msg::kVerbose)  
00071        << "create handle to " << GetPlexPlaneId() << endl;
00072 #endif
00073    }
00074 #ifdef VERBOSE_MSG
00075    else
00076      MSG("Ugli",Msg::kVerbose)  << "create handle to <no-node>" << endl;
00077 #endif
00078 
00079 }

UgliPlnHandle::UgliPlnHandle ( GeoPlnNode plnNode  ) 

Definition at line 82 of file UgliPlnHandle.cxx.

References fGeoPlnNode, GetPlexPlaneId(), GeoNode::IncrementRef(), Msg::kVerbose, and MSG.

00083   : fUgliPlnNode(0),fGeoPlnNode(node)
00084 {
00085    //  ctor keeps reference count up-to-date
00086 
00087    if (fGeoPlnNode) {
00088      fGeoPlnNode->IncrementRef();
00089 #ifdef VERBOSE_MSG
00090      MSG("Ugli",Msg::kVerbose)  
00091        << "create geo handle to " << GetPlexPlaneId() << endl;
00092 #endif
00093    }
00094 #ifdef VERBOSE_MSG
00095    else
00096      MSG("Ugli",Msg::kVerbose)  << "create geo handle to <no-node>" << endl;
00097 #endif
00098 
00099 }

UgliPlnHandle::UgliPlnHandle ( const UgliPlnHandle that  ) 

Definition at line 102 of file UgliPlnHandle.cxx.

References fGeoPlnNode, fUgliPlnNode, GetPlexPlaneId(), GeoNode::IncrementRef(), UgliPlnNode::IncrementRef(), Msg::kVerbose, and MSG.

00103   : UgliPlnABC(),fUgliPlnNode(that.fUgliPlnNode),
00104     fGeoPlnNode(that.fGeoPlnNode)
00105 {
00106    // copy constructor keeps reference counts up-to-date
00107   if (fUgliPlnNode || fGeoPlnNode) {
00108     if ( fUgliPlnNode ) fUgliPlnNode->IncrementRef();
00109     if ( fGeoPlnNode ) fGeoPlnNode->IncrementRef();
00110 #ifdef VERBOSE_MSG
00111     MSG("Ugli",Msg::kVerbose)  << "copy ctor to " << GetPlexPlaneId() << endl;
00112 #endif
00113   }
00114 #ifdef VERBOSE_MSG
00115   else
00116     MSG("Ugli",Msg::kVerbose)  << "copy ctor to <no-node>" << endl;
00117 #endif
00118 
00119 }

UgliPlnHandle::UgliPlnHandle (  ) 

Definition at line 25 of file UgliPlnHandle.cxx.

References Msg::kError, and MSG.

00026   : fUgliPlnNode(0),fGeoPlnNode(0)
00027 {
00028    // Default constructor
00029 
00030    MSG("Ugli",Msg::kError) <<
00031       "UgliPlnHandle created by default ctor" << endl;
00032 //   assert(0);
00033 }

UgliPlnHandle::~UgliPlnHandle (  )  [virtual]

Definition at line 36 of file UgliPlnHandle.cxx.

References UgliPlnNode::DecrementRef(), GeoNode::DecrementRef(), fGeoPlnNode, fUgliPlnNode, GetPlexPlaneId(), Msg::kVerbose, and MSG.

00037 {
00038    // handle deletion updates reference count
00039   if ( fUgliPlnNode || fGeoPlnNode ) {
00040 #ifdef VERBOSE_MSG
00041     MSG("Ugli",Msg::kVerbose)  
00042      << "destroy handle to " << GetPlexPlaneId() << endl;
00043 #endif
00044     if ( fUgliPlnNode ) {
00045       fUgliPlnNode->DecrementRef();
00046       fUgliPlnNode = 0;
00047     }
00048     else {
00049       fGeoPlnNode->DecrementRef();
00050       fGeoPlnNode = 0;
00051     }     
00052   }
00053 #ifdef VERBOSE_MSG
00054   else
00055     MSG("Ugli",Msg::kVerbose)  
00056        << "destroy handle to <no-node>" << endl;
00057 #endif
00058   
00059 }


Member Function Documentation

TVector3 UgliPlnHandle::GetCenter (  )  const [inline, virtual]

Implements UgliPlnABC.

Reimplemented in UgliSteelPlnHandle.

Definition at line 98 of file UgliPlnHandle.h.

References Munits::cm, fGeoPlnNode, fUgliPlnNode, UgliPlnNode::GetCenter(), GeoPlnNode::GetCenter(), and IsGeo().

Referenced by ToyMCModule::Get(), and ParticleTruthHelper::Process().

00099 { if ( !IsGeo() ) return fUgliPlnNode->GetCenter();
00100   else return (fGeoPlnNode->GetCenter())*Munits::cm;
00101 }

Float_t UgliPlnHandle::GetHalfThickness (  )  const [inline, virtual]
PlaneCoverage::PlaneCoverage_t UgliPlnHandle::GetPlaneCoverage (  )  const [inline, virtual]
Int_t UgliPlnHandle::GetPlaneNumber (  )  const [inline, virtual]
PlaneView::PlaneView_t UgliPlnHandle::GetPlaneView ( void   )  const [inline, virtual]
PlexPlaneId UgliPlnHandle::GetPlexPlaneId (  )  const [inline, virtual]

Implements UgliPlnABC.

Definition at line 72 of file UgliPlnHandle.h.

References fGeoPlnNode, fUgliPlnNode, GeoPlnNode::GetPlexPlaneId(), UgliPlnNode::GetPlexPlaneId(), and IsGeo().

Referenced by UgliScintPlnHandle::AttemptSet(), BfldCanvasSlice::BfldCanvasSlice(), fidvol_find_ugliplnhandle(), UgliSteelPlnHandle::GlobalToLocal(), UgliScintPlnHandle::GlobalToLocal(), UgliSteelPlnHandle::GlobalToLocalVect(), UgliSteelPlnHandle::LocalToGlobal(), UgliScintPlnHandle::LocalToGlobal(), UgliSteelPlnHandle::LocalToGlobalVect(), operator=(), BfldCache::SetSteelAndPlaneMapCache(), SwimGeo::SwimGeo(), GeoValidate::TestGeom_GetNearestSteelPlnHandle(), GeoValidate::TestGeom_GetPlnHandleVector(), GeoValidate::TestGeom_GetScintPlnHandle(), GeoValidate::TestGeom_GetScintPlnHandleVector(), GeoValidate::TestGeom_GetSteelPlnHandle(), GeoValidate::TestGeom_GetSteelPlnHandleVector(), GeoValidate::TestScintMdl(), GeoValidate::TestScintMdl_GetScintPlnHandle(), GeoValidate::TestScintPln(), GeoValidate::TestScintPln_GetClosestStrip(), GeoValidate::TestScintPln_GetX0RelSteel(), GeoValidate::TestScintPln_GetY0RelSteel(), GeoValidate::TestScintPln_GetZRotRelSteelRad(), GeoValidate::TestScintPln_GlobalToLocal(), GeoValidate::TestScintPln_LocalToGlobal(), GeoValidate::TestSteelPln(), GeoValidate::TestSteelPln_GetCenter(), GeoValidate::TestSteelPln_GetHalfThickness(), GeoValidate::TestSteelPln_GetX0(), GeoValidate::TestSteelPln_GetY0(), GeoValidate::TestSteelPln_GetZ0(), GeoValidate::TestSteelPln_GlobalToLocal(), GeoValidate::TestSteelPln_LocalToGlobal(), GeoValidate::TestStrip(), GeoValidate::TestStrip_GetScintPlnHandle(), UgliPlnHandle(), and ~UgliPlnHandle().

00073 { if ( !IsGeo() ) return fUgliPlnNode->GetPlexPlaneId(); 
00074   else return fGeoPlnNode->GetPlexPlaneId(); 
00075 }

Float_t UgliPlnHandle::GetX0 (  )  const [inline, virtual]

Implements UgliPlnABC.

Reimplemented in UgliSteelPlnHandle.

Definition at line 103 of file UgliPlnHandle.h.

References Munits::cm, fGeoPlnNode, fUgliPlnNode, GeoPlnNode::GetX0(), UgliPlnNode::GetX0(), and IsGeo().

Referenced by ShieldGeom::SetupShieldGeom().

00104 { if ( !IsGeo() ) return fUgliPlnNode->GetX0(); 
00105   else return (fGeoPlnNode->GetX0())*Munits::cm; 
00106 }

Float_t UgliPlnHandle::GetY0 (  )  const [inline, virtual]

Implements UgliPlnABC.

Reimplemented in UgliSteelPlnHandle.

Definition at line 108 of file UgliPlnHandle.h.

References Munits::cm, fGeoPlnNode, fUgliPlnNode, GeoPlnNode::GetY0(), UgliPlnNode::GetY0(), and IsGeo().

Referenced by ShieldGeom::SetupShieldGeom().

00109 { if ( !IsGeo() ) return fUgliPlnNode->GetY0(); 
00110   else return (fGeoPlnNode->GetY0())*Munits::cm;
00111 }

Float_t UgliPlnHandle::GetZ0 (  )  const [inline, virtual]
virtual Bool_t UgliPlnHandle::IsGeo (  )  const [inline, virtual]
Bool_t UgliPlnHandle::IsValid (  )  const [inline, virtual]

Reimplemented in UgliScintPlnHandle, and UgliSteelPlnHandle.

Definition at line 67 of file UgliPlnHandle.h.

References fGeoPlnNode, fUgliPlnNode, and IsGeo().

Referenced by FidVol::infid_z_finder(), and ShieldGeom::SetupShieldGeom().

00068 { if ( !IsGeo() ) return (fUgliPlnNode) ? kTRUE : kFALSE;
00069   else return (fGeoPlnNode) ? kTRUE : kFALSE;  
00070 }

UgliPlnHandle & UgliPlnHandle::operator= ( const UgliPlnHandle that  ) 

Reimplemented from UgliPlnABC.

Reimplemented in UgliScintPlnHandle, and UgliSteelPlnHandle.

Definition at line 122 of file UgliPlnHandle.cxx.

References UgliPlnNode::DecrementRef(), GeoNode::DecrementRef(), fGeoPlnNode, fUgliPlnNode, GetPlexPlaneId(), GeoNode::IncrementRef(), UgliPlnNode::IncrementRef(), Msg::kVerbose, and MSG.

00123 {
00124    // assignment keeps reference counts up-to-date
00125 
00126    if ( this == &that ) return *this;
00127    
00128    if ( fUgliPlnNode || fGeoPlnNode ) {
00129      if ( fUgliPlnNode ) fUgliPlnNode->DecrementRef();
00130      if ( fGeoPlnNode ) fGeoPlnNode->DecrementRef();
00131 #ifdef VERBOSE_MSG
00132      MSG("Ugli",Msg::kVerbose)  
00133        << "assignment from " << GetPlexPlaneId() << endl;
00134 #endif
00135    }
00136 #ifdef VERBOSE_MSG
00137    else
00138      MSG("Ugli",Msg::kVerbose)  << "assignment from <no-node>" << endl;
00139 #endif
00140 
00141    fUgliPlnNode = that.fUgliPlnNode;
00142    fGeoPlnNode = that.fGeoPlnNode;
00143    
00144    if ( fUgliPlnNode || fGeoPlnNode ) {
00145      if ( fUgliPlnNode ) fUgliPlnNode->IncrementRef();
00146      if ( fGeoPlnNode ) fGeoPlnNode->IncrementRef();
00147 #ifdef VERBOSE_MSG
00148      MSG("Ugli",Msg::kVerbose)  
00149        << "assignment to " << GetPlexPlaneId() << endl;
00150 #endif
00151    }
00152 #ifdef VERBOSE_MSG
00153    else
00154      MSG("Ugli",Msg::kVerbose)  << "assignment to <no-node> " << endl;
00155 #endif
00156 
00157    return *this;
00158 }


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1