95 for (
Int_t i=0; i<nframes; i++) {
162 if (!material)
return;
203 if (!ged)
return NULL;
222 for (
Int_t i=0; i<ntabs; i++) {
224 if (tel && !strcmp(tel->
GetString(),tabname.
Data()))
return i;
238 if (el->
fFrame == fr)
break;
305 gClient->GetColorByName(
"#0000ff", color);
343 name =
"Selected: -none-";
384 parent_item =
fLT->
AddItem(parent_item,
"Volume hierarchy", pic_fldo, pic_fld);
385 parent_item->
SetTipText(
"Select a volume from the existing hierarchy");
389 parent_item =
fLT->
AddItem(parent_item, parent_vol->
GetName(), parent_vol, pic_fileo, pic_file);
393 parent_item =
fLT->
AddItem(parent_item, parent_vol->
GetName(), parent_vol, pic_fldo, pic_fld);
398 parent_item =
fLT->
AddItem(NULL,
"Other volumes", pic_fldo, pic_fld);
399 parent_item->
SetTipText(
"Select a volume from the list of unconnected volumes");
440 for (i=0; i<nd; i++) {
442 crtnode = parent_vol->
GetNode(i);
445 ind = parent_vol->
GetIndex(crtnode);
446 for (j=0; j<ind; j++)
if (parent_vol->
GetNode(j)->
GetVolume() == vol)
break;
449 for (j=ind+1; j<nd; j++)
if (parent_vol->
GetNode(j)->
GetVolume() == vol) icopy++;
462 fClose->
Connect(
"Clicked()",
"TGeoVolumeDialog",
this,
"DoClose()");
463 fLT->
Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoVolumeDialog",
this,
464 "DoItemClick(TGListTreeItem *, Int_t)");
494 const char *shapename;
497 if (!nshapes)
return;
499 for (
Int_t i=0; i<nshapes; i++) {
501 if (!shape)
continue;
502 shapename = shape->IsA()->
GetName();
504 fld_name = shapename;
506 fld_name +=
" Shapes";
509 parent_item =
fLT->
AddItem(NULL, fld_name.
Data(), pic_fldo, pic_fld);
540 fClose->
Connect(
"Clicked()",
"TGeoShapeDialog",
this,
"DoClose()");
541 fLT->
Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoShapeDialog",
this,
542 "DoItemClick(TGListTreeItem *, Int_t)");
572 for (
Int_t i=0; i<nmed; i++) {
603 fClose->
Connect(
"Clicked()",
"TGeoMediumDialog",
this,
"DoClose()");
604 fLT->
Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoMediumDialog",
this,
605 "DoItemClick(TGListTreeItem *, Int_t)");
635 for (
Int_t i=0; i<nmat; i++) {
666 fClose->
Connect(
"Clicked()",
"TGeoMaterialDialog",
this,
"DoClose()");
667 fLT->
Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoMaterialDialog",
this,
668 "DoItemClick(TGListTreeItem *, Int_t)");
702 for (
Int_t i=0; i<nmat; i++) {
705 if (!strcmp(matrix->IsA()->
GetName(),
"TGeoTranslation")) {
709 parent_item =
fLT->
AddItem(NULL,
"Translations", pic, pic);
710 parent_item->
SetTipText(
"List of translations");
712 }
else if (!strcmp(matrix->IsA()->
GetName(),
"TGeoRotation")) {
716 parent_item =
fLT->
AddItem(NULL,
"Rotations", pic, pic);
719 }
else if (!strcmp(matrix->IsA()->
GetName(),
"TGeoCombiTrans") ||
720 !strcmp(matrix->IsA()->
GetName(),
"TGeoHMatrix")) {
724 parent_item =
fLT->
AddItem(NULL,
"Combined", pic, pic);
725 parent_item->
SetTipText(
"List of combined transformations");
757 fClose->
Connect(
"Clicked()",
"TGeoMatrixDialog",
this,
"DoClose()");
758 fLT->
Connect(
"Clicked(TGListTreeItem *, Int_t)",
"TGeoMatrixDialog",
this,
759 "DoItemClick(TGListTreeItem *, Int_t)");
791 gROOT->GetListOfCleanups()->Add(
this);
792 fClose->
Connect(
"Clicked()",
"TGeoTransientPanel",
this,
"Hide()");
803 gROOT->GetListOfCleanups()->Remove(
this);
813 gROOT->GetListOfCleanups()->Remove(
this);
827 if (fr->
fFrame->IsA() == class2)
return;
R__EXTERN TGeoManager * gGeoManager
TClass instances represent classes, structs and namespaces in the ROOT type system.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
virtual void SetContainer(TGFrame *f)
TGViewPort * GetViewPort() const
const TGWindow * GetRoot() const
Returns current root (i.e.
void SetRoot(TGWindow *root=0)
Sets the current root (i.e.
TGMimeTypes * GetMimeTypeList() const
virtual TList * GetList() const
TGCompositeFrame(const TGCompositeFrame &)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual UInt_t GetDefaultWidth() const
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void Layout()
Layout the elements of the composite frame.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual UInt_t GetDefaultHeight() const
virtual void Associate(const TGWindow *w)
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
virtual void DeleteWindow()
Delete window.
virtual void Move(Int_t x, Int_t y)
Move frame.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void MapWindow()
map window
virtual void UnmapWindow()
unmap window
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
virtual void SetText(TGString *newText)
Set new text in label.
TGListTreeItem * GetFirstChild() const
virtual void SetTipText(const char *)
virtual void * GetUserData() const =0
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
void SetSelected(TGListTreeItem *item)
TGListTreeItem * FindChildByName(TGListTreeItem *item, const char *name)
Find child of item by name.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
const TGPicture * GetIcon(const char *filename, Bool_t small_icon)
Return icon belonging to mime type of filename.
TGClient * GetClient() const
const char * GetString() const
virtual void SetEnabled(Int_t tabIndex, Bool_t on=kTRUE)
Enable or disable tab.
TGTabElement * GetTabTab(Int_t tabIndex) const
Return the tab element of tab with index tabIndex.
Int_t GetNumberOfTabs() const
Return number of tabs.
virtual Bool_t SetTab(Int_t tabIndex, Bool_t emit=kTRUE)
Brings the composite frame with the index tabIndex to the front and generate the following event if t...
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
virtual void RaiseWindow()
raise window
virtual TVirtualPad * GetPad() const
static void SetFrameCreator(TGedEditor *e)
Set the TGedEditor that currently creates TGedFrames.
void SetModelClass(TClass *mcl)
TList * GetListOfMedia() const
TObjArray * GetListOfVolumes() const
TObjArray * GetListOfMatrices() const
TGeoVolume * GetMasterVolume() const
TList * GetListOfMaterials() const
TObjArray * GetListOfShapes() const
virtual void DoItemClick(TGListTreeItem *item, Int_t btn)
Handle item click.
virtual void BuildListTree()
Build volume specific list tree.
TGeoMaterialDialog(TGFrame *caller, const TGWindow *main, UInt_t w=1, UInt_t h=1)
Ctor.
virtual void DoClose()
Handle close button.
virtual void ConnectSignalsToSlots()
Connect signals to slots.
Base class describing materials.
virtual Bool_t IsMixture() const
virtual void DoItemClick(TGListTreeItem *item, Int_t btn)
Handle item click.
TGeoMatrixDialog(TGFrame *caller, const TGWindow *main, UInt_t w=1, UInt_t h=1)
Ctor.
virtual void DoClose()
Handle close button.
virtual void BuildListTree()
Build matrix specific list tree.
virtual void ConnectSignalsToSlots()
Connect signals to slots.
Geometrical transformation package.
Bool_t IsIdentity() const
virtual void BuildListTree()
Build volume specific list tree.
virtual void DoClose()
Handle close button.
virtual void DoItemClick(TGListTreeItem *item, Int_t btn)
Handle item click.
virtual void ConnectSignalsToSlots()
Connect signals to slots.
TGeoMediumDialog(TGFrame *caller, const TGWindow *main, UInt_t w=1, UInt_t h=1)
Ctor.
Media are used to store properties related to tracking and which are useful only when using geometry ...
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
TGeoVolume * GetVolume() const
TGeoShapeDialog(TGFrame *caller, const TGWindow *main, UInt_t w=1, UInt_t h=1)
Ctor.
virtual void ConnectSignalsToSlots()
Connect signals to slots.
virtual void BuildListTree()
Build shape specific list tree.
virtual void DoClose()
Handle close button.
virtual void DoItemClick(TGListTreeItem *item, Int_t btn)
Handle item click.
Base abstract class for all shapes.
virtual const char * GetName() const
Get the shape name.
Manager for all editor tabs.
void GetVolumeEditor(TGeoVolume *vol)
Get editor for a volume.
TGeoTransientPanel * fMaterialPanel
virtual ~TGeoTabManager()
Dtor.
TGCompositeFrame * fVolumeTab
static void MoveFrame(TGCompositeFrame *fr, TGCompositeFrame *p)
Move frame fr at the end of the list of parent p.
static TMap fgEditorToMgrMap
void GetMaterialEditor(TGeoMaterial *material)
Get editor for a material.
void GetEditors(TClass *cl)
Get editor for a class.
static TGeoTabManager * GetMakeTabManager(TGedEditor *ged)
Static method to return the tab manager currently appended to the pad or create one if not existing.
void SetModel(TObject *model)
Send the SetModel signal to all editors in the tab TYPE.
Int_t GetTabIndex() const
Get index for a given tab element.
TGeoTransientPanel * fShapePanel
void GetMediumEditor(TGeoMedium *medium)
Get editor for a medium.
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
void GetShapeEditor(TGeoShape *shape)
Get editor for a shape.
TGeoTransientPanel * fMediumPanel
TGeoTabManager(TGedEditor *ged)
Ctor.
void SetTab()
Set a given tab element as active one.
void SetVolTabEnabled(Bool_t flag=kTRUE)
Enable/disable tabs.
void GetMatrixEditor(TGeoMatrix *matrix)
Get editor for a matrix.
TGeoTransientPanel * fMatrixPanel
virtual void Hide()
Hide the transient frame.
TGeoTransientPanel(TGedEditor *ged, const char *name, TObject *obj)
Transient panel ctor.
virtual void CloseWindow()
When closed via WM close button, just unmap (i.e.
void GetEditors(TClass *cl)
Get editor for a class.
virtual void Show()
Hide the transient frame.
virtual void DeleteEditors()
Delete editors.
TGCompositeFrame * fTabContainer
TGCompositeFrame * fStyle
void SetModel(TObject *model)
Update the editors in the main tab to reflect the selected object.
virtual ~TGeoTransientPanel()
Destructor.
static TObject * fgSelectedObj
virtual ~TGeoTreeDialog()
Destructor.
static TObject * GetSelected()
static; return selected object
void DoSelect(TGListTreeItem *item)
Update dialog to reflect current clicked object.
TGeoTreeDialog(TGFrame *caller, const TGWindow *main, UInt_t w=1, UInt_t h=1)
Constructor.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Int_t GetNdaughters() const
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
Int_t GetIndex(const TGeoNode *node) const
get index number for a given daughter
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
TObject * FindObject(const char *keyname) const
Check if a (key,value) pair exists with keyname as name of the key.
TObject * Remove(TObject *key)
Remove the (key,value) pair with key from the map.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntriesFast() const
TObject * At(Int_t idx) const
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
Class used by TMap to store (key,value) pairs.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
const char * Data() const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
int main(int argc, char **argv)