PTGuiMainFrame Class Reference

#include <PTGuiMainFrame.h>

List of all members.

Public Member Functions

 PTGuiMainFrame (const TGWindow *p, UInt_t w, UInt_t h)
virtual ~PTGuiMainFrame ()
virtual Bool_t ProcessMessage (Long_t msg, Long_t parm1, Long_t parm2)

Private Types

enum  EComboId { kComboMaterial, kComboMedium, kComboParticle, kComboMechanism }
enum  EFileId { kFileOpen, kFileCloseBrowser, kFileQuit }
enum  ETextId { kTextL10KENbin, kTextL10KEmin, kTextL10KEmax }

Private Member Functions

 PTGuiMainFrame (const PTGuiMainFrame &that)
PTGuiMainFrameoperator= (const PTGuiMainFrame &that)
void CloseWindow ()
void BuildMaterialFrame (TGTab *tabmgr)
void BuildMaterialList (Int_t igeo=0)
void BuildMediumFrame (TGTab *tabmgr)
void BuildMediumCombo (Int_t igeo=0)
void BuildProcessFrame (TGTab *tabmgr)
void BuildProcessList (Int_t igeo=0)
void BuildCutFrame (TGTab *tabmgr)
void BuildCutList (Int_t igeo=0)
void BuildXSecFrame (TGTab *tabmgr)
void BuildXSecList (Int_t igeo=0)
void AddComboMedia ()
void Plot ()
void Update ()
void UpdateCombo ()
void UpdateList ()
void UpdateMaterialList (Int_t igeo=0)
void UpdateMediumList (Int_t igeo=0)
void UpdateCutList (Int_t igeo=0)
void UpdateProcessList (Int_t igeo=0)
void UpdateMechanismCombo ()
void OpenGMinosFile ()

Private Attributes

UInt_t fL10KENbin
Float_t fL10KEmin
Float_t fL10KEmax
Int_t fCurrentPTParticle
Int_t fCurrentPTMechanism
PTGuiMediumfCurrentPTGuiMedium [2]
TGCompositeFrame * fMediumFrame
TGComboBox * fMediumCombo
TGTextEntry * fMediumTextE [9][2]
TGCompositeFrame * fMaterialFrame
TGTextEntry * fMaterialTextE [6][2]
TGCompositeFrame * fProcessFrame
TGListBox * fProcessLB [2]
TGCompositeFrame * fCutFrame
TGListBox * fCutLB [2]
TGComboBox * fParticleCombo
TGComboBox * fMechanismCombo
TGTextButton * fPlotButton
TGTextBuffer * fL10KETextB [3]
TMultiGraph * fMultiGraph
PTGuiRollG3fPTGuiRollG3
PTGuiRollGMinosfPTGuiRollGMinos

Detailed Description

Definition at line 42 of file PTGuiMainFrame.h.


Member Enumeration Documentation

enum PTGuiMainFrame::EComboId [private]
Enumerator:
kComboMaterial 
kComboMedium 
kComboParticle 
kComboMechanism 

Definition at line 55 of file PTGuiMainFrame.h.

00055                   {
00056       kComboMaterial,
00057       kComboMedium,
00058       kComboParticle,
00059       kComboMechanism
00060     };

enum PTGuiMainFrame::EFileId [private]
Enumerator:
kFileOpen 
kFileCloseBrowser 
kFileQuit 

Definition at line 62 of file PTGuiMainFrame.h.

00062                  {
00063       kFileOpen,
00064       kFileCloseBrowser,
00065       kFileQuit
00066     };

enum PTGuiMainFrame::ETextId [private]
Enumerator:
kTextL10KENbin 
kTextL10KEmin 
kTextL10KEmax 

Definition at line 68 of file PTGuiMainFrame.h.

00068                  {
00069       kTextL10KENbin,
00070       kTextL10KEmin,
00071       kTextL10KEmax
00072     };


Constructor & Destructor Documentation

PTGuiMainFrame::PTGuiMainFrame ( const TGWindow *  p,
UInt_t  w,
UInt_t  h 
)

Definition at line 68 of file PTGuiMainFrame.cxx.

References AddComboMedia(), BuildCutFrame(), BuildMaterialFrame(), BuildMediumFrame(), BuildProcessFrame(), BuildXSecFrame(), fCurrentPTGuiMedium, fCutLB, fL10KETextB, fMaterialTextE, fMediumTextE, fProcessLB, fPTGuiRollG3, kFileCloseBrowser, kFileOpen, kFileQuit, and Update().

00068                                                                     :
00069                    TGMainFrame(p,w,n), fL10KENbin(1000), fL10KEmin(-5.),
00070                    fL10KEmax(1.),fCurrentPTParticle(0),
00071                    fCurrentPTMechanism(0),fMediumFrame(0),fMediumCombo(0),
00072                    fMaterialFrame(0),fProcessFrame(0),fCutFrame(0),
00073                    fParticleCombo(0),fMechanismCombo(0),fPlotButton(0),
00074                    fMultiGraph(0),fPTGuiRollG3(0),fPTGuiRollGMinos(0) {
00075   // Normal constructor
00076   // A PTGuiMainFrame IsA TGMainFrame which is a top level window.
00077 
00078   // Initialization
00079   for ( Int_t igeo = 0; igeo < 2; igeo++ ) {
00080     fCurrentPTGuiMedium[igeo] = 0;
00081     fProcessLB[igeo] = 0;
00082     fCutLB[igeo] = 0;
00083     for ( int ie = 0; ie < 6; ie++ ) fMaterialTextE[ie][igeo] = 0;
00084     for ( int ie = 0; ie < 9; ie++ ) fMediumTextE[ie][igeo] = 0;
00085   }
00086   for ( Int_t ib = 0; ib < 3; ib++ ) fL10KETextB[ib] = 0;
00087   
00088   // Create a menuBar to lie along the top of the Gui
00089   // arguments: parent is this, size 1x1 pixel, horizontal layout
00090    TGMenuBar* menuBar = new TGMenuBar(this,1,1,kHorizontalFrame);
00091    // place in main frame in top left corner, expand in x to fit mainframe
00092    // leaving 0 or 1 pixel buffer on edges
00093    AddFrame(menuBar,
00094     new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 1, 1)); 
00095   
00096    // Add some menu file options to menubar
00097    TGPopupMenu* menuFile = new TGPopupMenu(gClient->GetRoot());
00098    menuFile -> AddEntry("&Open...",kFileOpen);
00099    menuFile -> AddEntry("&Close Browser",kFileCloseBrowser);
00100    menuFile -> AddEntry("&QuitRoot",kFileQuit);
00101    menuFile -> Associate(this);
00102    menuBar  -> AddPopup("File",menuFile,
00103                new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
00104 
00105   // Create tab widget.  A tab widget contains a set of composite
00106   // frames each with a little tab with a name (like a set of folders
00107   // with tabs)
00108    TGTab* tabmgr = new TGTab(this,400,400);
00109    AddFrame(tabmgr,
00110       new TGLayoutHints(kLHintsBottom | kLHintsExpandX | kLHintsExpandY,
00111                         2, 2, 5, 1));       
00112 
00113    // Now build the frames under the tabs
00114    BuildMediumFrame(tabmgr);
00115    BuildMaterialFrame(tabmgr);
00116    BuildProcessFrame(tabmgr);
00117    BuildCutFrame(tabmgr);
00118    BuildXSecFrame(tabmgr);
00119    
00120    // Set a name to the main frame
00121    SetWindowName("PT Browser");
00122    // Map all subwindows of main frame
00123    MapSubwindows();
00124    // We need to use GetDefault...() to initialize the layout algorithm...
00125    Resize(GetDefaultSize());
00126    // Map main frame
00127    MapWindow();
00128 
00129    // Fill entries
00130    fPTGuiRollG3 = new PTGuiRollG3();
00131    AddComboMedia();
00132    Update();
00133 
00134 }

