81 fMatA->Associate(
this);
87 fMatZ->Associate(
this);
170 fUndo->Associate(
this);
194 fApply->Connect(
"Clicked()",
"TGeoMaterialEditor",
this,
"DoApply()");
195 fUndo->Connect(
"Clicked()",
"TGeoMaterialEditor",
this,
"DoUndo()");
196 fMaterialName->Connect(
"TextChanged(const char *)",
"TGeoMaterialEditor",
this,
"DoName()");
197 fMatA->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoA()");
198 fMatZ->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoZ()");
199 fMatState->Connect(
"Selected(Int_t)",
"TGeoMaterialEditor",
this,
"DoState(Int_t)");
200 fMatDensity->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoDensity()");
201 fMatTemperature->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoTemperature()");
202 fMatPressure->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoPressure()");
203 fMatRadLen->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoRadAbs()");
204 fMatAbsLen->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoRadAbs()");
476 fApply->Connect(
"Clicked()",
"TGeoMixtureEditor",
this,
"DoApply1()");
477 fUndo->Connect(
"Clicked()",
"TGeoMixtureEditor",
this,
"DoUndo1()");
478 fChkFraction->Connect(
"Clicked()",
"TGeoMixtureEditor",
this,
"DoChkFraction()");
479 fChkNatoms->Connect(
"Clicked()",
"TGeoMixtureEditor",
this,
"DoChkNatoms()");
480 fNEFraction->Connect(
"ValueSet(Long_t)",
"TGeoMixtureEditor",
this,
"DoFraction()");
481 fNENatoms->Connect(
"ValueSet(Long_t)",
"TGeoMixtureEditor",
this,
"DoNatoms()");
482 fMixElem->Connect(
"Selected(Int_t)",
"TGeoMixtureEditor",
this,
"DoSelectElement(Int_t)");
483 fBAddElem->Connect(
"Clicked()",
"TGeoMixtureEditor",
this,
"DoAddElem()");
484 fMaterialName->Connect(
"TextChanged(const char *)",
"TGeoMaterialEditor",
this,
"DoName()");
485 fMatA->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoA()");
486 fMatZ->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoZ()");
487 fMatState->Connect(
"Selected(Int_t)",
"TGeoMaterialEditor",
this,
"DoState(Int_t)");
488 fMatDensity->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoDensity()");
489 fMatTemperature->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoTemperature()");
490 fMatPressure->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoPressure()");
491 fMatRadLen->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoRadAbs()");
492 fMatAbsLen->Connect(
"ValueSet(Long_t)",
"TGeoMaterialEditor",
this,
"DoRadAbs()");
567 Error(
"DoSelectElement",
"No element at index %d", ielem);
573 fZelem->SetText(z.Data());
583 if (!byfraction && natoms <= 0)
586 if (byfraction && frac <= 0)
645 for (
Int_t i = 0; i < nelem; i++) {
649 s.TString::Format(
"%d-%s-%d: Wmass = %g %%", (
Int_t)
fMixture->GetZmixt()[i],
652 s.TString::Format(
"%d-%s-%d: Natoms = %d", (
Int_t)
fMixture->GetZmixt()[i],
fMixture->GetElement(i)->GetName(),
ULong_t Pixel_t
Pixel value.
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
externTGeoManager * gGeoManager
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
The base class for composite widgets (menu bars, list boxes, etc.).
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual TList * GetList() const
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
TGCompositeFrame(const TGCompositeFrame &)=delete
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
virtual Bool_t IsComposite() const
This class handles GUI labels.
void SetTextJustify(Int_t tmode)
Set text justification.
This class describes layout hints used by the layout classes.
TGNumberEntry is a number entry input widget with up/down buttons.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
ROOT GUI Window base class.
Bool_t fInit
init flag for setting signals/slots
virtual void MakeTitle(const char *title)
Create attribute frame title.
TGeoElement * GetElement(Int_t z)
Int_t GetNelements() const
Base class for chemical elements.
TGeoGedFrame(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor.
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
void DoState(Int_t state)
Slot for material state.
TGTextEntry * fMaterialName
void DoTemperature()
Slot for material temperature.
TGeoMaterialEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for material editor.
void DoRadAbs()
Slot for radiation/absorption length.
void DoPressure()
Slot for material pressure.
void DoZ()
Slot for charge.
TGNumberEntry * fMatDensity
~TGeoMaterialEditor() override
Destructor.
TGNumberEntry * fMatAbsLen
TGNumberEntry * fMatTemperature
virtual void ConnectSignals2Slots()
Connect signals to slots.
void DoModified()
Slot for signaling modifications.
TGNumberEntry * fMatPressure
void DoA()
Slot for atomic mass.
void DoName()
Perform name change.
TGNumberEntry * fMatRadLen
void DoUndo()
Slot for cancelling current modifications.
void SetModel(TObject *obj) override
Connect to the selected material.
void DoDensity()
Slot for density.
void DoApply()
Slot for applying modifications.
Bool_t fIsMaterialEditable
Base class describing materials.
void DoAddElem()
Slot for adding an element. No undo.
TGNumberEntry * fNENatoms
void DoNatoms()
Natoms changed.
void ConnectSignals2Slots() override
Connect signals to slots.
void UpdateElements()
Update the list of elements in the TGCanvas.
TGCheckButton * fChkNatoms
void DoUndo1()
Slot for undoing all changes.
TGeoMixtureEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for mixture editor.
void DoChkNatoms()
Check button state changed for natoms.
TGCompositeFrame * fComps
void DoApply1()
Slot for applying modifications.
TGNumberEntry * fNEFraction
TGCheckButton * fChkFraction
void DoChkFraction()
Check button state changed for fraction.
void DoFraction()
Fraction changed.
void DoSelectElement(Int_t iel)
Slot for selecting an element.
void SetModel(TObject *obj) override
Connect to the selected mixture.
static void MoveFrame(TGCompositeFrame *fr, TGCompositeFrame *p)
Move frame fr at the end of the list of parent p.
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
const char * GetTitle() const override
Returns title of object.
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.