StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
TVolume Class Reference
Inheritance diagram for TVolume:
TObjectSet TDataSet StiDetectorVolume

Public Types

enum  ENodeSEEN { kBothVisible = 00, kSonUnvisible = 1, kThisUnvisible = 2, kNoneVisible = kThisUnvisible | kSonUnvisible }
 
- Public Types inherited from TDataSet
enum  EDataSetPass {
  kContinue, kPrune, kStop, kUp,
  kStruct, kAll, kRefs, kMarked
}
 
enum  ESetBits { kMark = BIT(22), kArray = BIT(20) }
 
enum  EBitOpt { kSet = kTRUE, kReset = kFALSE }
 

Public Member Functions

 TVolume ()
 
 TVolume (const char *name, const char *title, const char *shapename, Option_t *option="")
 
 TVolume (const char *name, const char *title, TShape *shape, Option_t *option="")
 
 TVolume (TNode &node)
 Convert a TNode object into a TVolume.
 
virtual TVolumePositionAdd (TVolume *node, Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0, UInt_t id=0, Option_t *option="")
 
virtual TVolumePositionAdd (TVolume *node, Double_t x, Double_t y, Double_t z, const char *matrixname, UInt_t id=0, Option_t *option="")
 
virtual void Add (TShape *shape, Bool_t IsMaster=kFALSE)
 to be documented
 
virtual void Browse (TBrowser *b)
 to be documented
 
virtual TNode * CreateTNode (const TVolumePosition *position=0)
 Convert a TVolume object into a TNode.
 
virtual void DeletePosition (TVolumePosition *position)
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 to be documented
 
virtual void Draw (Option_t *depth="3")
 
virtual void DrawOnly (Option_t *option="")
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 to be documented
 
const Option_t * GetOption () const
 
TShape * GetShape () const
 
TList * GetListOfShapes () const
 
virtual void GetLocalRange (Float_t *min, Float_t *max)
 
virtual ENodeSEEN GetVisibility () const
 
virtual TList * GetListOfPositions ()
 
virtual ULong_t Hash () const
 
virtual void ImportShapeAttributes ()
 
virtual Bool_t IsMarked () const
 
virtual Bool_t Is3D () const
 
virtual TList * Nodes () const
 
virtual void Paint (Option_t *option="")
 
virtual void PaintShape (Option_t *option="")
 
virtual void SetVisibility (ENodeSEEN vis=TVolume::kBothVisible)
 
virtual void Sizeof3D () const
 
- Public Member Functions inherited from TObjectSet
 TObjectSet (const Char_t *name, TObject *obj=0, Bool_t makeOwner=kTRUE)
 to be documented
 
 TObjectSet (TObject *obj=0, Bool_t makeOwner=kTRUE)
 to be documented
 
virtual ~TObjectSet ()
 to be documented
 
virtual TObject * AddObject (TObject *obj, Bool_t makeOwner=kTRUE)
 Aliase for SetObject method.
 
virtual void Delete (Option_t *opt="")
 to be documented
 
virtual Bool_t DoOwner (Bool_t done=kTRUE)
 
virtual Long_t HasData () const
 
virtual TObject * GetObject () const
 The depricated method (left here for the sake of the backward compatibility)
 
virtual TDataSetInstance () const
 
virtual Bool_t IsOwner () const
 
virtual void SetObject (TObject *obj)
 The depricated method (left here for the sake of the backward compatibility)
 
virtual TObject * SetObject (TObject *obj, Bool_t makeOwner)
 
- Public Member Functions inherited from TDataSet
 TDataSet (const char *name="", TDataSet *parent=0, Bool_t arrayFlag=kFALSE)
 
 TDataSet (const TDataSet &src, EDataSetPass iopt=kAll)
 
 TDataSet (TNode &src)
 This copy ctor has been depricated (left for thwe sake of the backweard compatibility)
 
virtual ~TDataSet ()
 std::cout << "Default destructor for " << GetName() << " - " << GetTitle() << std::endl;
 
virtual void AddAt (TDataSet *dataset, Int_t idx=0)
 
virtual void AddAtAndExpand (TDataSet *dataset, Int_t idx=0)
 
virtual void AddFirst (TDataSet *dataset)
 Add TDataSet object at the beginning of the dataset list of this dataset.
 