PTGuiMainFrame::~PTGuiMainFrame (  )  [virtual]

Definition at line 137 of file PTGuiMainFrame.cxx.

00137                                 {
00138   // Delete anything that doesn't belong to main frame.
00139   // I'm a little fuzzy on window frame memory management issues, but
00140   // I believe that every object which has its ancestral root in
00141   // the parent window will be deleted when this window (main window)
00142   // is deleted
00143   
00144 }

PTGuiMainFrame::PTGuiMainFrame ( const PTGuiMainFrame that  )  [private]

Member Function Documentation

void PTGuiMainFrame::AddComboMedia (  )  [private]

Definition at line 747 of file PTGuiMainFrame.cxx.

References fMediumCombo, fPTGuiRollG3, PTGuiRollG3::GetMedia(), and medium.

Referenced by PTGuiMainFrame().

00747                                    {
00748   // Set the media combo entries
00749 
00750   TClonesArray* medArray = fPTGuiRollG3->GetMedia();
00751   Int_t nent = medArray->GetEntriesFast();
00752   
00753   for ( Int_t ient = 0; ient < nent; ient++ ) {
00754     PTGuiMedium* medium = dynamic_cast<PTGuiMedium*>(medArray->At(ient));
00755     fMediumCombo->AddEntry(medium->GetName(),ient);
00756     fMediumCombo->Select(ient);
00757     fMediumCombo->Resize(200,20);
00758   }
00759   
00760 }

void PTGuiMainFrame::BuildCutFrame ( TGTab *  tabmgr  )  [private]

Definition at line 919 of file PTGuiMainFrame.cxx.

References BuildCutList(), and fCutFrame.

Referenced by PTGuiMainFrame().

00919                                                 {
00920   // Private method. Build frame associated with tab "Cuts"
00921 
00922   TGCompositeFrame *tabF = tabmgr->AddTab("Cuts");
00923 
00924   // Add the main frame under this tab.  
00925   fCutFrame = new TGCompositeFrame(tabF,60,20,kHorizontalFrame);
00926 
00927   TGLayoutHints *mainL=new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5);
00928   tabF -> AddFrame(fCutFrame,mainL);
00929   
00930   BuildCutList();
00931   
00932 }

void PTGuiMainFrame::BuildCutList ( Int_t  igeo = 0  )  [private]

Definition at line 935 of file PTGuiMainFrame.cxx.

References fCutFrame, and fCutLB.

Referenced by BuildCutFrame(), and OpenGMinosFile().

00935                                             {
00936 
00937   // Add a ListBox for Cut values to the tab main frame
00938   fCutLB[igeo] = new TGListBox(fCutFrame,1);
00939   fCutFrame -> AddFrame(fCutLB[igeo],
00940                      new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5));
00941 
00942   fCutLB[igeo] -> Resize(150,350);
00943   fCutLB[igeo] -> Associate(this);
00944 
00945 }

void PTGuiMainFrame::BuildMaterialFrame ( TGTab *  tabmgr  )  [private]

Definition at line 763 of file PTGuiMainFrame.cxx.

References BuildMaterialList(), and fMaterialFrame.

Referenced by PTGuiMainFrame().

00763                                                      {
00764   // Private method. Build frame associated with tab "Materials"
00765 
00766   TGCompositeFrame* tabF = tabmgr->AddTab("Material");
00767 
00768   // Add the main frame under this tab with a horizontal layout
00769   fMaterialFrame = new TGCompositeFrame(tabF,60,20,kHorizontalFrame);
00770 
00771   tabF -> AddFrame(fMaterialFrame,
00772             new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5));
00773 
00774   BuildMaterialList();
00775   
00776 }

void PTGuiMainFrame::BuildMaterialList ( Int_t  igeo = 0  )  [private]

Definition at line 779 of file PTGuiMainFrame.cxx.

References fMaterialFrame, and fMaterialTextE.

Referenced by BuildMaterialFrame(), and OpenGMinosFile().

00779                                                  {
00780   // Add a composite frame to the material frame containing the list of 
00781   // material parameters and their values
00782 
00783   TGCompositeFrame *vF 
00784              = new TGCompositeFrame(fMaterialFrame,60,20,kVerticalFrame);
00785   fMaterialFrame -> AddFrame(vF,
00786             new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5));
00787 
00788   TGLayoutHints* textL1 = new TGLayoutHints(kLHintsTop | kLHintsExpandY,
00789                                              5, 5, 5, 5);
00790   TGLayoutHints* textL2 = new TGLayoutHints(kLHintsLeft | kLHintsExpandX);
00791   
00792   const Int_t npar = 6; // material parameters
00793   std::string labelText[npar] = {
00794     "Material Name    ",
00795     "Atomic Weight    ",
00796     "Atomic Number    ",
00797     "Density          ",
00798     "Radiation Length ",
00799     "Absorption Length"
00800   };
00801   for ( Int_t ipar=0; ipar < npar; ipar++ ) {
00802     TGHorizontalFrame* textF
00803                      = new TGHorizontalFrame(vF,400,100,kFixedWidth);
00804     vF -> AddFrame(textF,textL1);
00805     fMaterialTextE[ipar][igeo] 
00806               = new TGTextEntry(textF,new TGTextBuffer(20),ipar);
00807     fMaterialTextE[ipar][igeo] -> Associate(this);
00808     textF->AddFrame(new TGLabel(textF,(labelText[ipar]).c_str()),
00809                         textL2);
00810     textF->AddFrame(fMaterialTextE[ipar][igeo],textL2);
00811   }
00812   
00813 }

void PTGuiMainFrame::BuildMediumCombo ( Int_t  igeo = 0  )  [private]

Definition at line 841 of file PTGuiMainFrame.cxx.

References fMediumCombo, fMediumFrame, and fMediumTextE.

Referenced by BuildMediumFrame(), and OpenGMinosFile().

00841                                                 {
00842   // Add a composite frame to the medium frame containing a list of 
00843   // media parameters and their values
00844   
00845   // Add a composite frame to the main frame containing the list of material
00846   // parameters and their values
00847   TGCompositeFrame *vF 
00848              = new TGCompositeFrame(fMediumFrame,60,20,kVerticalFrame);
00849   fMediumFrame -> AddFrame(vF,
00850                     new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5));
00851 
00852   TGLayoutHints* textL1 = new TGLayoutHints(kLHintsTop | kLHintsExpandY,
00853                                              5, 5, 5, 5);
00854   TGLayoutHints* textL2 = new TGLayoutHints(kLHintsLeft | kLHintsExpandX);
00855   
00856   const Int_t npar = 9; // medium parameters
00857   std::string labelText[npar] = {
00858     "Medium Name           ",
00859     "Sensitivity Flag      ",
00860     "Magnetic Field Flag   ",
00861     "Maximum Field         ",
00862     "Max. Ang. Deviation   ",
00863     "Maximum Step          ",
00864     "Max. Frac. Energy Loss",
00865     "Crossing Precision    ",
00866     "Minimum Step Size     "
00867   };
00868 
00869   for ( Int_t ipar=0; ipar < npar; ipar++ ) {
00870     TGHorizontalFrame* textF
00871                      = new TGHorizontalFrame(vF,400,100,kFixedWidth);
00872     vF -> AddFrame(textF,textL1);
00873     fMediumTextE[ipar][igeo] = new TGTextEntry(textF,new TGTextBuffer(20),ipar);
00874     fMediumTextE[ipar][igeo] -> Associate(this);
00875     textF->AddFrame(new TGLabel(textF,(labelText[ipar]).c_str()),
00876                         textL2);
00877     textF->AddFrame(fMediumTextE[ipar][igeo],textL2);
00878   }
00879 
00880   fMediumCombo -> Resize(200,20);
00881   fMediumCombo -> Associate(this);
00882   
00883 
00884 }

