98 static Int_t counter = 0;
101 if(!(counter%1000))std::cout<<
"TVolume count="<<counter<<
" name="<<
name<<std::endl;
144 const Int_t mapVis[4] = {1, -2, 0, -1 };
154 const Int_t mapVis[4] = {1, -2, 0, -1 };
157 for (i =0; i<3;i++)
if (mapVis[i] == vis)
return i;
182 while ( (node = (
TNode *) next()) ){
197 if (IsMaster)
fShape = shape;
228 TIter next(positions);
267 else Error(
"Add",
"Can not create list of positions for the current node <%s>:<%s>",
GetName(),
GetTitle());
294 if (!volume)
return 0;
299 return Add(volume,position);
312 if (!volume)
return 0;
318 return Add(volume,position);
331 posNumber = nodePosition->
GetId();
338 b->Add(nodePosition,posName.
Data());
361 const Int_t big = 9999;
364 const Int_t inaxis = 7;
365 const Int_t maxdist = 5;
373 if (px < puxmin - inaxis)
return big;
374 if (py > puymin + inaxis)
return big;
375 if (px > puxmax + inaxis)
return big;
376 if (py < puymax - inaxis)
return big;
379 if (!view)
return big;
383 if (!position) position = &nullPosition;
389 while ((shape = (
TShape *)nextShape())) {
393 if (dshape < maxdist) {
394 gPad->SetSelected(
this);
407 if (posList && posList->
GetSize()) {
412 while ((obj = next())) {
416 if (dnode <= 0)
break;
424 gPad->SetSelected(view);
439 gROOT->MakeDefCanvas();
445 Int_t iopt = atoi(option);
455 while (parent && ++iopt);
459#if ROOT_VERSION_CODE >= ROOT_VERSION(4,03,05)
518 memset(identityMatrix,0,9*
sizeof(
Double_t));
520 identityMatrix += 4; *identityMatrix = 1;
521 identityMatrix += 4; *identityMatrix = 1;
534 static char info[512];
537 ((
TPad *)
gPad)->AbsPixeltoXY(px,py,
x[0],
x[1]);
544 while( (shape = (
TShape *)nextShape()) ) {
545 Int_t nchi = strlen(info);
567 while ( (volume = (
TVolume *)next()) )
602 if (option) iopt = atoi(option);
603 if ( (0 < iopt) && (iopt <= level) )
return;
609 if (!position) position = &nullPosition;
621 if (posList && posList->
GetSize()) {
643 Bool_t rangeView = option && option[0]==
'r';
653 while( (shape = (
TShape *)nextShape()) ) {
666#if ROOT_VERSION_CODE >= ROOT_VERSION(4,03,05)
681 const_cast<TBuffer3D &
>(buffer).fID =
this;
683 Int_t reqSections = viewer3D->
AddObject(buffer, &viewerWantsSons);
690 shape->
Paint(option);
701 if (!position)
return;
707 if (nextPosition && nextPosition == position) {
731 TCanvas dummyPad(
"--Dumm--",
"dum",1,1);
742 if (savePad) savePad->
cd();
766 while( (shape = (
TShape *)nextShape()) ) {
773 if (!
Nodes())
return;
777 while ((obj = next())) {
R__EXTERN TGeometry * gGeometry
static Double_t gRotMatrix[kMAXLEVELS][kMatrixSize]
static Double_t gTranslation[kMAXLEVELS][kVectorSize]
static TRotMatrix * gIdentity
virtual void Sizeof3D() const
Set total size of this 3D object (used by X3D interface).
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void Modify()
Change current fill area attributes if necessary.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
virtual void Modify()
Change current line attributes if necessary.
Using a TBrowser one can browse all ROOT objects.
Generic 3D primitive description class.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
virtual TSeqCollection * GetCollection() const
virtual void Remove(TDataSet *set)
Remiove the "set" from this TDataSet.
virtual TDataSet * GetParent() const
TObject * FindObject(const char *name) const
Must be redefined in derived classes.
virtual void Add(TDataSet *dataset)
virtual void UpdateTempMatrix(Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Update temp matrix.
virtual void SetGeomLevel(Int_t level=0)
THashList * GetListOfMatrices() const
TRotMatrix * GetRotMatrix(const char *name) const
Return pointer to RotMatrix with name.
virtual Int_t PushLevel()
TShape * GetShape(const char *name) const
Return pointer to Shape with name.
void AddFirst(TObject *obj)
Add object at the beginning of the list.
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObjLink * FirstLink() const
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
virtual Double_t GetY() const
virtual Double_t GetX() const
virtual TRotMatrix * GetMatrix() const
TShape * GetShape() const
virtual Double_t GetZ() const
const Option_t * GetOption() const
Int_t GetVisibility() const
virtual void ImportShapeAttributes()
Copy shape attributes as node attributes.
virtual void SetVisibility(Int_t vis=1)
Set visibility for this node and its sons.
TList * GetListOfNodes() const
virtual void cd(const char *path=0)
Change Current Reference node to this.
Wrapper around a TObject so it can be stored in a TList.
TObject * GetObject() const
Mother of all ROOT objects.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Computes distance from point (px,py) to the object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
The most important graphics class in the ROOT system.
Manages a detector rotation matrix.
virtual void SetMatrix(const Double_t *matrix)
copy predefined 3x3 matrix into TRotMatrix object
virtual Double_t * GetMatrix()
virtual void SetName(const char *name)
Set the name of the TNamed.
This is the base class for all geometry shapes.
virtual void Paint(Option_t *option="")
This method is used only when a shape is painted outside a TNode.
Int_t GetVisibility() const
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Stub to avoid forcing implementation at this stage.
void ToLower()
Change string to lower-case.
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void SetLineAttr(Color_t color, Int_t width, Option_t *opt="")
virtual void PushMatrix()
virtual void SetAutoRange(Bool_t autorange=kTRUE)=0
virtual void NDCtoWC(const Float_t *pn, Float_t *pw)=0
virtual void GetRange(Float_t *min, Float_t *max)=0
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.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
Abstract 3D shapes viewer.
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
virtual void UpdatePosition(Option_t *option="")
to be documented
virtual Double_t GetZ() const
virtual TVolume * GetNode() const
virtual Double_t GetY() const
virtual Double_t GetX(Int_t indx=0) const
virtual UInt_t GetId() const
virtual void SetId(UInt_t id)
const TRotMatrix * GetMatrix() const
virtual void Draw(Option_t *depth="3")
Default Draw method for all objects.
virtual void Browse(TBrowser *b)
to be documented
static Int_t MapGEANT2StNodeVis(Int_t vis)
ENodeSEEN TVolume::MapGEANT2StNodeVis(Int_t vis) Maps the value of GEANT 3.21 "volume attributes" to ...
virtual void Sizeof3D() const
Set total size of this 3D object (used by X3D interface).
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
to be documented
virtual void Add(TDataSet *dataset)
virtual Int_t DistancetoNodePrimitive(Int_t px, Int_t py, TVolumePosition *position=0)
Compute distance from point px,py to a TVolumeView.
virtual void PaintNodePosition(Option_t *option="", TVolumePosition *postion=0)
virtual TNode * CreateTNode(const TVolumePosition *position=0)
Convert a TVolume object into a TNode.
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
virtual void DeletePosition(TVolumePosition *position)
DeletePosition deletes the position of the TVolume *node from this TVolume and removes that volume fr...
virtual void DrawOnly(Option_t *option="")
virtual char * GetObjectInfo(Int_t px, Int_t py) const
to be documented
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to an event at (px,py).
TShape * GetShape() const
void SetPositionsList(TList *list=0)
const Option_t * GetOption() const
virtual void GetLocalRange(Float_t *min, Float_t *max)
GetRange.
virtual void PaintShape(Option_t *option="")
Paint shape of the volume To be called from the TObject::Paint method only.
virtual TList * GetListOfPositions()
virtual void ImportShapeAttributes()
TVolume()
TVolume description.
virtual ENodeSEEN GetVisibility() const
static Int_t MapStNode2GEANTVis(ENodeSEEN vis)
ENodeSEEN Visibility flag 00 - everything visible, 10 - this invisible, but sons are visible 01 - thi...
static TRotMatrix * GetIdentity()
Return a pointer the "identity" matrix.
virtual void SetVisibility(ENodeSEEN vis=TVolume::kBothVisible)
Set visibility for this volume and its sons.
virtual TList * Nodes() const
double dist(Rotation3D const &r1, Rotation3D const &r2)
void CallRecursiveRemoveIfNeeded(TObject &obj)
call RecursiveRemove for obj if gROOT is valid and obj.TestBit(kMustCleanup) is true.