TGeoMaterialEditor.h

Go to the documentation of this file.
00001 // @(#):$Id: TGeoMaterialEditor.h 32718 2010-03-23 15:58:34Z rdm $
00002 // Author: M.Gheata 
00003 /*************************************************************************
00004  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
00005  * All rights reserved.                                                  *
00006  *                                                                       *
00007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00009  *************************************************************************/
00010 
00011 #ifndef ROOT_TGeoMaterialEditor
00012 #define ROOT_TGeoMaterialEditor
00013 
00014 //////////////////////////////////////////////////////////////////////////
00015 //                                                                      //
00016 //  TGeoMaterialEditor                                                  //
00017 //                                                                      //
00018 //  Editor for a TGeoMaterial.                                          //
00019 //                                                                      //
00020 //////////////////////////////////////////////////////////////////////////
00021 
00022 #ifndef ROOT_TGButton
00023 #include "TGWidget.h"
00024 #endif
00025 #ifndef ROOT_TGeoGedFrame
00026 #include "TGeoGedFrame.h"
00027 #endif
00028 
00029 class TGeoMaterial;
00030 class TGeoTabManager;
00031 class TGTextEntry;
00032 class TGNumberEntry;
00033 class TGTab;
00034 class TGComboBox;
00035 class TGTextButton;
00036 class TGCanvas;
00037 class TString;
00038 
00039 class TGeoMaterialEditor : public TGeoGedFrame {
00040 
00041 protected:
00042 
00043    Double_t             fAi;                // Initial atomic mass
00044    Int_t                fZi;                // Initial Z
00045    Int_t                fStatei;            // Initial material state
00046    Double_t             fDensityi;          // Initial density
00047    Double_t             fTempi;             // Initial temperature
00048    Double_t             fPresi;             // Initial pressure
00049    TString              fNamei;             // Initial name
00050    TGeoMaterial        *fMaterial;          // Material object
00051    Bool_t               fIsModified;        // Flag that material was modified
00052    Bool_t               fIsMaterialEditable;  // Flag that the material can be changed
00053 
00054    TGTextEntry         *fMaterialName;      // Material name text entry
00055    TGNumberEntry       *fMatA;              // Number entry for A
00056    TGNumberEntry       *fMatZ;              // Number entry for Z
00057    TGComboBox          *fMatState;          // Material state
00058    TGNumberEntry       *fMatDensity;        // Number entry for density
00059    TGNumberEntry       *fMatTemperature;    // Number entry for temperature
00060    TGNumberEntry       *fMatPressure;       // Number entry for pressure
00061    TGNumberEntry       *fMatRadLen;         // Number entry for radiation length
00062    TGNumberEntry       *fMatAbsLen;         // Number entry for absorbtion length
00063    TGCompositeFrame    *f23;                // Frame for buttons
00064    TGTextButton        *fApply;             // Apply-Button to accept changes
00065    TGTextButton        *fUndo;              // Undo-Button
00066 
00067    virtual void ConnectSignals2Slots();   // Connect the signals to the slots
00068 
00069 public:
00070    TGeoMaterialEditor(const TGWindow *p = 0,
00071                    Int_t width = 140, Int_t height = 30,
00072                    UInt_t options = kChildFrame,
00073                    Pixel_t back = GetDefaultFrameBackground());
00074    virtual ~TGeoMaterialEditor();
00075    virtual void   SetModel(TObject *obj);
00076 
00077    void           DoA();
00078    void           DoZ();
00079    void           DoDensity();
00080    void           DoModified();
00081    void           DoName();
00082    void           DoRadAbs();
00083    void           DoState(Int_t state);
00084    void           DoTemperature();
00085    void           DoPressure();
00086    void           DoApply();
00087    void           DoUndo();
00088    
00089    ClassDef(TGeoMaterialEditor,0)   // TGeoMaterial editor
00090 };   
00091 
00092 //////////////////////////////////////////////////////////////////////////
00093 //                                                                      //
00094 //  TGeoMixtureEditor                                                   //
00095 //                                                                      //
00096 //  Editor for a TGeoMixture.                                           //
00097 //                                                                      //
00098 //////////////////////////////////////////////////////////////////////////
00099 
00100 class TGCheckButton;
00101 class TGeoMixture;
00102 
00103 class TGeoMixtureEditor : public TGeoMaterialEditor {  
00104 
00105 protected:
00106 
00107    TGeoMixture         *fMixture;           // Mixture object 
00108 
00109    TGComboBox          *fMixElem;           // Combo box for elements
00110    TGLabel             *fNelem;             // Label for number of elements
00111    TGLabel             *fAelem;             // Label for A
00112    TGLabel             *fZelem;             // Label for Z
00113    TGCheckButton       *fChkFraction;       // Check button for fraction by wght.
00114    TGNumberEntry       *fNEFraction;        // Number entry for fraction value
00115    TGCheckButton       *fChkNatoms;         // Check button for number of atoms
00116    TGNumberEntry       *fNENatoms;          // Number entry for number of atoms
00117    TGTextButton        *fBAddElem;          // Buttom for adding element as component
00118    TGCompositeFrame    *fComps;             // Frame with components
00119 
00120    virtual void ConnectSignals2Slots();     // Connect the signals to the slots
00121 
00122 public:
00123    TGeoMixtureEditor(const TGWindow *p = 0,
00124                    Int_t width = 140, Int_t height = 30,
00125                    UInt_t options = kChildFrame,
00126                    Pixel_t back = GetDefaultFrameBackground());
00127    virtual ~TGeoMixtureEditor() {}
00128    virtual void   SetModel(TObject *obj);
00129    void           UpdateElements();
00130   
00131    void           DoApply1();
00132    void           DoUndo1();
00133    void           DoChkFraction();
00134    void           DoChkNatoms();
00135    void           DoFraction();
00136    void           DoNatoms();
00137    void           DoSelectElement(Int_t iel);
00138    void           DoAddElem();
00139 
00140    ClassDef(TGeoMixtureEditor,0)   // TGeoMixture editor
00141 };   
00142 
00143 #endif                    

Generated on Tue Jul 5 14:13:00 2011 for ROOT_528-00b_version by  doxygen 1.5.1