void PTGuiMainFrame::BuildMediumFrame ( TGTab *  tabmgr  )  [private]

Definition at line 816 of file PTGuiMainFrame.cxx.

References BuildMediumCombo(), fMediumCombo, fMediumFrame, and kComboMedium.

Referenced by PTGuiMainFrame().

00816                                                    {
00817   // Private method. Build frame associated with tab "Media" and
00818   // add a combobox (drop down list) of media.
00819 
00820   TGCompositeFrame *tabF = tabmgr->AddTab("Media");
00821 
00822   // Add the main frame under this tab.  TGCompositeFrame is
00823   // the base class for composite widgets (menu bars, list boxes, etc).
00824   // It provides a layout manager and a frame container (TList*)
00825   // kHorizontalFrame creates a horizontal layout
00826   fMediumFrame = new TGCompositeFrame(tabF,60,20,kHorizontalFrame);
00827 
00828   tabF -> AddFrame(fMediumFrame,
00829                     new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5));
00830 
00831   // Add a ComboBox (a drop down list box) for media to the tab main frame
00832   fMediumCombo = new TGComboBox(fMediumFrame,kComboMedium);
00833   fMediumFrame -> AddFrame(fMediumCombo,
00834                     new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5));
00835   
00836   BuildMediumCombo();
00837   
00838 }

void PTGuiMainFrame::BuildProcessFrame ( TGTab *  tabmgr  )  [private]

Definition at line 887 of file PTGuiMainFrame.cxx.

References BuildProcessList(), and fProcessFrame.

Referenced by PTGuiMainFrame().

00887                                                     {
00888   // Private method. Build frame associated with tab "Processes"
00889 
00890   TGCompositeFrame *tabF = tabmgr->AddTab("Processes");
00891 
00892   // Add the main frame under this tab.  TGCompositeFrame is
00893   // the base class for composite widgets (menu bars, list boxes, etc).
00894   // It provides a layout manager and a frame container (TList*)
00895   // kHorizontalFrame creates a horizontal layout
00896   fProcessFrame = new TGCompositeFrame(tabF,60,20,kHorizontalFrame);
00897 
00898   TGLayoutHints *mainL=new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5);
00899   tabF -> AddFrame(fProcessFrame,mainL);
00900   
00901   BuildProcessList();
00902   
00903 }

void PTGuiMainFrame::BuildProcessList ( Int_t  igeo = 0  )  [private]

Definition at line 906 of file PTGuiMainFrame.cxx.

References fProcessFrame, and fProcessLB.

Referenced by BuildProcessFrame(), and OpenGMinosFile().

00906                                                 {
00907   // Add a ListBox for process flags to the tab main frame
00908 
00909   fProcessLB[igeo] = new TGListBox(fProcessFrame,1);
00910   fProcessFrame -> AddFrame(fProcessLB[igeo],
00911                     new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5));
00912 
00913   fProcessLB[igeo] -> Resize(150,350);
00914   fProcessLB[igeo] -> Associate(this);
00915 
00916 }

void PTGuiMainFrame::BuildXSecFrame ( TGTab *  tabmgr  )  [private]

Definition at line 948 of file PTGuiMainFrame.cxx.

References fCurrentPTParticle, fL10KETextB, fMechanismCombo, fParticleCombo, fPlotButton, kComboMechanism, kComboParticle, PTGui::kLabelMechanism, PTGui::kLabelParticle, PTGui::kNMechanism, PTGui::kNParticle, kTextL10KEmax, kTextL10KEmin, and kTextL10KENbin.

Referenced by PTGuiMainFrame().

00948                                                  {
00949   // Private method. Build frame associated with tab "dE/dX and X-Sections"
00950 
00951   TGCompositeFrame *tabF = tabmgr->AddTab("dE/dX and X-Sections");
00952 
00953   // Add the main frame under this tab.  
00954   TGCompositeFrame* mainF = new TGCompositeFrame(tabF,60,20,kHorizontalFrame);
00955   TGLayoutHints *mainL=new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5);
00956   tabF -> AddFrame(mainF,mainL);
00957 
00958 
00959   // Create a frame within the main frame to store the particle combo box
00960   TGCompositeFrame* partF = new TGCompositeFrame(mainF,60,20,kVerticalFrame);
00961   mainF -> AddFrame(partF,mainL);
00962 
00963   // Add a ComboBox (a drop down list box) for particle type to the mech frame
00964   fParticleCombo = new TGComboBox(partF,kComboParticle);
00965   partF -> AddFrame(fParticleCombo,mainL);
00966   for ( Int_t ipart = 0; ipart < PTGui::kNParticle; ipart++ ) {
00967     fParticleCombo->AddEntry((PTGui::kLabelParticle[ipart]).c_str(),ipart);
00968   }
00969 
00970   fParticleCombo->Select(0);
00971   fParticleCombo->Resize(100,20);
00972   fParticleCombo->Associate(this);
00973   fCurrentPTParticle = 0;
00974   
00975   // Create a frame within the main frame to store the mechanism combo box
00976   TGCompositeFrame* mechF = new TGCompositeFrame(mainF,60,20,kVerticalFrame);
00977   mainF -> AddFrame(mechF,mainL);
00978   
00979   // Add a ComboBox (a drop down list box) for mechanism type to the mech frame
00980   fMechanismCombo = new TGComboBox(mechF,kComboMechanism);
00981   mechF -> AddFrame(fMechanismCombo,mainL);
00982   //UpdateMechanismCombo();
00983   //  
00984   for ( Int_t imech = 0; imech < PTGui::kNMechanism; imech++ ) {
00985     fMechanismCombo->AddEntry((PTGui::kLabelMechanism[imech]).c_str(),imech);
00986   }
00987 
00988   fMechanismCombo->Select(0);
00989   fMechanismCombo->Resize(100,20);
00990   fMechanismCombo->Associate(this);
00991 
00992   // Add to the particle frame some text boxes to store energy range
00993   fL10KETextB[0] = new TGTextBuffer(10);
00994   TGTextEntry* keTextE0=new TGTextEntry(partF,fL10KETextB[0],
00995                                         kTextL10KENbin);
00996   fL10KETextB[0] -> AddText(0,"1000");
00997   keTextE0 -> Associate(this);
00998 
00999   fL10KETextB[1] = new TGTextBuffer(10);
01000   TGTextEntry* keTextE1=new TGTextEntry(partF,fL10KETextB[1],
01001                                         kTextL10KEmin);
01002   fL10KETextB[1] -> AddText(0,"-5");
01003   keTextE1 -> Associate(this);
01004 
01005   fL10KETextB[2] = new TGTextBuffer(10);
01006   TGTextEntry* keTextE=new TGTextEntry(partF,fL10KETextB[2],
01007                                        kTextL10KEmax);
01008   fL10KETextB[2] -> AddText(0,"1");
01009   keTextE -> Associate(this);
01010   
01011   TGLabel* keLabel 
01012        = new TGLabel(partF,"Nbins,L10(KEmin),L10(KEmax) (GeV)");
01013   TGLayoutHints* keL = new TGLayoutHints(kLHintsLeft | kLHintsExpandX);
01014   partF->AddFrame(keLabel,keL);
01015   partF->AddFrame(keTextE0,keL);
01016   partF->AddFrame(keTextE1,keL);
01017   partF->AddFrame(keTextE,keL);
01018 
01019   // Plot Button
01020   TGCompositeFrame* plotF = new TGCompositeFrame(mainF,60,20,kHorizontalFrame);
01021   mainF -> AddFrame(plotF,mainL);
01022   fPlotButton = new TGTextButton(plotF,"Plot",1);
01023   fPlotButton -> Associate(this);
01024   plotF -> AddFrame(fPlotButton);
01025   
01026 }