virtual void AddLast (TDataSet *dataset)
 Add TDataSet object at the end of the dataset list of this dataset.
 
TDataSetAt (Int_t idx) const
 
virtual TObject * Clone (const char *newname="") const
 the custom implementation fo the TObject::Clone
 
virtual TDataSetFind (const char *path) const
 
virtual TDataSetFindByName (const char *name, const char *path="", Option_t *opt="") const
 
virtual TDataSetFindByPath (const char *path) const
 Aliase for TDataSet::Find(const Char_t *path) method.
 
virtual TDataSetFindByTitle (const char *title, const char *path="", Option_t *opt="") const
 
TObject * FindObject (const char *name) const
 
TObject * FindObject (const TObject *o) const
 
virtual TDataSetFirst () const
 Return the first object in the list. Returns 0 when list is empty.
 
TObjArray * GetObjArray () const
 
virtual TSeqCollection * GetCollection () const
 
TList * GetList () const
 
virtual Int_t GetListSize () const
 
TObject * GetMother () const
 
virtual TDataSetGetParent () const
 
virtual TString Path () const
 return the full path of this data set
 
virtual EDataSetPass Pass (EDataSetPass(*callback)(TDataSet *), Int_t depth=0)
 
virtual EDataSetPass Pass (EDataSetPass(*callback)(TDataSet *, void *), void *user, Int_t depth=0)
 
virtual void PrintContents (Option_t *opt="") const
 
virtual Int_t Purge (Option_t *opt="")
 
virtual void Remove (TDataSet *set)
 Remiove the "set" from this TDataSet.
 
virtual TDataSetRemoveAt (Int_t idx)
 
virtual void SetMother (TDataSet *parent=0)
 
virtual void SetParent (TDataSet *parent=0)
 
virtual void SetWrite ()
 
virtual void Shunt (TDataSet *newParent=0)
 
virtual void Sort ()
 Sort recursively all members of the TDataSet with TList::Sort method.
 
virtual Bool_t IsEmpty () const
 return kTRUE if the "internal" collection has no member
 
virtual Bool_t IsFolder () const
 
virtual Bool_t IsThisDir (const char *dirname, int len=-1, int ignorecase=0) const
 
virtual TDataSetLast () const
 Return the last object in the list. Returns 0 when list is empty.
 
virtual void ls (Option_t *option="") const
 
virtual void ls (Int_t depth) const
 
void Mark ()
 
void UnMark ()
 
void MarkAll ()
 Mark all members of this dataset.
 
void UnMarkAll ()
 UnMark all members of this dataset.
 
void InvertAllMarks ()
 Invert mark bit for all members of this dataset.
 
void Mark (UInt_t flag, EBitOpt reset=kSet)
 
virtual TDataSetNext () const
 
virtual TDataSetPrev () const
 
virtual void Update ()
 
