92 static Int_t counter = 0;
95 if(!(counter%1000))std::cout<<
"TVolume count="<<counter<<
" name="<<name<<std::endl;
138 const Int_t mapVis[4] = {1, -2, 0, -1 };
148 const Int_t mapVis[4] = {1, -2, 0, -1 };
151 for (i =0; i<3;i++)
if (mapVis[i] == vis)
return i;
176 while ( (node = (
TNode *) next()) ){
191 if (IsMaster)
fShape = shape;
222 TIter next(positions);
261 else Error(
"Add",
"Can not create list of positions for the current node <%s>:<%s>",
GetName(),
GetTitle());
288 if (!volume)
return 0;
293 return Add(volume,position);
306 if (!volume)
return 0;
312 return Add(volume,position);
325 posNumber = nodePosition->
GetId();
332 b->
Add(nodePosition,posName.
Data());
355 const Int_t big = 9999;
358 const Int_t inaxis = 7;
359 const Int_t maxdist = 5;
367 if (px < puxmin - inaxis)
return big;
368 if (py > puymin + inaxis)
return big;
369 if (px > puxmax + inaxis)
return big;
370 if (py < puymax - inaxis)
return big;
373 if (!view)
return big;
377 if (!position) position = &nullPosition;
383 while ((shape = (
TShape *)nextShape())) {
387 if (dshape < maxdist) {
388 gPad->SetSelected(
this);
391 if (dshape < dist) dist = dshape;
401 if (posList && posList->
GetSize()) {
406 while ((obj = next())) {
410 if (dnode <= 0)
break;
411 if (dnode < dist) dist = dnode;
418 gPad->SetSelected(view);
433 gROOT->MakeDefCanvas();
439 Int_t iopt = atoi(option);
449 while (parent && ++iopt);
453 #if ROOT_VERSION_CODE >= ROOT_VERSION(4,03,05) 508 gIdentity->
SetName(
"Identity");
509 gIdentity->
SetTitle(
"Identity matrix");
512 memset(identityMatrix,0,9*
sizeof(
Double_t));
514 identityMatrix += 4; *identityMatrix = 1;
515 identityMatrix += 4; *identityMatrix = 1;
528 static char info[512];
531 ((
TPad *)
gPad)->AbsPixeltoXY(px,py,x[0],x[1]);
538 while( (shape = (
TShape *)nextShape()) ) {
539 Int_t nchi = strlen(info);
561 while ( (volume = (
TVolume *)next()) )
596 if (option) iopt = atoi(option);
597 if ( (0 < iopt) && (iopt <= level) )
return;
603 if (!position) position = &nullPosition;
615 if (posList && posList->
GetSize()) {
637 Bool_t rangeView = option && option[0]==
'r';
647 while( (shape = (
TShape *)nextShape()) ) {
660 #if ROOT_VERSION_CODE >= ROOT_VERSION(4,03,05) 675 const_cast<TBuffer3D &
>(buffer).fID =
this;
677 Int_t reqSections = viewer3D->
AddObject(buffer, &viewerWantsSons);
684 shape->
Paint(option);
695 if (!position)
return;
701 if (nextPosition && nextPosition == position) {
725 TCanvas dummyPad(
"--Dumm--",
"dum",1,1);
736 if (savePad) savePad->
cd();
760 while( (shape = (
TShape *)nextShape()) ) {
767 if (!
Nodes())
return;
771 while ((obj = next())) {
virtual void DeletePosition(TVolumePosition *position)
DeletePosition deletes the position of the TVolume *node from this TVolume and removes that volume fr...
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
virtual Double_t GetY() const
virtual const char * GetName() const
Returns name of object.
virtual UInt_t GetId() const
virtual Double_t * GetMatrix()
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
void AddFirst(TObject *obj)
Add object at the beginning of the list.
static Double_t gTranslation[kMAXLEVELS][kVectorSize]
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual void Add(TDataSet *dataset)
virtual ENodeSEEN GetVisibility() const
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
TRotMatrix * GetRotMatrix(const char *name) const
Return pointer to RotMatrix with name.
virtual TRotMatrix * GetMatrix() const
TList * GetListOfNodes() const
static Int_t MapGEANT2StNodeVis(Int_t vis)
ENodeSEEN TVolume::MapGEANT2StNodeVis(Int_t vis) Maps the value of GEANT 3.21 "volume attributes" to ...
void CallRecursiveRemoveIfNeeded(TObject &obj)
call RecursiveRemove for obj if gROOT is valid and obj.TestBit(kMustCleanup) is true.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes distance from point (px,py) to the object.
static Int_t MapStNode2GEANTVis(ENodeSEEN vis)
ENodeSEEN Visibility flag 00 - everything visible, 10 - this invisible, but sons are visible 01 - thi...
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void SetAutoRange(Bool_t autorange=kTRUE)=0
virtual void cd(const char *path=0)
Change Current Reference node to this.
void ToLower()
Change string to lower-case.
virtual Double_t GetX() const
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void Draw(Option_t *depth="3")
Default Draw method for all objects.
virtual Double_t GetZ() const
virtual void Remove(TDataSet *set)
Remiove the "set" from this TDataSet.
virtual void Modify()
Change current line attributes if necessary.
virtual void SetMatrix(const Double_t *matrix)
copy predefined 3x3 matrix into TRotMatrix object
virtual void NDCtoWC(const Float_t *pn, Float_t *pw)=0
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
virtual Width_t GetLineWidth() const
Return the line width.
virtual void PaintShape(Option_t *option="")
Paint shape of the volume To be called from the TObject::Paint method only.
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Stub to avoid forcing implementation at this stage.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
const TRotMatrix * GetMatrix() const
virtual Style_t GetLineStyle() const
Return the line style.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Fill Area Attributes class.
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
virtual void Add(TDataSet *dataset)
virtual void SetVisibility(Int_t vis=1)
Set visibility for this node and its sons.
virtual void SetVisibility(ENodeSEEN vis=TVolume::kBothVisible)
Set visibility for this volume and its sons.
virtual void Modify()
Change current fill area attributes if necessary.
virtual void ImportShapeAttributes()
TShape * GetShape() const
const Option_t * GetOption() const
virtual TList * GetListOfPositions()
TObject * FindObject(const char *name) const
Must be redefined in derived classes.
virtual Int_t PushLevel()
Abstract 3D shapes viewer.
static TRotMatrix * GetIdentity()
Return a pointer the "identity" matrix.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
to be documented
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Using a TBrowser one can browse all ROOT objects.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual Double_t GetX(Int_t indx=0) const
static TRotMatrix * gIdentity
This is the base class for all geometry shapes.
Manages a detector rotation matrix.
const Option_t * GetOption() const
virtual void PaintNodePosition(Option_t *option="", TVolumePosition *postion=0)
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void Browse(TBrowser *b)
to be documented
virtual void UpdatePosition(Option_t *option="")
to be documented
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
virtual TNode * CreateTNode(const TVolumePosition *position=0)
Convert a TVolume object into a TNode.
TVolume()
TVolume description.
The most important graphics class in the ROOT system.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Generic 3D primitive description class.
virtual void ImportShapeAttributes()
Copy shape attributes as node attributes.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to an event at (px,py).
virtual TList * Nodes() const
virtual TObjLink * FirstLink() const
virtual void SetId(UInt_t id)
virtual Color_t GetLineColor() const
Return the line color.
virtual void DrawOnly(Option_t *option="")
virtual void Paint(Option_t *option="")
This method is used only when a shape is painted outside a TNode.
THashList * GetListOfMatrices() const
virtual char * GetObjectInfo(Int_t px, Int_t py) const
to be documented
Wrapper around a TObject so it can be stored in a TList.
virtual void Sizeof3D() const
Set total size of this 3D object (used by X3D interface).
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Double_t GetY() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void SetPositionsList(TList *list=0)
virtual Int_t DistancetoNodePrimitive(Int_t px, Int_t py, TVolumePosition *position=0)
Compute distance from point px,py to a TVolumeView.
virtual void SetLineAttr(Color_t color, Int_t width, Option_t *opt="")
virtual void SetGeomLevel(Int_t level=0)
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
static TView * CreateView(Int_t system=1, const Double_t *rmin=0, const Double_t *rmax=0)
Create a concrete default 3-d view via the plug-in manager.
virtual TVolume * GetNode() const
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
virtual void UpdateTempMatrix(Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Update temp matrix.
TObject * GetObject() const
TShape * GetShape() const
virtual void Add(TObject *obj)
virtual void GetLocalRange(Float_t *min, Float_t *max)
GetRange.
virtual void GetRange(Float_t *min, Float_t *max)=0
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
static Double_t gRotMatrix[kMAXLEVELS][kMatrixSize]
virtual void Sizeof3D() const
Set total size of this 3D object (used by X3D interface).
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual Int_t GetSize() const
virtual Double_t GetZ() const
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
R__EXTERN TGeometry * gGeometry
Int_t GetVisibility() const
virtual TSeqCollection * GetCollection() const
virtual void PushMatrix()
Int_t GetVisibility() const
TShape * GetShape(const char *name) const
Return pointer to Shape with name.
virtual const char * GetTitle() const
Returns title of object.
virtual TDataSet * GetParent() const
const char * Data() const