void PTGuiMainFrame::BuildXSecList ( Int_t  igeo = 0  )  [private]
void PTGuiMainFrame::CloseWindow (  )  [private]

Definition at line 1029 of file PTGuiMainFrame.cxx.

Referenced by ProcessMessage().

01029                                  {
01030    // Got close message for this MainFrame. Calls parent CloseWindow()
01031    // (which destroys the window).
01032    // The close message is generated by the window manager when its close
01033    // window menu item is selected.
01034 
01035    TGMainFrame::CloseWindow();
01036 
01037 }

void PTGuiMainFrame::OpenGMinosFile (  )  [private]

Definition at line 473 of file PTGuiMainFrame.cxx.

References BuildCutList(), BuildMaterialList(), BuildMediumCombo(), BuildProcessList(), fPTGuiRollGMinos, gOpenTypes, Msg::kInfo, Msg::kWarning, MSG, and Update().

Referenced by ProcessMessage().

00473                                     {
00474   // Open gminos file
00475 
00476    // This code snipped stolen from TRootBrowser
00477    static TString dir(".");
00478    TGFileInfo fi;
00479    fi.fFileTypes = gOpenTypes;
00480    fi.fIniDir = StrDup(dir);
00481    new TGFileDialog(fClient->GetDefaultRoot(),this,kFDOpen,&fi);
00482    if (!fi.fFilename) return;
00483    dir = fi.fIniDir;
00484    if ( fPTGuiRollGMinos ) {
00485      // If already existing gminos file, close it and start fresh
00486      MSG("PTGui",Msg::kInfo) << "Closing existing gminos file " << endl;
00487      delete fPTGuiRollGMinos;  fPTGuiRollGMinos = 0;
00488    }
00489  
00490    TFile* file = new TFile(fi.fFilename,"update");
00491    if ( !(file -> IsOpen()) || (file -> IsZombie()) ) {
00492      MSG("PTGui",Msg::kWarning) << "Unable to open file "
00493                                 << file->GetName() << endl;
00494      delete file; file = 0;
00495      return;
00496    }
00497 
00498    // Extract the gminos geometry from the file and initialize
00499    fPTGuiRollGMinos = new PTGuiRollGMinos(file);
00500    BuildMediumCombo(1);
00501    BuildMaterialList(1);
00502    BuildCutList(1);
00503    BuildProcessList(1);
00504    MapSubwindows();
00505    Resize(GetDefaultSize());
00506    MapWindow();
00507    
00508    Update();
00509    
00510 }

PTGuiMainFrame& PTGuiMainFrame::operator= ( const PTGuiMainFrame that  )  [private]
void PTGuiMainFrame::Plot ( void   )  [private]

Definition at line 147 of file PTGuiMainFrame.cxx.

References Draw(), MuELoss::e, fCurrentPTGuiMedium, fCurrentPTMechanism, fCurrentPTParticle, fL10KEmax, fL10KEmin, fL10KENbin, fMechanismCombo, fMultiGraph, fPTGuiRollGMinos, PTGuiRollGMinos::GetGraph(), Nav::GetName(), PTGuiMedium::IdMat(), PTGui::kDescMechanism, PTGui::kLabelParticle, PTGui::kNMechanism, PTGui::kNParticle, minimum, and Update().

Referenced by ProcessMessage().

