QGUIRunSelector.hh

00001 /*
00002  * APOLLO: A complete DAQ and Online Data Analysis Framework for Cuore
00003  * 
00004  * A.Giachero created 12/08/07 - <Andrea.Giachero@ge.infn.it> 
00005  * 
00006  $ $Id: $
00007  * $Revision: $
00008  *
00009  * Class QGUIRunSelector: Win
00010  *
00011  */
00012 
00013 #ifndef _QGUI_RUN_SELECTOR_HH_
00014 #define _QGUI_RUN_SELECTOR_HH_
00015 
00016 
00017 
00018 // Apollo Includes
00019 #include "QGUIBaseFrame.hh"
00020 #include "QGUIDataCollector.hh"
00021 #include "QGUIFont.hh"
00022 
00023 
00024 // Root Includes
00025 #include "Rtypes.h"
00026 
00027 // C/C++ Includes
00028 #include <vector>
00029 
00030 
00031 // Used Class
00032 class TGNumberEntry;
00033 
00034 
00035 class QGUIRunSelector: public QGUIBaseFrame
00036 {
00037 
00038 public:
00039   
00040   // ctor
00041   QGUIRunSelector(const TGWindow *p, size_t& RunNumber, size_t Width, size_t Height, const QGUIDataCollector* const Status);
00042 
00043   // ctor with fixed dimensions
00044   QGUIRunSelector(const TGWindow *p, size_t& RunNumber, const QGUIDataCollector* const Status);
00045 
00046   // dtor
00047   virtual ~QGUIRunSelector();
00048 
00049   //******************************** SIGNAL ****************************************
00050 
00051   // Close Window
00052   void Close(bool qStatus);
00053   
00054   // Update Number Entry
00055   void UpdateNumberEntry();
00056 
00057   // Set Run Number to the greater free
00058   void SetToMax(); 
00059 
00060   // Set Run Number to the last one plus one
00061   void SetToNext();
00062 
00063 
00064   //********************************************************************************
00065 
00066 protected:
00067 
00068 
00069 private:
00070 
00071 
00072   // Create Window
00073   void PopUp();
00074     
00075   // Set to zero all Pointers
00076   void Zeros();
00077 
00078   // Init
00079   void Init();
00080 
00081   // Data collector pointer
00082   const QGUIDataCollector* fStatus;
00083 
00084 
00085   TGHorizontalFrame* fVRunFrame;
00086   TGHorizontalFrame* fVBtnFrame;
00087   TGHorizontalFrame* fVExtFrame;
00088   TGNumberEntry*     fRun;
00089 
00090   TGTextButton*  fOkBtn;       // Configure Run 
00091   TGTextButton*  fCancelBtn;   // Start Run
00092   TGTextButton*  fMaxBtn;      // Stop  Run
00093   TGTextButton*  fLastBtn;     // Start QScope
00094 
00095 
00096 
00097   size_t fTmpRunNumber; // Temp Run Number
00098   size_t fOldRunNumber; // Old  Run Number 
00099   size_t &fRunNumber;   // Address to store return values
00100 
00101   // Vector Filled with Setting Basket Ids
00102   std::vector<int> fRunNumbers;
00103 
00104   
00105 
00106   //****************************** NOT GRAPHICAL FUNCTIONS **************************************
00107 
00108   // Build Window Names
00109   void BuildNames();
00110 
00111   //*********************************************************************************************
00112 
00113 
00114   //******************************** GRAPHICAL FUNCTIONS ****************************************
00115   
00116   // Create all GUI Frames
00117   void CreateFrames();
00118 
00119   // Add Label To Frame
00120   void AddLabel(TGCompositeFrame* qParent, const std::string qLabel);
00121 
00122 
00123   //*********************************************************************************************
00124   
00125 
00126   // To integrate QGUIWindowText class into the ROOT system
00127   ClassDef(QGUIRunSelector,0)
00128 
00129 };
00130 
00131 #endif // _QGUI_RUN_SELECTOR_HH_

Generated on Tue Nov 16 10:49:55 2010 for CUORE Software by  doxygen 1.5.6