Ignore:
Timestamp:
01/23/01 10:43:18 (24 years ago)
Author:
harald
Message:
The integration of the class MGFadcDisp in the mars code. Now
one is able to see at least the high gain samples with this gui.
I hope that also Razmik is now able to look to the data.
Location:
trunk/MagicSoft/Mars/mgui
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mgui/GuiIncl.h

    r461 r587  
    99#include <TGSplitter.h>     // TGHorizontal3DLine
    1010#include <TGFSContainer.h>  // TGFileContainer
     11#include <TGLabel.h>       // TGLabel
     12#include <TGTextEntry.h> 
     13
    1114
    1215#endif // __CINT__
  • trunk/MagicSoft/Mars/mgui/GuiLinkDef.h

    r571 r587  
    66
    77#pragma link C++ class MGMarsMain;
     8#pragma link C++ class MGEventDispMain;
    89#pragma link C++ class MGDataCheckMain;
    910#pragma link C++ class MGMonteCarloMain;
  • trunk/MagicSoft/Mars/mgui/MGMarsMain.cc

    r571 r587  
    99#include <TGSplitter.h>    // TGHorizontal3DLine
    1010
     11#include "MGEventDispMain.h"
    1112#include "MGDataCheckMain.h"
    1213#include "MGMonteCarloMain.h"
     
    193194
    194195            case M_BUTTON_EVTDISP:
    195 
    196               new TGMsgBox(fClient->GetRoot(), this,
    197                            "WARNING!",
    198                            "EventDisplay not yet implemented!",
    199                            kMBIconExclamation, buttons, &retval);
     196             
     197              new MGEventDispMain (fClient->GetRoot(), this, 400, 650 ) ;
    200198              break ;
    201199             
     
    205203
    206204            case M_BUTTON_ANALYSE:
    207               new TGMsgBox(fClient->GetRoot(), this,
     205              //new MGPrototyp(fClient->GetRoot(), this, 400, 650 ) ;
     206
     207               new TGMsgBox(fClient->GetRoot(), this,
    208208                           "WARNING!",
    209209                           "Analysis not yet implemented!",
  • trunk/MagicSoft/Mars/mgui/MGPrototyp.cc

    r571 r587  
    99#include <TGListBox.h>      // TGListBox
    1010#include <TGFSContainer.h>  // TGFileContainer
     11#include <TGSplitter.h>    // TGHorizontal3DLine
     12#include <TGTextEntry.h>
     13#include <TGLabel.h>       // TGLabel
     14
    1115
    1216// FIXME: Move to MAGIC.h
     
    1519ClassImp(MGPrototyp)
    1620
    17 enum CommandDataChecker {
     21enum CommandPrototyp {
    1822  M_FILE_CLOSE ,
    1923  M_BUTTON_ACTION,
    2024
     25  M_FILERESET,
    2126  M_PBUTTON_CDIR_UP,
    2227  M_PBUTTON_LIST_MODE,
     
    5863  AddFrame(fMenuBar, fLayMenuBar ) ;
    5964 
     65  fLineSep1 = new TGHorizontal3DLine(this) ;
     66  AddFrame(fLineSep1, new TGLayoutHints(kLHintsTop | kLHintsExpandX) );
     67
     68 
    6069  //
    6170  //    Create the top window with a lot of buttons
     
    7483  AddFrame(fFrameTop, new TGLayoutHints (kLHintsTop ) ) ;   
    7584
     85  //   a line between top and low frame
     86 
     87  fLineSep2 = new TGHorizontal3DLine(this) ;
     88  AddFrame(fLineSep2, new TGLayoutHints(kLHintsTop | kLHintsExpandX) );
    7689
    7790  //
     
    92105  //  tf->AddFrame(fTabF1, fLayTab ) ;
    93106
    94  
    95107  fTabF1a = new TGCompositeFrame (tf, 100, 100, kHorizontalFrame) ;
    96108  tf->AddFrame(fTabF1a,  new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5 ) ) ;
    97109
    98   fTabF1b = new TGCompositeFrame (tf, 100, 100, kVerticalFrame) ;
    99   //  tf->AddFrame(fTabF1b,  new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY  , 5, 5, 5, 5 ) ) ;
    100   tf->AddFrame(fTabF1b,  new TGLayoutHints ( kLHintsExpandX | kLHintsExpandY  , 5, 5, 5, 5 ) ) ;
    101 
    102  
    103   fDir = new TGListBox(fTabF1a, -1) ;
     110  fTabF1b = new TGCompositeFrame (tf, 100, 100, kHorizontalFrame) ;
     111  tf->AddFrame(fTabF1b,  new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5 ) ) ;
     112
     113  fTabF1c = new TGCompositeFrame (tf, 100, 100, kVerticalFrame) ;
     114  //  tf->AddFrame(fTabF1c,  new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY  , 5, 5, 5, 5 ) ) ;
     115  tf->AddFrame(fTabF1c,  new TGLayoutHints ( kLHintsExpandX | kLHintsExpandY  , 5, 5, 5, 5 ) ) ;
     116 
     117  //   the items in the first subframe
     118
     119  fLabFileName = new TGLabel(fTabF1a, new TGString("selected File:") );
     120  fTabF1a->AddFrame( fLabFileName, new TGLayoutHints (kLHintsLeft, 10, 10, 10, 10)) ;
     121
     122  fTxtFileName = new TGTextEntry(fTabF1a, fTxtBufFileName = new TGTextBuffer(256) );
     123  fTxtFileName->Resize(60, fTxtFileName->GetDefaultHeight());
     124  fTabF1a->AddFrame(fTxtFileName, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5));
     125
     126  fButFileReset = new TGTextButton (fTabF1a, "Reset", M_FILERESET ) ;
     127  fButFileReset->Associate(this) ;
     128  fTabF1a->AddFrame (fButFileReset, new TGLayoutHints (kLHintsRight, 10, 10, 10, 10  ) ) ;
     129 
     130 
     131 
     132  //   the items in the second subfraem
     133
     134  fLabDir = new TGLabel(fTabF1b, new TGString("Directory:") );
     135  fTabF1b->AddFrame( fLabDir, new TGLayoutHints (kLHintsLeft, 10, 10, 10, 10)) ;
     136
     137  fDir = new TGListBox(fTabF1b, -1) ;
    104138  fDir->Resize(350,20) ;
    105139  char temp[100] ;
     
    107141  sprintf ( temp, "%s", gSystem->WorkingDirectory()  ) ;
    108142  fDir->AddEntry(temp, 1) ;
    109   fTabF1a->AddFrame( fDir, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5 ) ) ;
     143  fTabF1b->AddFrame( fDir, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5 ) ) ;
    110144
    111145
    112146  fPicCdup = fClient->GetPicture("tb_uplevel.xpm") ;
    113   fCdup = new TGPictureButton(fTabF1a, fPicCdup, M_PBUTTON_CDIR_UP ) ;
     147  fCdup = new TGPictureButton(fTabF1b, fPicCdup, M_PBUTTON_CDIR_UP ) ;
    114148  fCdup->SetToolTipText("One Level up!") ;
    115149  fCdup->Associate(this) ;
    116   fTabF1a->AddFrame (fCdup, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ;
     150  fTabF1b->AddFrame (fCdup, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ;
    117151
    118152  fPicList = fClient->GetPicture("tb_list.xpm") ;
    119   fListMode = new TGPictureButton(fTabF1a, fPicList, M_PBUTTON_LIST_MODE ) ;
     153  fListMode = new TGPictureButton(fTabF1b, fPicList, M_PBUTTON_LIST_MODE ) ;
    120154  fListMode->SetToolTipText("List Mode") ;
    121155  fListMode->Associate(this) ;
    122156  fListMode->SetState(kButtonUp) ;
    123157  fListMode->AllowStayDown(kTRUE) ;
    124   fListMode->AllowStayDown(kTRUE) ;  fTabF1a->AddFrame (fListMode, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ;
     158  fListMode->AllowStayDown(kTRUE) ;  fTabF1b->AddFrame (fListMode, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ;
    125159
    126160  fPicDetail = fClient->GetPicture("tb_details.xpm") ;
    127   fDetail = new TGPictureButton(fTabF1a, fPicDetail, M_PBUTTON_DETAIL_MODE ) ;
     161  fDetail = new TGPictureButton(fTabF1b, fPicDetail, M_PBUTTON_DETAIL_MODE ) ;
    128162  fDetail->SetToolTipText("Details Mode") ;
    129163  fDetail->Associate(this) ;
    130164  fDetail->SetState(kButtonEngaged) ;
    131165  fDetail->AllowStayDown(kTRUE) ;
    132   fTabF1a->AddFrame (fDetail, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ;
    133 
    134    
    135   fFileView = new TGListView(fTabF1b, 540, 380 ) ;
     166  fTabF1b->AddFrame (fDetail, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ;
     167
     168  // the items in the third subframe
     169
     170  fFileView = new TGListView(fTabF1c, 540, 380 ) ;
    136171  fFileCont = new TGFileContainer(fFileView->GetViewPort(), 100, 100,
    137172                                  kVerticalFrame, fgWhitePixel) ;
     
    146181  fFileCont->Sort(kSortByName) ;
    147182 
    148   fTabF1b->AddFrame(fFileView, new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5) ) ;
     183  fTabF1c->AddFrame(fFileView, new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5) ) ;
    149184
    150185  tf->AddFrame(fTabF1, fLayTab) ;
     
    187222    delete fDetail;
    188223    delete fDir ;
     224    delete fLabDir ;
     225
     226    delete fButFileReset ;
     227    delete fTxtFileName  ;
     228    delete fLabFileName  ;
     229   
     230    delete fTabF1c;
    189231    delete fTabF1b;
    190232    delete fTabF1a;
     
    193235    delete fTop1;
    194236    delete fTab;
     237
    195238    delete fFrameTop;
    196239    delete fFrameLow;
     240    delete fLineSep2 ;
     241    delete fLineSep1 ;
     242
    197243    delete fFileMenu;
    198244    delete fMenuBar;
     
    269315
    270316              break ;
    271                  
     317               
     318
     319            case M_FILERESET:
     320             
     321              sprintf ( fInputFile, "\n" ) ;
     322              fTxtFileName->SetText( fInputFile ) ;
     323             
     324              break;
    272325            case M_PBUTTON_CDIR_UP :
    273326
     
    375428                else if  ( ! strcmp(extens, "root") ) {      //     root file
    376429                  sprintf ( fInputFile, "%s/%s" , gSystem->WorkingDirectory(), wort ) ; 
    377 
    378                   printf (" %s \n", fInputFile ) ;
     430                  fTxtFileName->SetText( fInputFile ) ;
     431
    379432                  break ;
    380433                }
  • trunk/MagicSoft/Mars/mgui/MGPrototyp.h

    r571 r587  
    1919class TGFileContainer;
    2020class TGListView;
     21class TGHorizontal3DLine;
     22class TGLabel ;
     23class TGTextEntry ;
     24class TGTextBuffer;
    2125
    2226class MGPrototyp : public TGTransientFrame {
     
    3539  TGMenuBar         *fMenuBar ;
    3640  TGPopupMenu       *fFileMenu ;
     41  TGHorizontal3DLine *fLineSep1, *fLineSep2 ;
     42
    3743
    3844  //   divide the Window in two different parts
     
    5359
    5460  TGCompositeFrame  *fTabF1 ;                       // first tab of low part
    55   TGCompositeFrame  *fTabF1a, *fTabF1b ;            // subpart of the file selector in low window
     61  TGCompositeFrame  *fTabF1a, *fTabF1b, *fTabF1c ;  // subpart of the file selector in low window
     62
     63  TGLabel           *fLabFileName ;
     64  TGTextEntry       *fTxtFileName ;
     65  TGTextBuffer      *fTxtBufFileName ; //!
     66  TGTextButton      *fButFileReset ;
     67 
     68  TGLabel           *fLabDir ;
    5669  TGListBox         *fDir ;
    5770  TGPictureButton   *fCdup, *fListMode, *fDetail ;
  • trunk/MagicSoft/Mars/mgui/Makefile

    r571 r587  
    2727#  connect the include files defined in the config.mk file
    2828#
    29 INCLUDES = -I. -I../mbase -I../mraw -I../mdatacheck
     29INCLUDES = -I. -I../mbase -I../mraw -I../mdatacheck -I../meventdisp
    3030
    3131#
     
    5353
    5454SRCFILES = MGMarsMain.cc \
     55           MGEventDispMain.cc \
    5556           MGDataCheckMain.cc \
    5657           MGMonteCarloMain.cc \
Note: See TracChangeset for help on using the changeset viewer.