00147                           {
00148   // Plot de/dx or cross-sections
00149   
00150   if ( fCurrentPTMechanism < 0 || fCurrentPTMechanism > PTGui::kNMechanism ) 
00151     return;
00152   if ( fCurrentPTParticle  < 0 || fCurrentPTParticle  > PTGui::kNParticle ) 
00153     return;
00154 
00155   // Material
00156   Int_t imate = fCurrentPTGuiMedium[0]->IdMat();
00157   if ( imate < 0 ) return;
00158   
00159   // Kinetic energy bins
00160   Float_t* L10tkin = new Float_t[fL10KENbin];
00161   Float_t* tkin = new Float_t[fL10KENbin];
00162   Float_t* value = new Float_t[fL10KENbin];
00163   Float_t* pcut = new Float_t[fL10KENbin];
00164   Float_t de = (fL10KEmax-fL10KEmin)/fL10KENbin;
00165   for ( UInt_t ie = 0; ie < fL10KENbin; ie++ ) {
00166     L10tkin[ie] = fL10KEmin + Float_t(ie)*de;
00167     tkin[ie] = pow((Float_t) 10.,L10tkin[ie]);
00168     value[ie] = 0.;
00169     pcut[ie] = 0.;
00170   }
00171 
00172   // Mechanism & particle type
00173   TGTextLBEntry* textE = dynamic_cast<TGTextLBEntry*>
00174         (fMechanismCombo->GetListBox()->GetEntry(fCurrentPTMechanism));
00175   std::string mechname = textE->GetText()->GetString();
00176   // Retrieve the mechanism number, this is a cheat 
00177   UInt_t imech = textE->GetUniqueID();
00178   std::string descname = PTGui::kDescMechanism[imech];
00179   
00180   Int_t ipart = fCurrentPTParticle + 1;
00181   std::string graphname = PTGui::kLabelParticle[ipart-1] + "             "
00182       + mechname + " (" + descname + ")             " 
00183       + std::string(fCurrentPTGuiMedium[0]->GetName());
00184 
00185   if ( fMultiGraph ) {
00186     // Clean up old multigraph, this also deletes any owned graphs
00187     delete fMultiGraph; fMultiGraph = 0;
00188   }
00189   
00190   TCanvas* c1 = new TCanvas("c1"," ",400,10,1000,700);
00191   TLegend* lgd = new TLegend(0.7,0.8,0.89,0.89);
00192   // Create a multigraph to display the set of graphs
00193   fMultiGraph = new TMultiGraph();
00194   fMultiGraph -> SetTitle(graphname.c_str());
00195 
00196   if ( mechname != "ALL XSEC" ) {
00197     Int_t ixst = 0; // return value
00198     char* mechch = const_cast<char*>(mechname.c_str());
00199     ((TGeant3*) gMC) -> Gftmat(imate,ipart,mechch,
00200                                (Int_t)fL10KENbin,tkin, value, pcut, ixst);
00201  
00202     if ( ixst ) {
00203       // name of the graph reflects content
00204     
00205       TGraph* graph = new TGraph(fL10KENbin,L10tkin,value);
00206     
00207       graph->SetFillColor(42);
00208       graph->SetMarkerColor(4);
00209       graph->SetMarkerStyle(21);
00210       graph->SetMarkerSize(0.4);
00211       fMultiGraph->Add(graph);
00212       lgd -> AddEntry(graph,"PTSim","PL");
00213       
00214       // If GMinos file is open, extract matching graph
00215       if ( fCurrentPTGuiMedium[1] ) {
00216 
00217         Int_t igminosmate = fCurrentPTGuiMedium[1]->IdMat();
00218         TGraph* gminosgraph 
00219                = fPTGuiRollGMinos->GetGraph(igminosmate,ipart,imech+1);
00220         if ( gminosgraph ) {
00221           gminosgraph->SetMarkerStyle(21);
00222           gminosgraph->SetMarkerSize(0.3);
00223           fMultiGraph -> Add(gminosgraph);
00224           lgd -> AddEntry(gminosgraph,"GMinos","PL");
00225 
00226         }
00227       }
00228       
00229       fMultiGraph->Draw("AP");
00230       lgd->Draw();
00231       fMultiGraph->GetHistogram()->GetXaxis()
00232            ->SetTitle("Log10(Kinetic Energy (GeV))");
00233 
00234       if ( mechname == "RANG" || mechname == "STEP") {
00235         fMultiGraph -> GetHistogram() -> SetYTitle("Distance (cm)");
00236       }
00237       else if ( mechname == "LOSS" ) {
00238         fMultiGraph -> GetHistogram() -> SetYTitle("dE/dX (MeV/cm)");
00239       }
00240       else {
00241         fMultiGraph -> GetHistogram() -> GetYaxis()
00242               -> SetTitle("Macroscopic X-Section (1/cm)");
00243       }
00244      
00245       Double_t minimum = pow(10,log10(graph->GetHistogram()->GetMaximum())-4.);
00246       minimum = TMath::Min(minimum,1.e-4);
00247       fMultiGraph -> GetHistogram() -> SetMinimum(minimum);
00248       fMultiGraph -> GetHistogram()->SetAxisRange(fL10KEmin,fL10KEmax,"X");
00249  
00250       if ( mechname != "LOSS" ) c1->SetLogy();
00251       c1->Update();
00252       c1->Modified();
00253       
00254     }
00255     
00256   }
00257   else {
00258     // Loop over all applicable x-secs, and plot on same plot, use log scale
00259     // not RANG,STEP,LOSS
00260     
00261     Int_t nent = fMechanismCombo->GetNumberOfEntries();
00262 
00263     TLegend* lgd = new TLegend(0.6,0.7,0.89,0.89);
00264     Int_t nmech = 0;
00265     for ( Int_t ient = 0; ient < nent; ient++ ) {
00266       TGTextLBEntry* combotextE = dynamic_cast<TGTextLBEntry*>
00267         (fMechanismCombo->GetListBox()->GetEntry(ient));
00268       std::string combomechname = combotextE->GetText()->GetString();
00269       UInt_t icombomech = combotextE -> GetUniqueID();
00270       std::string combodescname = PTGui::kDescMechanism[icombomech];
00271       if ( combomechname == "RANG" || combomechname == "STEP" || 
00272            combomechname == "LOSS" || combomechname == "ALL XSEC" ) continue;
00273       Int_t ipart = fCurrentPTParticle + 1;
00274       // Material
00275       Int_t imate = fCurrentPTGuiMedium[0]->IdMat();
00276       char* combomechch = const_cast<char*>(combomechname.c_str());
00277       Int_t ixst = 0;
00278       ((TGeant3*) gMC) -> Gftmat(imate,ipart,combomechch,
00279                                (Int_t)fL10KENbin,tkin, value, pcut, ixst);
00280       nmech++;
00281        // Create graph and overlay
00282       TGraph* combograph = new TGraph(fL10KENbin,L10tkin,value);
00283       combograph->SetFillColor(42);
00284       Int_t icolor = 1+nmech; // skip black
00285       if ( icolor >= 10 ) icolor++; // skip white
00286       combograph->SetMarkerColor(icolor); 
00287       combograph->SetLineColor(icolor);
00288       combograph->SetMarkerStyle(21);
00289       combograph->SetMarkerSize(0.4);
00290       fMultiGraph -> Add(combograph);
00291      
00292       // If GMinos file is open, extract matching graph
00293       if ( fCurrentPTGuiMedium[1] ) {
00294         Int_t igminosmate = fCurrentPTGuiMedium[1]->IdMat();
00295         TGraph* gminosgraph 
00296                = fPTGuiRollGMinos->GetGraph(igminosmate,ipart,icombomech+1);
00297         if ( gminosgraph ) {
00298           gminosgraph->SetMarkerStyle(21);
00299           gminosgraph->SetMarkerSize(0.3);
00300           fMultiGraph -> Add(gminosgraph);
00301         }
00302       }
00303       std::string combographname = combomechname + " (" + combodescname + ")";
00304       lgd -> AddEntry(combograph,combographname.c_str(),"PL");
00305     }
00306     fMultiGraph -> Draw("AP");
00307     lgd -> Draw();
00308     fMultiGraph -> GetHistogram()->GetYaxis()
00309                 -> SetTitle("Macroscopic X-Section (1/cm)");
00310     fMultiGraph -> GetHistogram()->GetXaxis()
00311                 -> SetTitle("Log10(Kinetic Energy (GeV))");
00312     Double_t minimum 
00313            = pow(10,log10(fMultiGraph->GetHistogram()->GetMaximum())-4.);
00314     minimum = TMath::Min(minimum,1.e-4);
00315     fMultiGraph -> GetHistogram()->SetMinimum(minimum);
00316     fMultiGraph -> GetHistogram()->SetAxisRange(fL10KEmin,fL10KEmax,"X");
00317     c1 -> Update();
00318     c1 -> Modified();
00319     c1 -> SetLogy();    
00320   }
00321   
00322   
00323 
00324   delete [] L10tkin;
00325   delete [] tkin;
00326   delete [] value;
00327   delete [] pcut;
00328     
00329 }

Bool_t PTGuiMainFrame::ProcessMessage ( Long_t  msg,
Long_t  parm1,
Long_t  parm2 
) [virtual]

Definition at line 332 of file PTGuiMainFrame.cxx.

References CloseWindow(), fCurrentPTGuiMedium, fCurrentPTMechanism, fCurrentPTParticle, fL10KEmax, fL10KEmin, fL10KENbin, fL10KETextB, fPTGuiRollG3, PTGuiRollG3::GetMedia(), Anp::GetString(), kComboMechanism, kComboMedium, kComboParticle, kFileCloseBrowser, kFileOpen, kFileQuit, kTextL10KEmax, kTextL10KEmin, kTextL10KENbin, OpenGMinosFile(), Plot(), Update(), and UpdateMechanismCombo().

