/* This is the code for the base window of the MDAQ gui. From here all other windows and options are accessed Author: Michael Ausilio mausilio@umich.edu */ /* 2do. 1.add handler functions 2 private 1.find out what is/isnt button 2.add other elements into window 3. get a good layout size 4. fix the popupmenues showing on start up 5.connect all nonmenu elements 6.fill in connect code as features are added 7.add the greying in/out features 8. Resize all items to not cut off text (see documenation) 9. set default size and lock window into that 10. fix frame numbering 11. add in DAQ error report window */ //#include "jtagControl.c" //------------ #include #include "TGNumberEntry.h" #include "TGLabel.h" #include #include #include #include #include "TGMenu.h" #include "TGLabel.h" #include "TGComboBox.h" class MyWindow{ RQ_OBJECT("MyWindow") private: TGMainFrame *fMain; //menu TGMenuBar *windowMenu; //top level options for menu TGPopupMenu *windowMenuFile; TGPopupMenu *windowMenuExecute; TGPopupMenu *runDiag; TGPopupMenu *windowMenuJTAG; TGPopupMenu *mezzIndSetup; TGPopupMenu *diagJTAG; TGPopupMenu *windowMenuTTCvi; TGPopupMenu *ttcviRandTrigger; TGPopupMenu *ttcviExtTrigger; TGPopupMenu *windowMenuHelp; //frame to put menu in TGVerticalFrame *frame1; //frames for buttons //horizontal frame windo elements //1st row TGHorizontalFrame *frame2; //frame for "CSM Board Status" and its drop down menu TGVerticalFrame *frame3; TGHorizontalFrame *frame4; TGVerticalFrame *framev1; TGVerticalFrame *framev2; TGVerticalFrame *framev3; TGVerticalFrame *framev4; TGVerticalFrame *framev5; TGVerticalFrame *framev6; TGVerticalFrame *framev7; TGHorizontalFrame *frame5; TGHorizontalFrame *frame6; TGHorizontalFrame *frame7; TGHorizontalFrame *frame8; TGHorizontalFrame *frame9; TGHorizontalFrame *frame10; TGHorizontalFrame *frame11; TGHorizontalFrame *frame12; TGHorizontalFrame *frame13; TGVerticalFrame *frame8_9_10; TGHorizontalFrame *frame8_9_10_v7; TGHorizontalFrame *frameB; //various objects to be put into frame (names are order top to bottom and right to left) TGTextButton *startCSMBut; TGTextButton *restCSMBut; TGTextButton *sampleAMTBut; TGLabel *csmBoardLab; TGComboBox *csmBoardBox; //.............. TGLabel *PROMLab; TGCheckButton *PROMBox; TGLabel *XC2V1000Lab; TGCheckButton *XC2V1000Box; TGLabel *GOLLab; TGCheckButton *GOLBox; TGLabel *TTCrxLab; TGCheckButton *TTCrxBox; TGLabel *CSMLab; TGCheckButton *CSMBox; TGLabel *mezzLab; TGCheckButton *mezzBox; //................... TGLabel *setupLab; //4 text box that change TGLabel *setup1Lab; TGLabel *setup2Lab; TGLabel *setup3Lab; TGLabel *setup4Lab; //........................ TGTextButton *unlockJTAGBut; TGLabel *CSMTypeLab; TGLabel *CSMTypeField;//No clue what this is TGLabel *JTAGRateLab; TGNumberEntry *JTAGRateField; //................... TGLabel *numCSMLab; TGNumberEntry *numCSMField; TGLabel *currentCSMLab; TGNumberEntry *currentCSMField; TGTextButton *setupMultCSMBut; //.................. ///...................... TGLabel *numRunLab; TGNumberEntry *numRunField; TGLabel *startLab; TGNumberEntryField *startField; TGLabel *DAQRateLab; TGNumberEntryField *DAQRateField; TGLabel *numTCPLab; TGNumberEntryField *numTCPField; //.................... TGLabel *numEventLab; TGNumberEntryField *numEventField; TGLabel *stopLab; TGNumberEntryField *stopField; //probably a text box TGLabel *trigRateLab; TGNumberEntryField *trigRateField; //........................ TGCheckButton *DAQInfoBox; //"DAQ Infor. On/Off" button TGLabel *numDataErrLab; //"#DataErrors" TGNumberEntryField *numDataErrField; TGLabel *DAQTimeLab; TGNumberEntryField *DAQTimeField; TGLabel *TCPStatusLab; TGNumberEntryField *TCPStatusField; //this needs to be text, probably want to change this //... TGLabel *storageLab; // TGText*Entry *storageField; TGLabel *fileLab; // TGText*Entry *fileField; //... // TGText*Entry *wierdField; //..... TGTextButton *startRunButt; //"Start Run" button TGTextButton *pauseRunButt; //"Pause Run Button TGTextButton *initDAQButt; //"INIT DAQ" button TGTextButton *discTCPButt; //"Disconnect All TCP Client" button TGTextButton *quitButt; //"QUIT" Button public: MyWindow(const TGWindow *p); void Test(); //Purpose: this function handles any menu item click in the "File" menu //Requirements: //Modifies: //Notes: This is in progress of being built, as more menus/actions are completed // they will be added to the corresponding button void HandleFileMenu(Int_t optionNum); //Purpose: this function handles any menu item click in the "Execute" menu //Requirements: //Modifies: //Notes: This is in progress of being built, as more menus/actions are completed // they will be added to the corresponding button void HandleExecuteMenu(Int_t optionNum); //Purpose: this function handles any menu item click in the "Run Diagnostics"sub menu of "Execute" //Requirements: //Modifies: //Notes: This is in progress of being built, as more menus/actions are completed // they will be added to the corresponding button void HandleExecuteRunDiag(Int_t optionNum); //Purpose: this function handles any menu item click in the "JTAG" menu //Requirements: //Modifies: //Notes: This is in progress of being built, as more menus/actions are completed // they will be added to the corresponding button void HandleJTAGMenu(Int_t optionNum); //Purpose: this function handles any menu item click in the "Mezz Ind Setup" submenu in the JTAG menu //Requirements: //Modifies: //Notes: This is in progress of being built, as more menus/actions are completed // they will be added to the corresponding button void HandleJTAGMezz(Int_t optionNum); //Purpose: this function handles any menu item click in the "Diagnostics" submenu in the JTAG menu //Requirements: //Modifies: //Notes: This is in progress of being built, as more menus/actions are completed // they will be added to the corresponding button void HandleJTAGDiag(Int_t optionNum); //Purpose: this function handles any menu item click in the "TTCvi" menu //Requirements: //Modifies: //Notes: This is in progress of being built, as more menus/actions are completed // they will be added to the corresponding button void HandleTTCviMenu(Int_t optionNum); //Purpose: this function handles any menu item click in the "Random Software Trigger" submenu in the JTAG menu //Requirements: //Modifies: //Notes: This is in progress of being built, as more menus/actions are completed // they will be added to the corresponding button void HandleTTCviRand(Int_t optionNum); //Purpose: this function handles any menu item click in the "External Trigger" submenu in the JTAG menu //Requirements: //Modifies: //Notes: This is in progress of being built, as more menus/actions are completed // they will be added to the corresponding button void HandleTTCviTrig(Int_t optionNum); //Purpose: this function handles any menu item click in the "Help" menu //Requirements: //Modifies: //Notes: This is in progress of being built, as more menus/actions are completed // they will be added to the corresponding button void HandleHelpMenu(Int_t optionNum); };