virtual void Update (TDataSet *set, UInt_t opt=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 

Static Public Member Functions

static Int_t MapStNode2GEANTVis (ENodeSEEN vis)
 
static Int_t MapGEANT2StNodeVis (Int_t vis)
 
static TRotMatrix * GetIdentity ()
 Return a pointer the "identity" matrix.
 
- Static Public Member Functions inherited from TObjectSet
static TObjectSetinstance ()
 
- Static Public Member Functions inherited from TDataSet
static TDataSetGetMainSet ()
 return pointer to the main dataset
 
static TDataSetinstance ()
 

Protected Member Functions

virtual void Add (TDataSet *dataset)
 
virtual void Add (TVolumePosition *position)
 to be documented
 
virtual TVolumePositionAdd (TVolume *node, TVolumePosition *nodePosition)
 to be documented
 
virtual Int_t DistancetoNodePrimitive (Int_t px, Int_t py, TVolumePosition *position=0)
 
void SetPositionsList (TList *list=0)
 
virtual void PaintNodePosition (Option_t *option="", TVolumePosition *postion=0)
 
- Protected Member Functions inherited from TDataSet
virtual void SetMother (TObject *mother)
 
 TDataSet (const char *name, const char *title)
 
void AddMain (TDataSet *set)
 add data set to main data set
 
TDataSetGetRealParent ()
 return real parent
 
void MakeCollection ()
 Create the internal container at once if any.
 

Protected Attributes

TShape * fShape
 
TList * fListOfShapes
 
TString fOption
 
ENodeSEEN fVisibility
 
- Protected Attributes inherited from TObjectSet
TObject * fObj
 
- Protected Attributes inherited from TDataSet
TDataSetfParent
 
TSeqCollection * fList
 

Friends

class TPolyLineShape
 

Additional Inherited Members

- Protected Types inherited from TObjectSet
enum  EOwnerBits { kIsOwner = BIT(23) }
 
- Static Protected Member Functions inherited from TDataSet
static EDataSetPass SortIt (TDataSet *ds)
 
static EDataSetPass SortIt (TDataSet *ds, void *user)
 
- Static Protected Attributes inherited from TDataSet
static TDataSetfgMainSet = &mainSet
 

Detailed Description

Definition at line 36 of file TVolume.h.

Constructor & Destructor Documentation

TVolume::TVolume ( )

TVolume description

A TVolume object is used to build the geometry hierarchy. Since TVolume is derived from TDataSet class it may contain other volumes.

A geometry volume has attributes:

  • name and title
  • pointer to the referenced shape (see TShape).
  • list of TVolumePosition object defining the position of the nested volumes with respect to the mother node.

A volume can be drawn.

Definition at line 75 of file TVolume.cxx.

Referenced by TVolume().

Member Function Documentation

void TVolume::DeletePosition ( TVolumePosition position)
virtual

DeletePosition deletes the position of the TVolume *node from this TVolume and removes that volume from the list of the nodes of this TVolume

Definition at line 699 of file TVolume.cxx.

References TDataSet::Remove().

Int_t TVolume::DistancetoNodePrimitive ( Int_t  px,
Int_t  py,
TVolumePosition pos = 0 
)
protectedvirtual

Compute distance from point px,py to a TVolumeView

  • return if point is not in the user area
  • Distance to the next referenced shape if visible
  • Loop on all sons

Definition at line 359 of file TVolume.cxx.

References DistancetoNodePrimitive(), and TVolumePosition::UpdatePosition().

Referenced by DistancetoNodePrimitive(), and DistancetoPrimitive().

void TVolume::Draw ( Option_t *  depth = "3")
virtual
  • Clear pad if option "same" not given

Definition at line 433 of file TVolume.cxx.

Referenced by TVolumePosition::Draw().

void TVolume::GetLocalRange ( Float_t *  min,
Float_t *  max 
)
virtual

GetRange

Calculates the size of 3 box the volume occupies, Return: two floating point arrays with the bound of box surrounding all shapes of this TVolumeView

Definition at line 727 of file TVolume.cxx.

Int_t TVolume::MapGEANT2StNodeVis ( Int_t  vis)
static

ENodeSEEN TVolume::MapGEANT2StNodeVis(Int_t vis) Maps the value of GEANT 3.21 "volume attributes" to the visibility flag

Definition at line 152 of file TVolume.cxx.

Referenced by TVolume().

Int_t TVolume::MapStNode2GEANTVis ( ENodeSEEN  vis)
static

ENodeSEEN Visibility flag 00 - everything visible, 10 - this invisible, but sons are visible 01 - this visible but sons 11 - neither this nor its sons are visible Maps the value of the visibility flag to GEANT 3.21 "volume attributes"

Definition at line 142 of file TVolume.cxx.

Referenced by CreateTNode().

void TVolume::PaintNodePosition ( Option_t *  option = "",
TVolumePosition postion = 0 
)
protectedvirtual
  • Paint all sons

Definition at line 591 of file TVolume.cxx.

References PaintNodePosition(), PaintShape(), and TVolumePosition::UpdatePosition().

Referenced by TPolyLineShape::PaintNode(), and PaintNodePosition().

void TVolume::PaintShape ( Option_t *  option = "")
virtual

Paint shape of the volume To be called from the TObject::Paint method only

Definition at line 641 of file TVolume.cxx.

Referenced by TVolumeView::Paint(), and PaintNodePosition().

void TVolume::SetVisibility ( ENodeSEEN  vis = TVolume::kBothVisible)
virtual

Set visibility for this volume and its sons

ENodeSEEN Visibility flag 00 - everything visible, 10 - this invisible, but sons are visible 01 - this visible but sons 11 - neither this nor its sons are visible

Definition at line 753 of file TVolume.cxx.

Referenced by TPolyLineShape::PaintNode(), TVolumeView::SetVisibility(), and TVolumePosition::SetVisibility().


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