00332                                                                             {
00333   // Process messages received by widgets
00334 
00335   switch ( GET_MSG(msg) ) {
00336 
00337   case kC_TEXTENTRY:
00338     // Text entries for binning of cross-section plots
00339     switch ( GET_SUBMSG(msg) ) {
00340     case kTE_TEXTCHANGED:
00341       switch (parm1) {
00342       case kTextL10KENbin:
00343         fL10KENbin = (Int_t)atof(fL10KETextB[0]->GetString());
00344         break;
00345       case kTextL10KEmin:
00346         fL10KEmin = atof(fL10KETextB[1]->GetString());
00347         break;
00348       case kTextL10KEmax:
00349         fL10KEmax = atof(fL10KETextB[2]->GetString());
00350         break;
00351       }
00352     }
00353     break;
00354     
00355   case kC_COMMAND:
00356     switch ( GET_SUBMSG(msg) ) {
00357     case kCM_BUTTON:
00358       switch(parm1) {
00359       case 1: 
00360         Plot();
00361         break;
00362 
00363       default:
00364         break;
00365       } // parm1
00366       break;
00367    
00368     case kCM_COMBOBOX:
00369       switch(parm1) {
00370 
00371       case kComboMedium:
00372         // Medium combo
00373         fCurrentPTGuiMedium[0]=(PTGuiMedium*)
00374           (fPTGuiRollG3->GetMedia()->UncheckedAt(Int_t(parm2)));
00375         Update();
00376         break;
00377 
00378       case kComboParticle:
00379        // Particle combo
00380         fCurrentPTParticle = Int_t(parm2);
00381         UpdateMechanismCombo();
00382         break;
00383 
00384       case kComboMechanism:
00385        // Mechanism combo
00386         fCurrentPTMechanism = Int_t(parm2);
00387         break;
00388           
00389       default:
00390         break;
00391       
00392       } // parm1
00393       break;
00394 
00395     case kCM_MENU:
00396       switch(parm1) {
00397 
00398       case kFileOpen: 
00399         // Menu option File open
00400         OpenGMinosFile();
00401         break;
00402 
00403       case kFileCloseBrowser:
00404         // Menu option close browser
00405         CloseWindow();
00406         
00407         break;
00408 
00409       case kFileQuit:
00410         // Menu option quit root
00411         gApplication->Terminate(0);
00412         break;
00413           
00414       default:
00415         break;
00416       
00417       } // parm1
00418       break;
00419 
00420     default:
00421       break;
00422 
00423     } // GET_SUBMSG(msg)
00424 
00425   default:
00426     break;
00427     
00428   }  // GET_MSG(msg)
00429   
00430   return kTRUE;
00431 
00432 }

void PTGuiMainFrame::Update ( void   )  [private]

Definition at line 435 of file PTGuiMainFrame.cxx.

References fCurrentPTGuiMedium, fPTGuiRollG3, fPTGuiRollGMinos, PTGuiRollGMinos::GetMedium(), Nav::GetName(), UpdateCombo(), and UpdateList().

Referenced by OpenGMinosFile(), Plot(), ProcessMessage(), and PTGuiMainFrame().

00435                             {
00436   // Update Widgets
00437 
00438   if ( !fCurrentPTGuiMedium[0] ) {
00439     Int_t nmed = fPTGuiRollG3 -> GetMedia() -> GetEntriesFast();
00440     if ( nmed > 0 ) fCurrentPTGuiMedium[0] = dynamic_cast<PTGuiMedium*>
00441                       (fPTGuiRollG3 -> GetMedia() -> At(0));
00442   }
00443   if ( fPTGuiRollGMinos) fCurrentPTGuiMedium[1]=
00444         (fPTGuiRollGMinos->GetMedium(fCurrentPTGuiMedium[0]->GetName()));
00445   
00446   UpdateList();
00447   UpdateCombo();
00448   
00449 }

void PTGuiMainFrame::UpdateCombo (  )  [private]

Definition at line 452 of file PTGuiMainFrame.cxx.

References UpdateMechanismCombo().

Referenced by Update().

00452                                  {
00453   // Update Combo Boxes
00454 
00455   UpdateMechanismCombo();
00456     
00457 }

void PTGuiMainFrame::UpdateCutList ( Int_t  igeo = 0  )  [private]

Definition at line 533 of file PTGuiMainFrame.cxx.

References PTGuiMedium::Cut(), fCurrentPTGuiMedium, fCutLB, PTGui::kLabelCut, and PTGui::kNCut.

Referenced by UpdateList().

00533                                              {
00534   // Update Cut List 
00535 
00536   if ( !fCutLB[igeo] || !fCurrentPTGuiMedium[igeo] ) return;
00537 
00538   fCutLB[igeo] -> RemoveEntries(0,PTGui::kNCut-1); 
00539   for ( Int_t ic = 0; ic < PTGui::kNCut; ic++ ) {
00540     Float_t cut = fCurrentPTGuiMedium[igeo]->Cut(ic); // pars 0-9 are cuts
00541     char tmp[20];
00542     sprintf(tmp,"%6s%10.3e",(PTGui::kLabelCut[ic]).c_str(),cut);
00543     fCutLB[igeo]->AddEntry(tmp,ic);
00544   }
00545 
00546   fCutLB[igeo]->MapSubwindows();
00547   fCutLB[igeo]->Layout();    
00548     
00549 }

void PTGuiMainFrame::UpdateList (  )  [private]

Definition at line 460 of file PTGuiMainFrame.cxx.

References UpdateCutList(), UpdateMaterialList(), UpdateMediumList(), and UpdateProcessList().

Referenced by Update().

00460                                 {
00461   // Update List Boxes
00462 
00463   for ( int igeo = 0; igeo < 2; igeo++ ) {
00464     UpdateMediumList(igeo);
00465     UpdateMaterialList(igeo);
00466     UpdateProcessList(igeo);
00467     UpdateCutList(igeo);
00468   }
00469   
00470 }

void PTGuiMainFrame::UpdateMaterialList ( Int_t  igeo = 0  )  [private]

Definition at line 552 of file PTGuiMainFrame.cxx.

References MuELoss::a, PTGuiMaterial::A(), PTGuiMaterial::Density(), fCurrentPTGuiMedium, fMaterialTextE, fPTGuiRollG3, fPTGuiRollGMinos, PTGuiRollGMinos::GetMaterials(), PTGuiRollG3::GetMaterials(), PTGuiMedium::IdMat(), PTGuiMaterial::IntLen(), PTGuiMaterial::RadLen(), and PTGuiMaterial::Z().

Referenced by UpdateList().

00552                                                   {
00553   // Update Material List
00554 
00555     PTGuiMedium* med = fCurrentPTGuiMedium[igeo];
00556     if ( !med ) return;
00557     
00558     Int_t imat = med->IdMat();
00559     std::string matname = "<null>";
00560     Float_t a = -1;
00561     Float_t z = -1;
00562     Float_t dens = -1;
00563     Float_t radl = -1;
00564     Float_t absl = -1;
00565     if  ( imat >= 0 ) {
00566       PTGuiMaterial* ptmat = 0;
00567       if ( igeo == 0 ) ptmat = dynamic_cast<PTGuiMaterial*>
00568                    (fPTGuiRollG3->GetMaterials()->At(imat-1));
00569       else ptmat = dynamic_cast<PTGuiMaterial*>
00570                    (fPTGuiRollGMinos->GetMaterials()->At(imat-1));
00571     
00572       matname = ptmat->GetName();
00573       a = ptmat->A();
00574       z = ptmat->Z();    
00575       dens = ptmat->Density();
00576       radl = ptmat->RadLen();
00577       absl = ptmat->IntLen();
00578     }
00579      
00580     char buf[20];
00581      
00582     sprintf(buf, "%20s", matname.c_str());
00583     fMaterialTextE[0][igeo]->GetBuffer()->Clear();
00584     fMaterialTextE[0][igeo]->GetBuffer()->AddText(0, buf);
00585     gClient->NeedRedraw(fMaterialTextE[0][igeo]);
00586 
00587     sprintf(buf, "%20.3e", a);
00588     fMaterialTextE[1][igeo]->GetBuffer()->Clear();
00589     fMaterialTextE[1][igeo]->GetBuffer()->AddText(0, buf);
00590     gClient->NeedRedraw(fMaterialTextE[1][igeo]);
00591 
00592     sprintf(buf, "%20.3e", z);
00593     fMaterialTextE[2][igeo]->GetBuffer()->Clear();
00594     fMaterialTextE[2][igeo]->GetBuffer()->AddText(0, buf);
00595     gClient->NeedRedraw(fMaterialTextE[2][igeo]);
00596 
00597     sprintf(buf, "%20.3e", dens);
00598     fMaterialTextE[3][igeo]->GetBuffer()->Clear();
00599     fMaterialTextE[3][igeo]->GetBuffer()->AddText(0, buf);
00600     gClient->NeedRedraw(fMaterialTextE[3][igeo]);
00601 
00602     sprintf(buf, "%20.3e", radl);
00603     fMaterialTextE[4][igeo]->GetBuffer()->Clear();
00604     fMaterialTextE[4][igeo]->GetBuffer()->AddText(0, buf);
00605     gClient->NeedRedraw(fMaterialTextE[4][igeo]);
00606 
00607     sprintf(buf, "%20.3e", absl);
00608     fMaterialTextE[5][igeo]->GetBuffer()->Clear();
00609     fMaterialTextE[5][igeo]->GetBuffer()->AddText(0, buf);
00610     gClient->NeedRedraw(fMaterialTextE[5][igeo]);
00611 
00612   
00613 }

void PTGuiMainFrame::UpdateMechanismCombo (  )  [private]

Definition at line 694 of file PTGuiMainFrame.cxx.

References fCurrentPTGuiMedium, fCurrentPTMechanism, fCurrentPTParticle, fMechanismCombo, PTGuiMedium::IdMat(), PTGui::kLabelMechanism, and PTGui::kNMechanism.

Referenced by ProcessMessage(), and UpdateCombo().

00694                                           {
00695   // Mechanism ComboBox entries are added if the mechanism is valid
00696   // for the current particle type.
00697 
00698   if ( !fCurrentPTGuiMedium[0] ) return;
00699   
00700   fMechanismCombo->RemoveAll();
00701   
00702   // Test each mechanism to check validity for the current particle type
00703   
00704   // Kinetic energy bins
00705   Float_t tkin[1] = {1.};
00706   Float_t value[1] = {0};
00707   Float_t pcut[1] = {0};
00708 
00709   Int_t nmech = 0;
00710   for ( Int_t imech = 0; imech < PTGui::kNMechanism-1; imech++ ) {
00711     Int_t ipart = fCurrentPTParticle + 1;
00712 
00713      // Material
00714     Int_t imate = fCurrentPTGuiMedium[0]->IdMat();
00715     std::string mechname = PTGui::kLabelMechanism[imech];
00716     char* mechstr = const_cast<char*>(mechname.c_str());
00717 
00718     Int_t ixst = 0;
00719     ((TGeant3*) gMC) -> Gftmat(imate,ipart,mechstr,1,tkin, value, pcut, ixst);
00720     
00721     if ( ixst > 0 ) {
00722       fMechanismCombo->AddEntry((PTGui::kLabelMechanism[imech]).c_str(),nmech);
00723       TGTextLBEntry* textE = dynamic_cast<TGTextLBEntry*>
00724         (fMechanismCombo->GetListBox()->GetEntry(nmech));
00725       textE->SetUniqueID(imech);
00726       nmech++;
00727     }
00728     
00729   }
00730   
00731   fCurrentPTMechanism = -1;
00732   if ( nmech > 0 ) {
00733     // Add the final entry for All X-sec
00734     fMechanismCombo->AddEntry(
00735              (PTGui::kLabelMechanism[PTGui::kNMechanism-1]).c_str(),nmech);
00736     TGTextLBEntry* textE = dynamic_cast<TGTextLBEntry*>
00737         (fMechanismCombo->GetListBox()->GetEntry(nmech));
00738     textE->SetUniqueID(PTGui::kNMechanism-1);
00739     fMechanismCombo->Select(0);
00740     fCurrentPTMechanism = 0;
00741   }
00742   
00743 
00744 }

void PTGuiMainFrame::UpdateMediumList ( Int_t  igeo = 0  )  [private]

Definition at line 616 of file PTGuiMainFrame.cxx.

References PTGuiMedium::Deemax(), PTGuiMedium::Epsil(), fCurrentPTGuiMedium, PTGuiMedium::Fieldm(), fMediumCombo, fMediumTextE, PTGuiMedium::Id(), PTGuiMedium::Ifield(), PTGuiMedium::Isvol(), PTGuiMedium::Stemax(), PTGuiMedium::Stmin(), and PTGuiMedium::Tmaxfd().

Referenced by UpdateList().

00616                                                 {
00617   // Update Medium lists
00618 
00619     if ( !fCurrentPTGuiMedium[igeo] ) return;
00620   
00621     std::string medName = fCurrentPTGuiMedium[igeo]->GetName();
00622     Int_t     imed = fCurrentPTGuiMedium[igeo]->Id();
00623     Int_t    isvol = fCurrentPTGuiMedium[igeo]->Isvol();
00624     Int_t   ifield = fCurrentPTGuiMedium[igeo]->Ifield();
00625     Float_t fieldm = fCurrentPTGuiMedium[igeo]->Fieldm();    
00626     Float_t tmaxfd = fCurrentPTGuiMedium[igeo]->Tmaxfd();
00627     Float_t stemax = fCurrentPTGuiMedium[igeo]->Stemax();
00628     Float_t deemax = fCurrentPTGuiMedium[igeo]->Deemax();
00629     Float_t  epsil = fCurrentPTGuiMedium[igeo]->Epsil();
00630     Float_t  stmin = fCurrentPTGuiMedium[igeo]->Stmin();
00631 
00632     if ( igeo == 0 )fMediumCombo->Select(imed-1);
00633     char buf[20];
00634     
00635     int itxt = 0;
00636     sprintf(buf,"%20s",medName.c_str());
00637     fMediumTextE[itxt][igeo]->GetBuffer()->Clear();
00638     fMediumTextE[itxt][igeo]->GetBuffer()->AddText(0,buf);
00639     gClient->NeedRedraw(fMediumTextE[itxt][igeo]);
00640     
00641     itxt++;
00642     sprintf(buf, "%20i", isvol);
00643     fMediumTextE[itxt][igeo]->GetBuffer()->Clear();
00644     fMediumTextE[itxt][igeo]->GetBuffer()->AddText(0, buf);
00645     gClient->NeedRedraw(fMediumTextE[itxt][igeo]);
00646 
00647     itxt++;
00648     sprintf(buf, "%20i", ifield);
00649     fMediumTextE[itxt][igeo]->GetBuffer()->Clear();
00650     fMediumTextE[itxt][igeo]->GetBuffer()->AddText(0, buf);
00651     gClient->NeedRedraw(fMediumTextE[itxt][igeo]);
00652 
00653     itxt++;
00654     sprintf(buf, "%20.3e", fieldm);
00655     fMediumTextE[itxt][igeo]->GetBuffer()->Clear();
00656     fMediumTextE[itxt][igeo]->GetBuffer()->AddText(0, buf);
00657     gClient->NeedRedraw(fMediumTextE[itxt][igeo]);
00658 
00659     itxt++;
00660     sprintf(buf, "%20.3e", tmaxfd);
00661     fMediumTextE[itxt][igeo]->GetBuffer()->Clear();
00662     fMediumTextE[itxt][igeo]->GetBuffer()->AddText(0, buf);
00663     gClient->NeedRedraw(fMediumTextE[itxt][igeo]);
00664 
00665     itxt++;
00666     sprintf(buf, "%20.3e", stemax);
00667     fMediumTextE[itxt][igeo]->GetBuffer()->Clear();
00668     fMediumTextE[itxt][igeo]->GetBuffer()->AddText(0, buf);
00669     gClient->NeedRedraw(fMediumTextE[itxt][igeo]);
00670 
00671     itxt++;
00672     sprintf(buf, "%20.3e", deemax);
00673     fMediumTextE[itxt][igeo]->GetBuffer()->Clear();
00674     fMediumTextE[itxt][igeo]->GetBuffer()->AddText(0, buf);
00675     gClient->NeedRedraw(fMediumTextE[itxt][igeo]);
00676 
00677     itxt++;
00678     sprintf(buf, "%20.3e", epsil);
00679     fMediumTextE[itxt][igeo]->GetBuffer()->Clear();
00680     fMediumTextE[itxt][igeo]->GetBuffer()->AddText(0, buf);
00681     gClient->NeedRedraw(fMediumTextE[itxt][igeo]);
00682 
00683     itxt++;
00684     sprintf(buf, "%20.3e", stmin);
00685     fMediumTextE[itxt][igeo]->GetBuffer()->Clear();
00686     fMediumTextE[itxt][igeo]->GetBuffer()->AddText(0, buf);
00687     gClient->NeedRedraw(fMediumTextE[itxt][igeo]);
00688 
00689   
00690 }

void PTGuiMainFrame::UpdateProcessList ( Int_t  igeo = 0  )  [private]

Definition at line 514 of file PTGuiMainFrame.cxx.

References fCurrentPTGuiMedium, fProcessLB, PTGui::kLabelProcess, PTGui::kNProcess, and PTGuiMedium::Process().

Referenced by UpdateList().

00514                                                  {
00515   // Update Process List 
00516 
00517   if ( !fProcessLB[igeo] || !fCurrentPTGuiMedium[igeo] ) return;
00518 
00519   fProcessLB[igeo] -> RemoveEntries(0,PTGui::kNProcess-1); 
00520   for ( Int_t ip = 0; ip < PTGui::kNProcess; ip++ ) {
00521     Float_t pflag = fCurrentPTGuiMedium[igeo]->Process(ip); 
00522     char tmp[20];
00523     sprintf(tmp,"%6s%5d",(PTGui::kLabelProcess[ip]).c_str(),(Int_t)pflag);
00524     fProcessLB[igeo]->AddEntry(tmp,ip);
00525   }
00526 
00527   fProcessLB[igeo]->MapSubwindows();
00528   fProcessLB[igeo]->Layout();
00529     
00530 }


Member Data Documentation

Definition at line 120 of file PTGuiMainFrame.h.

Referenced by Plot(), ProcessMessage(), and UpdateMechanismCombo().

Definition at line 119 of file PTGuiMainFrame.h.

Referenced by BuildXSecFrame(), Plot(), ProcessMessage(), and UpdateMechanismCombo().

TGCompositeFrame* PTGuiMainFrame::fCutFrame [private]

Definition at line 129 of file PTGuiMainFrame.h.

Referenced by BuildCutFrame(), and BuildCutList().

TGListBox* PTGuiMainFrame::fCutLB[2] [private]

Definition at line 130 of file PTGuiMainFrame.h.

Referenced by BuildCutList(), PTGuiMainFrame(), and UpdateCutList().

Float_t PTGuiMainFrame::fL10KEmax [private]

Definition at line 117 of file PTGuiMainFrame.h.

Referenced by Plot(), and ProcessMessage().

Float_t PTGuiMainFrame::fL10KEmin [private]

Definition at line 116 of file PTGuiMainFrame.h.

Referenced by Plot(), and ProcessMessage().

UInt_t PTGuiMainFrame::fL10KENbin [private]

Definition at line 115 of file PTGuiMainFrame.h.

Referenced by Plot(), and ProcessMessage().

TGTextBuffer* PTGuiMainFrame::fL10KETextB[3] [private]

Definition at line 134 of file PTGuiMainFrame.h.

Referenced by BuildXSecFrame(), ProcessMessage(), and PTGuiMainFrame().

TGCompositeFrame* PTGuiMainFrame::fMaterialFrame [private]

Definition at line 125 of file PTGuiMainFrame.h.

Referenced by BuildMaterialFrame(), and BuildMaterialList().

TGTextEntry* PTGuiMainFrame::fMaterialTextE[6][2] [private]

Definition at line 126 of file PTGuiMainFrame.h.

Referenced by BuildMaterialList(), PTGuiMainFrame(), and UpdateMaterialList().

TGComboBox* PTGuiMainFrame::fMechanismCombo [private]

Definition at line 132 of file PTGuiMainFrame.h.

Referenced by BuildXSecFrame(), Plot(), and UpdateMechanismCombo().

TGComboBox* PTGuiMainFrame::fMediumCombo [private]
TGCompositeFrame* PTGuiMainFrame::fMediumFrame [private]

Definition at line 122 of file PTGuiMainFrame.h.

Referenced by BuildMediumCombo(), and BuildMediumFrame().

TGTextEntry* PTGuiMainFrame::fMediumTextE[9][2] [private]

Definition at line 124 of file PTGuiMainFrame.h.

Referenced by BuildMediumCombo(), PTGuiMainFrame(), and UpdateMediumList().

TMultiGraph* PTGuiMainFrame::fMultiGraph [private]

Definition at line 135 of file PTGuiMainFrame.h.

Referenced by Plot().

TGComboBox* PTGuiMainFrame::fParticleCombo [private]

Definition at line 131 of file PTGuiMainFrame.h.

Referenced by BuildXSecFrame().

TGTextButton* PTGuiMainFrame::fPlotButton [private]

Definition at line 133 of file PTGuiMainFrame.h.

Referenced by BuildXSecFrame().

TGCompositeFrame* PTGuiMainFrame::fProcessFrame [private]

Definition at line 127 of file PTGuiMainFrame.h.

Referenced by BuildProcessFrame(), and BuildProcessList().

TGListBox* PTGuiMainFrame::fProcessLB[2] [private]

Definition at line 128 of file PTGuiMainFrame.h.

Referenced by BuildProcessList(), PTGuiMainFrame(), and UpdateProcessList().

Definition at line 137 of file PTGuiMainFrame.h.

Referenced by OpenGMinosFile(), Plot(), Update(), and UpdateMaterialList().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1