CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaGui.cc

Go to the documentation of this file.
00001 //----------Author's Name: B.Fabbro DSM/IRFU/SPP CEA-Saclay
00002 //----------Copyright: Those valid for CEA sofware
00003 //----------Modified: 08/04/2010
00004 
00005 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaGui.h"
00006 #include <cstdlib>
00007 
00008 ClassImp(TEcnaGui)
00009 //______________________________________________________________________________
00010 //
00011 // TEcnaGui.
00012 //
00013 // This class provides a dialog box for ECNA (Ecal Correlated Noise Analysis)
00014 // in the framework of ROOT Graphical User Interface (GUI)
00015 //
00016 //   In the following, "Stin", "Stex", "Stas" means:
00017 //
00018 //                 "Stin" = "Tower"  if the subdetector is "EB"  
00019 //                        = "SC"     if the subdetector is "EE"
00020 //
00021 //                 "Stex" = "SM"     if the subdetector is "EB"
00022 //                        = "Dee"    if the subdetector is "EE"
00023 //
00024 //                 "Stas" = "EB"     if the subdetector is "EB"
00025 //                        = "EE"     if the subdetector is "EE"  
00026 //
00027 //
00028 //==================== GUI DIALOG BOX PRESENTATION ==================
00029 // 
00030 // line# 
00031 //   
00032 //
00033 //   1      Analysis                      (button + input widget)
00034 //          First requested event number  (button + input widget)
00035 //          Run number                    (button + input widget)
00036 //
00037 //   2      Number of samples             (button + input widget)
00038 //          Last requested event number   (button + input widget)
00039 //          Clean                         (menu)
00040 //          Submit                        (menu)
00041 //
00042 //   3      Stex number                   (button + input widget)
00043 //          Stex Stin numbering           (button)
00044 //          Calculations                  (menu)
00045 //
00046 //........................................................................
00047 //
00048 //   4      Number of events                  (menu)
00049 //   5      Pedestals                         (menu) 
00050 //   6      Total Noise                       (menu) 
00051 //   7      Low  Frequency Noise              (menu)
00052 //   8      High Frequency Noise              (menu)
00053 //   9      Mean of Cor(s,s')                 (menu)
00054 //  10      Sigma of Cor(s,s')                (menu)
00055 //  11      Mean LF |Cor(c,c')| in (tow,tow') (menu)
00056 //  12      Mean LH |Cor(c,c')| in (tow,tow') (menu)
00057 //
00058 //........................................................................
00059 //
00060 //  13      Stin                 (button + input widget)
00061 //          Stin'                (button + input widget)
00062 //  14      Stin Xtal Numbering  (button) 
00063 //
00064 //  15      Low  Frequency Cor(Xtal Stin, Xtal Stin')   (menu)
00065 //  16      High Frequency Cor(Xtal Stin, Xtal Stin')   (menu)
00066 //
00067 //...........................................................................
00068 //
00069 //  17      Channel number in Stin        (button + input widget)
00070 //          Sample number                 (button + input widget)
00071 //
00072 //
00073 //  18      Correlations between samples        (menu)
00074 //  19      Covariances between samples         (menu)
00075 //  20      Expectation values of the samples   (menu)
00076 //  21      Sigmas of the samples               (menu)
00077 //
00078 //  22      ADC sample values for (Xtal,Sample) (menu)
00079 //
00080 //............................................................................
00081 //
00082 //  23      List of run file name for history plots     (button + input widget)
00083 //
00084 //  24      Menu for history plots                      (menu)         
00085 //............................................................................
00086 //
00087 //  25      LOG X          (check button: OFF: LIN scale / ON: LOG scale) 
00088 //          LOG Y          (check button: OFF: LIN scale / ON: LOG scale) 
00089 //          Y projection   (check button: OFF: X = variable
00090 //                                             Y = quantity
00091 //                                        ON : X = quantity
00092 //                                             Y = distribution of the variable)
00093 //............................................................................
00094 //
00095 //  26      General Title for Plots  (button + input widget)
00096 //
00097 //  27      Colors         (check button: ON = Rainbow,   OFF = ECNAColor )
00098 //          Exit                 (button)
00099 //
00100 //  28      Clone Last Canvas    (button)
00101 //          ROOT version         (button)
00102 //          Help                 (button)
00103 //
00104 //===============================================================================
00105 //
00106 // Example of main program using the class TEcnaGui:
00107 //
00108 //%~%~%~%~%~%~%~%~%~%~%~%~%~~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~
00109 //
00110 //   //----------------------- EcnaGuiEB.cc ---------------
00111 //   //
00112 //   //         E.C.N.A.  dialog box (GUI) for barrel
00113 //   //
00114 //   //----------------------------------------------------
00115 //   #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaGui.h"
00116 //   #include <cstdlib>
00117 //   
00118 //   #include "Riostream.h"
00119 //   #include "TROOT.h"
00120 //   #include "TGApplication.h"
00121 //   #include "TGClient.h"
00122 //   #include "TRint.h"
00123 //   
00124 //   #include <stdlib.h>
00125 //   #include <string>
00126 //   #include "TSystem.h"
00127 //   #include "TObject.h"
00128 //   #include "TGWindow.h"
00129 //   
00130 //   extern void InitGui();
00131 //   VoidFuncPtr_t initfuncs[] = { InitGui, 0 };
00132 //   TROOT root("GUI","GUI test environnement", initfuncs);
00133 //   
00134 //   using namespace std;
00135 //   
00136 //   int main(int argc, char **argv)
00137 //   {
00138 //     cout << "*EcnaGuiEB> Starting ROOT session" << endl;
00139 //     TRint theApp("App", &argc, argv);
00140 //     cout << "*EcnaGuiEB> Starting new CNA session. Opening dialog box" << endl;
00141 //     TEcnaGui* mainWin = new TEcnaGui(gClient->GetRoot(), 390, 680, "EB");
00142 //     cout << "*EcnaGuiEB> CNA session: preparing to run application." << endl;
00143 //   
00144 //     Bool_t retVal = kTRUE;
00145 //     theApp.Run(retVal);
00146 //     cout << "*EcnaGuiEB> End of CNA session. Closing dialog box." << endl;
00147 //     delete mainWin;
00148 //     cout << "*EcnaGuiEB> Terminating ROOT session." << endl;
00149 //     theApp.Terminate(0);
00150 //     cout << "*EcnaGuiEB> Exiting main program." << endl;
00151 //     exit(0);
00152 //   }
00153 //
00154 //%~%~%~%~%~%~%~%~%~%~%~%~%~~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~
00155 //
00156 //...........................................................................
00157 //
00158 //   Location of the ECNA web page:
00159 //
00160 //   http://cms-fabbro.web.cern.ch/cms-fabbro/cna_new/Correlated_Noise_Analysis/ECNA_main_page.htm
00161 //
00162 //------------------------------ TEcnaGui.cc ----------------------------
00163 //
00164 //   Gui box + methods for ECNA (Ecal Correlated Noise Analysis)
00165 //
00166 //   For questions or comments, please send e-mail to Bernard Fabbro:
00167 //             
00168 //   bernard.fabbro@cea.fr 
00169 //
00170 //----------------------------------------------------------------------
00171 
00172   TEcnaGui::~TEcnaGui()
00173 {
00174 //destructor
00175 
00176 #define DEST
00177 #ifdef DEST
00178   // cout << "TEcnaGui> Entering destructor" << endl;
00179   // cout << "            fCnew = " << fCnew << ", fCdelete = " << fCdelete << endl;
00180  
00181   //.... general variables 
00182   if ( fHistos             != 0 ) {delete fHistos;             fCdelete++;}
00183 
00184   //if ( fCnaParHistos       != 0 ) {delete fCnaParHistos;       fCdelete++;}
00185   //if ( fCnaParPaths        != 0 ) {delete fCnaParPaths;        fCdelete++;}
00186   //if ( fEcalNumbering      != 0 ) {delete fEcalNumbering;      fCdelete++;}
00187   //if ( fEcal               != 0 ) {delete fEcal;               fCdelete++;}
00188 
00189   //.... general frames
00190 
00191   if ( fLayoutGeneral      != 0 ) {delete fLayoutGeneral;      fCdelete++;}
00192   if ( fLayoutBottLeft     != 0 ) {delete fLayoutBottLeft;     fCdelete++;}
00193   if ( fLayoutBottRight    != 0 ) {delete fLayoutBottRight;    fCdelete++;}
00194   if ( fLayoutTopLeft      != 0 ) {delete fLayoutTopLeft;      fCdelete++;}
00195   if ( fLayoutTopRight     != 0 ) {delete fLayoutTopRight;     fCdelete++;}
00196   if ( fLayoutCenterYLeft  != 0 ) {delete fLayoutCenterYLeft;  fCdelete++;}
00197   if ( fLayoutCenterYRight != 0 ) {delete fLayoutCenterYRight; fCdelete++;}
00198   if ( fLayoutCenterXTop   != 0 ) {delete fLayoutCenterXTop;   fCdelete++;}
00199 
00200   if ( fVoidFrame          != 0 ) {delete fVoidFrame;          fCdelete++;}
00201 
00202   //..... specific frames + buttons + menus
00203   
00204   //++++++++++++++++++++++++++++++++++++ Frame: Python Source (Pyf) (Button + EntryField)
00205   //if ( fPyfFrame            != 0 ) {delete fPyfFrame;            fCdelete++;}
00206   //if ( fPyfBut              != 0 ) {delete fPyfBut;              fCdelete++;}
00207   //if ( fLayoutPyfBut        != 0 ) {delete fLayoutPyfBut;        fCdelete++;}
00208   //if ( fEntryPyfNumber      != 0 ) {delete fEntryPyfNumber;      fCdelete++;}
00209   //if ( fPyfText             != 0 ) {fPyfText->Delete();          fCdelete++;}
00210   //if ( fLayoutPyfFieldText  != 0 ) {delete fLayoutPyfFieldText;  fCdelete++;}
00211   //if ( fLayoutPyfFieldFrame != 0 ) {delete fLayoutPyfFieldFrame; fCdelete++;}
00212 
00213   //++++++++++++++++++++++++++++++ Horizontal frame Analysis + First requested evt number + Run number
00214   if ( fAnaNorsRunFrame       != 0 ) {delete fAnaNorsRunFrame;       fCdelete++;}
00215   if ( fLayoutAnaNorsRunFrame != 0 ) {delete fLayoutAnaNorsRunFrame; fCdelete++;}
00216 
00217   //--------------------------------- Sub-Frame Analysis Name (Button+Entry Field)
00218   if ( fAnaFrame       != 0 ) {delete fAnaFrame;       fCdelete++;}
00219   if ( fAnaBut         != 0 ) {delete fAnaBut;         fCdelete++;}
00220   if ( fLayoutAnaBut   != 0 ) {delete fLayoutAnaBut;   fCdelete++;}
00221   if ( fEntryAnaNumber != 0 ) {delete fEntryAnaNumber; fCdelete++;}
00222   if ( fAnaText        != 0 ) {fAnaText->Delete();     fCdelete++;}
00223   if ( fLayoutAnaField != 0 ) {delete fLayoutAnaField; fCdelete++;}
00224 
00225   //------------------- subframe first requested evt number
00226   if ( fFevFrame            != 0 ) {delete fFevFrame;            fCdelete++;}
00227   if ( fFevBut              != 0 ) {delete fFevBut;              fCdelete++;}
00228   if ( fLayoutFevBut        != 0 ) {delete fLayoutFevBut;        fCdelete++;}
00229   if ( fEntryFevNumber      != 0 ) {delete fEntryFevNumber;      fCdelete++;}
00230   if ( fFevText             != 0 ) {fFevText->Delete();          fCdelete++;}  
00231   if ( fLayoutFevFieldText  != 0 ) {delete fLayoutFevFieldText;  fCdelete++;}
00232   if ( fLayoutFevFieldFrame != 0 ) {delete fLayoutFevFieldFrame; fCdelete++;}
00233 
00234   //-------------------------------- Sub-Frame Run number (Button+Entry Field)  
00235   if ( fRunFrame       != 0 ) {delete fRunFrame;           fCdelete++;}
00236   if ( fRunBut         != 0 ) {delete fRunBut;             fCdelete++;}
00237   if ( fLayoutRunBut   != 0 ) {delete fLayoutRunBut;       fCdelete++;}
00238   if ( fEntryRunNumber != 0 ) {delete fEntryRunNumber;     fCdelete++;}
00239   if ( fRunText        != 0 ) {fRunText->Delete();         fCdelete++;}
00240   if ( fLayoutRunField != 0 ) {delete fLayoutRunField;     fCdelete++;}
00241 
00242  //+++++++++++++++++++++++++++++ Horizontal frame Nb Of Samples + last requested events + Clean + Submit
00243   if ( fFevLevStexFrame       != 0 ) {delete fFevLevStexFrame;       fCdelete++;}
00244   if ( fLayoutFevLevStexFrame != 0 ) {delete fLayoutFevLevStexFrame; fCdelete++;}
00245 
00246   //------------------- Sub-Frame Nb of Required Samples (Button+Entry Field)
00247   if ( fNorsFrame          != 0 ) {delete fNorsFrame;          fCdelete++;}
00248   if ( fNorsBut            != 0 ) {delete fNorsBut;            fCdelete++;}
00249   if ( fLayoutNorsBut      != 0 ) {delete fLayoutNorsBut;      fCdelete++;}
00250   if ( fEntryNorsNumber    != 0 ) {delete fEntryNorsNumber;    fCdelete++;}
00251   if ( fNorsText           != 0 ) {fNorsText->Delete();        fCdelete++;}
00252   if ( fLayoutNorsField    != 0 ) {delete fLayoutNorsField;    fCdelete++;}
00253 
00254   //------------------- subframe last requested evt number
00255   if ( fLevFrame            != 0 ) {delete fLevFrame;            fCdelete++;}
00256   if ( fLevBut              != 0 ) {delete fLevBut;              fCdelete++;}
00257   if ( fLayoutLevBut        != 0 ) {delete fLayoutLevBut;        fCdelete++;}
00258   if ( fEntryLevNumber      != 0 ) {delete fEntryLevNumber;      fCdelete++;}
00259   if ( fLevText             != 0 ) {fLevText->Delete();          fCdelete++;}
00260   if ( fLayoutLevFieldText  != 0 ) {delete fLayoutLevFieldText;  fCdelete++;}
00261   if ( fLayoutLevFieldFrame != 0 ) {delete fLayoutLevFieldFrame; fCdelete++;}
00262 
00263   //................................ Menu for Clean
00264   if ( fMenuClean          != 0 ) {delete fMenuClean;          fCdelete++;}
00265   if ( fMenuBarClean       != 0 ) {fMenuBarClean->Delete();    fCdelete++;}
00266   //................................ Menu for Submit jobs on batch system
00267   if ( fMenuSubmit         != 0 ) {delete fMenuSubmit;         fCdelete++;}
00268   if ( fMenuBarSubmit      != 0 ) {fMenuBarSubmit->Delete();   fCdelete++;}
00269 
00270  //+++++++++++++++++++++++++++++++++++++++++++++++++  Horizontal Frame:Stex number + NbOfReqEvts
00271   if ( fCompStRqFrame       != 0 ) {delete fCompStRqFrame;       fCdelete++;}
00272   if ( fLayoutCompStRqFrame != 0 ) {delete fLayoutCompStRqFrame; fCdelete++;}
00273 
00274   //------------------- subframe stex number
00275   if ( fStexFrame            != 0 ) {delete fStexFrame;            fCdelete++;}
00276   if ( fStexBut              != 0 ) {delete fStexBut;              fCdelete++;}
00277   if ( fLayoutStexBut        != 0 ) {delete fLayoutStexBut;        fCdelete++;}
00278   if ( fEntryStexNumber      != 0 ) {delete fEntryStexNumber;      fCdelete++;}
00279   if ( fStexText             != 0 ) {fStexText->Delete();          fCdelete++;}  
00280   if ( fLayoutStexFieldText  != 0 ) {delete fLayoutStexFieldText;  fCdelete++;}
00281   if ( fLayoutStexFieldFrame != 0 ) {delete fLayoutStexFieldFrame; fCdelete++;}
00282 
00283   //------------------- subframe number of requested evts
00284   if ( fRevFrame            != 0 ) {delete fRevFrame;            fCdelete++;}
00285   if ( fRevBut              != 0 ) {delete fRevBut;              fCdelete++;}
00286   if ( fLayoutRevBut        != 0 ) {delete fLayoutRevBut;        fCdelete++;}
00287   if ( fEntryRevNumber      != 0 ) {delete fEntryRevNumber;      fCdelete++;}
00288   if ( fRevText             != 0 ) {fRevText->Delete();          fCdelete++;}
00289   if ( fLayoutRevFieldText  != 0 ) {delete fLayoutRevFieldText;  fCdelete++;}
00290   if ( fLayoutRevFieldFrame != 0 ) {delete fLayoutRevFieldFrame; fCdelete++;}
00291 
00292   //+++++++++++++++++++++++  Horizontal Frame StexStin numbering + Nb Samp for calc + Calculations
00293   if ( fCompStnbFrame       != 0 ) {delete fCompStnbFrame;       fCdelete++;}
00294   if ( fLayoutCompStnbFrame != 0 ) {delete fLayoutCompStnbFrame; fCdelete++;}
00295 
00296   //............................ Stex Stin Numbering view (Button)
00297   if ( fButStexNb           != 0 ) {delete fButStexNb;           fCdelete++;}
00298   if ( fLayoutStexNbBut     != 0 ) {delete fLayoutStexNbBut;     fCdelete++;}
00299   //------------------- subframe NbSampForCalc
00300   if ( fNbSampForCalcFrame            != 0 ) {delete fNbSampForCalcFrame;            fCdelete++;}
00301   if ( fNbSampForCalcBut              != 0 ) {delete fNbSampForCalcBut;              fCdelete++;}
00302   if ( fLayoutNbSampForCalcBut        != 0 ) {delete fLayoutNbSampForCalcBut;        fCdelete++;}
00303   if ( fEntryNbSampForCalcNumber      != 0 ) {delete fEntryNbSampForCalcNumber;      fCdelete++;}
00304   if ( fNbSampForCalcText             != 0 ) {fNbSampForCalcText->Delete();          fCdelete++;}  
00305   if ( fLayoutNbSampForCalcFieldText  != 0 ) {delete fLayoutNbSampForCalcFieldText;  fCdelete++;}
00306   if ( fLayoutNbSampForCalcFieldFrame != 0 ) {delete fLayoutNbSampForCalcFieldFrame; fCdelete++;}
00307   //................................ Menus for CALCULATIONS
00308   if ( fMenuComput          != 0 ) {delete fMenuComput;          fCdelete++;}
00309   if ( fMenuBarComput       != 0 ) {fMenuBarComput->Delete();    fCdelete++;}
00310 
00311   //+++++++++++++++++++++++++++++++++++++++++++ Frame for quantities relative to the Stex 
00312   if ( fStexUpFrame          != 0 ) {delete fStexUpFrame;          fCdelete++;}
00313 
00314   //................................ Menus+Ymin+Ymax for the Stex ............................
00315 
00316   //...................................... Nb of evts in the data
00317 
00318   if ( fVmmD_NOE_ChNbFrame            != 0 ) {delete fVmmD_NOE_ChNbFrame;            fCdelete++;}
00319 
00320   if ( fVmaxD_NOE_ChNbFrame           != 0 ) {delete fVmaxD_NOE_ChNbFrame;           fCdelete++;}
00321   if ( fVmaxD_NOE_ChNbBut             != 0 ) {delete fVmaxD_NOE_ChNbBut;             fCdelete++;}
00322   if ( fLayoutVmaxD_NOE_ChNbBut       != 0 ) {delete fLayoutVmaxD_NOE_ChNbBut;       fCdelete++;}
00323   if ( fEntryVmaxD_NOE_ChNbNumber     != 0 ) {delete fEntryVmaxD_NOE_ChNbNumber;     fCdelete++;}
00324   if ( fVmaxD_NOE_ChNbText            != 0 ) {fVmaxD_NOE_ChNbText->Delete();         fCdelete++;}
00325   if ( fLayoutVmaxD_NOE_ChNbFieldText != 0 ) {delete fLayoutVmaxD_NOE_ChNbFieldText; fCdelete++;}
00326   if ( fLayoutVmaxD_NOE_ChNbFrame     != 0 ) {delete fLayoutVmaxD_NOE_ChNbFrame;     fCdelete++;}
00327 
00328   if ( fVminD_NOE_ChNbFrame           != 0 ) {delete fVminD_NOE_ChNbFrame;           fCdelete++;}
00329   if ( fVminD_NOE_ChNbBut             != 0 ) {delete fVminD_NOE_ChNbBut;             fCdelete++;}
00330   if ( fLayoutVminD_NOE_ChNbBut       != 0 ) {delete fLayoutVminD_NOE_ChNbBut;       fCdelete++;}
00331   if ( fEntryVminD_NOE_ChNbNumber     != 0 ) {delete fEntryVminD_NOE_ChNbNumber;     fCdelete++;}
00332   if ( fVminD_NOE_ChNbText            != 0 ) {fVminD_NOE_ChNbText->Delete();         fCdelete++;}
00333   if ( fLayoutVminD_NOE_ChNbFieldText != 0 ) {delete fLayoutVminD_NOE_ChNbFieldText; fCdelete++;}
00334   if ( fLayoutVminD_NOE_ChNbFrame     != 0 ) {delete fLayoutVminD_NOE_ChNbFrame;     fCdelete++;}
00335 
00336   if ( fMenuD_NOE_ChNb                != 0 ) {delete fMenuD_NOE_ChNb;                fCdelete++;}
00337   if ( fMenuBarD_NOE_ChNb             != 0 ) {fMenuBarD_NOE_ChNb->Delete();          fCdelete++;}
00338   if ( fVminD_NOE_ChNbText            != 0 ) {fVminD_NOE_ChNbText->Delete();         fCdelete++;}
00339 
00340   if ( fLayoutVmmD_NOE_ChNbFrame      != 0 ) {delete fLayoutVmmD_NOE_ChNbFrame;      fCdelete++;}
00341 
00342   //---------------------------------------------------
00343   if ( fVmmD_Ped_ChNbFrame            != 0 ) {delete fVmmD_Ped_ChNbFrame;            fCdelete++;}
00344 
00345   if ( fVmaxD_Ped_ChNbFrame           != 0 ) {delete fVmaxD_Ped_ChNbFrame;           fCdelete++;}
00346   if ( fVmaxD_Ped_ChNbBut             != 0 ) {delete fVmaxD_Ped_ChNbBut;             fCdelete++;}
00347   if ( fLayoutVmaxD_Ped_ChNbBut       != 0 ) {delete fLayoutVmaxD_Ped_ChNbBut;       fCdelete++;}
00348   if ( fVmaxD_Ped_ChNbText            != 0 ) {fVmaxD_Ped_ChNbText->Delete();         fCdelete++;}
00349   if ( fEntryVmaxD_Ped_ChNbNumber     != 0 ) {delete fEntryVmaxD_Ped_ChNbNumber;     fCdelete++;}
00350   if ( fLayoutVmaxD_Ped_ChNbFieldText != 0 ) {delete fLayoutVmaxD_Ped_ChNbFieldText; fCdelete++;}
00351   if ( fLayoutVmaxD_Ped_ChNbFrame     != 0 ) {delete fLayoutVmaxD_Ped_ChNbFrame;     fCdelete++;}
00352 
00353   if ( fVminD_Ped_ChNbFrame           != 0 ) {delete fVminD_Ped_ChNbFrame;           fCdelete++;}
00354   if ( fVminD_Ped_ChNbBut             != 0 ) {delete fVminD_Ped_ChNbBut;             fCdelete++;}
00355   if ( fLayoutVminD_Ped_ChNbBut       != 0 ) {delete fLayoutVminD_Ped_ChNbBut;       fCdelete++;}
00356   if ( fVminD_Ped_ChNbText            != 0 ) {fVminD_Ped_ChNbText->Delete();         fCdelete++;}
00357   if ( fEntryVminD_Ped_ChNbNumber     != 0 ) {delete fEntryVminD_Ped_ChNbNumber;     fCdelete++;}
00358   if ( fLayoutVminD_Ped_ChNbFieldText != 0 ) {delete fLayoutVminD_Ped_ChNbFieldText; fCdelete++;}
00359   if ( fLayoutVminD_Ped_ChNbFrame     != 0 ) {delete fLayoutVminD_Ped_ChNbFrame;     fCdelete++;}
00360 
00361   if ( fMenuD_Ped_ChNb                != 0 ) {delete fMenuD_Ped_ChNb;                fCdelete++;}
00362   if ( fMenuBarD_Ped_ChNb             != 0 ) {fMenuBarD_Ped_ChNb->Delete();          fCdelete++;}
00363   if ( fLayoutMenuBarD_Ped_ChNb       != 0 ) {delete fLayoutMenuBarD_Ped_ChNb;       fCdelete++;}
00364 
00365   if ( fLayoutVmmD_Ped_ChNbFrame      != 0 ) {delete fLayoutVmmD_Ped_ChNbFrame;      fCdelete++;}
00366 
00367   //----------------------------------------------------
00368   if ( fVmmD_TNo_ChNbFrame            != 0 ) {delete fVmmD_TNo_ChNbFrame;            fCdelete++;}
00369 
00370   if ( fVmaxD_TNo_ChNbFrame           != 0 ) {delete fVmaxD_TNo_ChNbFrame;           fCdelete++;}
00371   if ( fVmaxD_TNo_ChNbBut             != 0 ) {delete fVmaxD_TNo_ChNbBut;             fCdelete++;}
00372   if ( fLayoutVmaxD_TNo_ChNbBut       != 0 ) {delete fLayoutVmaxD_TNo_ChNbBut;       fCdelete++;}
00373   if ( fVmaxD_TNo_ChNbText            != 0 ) {fVmaxD_TNo_ChNbText->Delete();         fCdelete++;}
00374   if ( fEntryVmaxD_TNo_ChNbNumber     != 0 ) {delete fEntryVmaxD_TNo_ChNbNumber;     fCdelete++;}
00375   if ( fLayoutVmaxD_TNo_ChNbFieldText != 0 ) {delete fLayoutVmaxD_TNo_ChNbFieldText; fCdelete++;}
00376   if ( fLayoutVmaxD_TNo_ChNbFrame     != 0 ) {delete fLayoutVmaxD_TNo_ChNbFrame;     fCdelete++;}
00377  
00378   if ( fVminD_TNo_ChNbFrame           != 0 ) {delete fVminD_TNo_ChNbFrame;           fCdelete++;}
00379   if ( fVminD_TNo_ChNbBut             != 0 ) {delete fVminD_TNo_ChNbBut;             fCdelete++;}
00380   if ( fLayoutVminD_TNo_ChNbBut       != 0 ) {delete fLayoutVminD_TNo_ChNbBut;       fCdelete++;}
00381   if ( fVminD_TNo_ChNbText            != 0 ) {fVminD_TNo_ChNbText->Delete();         fCdelete++;}
00382   if ( fEntryVminD_TNo_ChNbNumber     != 0 ) {delete fEntryVminD_TNo_ChNbNumber;     fCdelete++;}
00383   if ( fLayoutVminD_TNo_ChNbFieldText != 0 ) {delete fLayoutVminD_TNo_ChNbFieldText; fCdelete++;}
00384   if ( fLayoutVminD_TNo_ChNbFrame     != 0 ) {delete fLayoutVminD_TNo_ChNbFrame;     fCdelete++;}
00385  
00386   if ( fMenuD_TNo_ChNb                != 0 ) {delete fMenuD_TNo_ChNb;                fCdelete++;}
00387   if ( fMenuBarD_TNo_ChNb             != 0 ) {fMenuBarD_TNo_ChNb->Delete();          fCdelete++;}
00388   if ( fLayoutMenuBarD_TNo_ChNb       != 0 ) {delete fLayoutMenuBarD_TNo_ChNb;       fCdelete++;}
00389 
00390   if ( fLayoutVmmD_TNo_ChNbFrame      != 0 ) {delete fLayoutVmmD_TNo_ChNbFrame;      fCdelete++;}
00391 
00392   //-----------------------------------------------------------
00393   if ( fVmmD_MCs_ChNbFrame            != 0 ) {delete fVmmD_MCs_ChNbFrame;            fCdelete++;}
00394 
00395   if ( fVmaxD_MCs_ChNbFrame           != 0 ) {delete fVmaxD_MCs_ChNbFrame;           fCdelete++;}
00396   if ( fVmaxD_MCs_ChNbBut             != 0 ) {delete fVmaxD_MCs_ChNbBut;             fCdelete++;}
00397   if ( fLayoutVmaxD_MCs_ChNbBut       != 0 ) {delete fLayoutVmaxD_MCs_ChNbBut;       fCdelete++;}
00398   if ( fVmaxD_MCs_ChNbText            != 0 ) {fVmaxD_MCs_ChNbText->Delete();         fCdelete++;}
00399   if ( fEntryVmaxD_MCs_ChNbNumber     != 0 ) {delete fEntryVmaxD_MCs_ChNbNumber;     fCdelete++;}
00400   if ( fLayoutVmaxD_MCs_ChNbFieldText != 0 ) {delete fLayoutVmaxD_MCs_ChNbFieldText; fCdelete++;}
00401   if ( fLayoutVmaxD_MCs_ChNbFrame     != 0 ) {delete fLayoutVmaxD_MCs_ChNbFrame;     fCdelete++;}
00402 
00403   if ( fVminD_MCs_ChNbFrame           != 0 ) {delete fVminD_MCs_ChNbFrame;           fCdelete++;}
00404   if ( fVminD_MCs_ChNbBut             != 0 ) {delete fVminD_MCs_ChNbBut;             fCdelete++;}
00405   if ( fLayoutVminD_MCs_ChNbBut       != 0 ) {delete fLayoutVminD_MCs_ChNbBut;       fCdelete++;}
00406   if ( fVminD_MCs_ChNbText            != 0 ) {fVminD_MCs_ChNbText->Delete();         fCdelete++;}
00407   if ( fEntryVminD_MCs_ChNbNumber     != 0 ) {delete fEntryVminD_MCs_ChNbNumber;     fCdelete++;}
00408   if ( fLayoutVminD_MCs_ChNbFieldText != 0 ) {delete fLayoutVminD_MCs_ChNbFieldText; fCdelete++;}
00409   if ( fLayoutVminD_MCs_ChNbFrame     != 0 ) {delete fLayoutVminD_MCs_ChNbFrame;     fCdelete++;}
00410 
00411   if ( fMenuD_MCs_ChNb                != 0 ) {delete fMenuD_MCs_ChNb;                fCdelete++;}
00412   if ( fMenuBarD_MCs_ChNb             != 0 ) {fMenuBarD_MCs_ChNb->Delete();          fCdelete++;}
00413   if ( fLayoutMenuBarD_MCs_ChNb       != 0 ) {delete fLayoutMenuBarD_MCs_ChNb;       fCdelete++;}
00414 
00415   if ( fLayoutVmmD_MCs_ChNbFrame      != 0 ) {delete fLayoutVmmD_MCs_ChNbFrame;      fCdelete++;}
00416   
00417   //............................................... Frame Sig + Menus Sig
00418   if ( fStexHozFrame         != 0 ) {delete fStexHozFrame;         fCdelete++;}
00419 
00420   //------------------------------------------------------------- 
00421   if ( fVmmD_LFN_ChNbFrame            != 0 ) {delete fVmmD_LFN_ChNbFrame;            fCdelete++;}
00422 
00423   if ( fVmaxD_LFN_ChNbFrame           != 0 ) {delete fVmaxD_LFN_ChNbFrame;           fCdelete++;}
00424   if ( fVmaxD_LFN_ChNbBut             != 0 ) {delete fVmaxD_LFN_ChNbBut;             fCdelete++;}
00425   if ( fLayoutVmaxD_LFN_ChNbBut       != 0 ) {delete fLayoutVmaxD_LFN_ChNbBut;       fCdelete++;}
00426   if ( fVmaxD_LFN_ChNbText            != 0 ) {fVmaxD_LFN_ChNbText->Delete();         fCdelete++;}
00427   if ( fEntryVmaxD_LFN_ChNbNumber     != 0 ) {delete fEntryVmaxD_LFN_ChNbNumber;     fCdelete++;}
00428   if ( fLayoutVmaxD_LFN_ChNbFieldText != 0 ) {delete fLayoutVmaxD_LFN_ChNbFieldText; fCdelete++;}
00429   if ( fLayoutVmaxD_LFN_ChNbFrame     != 0 ) {delete fLayoutVmaxD_LFN_ChNbFrame;     fCdelete++;}
00430 
00431   if ( fVminD_LFN_ChNbFrame           != 0 ) {delete fVminD_LFN_ChNbFrame;           fCdelete++;}
00432   if ( fVminD_LFN_ChNbBut             != 0 ) {delete fVminD_LFN_ChNbBut;             fCdelete++;}
00433   if ( fLayoutVminD_LFN_ChNbBut       != 0 ) {delete fLayoutVminD_LFN_ChNbBut;       fCdelete++;}
00434   if ( fVminD_LFN_ChNbText            != 0 ) {fVminD_LFN_ChNbText->Delete();         fCdelete++;}
00435   if ( fEntryVminD_LFN_ChNbNumber     != 0 ) {delete fEntryVminD_LFN_ChNbNumber;     fCdelete++;}
00436   if ( fLayoutVminD_LFN_ChNbFieldText != 0 ) {delete fLayoutVminD_LFN_ChNbFieldText; fCdelete++;}
00437   if ( fLayoutVminD_LFN_ChNbFrame     != 0 ) {delete fLayoutVminD_LFN_ChNbFrame;     fCdelete++;}
00438 
00439   if ( fMenuD_LFN_ChNb                != 0 ) {delete fMenuD_LFN_ChNb;                fCdelete++;}
00440   if ( fMenuBarD_LFN_ChNb             != 0 ) {fMenuBarD_LFN_ChNb->Delete();          fCdelete++;}
00441   if ( fLayoutMenuBarD_LFN_ChNb       != 0 ) {delete fLayoutMenuBarD_LFN_ChNb;       fCdelete++;}
00442 
00443   if ( fLayoutVmmD_LFN_ChNbFrame      != 0 ) {delete fLayoutVmmD_LFN_ChNbFrame;      fCdelete++;}
00444 
00445   //-------------------------------------------------------------
00446   if ( fVmmD_HFN_ChNbFrame            != 0 ) {delete fVmmD_HFN_ChNbFrame;            fCdelete++;}
00447 
00448   if ( fVmaxD_HFN_ChNbFrame           != 0 ) {delete fVmaxD_HFN_ChNbFrame;           fCdelete++;}
00449   if ( fVmaxD_HFN_ChNbBut             != 0 ) {delete fVmaxD_HFN_ChNbBut;             fCdelete++;}
00450   if ( fLayoutVmaxD_HFN_ChNbBut       != 0 ) {delete fLayoutVmaxD_HFN_ChNbBut;       fCdelete++;}
00451   if ( fVmaxD_HFN_ChNbText            != 0 ) {fVmaxD_HFN_ChNbText->Delete();         fCdelete++;}
00452   if ( fEntryVmaxD_HFN_ChNbNumber     != 0 ) {delete fEntryVmaxD_HFN_ChNbNumber;     fCdelete++;}
00453   if ( fLayoutVmaxD_HFN_ChNbFieldText != 0 ) {delete fLayoutVmaxD_HFN_ChNbFieldText; fCdelete++;}
00454   if ( fLayoutVmaxD_HFN_ChNbFrame     != 0 ) {delete fLayoutVmaxD_HFN_ChNbFrame;     fCdelete++;}
00455 
00456   if ( fVminD_HFN_ChNbFrame           != 0 ) {delete fVminD_HFN_ChNbFrame;           fCdelete++;}
00457   if ( fVminD_HFN_ChNbBut             != 0 ) {delete fVminD_HFN_ChNbBut;             fCdelete++;}
00458   if ( fLayoutVminD_HFN_ChNbBut       != 0 ) {delete fLayoutVminD_HFN_ChNbBut;       fCdelete++;}
00459   if ( fVminD_HFN_ChNbText            != 0 ) {fVminD_HFN_ChNbText->Delete();         fCdelete++;}
00460   if ( fEntryVminD_HFN_ChNbNumber     != 0 ) {delete fEntryVminD_HFN_ChNbNumber;     fCdelete++;}
00461   if ( fLayoutVminD_HFN_ChNbFieldText != 0 ) {delete fLayoutVminD_HFN_ChNbFieldText; fCdelete++;}
00462   if ( fLayoutVminD_HFN_ChNbFrame     != 0 ) {delete fLayoutVminD_HFN_ChNbFrame;     fCdelete++;}
00463 
00464   if ( fMenuD_HFN_ChNb                != 0 ) {delete fMenuD_HFN_ChNb;                fCdelete++;}
00465   if ( fMenuBarD_HFN_ChNb             != 0 ) {fMenuBarD_HFN_ChNb->Delete();          fCdelete++;}
00466   if ( fLayoutMenuBarD_HFN_ChNb       != 0 ) {delete fLayoutMenuBarD_HFN_ChNb;       fCdelete++;}
00467 
00468   if ( fLayoutVmmD_HFN_ChNbFrame      != 0 ) {delete fLayoutVmmD_HFN_ChNbFrame;      fCdelete++;}
00469 
00470   //-------------------------------------------------------------
00471   if ( fVmmD_SCs_ChNbFrame            != 0 ) {delete fVmmD_SCs_ChNbFrame;            fCdelete++;}
00472 
00473   if ( fVmaxD_SCs_ChNbFrame           != 0 ) {delete fVmaxD_SCs_ChNbFrame;           fCdelete++;}
00474   if ( fVmaxD_SCs_ChNbBut             != 0 ) {delete fVmaxD_SCs_ChNbBut;             fCdelete++;}
00475   if ( fLayoutVmaxD_SCs_ChNbBut       != 0 ) {delete fLayoutVmaxD_SCs_ChNbBut;       fCdelete++;}
00476   if ( fVmaxD_SCs_ChNbText            != 0 ) {fVmaxD_SCs_ChNbText->Delete();         fCdelete++;}
00477   if ( fEntryVmaxD_SCs_ChNbNumber     != 0 ) {delete fEntryVmaxD_SCs_ChNbNumber;     fCdelete++;}
00478   if ( fLayoutVmaxD_SCs_ChNbFieldText != 0 ) {delete fLayoutVmaxD_SCs_ChNbFieldText; fCdelete++;}
00479   if ( fLayoutVmaxD_SCs_ChNbFrame     != 0 ) {delete fLayoutVmaxD_SCs_ChNbFrame;     fCdelete++;}
00480 
00481   if ( fVminD_SCs_ChNbFrame           != 0 ) {delete fVminD_SCs_ChNbFrame;           fCdelete++;}
00482   if ( fVminD_SCs_ChNbBut             != 0 ) {delete fVminD_SCs_ChNbBut;             fCdelete++;}
00483   if ( fLayoutVminD_SCs_ChNbBut       != 0 ) {delete fLayoutVminD_SCs_ChNbBut;       fCdelete++;}
00484   if ( fVminD_SCs_ChNbText            != 0 ) {fVminD_SCs_ChNbText->Delete();         fCdelete++;}
00485   if ( fEntryVminD_SCs_ChNbNumber     != 0 ) {delete fEntryVminD_SCs_ChNbNumber;     fCdelete++;}
00486   if ( fLayoutVminD_SCs_ChNbFieldText != 0 ) {delete fLayoutVminD_SCs_ChNbFieldText; fCdelete++;}
00487   if ( fLayoutVminD_SCs_ChNbFrame     != 0 ) {delete fLayoutVminD_SCs_ChNbFrame;     fCdelete++;}
00488 
00489   if ( fMenuD_SCs_ChNb                != 0 ) {delete fMenuD_SCs_ChNb;                fCdelete++;}
00490   if ( fMenuBarD_SCs_ChNb             != 0 ) {fMenuBarD_SCs_ChNb->Delete();          fCdelete++;}
00491   if ( fLayoutMenuBarD_SCs_ChNb       != 0 ) {delete fLayoutMenuBarD_SCs_ChNb;       fCdelete++;}
00492 
00493   if ( fLayoutVmmD_SCs_ChNbFrame      != 0 ) {delete fLayoutVmmD_SCs_ChNbFrame;      fCdelete++;}
00494   //-------------------------------------------------------------
00495   if ( fLayoutStexHozFrame          != 0 ) {delete fLayoutStexHozFrame;          fCdelete++;}
00496 
00497   //----------------------------------------------------------------------------------------------
00498 
00499   //...................................... Covariances between Stins
00500   if ( fVmmLHFccFrame            != 0 ) {delete fVmmLHFccFrame;            fCdelete++;}
00501 
00502   if ( fVmaxLHFccFrame           != 0 ) {delete fVmaxLHFccFrame;           fCdelete++;}
00503   if ( fVmaxLHFccBut             != 0 ) {delete fVmaxLHFccBut;             fCdelete++;}
00504   if ( fLayoutVmaxLHFccBut       != 0 ) {delete fLayoutVmaxLHFccBut;       fCdelete++;}
00505   if ( fVmaxLHFccText            != 0 ) {fVmaxLHFccText->Delete();         fCdelete++;}
00506   if ( fEntryVmaxLHFccNumber     != 0 ) {delete fEntryVmaxLHFccNumber;     fCdelete++;}
00507   if ( fLayoutVmaxLHFccFieldText != 0 ) {delete fLayoutVmaxLHFccFieldText; fCdelete++;}
00508   if ( fLayoutVmaxLHFccFrame     != 0 ) {delete fLayoutVmaxLHFccFrame;     fCdelete++;}
00509 
00510   if ( fVminLHFccFrame           != 0 ) {delete fVminLHFccFrame;           fCdelete++;}
00511   if ( fVminLHFccBut             != 0 ) {delete fVminLHFccBut;             fCdelete++;}
00512   if ( fLayoutVminLHFccBut       != 0 ) {delete fLayoutVminLHFccBut;       fCdelete++;}
00513   if ( fVminLHFccText            != 0 ) {fVminLHFccText->Delete();         fCdelete++;}
00514   if ( fEntryVminLHFccNumber     != 0 ) {delete fEntryVminLHFccNumber;     fCdelete++;}
00515   if ( fLayoutVminLHFccFieldText != 0 ) {delete fLayoutVminLHFccFieldText; fCdelete++;}
00516   if ( fLayoutVminLHFccFrame     != 0 ) {delete fLayoutVminLHFccFrame;     fCdelete++;}
00517 
00518   if ( fMenuLHFcc             != 0 ) {delete fMenuLHFcc;             fCdelete++;}
00519   if ( fMenuBarLHFcc          != 0 ) {fMenuBarLHFcc->Delete();       fCdelete++;}
00520   if ( fLayoutMenuBarLHFcc    != 0 ) {delete fLayoutMenuBarLHFcc;    fCdelete++;}
00521 
00522   if ( fLayoutVmmLHFccFrame      != 0 ) {delete fLayoutVmmLHFccFrame;      fCdelete++;}
00523 
00524   //...................................... Low Freq Cor(c,c') for each pair of Stins  
00525   if ( fVmmLFccMosFrame            != 0 ) {delete fVmmLFccMosFrame;            fCdelete++;}
00526 
00527   if ( fVmaxLFccMosFrame           != 0 ) {delete fVmaxLFccMosFrame;           fCdelete++;}
00528   if ( fVmaxLFccMosBut             != 0 ) {delete fVmaxLFccMosBut;             fCdelete++;}
00529   if ( fLayoutVmaxLFccMosBut       != 0 ) {delete fLayoutVmaxLFccMosBut;       fCdelete++;}
00530   if ( fVmaxLFccMosText            != 0 ) {fVmaxLFccMosText->Delete();         fCdelete++;}
00531   if ( fEntryVmaxLFccMosNumber     != 0 ) {delete fEntryVmaxLFccMosNumber;     fCdelete++;}
00532   if ( fLayoutVmaxLFccMosFieldText != 0 ) {delete fLayoutVmaxLFccMosFieldText; fCdelete++;}
00533   if ( fLayoutVmaxLFccMosFrame     != 0 ) {delete fLayoutVmaxLFccMosFrame;     fCdelete++;}
00534 
00535   if ( fVminLFccMosFrame           != 0 ) {delete fVminLFccMosFrame;           fCdelete++;}
00536   if ( fVminLFccMosBut             != 0 ) {delete fVminLFccMosBut;             fCdelete++;}
00537   if ( fLayoutVminLFccMosBut       != 0 ) {delete fLayoutVminLFccMosBut;       fCdelete++;}
00538   if ( fVminLFccMosText            != 0 ) {fVminLFccMosText->Delete();         fCdelete++;}
00539   if ( fEntryVminLFccMosNumber     != 0 ) {delete fEntryVminLFccMosNumber;     fCdelete++;}
00540   if ( fLayoutVminLFccMosFieldText != 0 ) {delete fLayoutVminLFccMosFieldText; fCdelete++;}
00541   if ( fLayoutVminLFccMosFrame     != 0 ) {delete fLayoutVminLFccMosFrame;     fCdelete++;}
00542 
00543   if ( fMenuLFccMos                  != 0 ) {delete fMenuLFccMos;                  fCdelete++;}
00544   if ( fMenuBarLFccMos               != 0 ) {fMenuBarLFccMos->Delete();            fCdelete++;}
00545   if ( fLayoutMenuBarLFccMos         != 0 ) {delete fLayoutMenuBarLFccMos;         fCdelete++;}
00546 
00547   if ( fLayoutVmmLFccMosFrame      != 0 ) {delete fLayoutVmmLFccMosFrame;      fCdelete++;}
00548 
00549   //...................................... High Freq Cor(c,c') for each pair of Stins  
00550   if ( fVmmHFccMosFrame            != 0 ) {delete fVmmHFccMosFrame;            fCdelete++;}
00551 
00552   if ( fVmaxHFccMosFrame           != 0 ) {delete fVmaxHFccMosFrame;           fCdelete++;}
00553   if ( fVmaxHFccMosBut             != 0 ) {delete fVmaxHFccMosBut;             fCdelete++;}
00554   if ( fLayoutVmaxHFccMosBut       != 0 ) {delete fLayoutVmaxHFccMosBut;       fCdelete++;}
00555   if ( fVmaxHFccMosText            != 0 ) {fVmaxHFccMosText->Delete();         fCdelete++;}
00556   if ( fEntryVmaxHFccMosNumber     != 0 ) {delete fEntryVmaxHFccMosNumber;     fCdelete++;}
00557   if ( fLayoutVmaxHFccMosFieldText != 0 ) {delete fLayoutVmaxHFccMosFieldText; fCdelete++;}
00558   if ( fLayoutVmaxHFccMosFrame     != 0 ) {delete fLayoutVmaxHFccMosFrame;     fCdelete++;}
00559 
00560   if ( fVminHFccMosFrame           != 0 ) {delete fVminHFccMosFrame;           fCdelete++;}
00561   if ( fVminHFccMosBut             != 0 ) {delete fVminHFccMosBut;             fCdelete++;}
00562   if ( fLayoutVminHFccMosBut       != 0 ) {delete fLayoutVminHFccMosBut;       fCdelete++;}
00563   if ( fVminHFccMosText            != 0 ) {fVminHFccMosText->Delete();         fCdelete++;}
00564   if ( fEntryVminHFccMosNumber     != 0 ) {delete fEntryVminHFccMosNumber;     fCdelete++;}
00565   if ( fLayoutVminHFccMosFieldText != 0 ) {delete fLayoutVminHFccMosFieldText; fCdelete++;}
00566   if ( fLayoutVminHFccMosFrame     != 0 ) {delete fLayoutVminHFccMosFrame;     fCdelete++;}
00567 
00568   if ( fMenuHFccMos                != 0 ) {delete fMenuHFccMos;                fCdelete++;}
00569   if ( fMenuBarHFccMos             != 0 ) {fMenuBarHFccMos->Delete();          fCdelete++;}
00570   if ( fLayoutMenuBarHFccMos       != 0 ) {delete fLayoutMenuBarHFccMos;       fCdelete++;}
00571 
00572   if ( fLayoutVmmHFccMosFrame      != 0 ) {delete fLayoutVmmHFccMosFrame;      fCdelete++;}
00573 
00574   if ( fLayoutStexUpFrame          != 0 ) {delete fLayoutStexUpFrame;          fCdelete++;}
00575 
00576   //+++++++++++++++++++++++++++++++++++++++++ Horizontal frame Stin_A + Stin_B
00577   if ( fStinSpFrame       != 0 ) {delete fStinSpFrame;         fCdelete++;}
00578   
00579   //----------------------------------- SubFrame Stin_A (Button + EntryField)
00580   if ( fTxSubFrame        != 0 ) {delete fTxSubFrame;          fCdelete++;}
00581 
00582   if ( fStinAFrame        != 0 ) {delete fStinAFrame;          fCdelete++;}
00583   if ( fStinABut          != 0 ) {delete fStinABut;            fCdelete++;}
00584   if ( fLayoutStinABut    != 0 ) {delete fLayoutStinABut;      fCdelete++;} 
00585   if ( fEntryStinANumber  != 0 ) {delete fEntryStinANumber;    fCdelete++;}
00586   if ( fStinAText         != 0 ) {fStinAText->Delete();        fCdelete++;} 
00587   if ( fLayoutStinAField  != 0 ) {delete fLayoutStinAField;    fCdelete++;} 
00588 
00589   //............................ Stin Crystal Numbering view (Button)
00590   if ( fButChNb          != 0 ) {delete fButChNb;            fCdelete++;}
00591   if ( fLayoutChNbBut    != 0 ) {delete fLayoutChNbBut;      fCdelete++;} 
00592 
00593   //............................ Menus Stin_A
00594   if ( fMenuCorssAll     != 0 ) {delete fMenuCorssAll;       fCdelete++;}
00595   if ( fMenuBarCorssAll  != 0 ) {fMenuBarCorssAll->Delete(); fCdelete++;}
00596 
00597   if ( fMenuCovssAll     != 0 ) {delete fMenuCovssAll;       fCdelete++;}
00598   if ( fMenuBarCovssAll  != 0 ) {fMenuBarCovssAll->Delete(); fCdelete++;}
00599 
00600   if ( fLayoutTxSubFrame != 0 ) {delete fLayoutTxSubFrame;   fCdelete++;}
00601 
00602   //----------------------------------- SubFrame Stin_B (Button + EntryField)
00603 
00604   if ( fTySubFrame        != 0 ) {delete fTySubFrame;        fCdelete++;}
00605 
00606   if ( fStinBFrame        != 0 ) {delete fStinBFrame;        fCdelete++;}
00607   if ( fStinBBut          != 0 ) {delete fStinBBut;          fCdelete++;}
00608   if ( fLayoutStinBBut    != 0 ) {delete fLayoutStinBBut;    fCdelete++;}
00609   if ( fEntryStinBNumber  != 0 ) {delete fEntryStinBNumber;  fCdelete++;}
00610   if ( fStinBText         != 0 ) {fStinBText->Delete();      fCdelete++;}
00611   if ( fLayoutStinBField  != 0 ) {delete fLayoutStinBField;  fCdelete++;}
00612 
00613   if ( fLayoutTySubFrame  != 0 ) {delete fLayoutTySubFrame;  fCdelete++;}
00614 
00615   if ( fLayoutStinSpFrame != 0 ) {delete fLayoutStinSpFrame; fCdelete++;}
00616 
00617   //.................................. Menus for Horizontal frame (Stin_A + Stin_B)
00618 
00619   if ( fMenuLFCorcc     != 0 ) {delete fMenuLFCorcc;        fCdelete++;}
00620   if ( fMenuBarLFCorcc  != 0 ) {fMenuBarLFCorcc->Delete();  fCdelete++;}
00621 
00622   if ( fMenuHFCorcc     != 0 ) {delete fMenuHFCorcc;        fCdelete++;}
00623   if ( fMenuBarHFCorcc  != 0 ) {fMenuBarHFCorcc->Delete();  fCdelete++;}
00624 
00625   //++++++++++++++++++++++++ Horizontal frame channel number (Stin_A crystal number) + sample number
00626   if ( fChSpFrame        != 0 ) {delete fChSpFrame;         fCdelete++;}
00627 
00628   //------------------------------------- SubFrame Channel (Button + EntryField)
00629 
00630   if ( fChSubFrame       != 0 ) {delete fChSubFrame;        fCdelete++;}
00631 
00632   if ( fChanFrame        != 0 ) {delete fChanFrame;         fCdelete++;}
00633   if ( fChanBut          != 0 ) {delete fChanBut;           fCdelete++;}
00634   if ( fLayoutChanBut    != 0 ) {delete fLayoutChanBut;     fCdelete++;}
00635   if ( fEntryChanNumber  != 0 ) {delete fEntryChanNumber;   fCdelete++;}
00636   if ( fChanText         != 0 ) {fChanText->Delete();       fCdelete++;}
00637   if ( fLayoutChanField  != 0 ) {delete fLayoutChanField;   fCdelete++;}
00638 
00639   //................................ Menus Stin_A crystal number
00640   if ( fMenuCorss        != 0 ) {delete fMenuCorss;         fCdelete++;}
00641   if ( fMenuBarCorss     != 0 ) {fMenuBarCorss->Delete();   fCdelete++;}
00642 
00643   if ( fMenuCovss        != 0 ) {delete fMenuCovss;         fCdelete++;}
00644   if ( fMenuBarCovss     != 0 ) {fMenuBarCovss->Delete();   fCdelete++;}
00645 
00646   if ( fMenuD_MSp_Samp    != 0 ) {delete fMenuD_MSp_Samp;       fCdelete++;}
00647   if ( fMenuBarD_MSp_Samp != 0 ) {fMenuBarD_MSp_Samp->Delete(); fCdelete++;}
00648 
00649   if ( fMenuD_SSp_Samp    != 0 ) {delete fMenuD_SSp_Samp;       fCdelete++;}
00650   if ( fMenuBarD_SSp_Samp != 0 ) {fMenuBarD_SSp_Samp->Delete(); fCdelete++;}
00651 
00652   if ( fLayoutChSubFrame != 0 ) {delete fLayoutChSubFrame;  fCdelete++;}
00653 
00654   //------------------------------------ SubFrame Sample (Button + EntryField)
00655   if ( fSpSubFrame       != 0 ) {delete fSpSubFrame;        fCdelete++;}
00656   if ( fSampFrame        != 0 ) {delete fSampFrame;         fCdelete++;}
00657   if ( fSampBut          != 0 ) {delete fSampBut;           fCdelete++;}
00658   if ( fLayoutSampBut    != 0 ) {delete fLayoutSampBut;     fCdelete++;}
00659   if ( fEntrySampNumber  != 0 ) {delete fEntrySampNumber;   fCdelete++;}
00660   if ( fSampText         != 0 ) {fSampText->Delete();       fCdelete++;}
00661   if ( fLayoutSampField  != 0 ) {delete fLayoutSampField;   fCdelete++;}
00662   if ( fLayoutSpSubFrame != 0 ) {delete fLayoutSpSubFrame;  fCdelete++;}
00663 
00664   //................................ Menus Sample number
00665 
00666   //     (no menu in this SubFrame)
00667 
00668   if ( fLayoutChSpFrame  != 0 ) {delete fLayoutChSpFrame;   fCdelete++;}
00669 
00670   //++++++++++++++++++++++++++++++++++++ Menu Event Distribution
00671   if ( fMenuAdcProj            != 0 ) {delete fMenuAdcProj;            fCdelete++;}
00672   if ( fMenuBarAdcProj         != 0 ) {fMenuBarAdcProj->Delete();      fCdelete++;}
00673   if ( fLayoutMenuBarAdcProj   != 0 ) {delete fLayoutMenuBarAdcProj;   fCdelete++;}
00674 
00675   //++++++++++++++++++++++++++++++++++++ Frame: Run List (Rul) (Button + EntryField)
00676   if ( fRulFrame            != 0 ) {delete fRulFrame;            fCdelete++;}
00677   if ( fRulBut              != 0 ) {delete fRulBut;              fCdelete++;}
00678   if ( fLayoutRulBut        != 0 ) {delete fLayoutRulBut;        fCdelete++;}
00679   if ( fEntryRulNumber      != 0 ) {delete fEntryRulNumber;      fCdelete++;}
00680   if ( fRulText             != 0 ) {fRulText->Delete();          fCdelete++;}
00681   if ( fLayoutRulFieldText  != 0 ) {delete fLayoutRulFieldText;  fCdelete++;}
00682   if ( fLayoutRulFieldFrame != 0 ) {delete fLayoutRulFieldFrame; fCdelete++;}
00683 
00684   //................................ Menus for time evolution
00685   if ( fMenuHistory         != 0 ) {delete fMenuHistory;         fCdelete++;}
00686   if ( fMenuBarHistory      != 0 ) {fMenuBarHistory->Delete();   fCdelete++;}
00687 
00688   //++++++++++++++++++++++++++++++++++++ LinLog Frame
00689   if ( fLinLogFrame   != 0 ) {delete fLinLogFrame;   fCdelete++;}
00690 
00691   //---------------------------------- Lin/Log X
00692   if ( fButLogx         != 0 ) {delete fButLogx;         fCdelete++;}
00693   if ( fLayoutLogxBut   != 0 ) {delete fLayoutLogxBut;   fCdelete++;}
00694   //---------------------------------- Lin/Log Y
00695   if ( fButLogy         != 0 ) {delete fButLogy;         fCdelete++;}
00696   if ( fLayoutLogyBut   != 0 ) {delete fLayoutLogyBut;   fCdelete++;} 
00697   //---------------------------------- Proj Y
00698   if ( fButProjy        != 0 ) {delete fButProjy;        fCdelete++;}
00699   if ( fLayoutProjyBut  != 0 ) {delete fLayoutProjyBut;  fCdelete++;} 
00700 
00701   //++++++++++++++++++++++++++++++++++++ Frame: General Title (Gent) (Button + EntryField)
00702   if ( fGentFrame            != 0 ) {delete fGentFrame;            fCdelete++;}
00703   if ( fGentBut              != 0 ) {delete fGentBut;              fCdelete++;}
00704   if ( fLayoutGentBut        != 0 ) {delete fLayoutGentBut;        fCdelete++;}
00705   if ( fEntryGentNumber      != 0 ) {delete fEntryGentNumber;      fCdelete++;}
00706   if ( fGentText             != 0 ) {fGentText->Delete();          fCdelete++;}
00707   if ( fLayoutGentFieldText  != 0 ) {delete fLayoutGentFieldText;  fCdelete++;}
00708   if ( fLayoutGentFieldFrame != 0 ) {delete fLayoutGentFieldFrame; fCdelete++;}
00709 
00710   //++++++++++++++++++++++++++++++++++++ Color + EXIT BUTTON
00711   if ( fColorExitFrame       != 0 ) {delete fColorExitFrame;       fCdelete++;}
00712   if ( fLayoutColorExitFrame != 0 ) {delete fLayoutColorExitFrame; fCdelete++;}
00713 
00714   //---------------------------------- Color Palette
00715   if ( fButColPal       != 0 ) {delete fButColPal;       fCdelete++;}
00716   if ( fLayoutColPalBut != 0 ) {delete fLayoutColPalBut; fCdelete++;}
00717   //---------------------------------- Exit
00718   if ( fButExit       != 0 ) {delete fButExit;       fCdelete++;}
00719   if ( fLayoutExitBut != 0 ) {delete fLayoutExitBut; fCdelete++;}
00720  
00721   //++++++++++++++++++++++++++++++++++++ Last Frame
00722   if ( fLastFrame     != 0 ) {delete fLastFrame;     fCdelete++;}
00723 
00724   //--------------------------------- Clone Last Canvas (Button)
00725   if ( fButClone       != 0 ) {delete fButClone;       fCdelete++;}
00726   if ( fLayoutCloneBut != 0 ) {delete fLayoutCloneBut; fCdelete++;}
00727 
00728   //--------------------------------- Root version (Button)
00729   if ( fButRoot       != 0 ) {delete fButRoot;       fCdelete++;}
00730   if ( fLayoutRootBut != 0 ) {delete fLayoutRootBut; fCdelete++;}
00731 
00732   //--------------------------------- Help (Button)
00733   if ( fButHelp       != 0 ) {delete fButHelp;       fCdelete++;}
00734   if ( fLayoutHelpBut != 0 ) {delete fLayoutHelpBut; fCdelete++;}
00735 
00736   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00737 
00738   if ( fCnew != fCdelete )
00739     {
00740       cout << "*TEcnaGui> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = "
00741            << fCnew << ", fCdelete = " << fCdelete << endl;
00742     }
00743   else
00744     {
00745       //cout << "*TEcnaGui> BRAVO! GOOD MANAGEMENT OF ALLOCATIONS: fCnew = "
00746       //   << fCnew << ", fCdelete = " << fCdelete << endl;
00747     }
00748 
00749 #endif // DEST
00750 
00751 #define MGRA
00752 #ifndef MGRA
00753   if ( fCnewRoot != fCdeleteRoot )
00754     {
00755       cout << "*TEcnaGui> WRONG MANAGEMENT OF ROOT ALLOCATIONS: fCnewRoot = "
00756            << fCnewRoot << ", fCdeleteRoot = " << fCdeleteRoot << endl;
00757     }
00758   else
00759     {
00760       cout << "*TEcnaGui> BRAVO! GOOD MANAGEMENT OF ROOT ALLOCATIONS:"
00761            << " fCnewRoot = " << fCnewRoot <<", fCdeleteRoot = "
00762            << fCdeleteRoot << endl;
00763     }
00764 #endif // MGRA
00765 
00766   // cout << "TEcnaGui> Leaving destructor" << endl;
00767   // cout << "            fCnew = " << fCnew << ", fCdelete = " << fCdelete << endl;
00768 
00769  // cout << "[Info Management] CLASS: TEcnaGui.           DESTROY OBJECT: this = " << this << endl;
00770 
00771 }
00772 //   end of destructor
00773 
00774 //===================================================================
00775 //
00776 //                   Constructor with arguments
00777 //
00778 //===================================================================
00779 TEcnaGui::TEcnaGui(const TGWindow *p, UInt_t w, UInt_t h, const TString SubDet):
00780   TGMainFrame(p, w, h) 
00781 {
00782 //Constructor with arguments. Gui box making
00783 
00784  // cout << "[Info Management] CLASS: TEcnaGui.           CREATE OBJECT: this = " << this << endl;
00785 
00786   // cout << "TEcnaGui> Entering constructor with arguments" << endl;
00787   // cout << "            fCnew = " << fCnew << ", fCdelete = " << fCdelete << endl;
00788 
00789 //========================= GENERAL INITIALISATION 
00790 
00791   fCnew        = 0;
00792   fCdelete     = 0;
00793   fCnewRoot    = 0;
00794   fCdeleteRoot = 0;
00795 
00796   fCnaP = (TGWindow *)p;
00797   fCnaW = w;
00798   fCnaH = h;
00799 
00800   fgMaxCar = (Int_t)512;
00801   fTTBELL = '\007';
00802 
00803   //........................ init View and Cna parameters
00804   Int_t MaxCar = fgMaxCar;
00805   fSubDet.Resize(MaxCar); 
00806   fSubDet = SubDet.Data();
00807 
00808   //............................................................................
00809 
00810   if( fSubDet == "EB" ){fStexName = "SM";  fStinName = "tower";}
00811   if( fSubDet == "EE" ){fStexName = "Dee"; fStinName = "SC";}
00812 
00813   fCnaParPaths   = 0; fCnaParPaths   = new TEcnaParPaths();                        //fCnew++;
00814   fEcal          = 0; fEcal          = new TEcnaParEcal(fSubDet.Data());           //fCnew++;
00815   fEcalNumbering = 0; fEcalNumbering = new TEcnaNumbering(fSubDet.Data(), fEcal);  //fCnew++;
00816   fCnaParHistos  = 0;
00817   fCnaParHistos  = new TEcnaParHistos(fSubDet.Data(), fEcal, fEcalNumbering );      //fCnew++;
00818   fCnaParCout = 0;
00819   fCnaWrite   = 0;
00820   fHistos     = 0;
00821   fHistos = new TEcnaHistos(fSubDet.Data(), fCnaParPaths, fCnaParCout,
00822                             fEcal, fCnaParHistos, fEcalNumbering, fCnaWrite);       fCnew++;
00823   fMyRootFile = 0;
00824 
00825   //................. Init Keys
00826   InitKeys();
00827 
00828   //................ Init CNA Command and error numbering
00829   fCnaCommand = 0;
00830   fCnaError   = 0;
00831   //................ Init Confirm flags
00832   fConfirmSubmit    = 0;
00833   fConfirmRunNumber = 0;
00834   fConfirmCalcScc   = 0;
00835 
00836   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Init GUI DIALOG BOX pointers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00837 
00838   fLayoutGeneral      = 0;
00839   fLayoutBottLeft     = 0;
00840   fLayoutBottRight    = 0;
00841   fLayoutTopLeft      = 0;
00842   fLayoutTopRight     = 0;  
00843   fLayoutCenterYLeft  = 0;
00844   fLayoutCenterYRight = 0; 
00845 
00846   fVoidFrame = 0;
00847 
00848   //+++++++++++++++++++++++++++++++++ Horizontal frame Analysis + 1st requested evt number + Run number
00849   fAnaNorsRunFrame       = 0;
00850   fLayoutAnaNorsRunFrame = 0;
00851   //--------------------------------- Sub-Frame Analysis Name (Button+Entry Field)
00852   fAnaFrame       = 0;
00853   fAnaBut         = 0;
00854   fLayoutAnaBut   = 0;
00855   fAnaText        = 0;
00856   fEntryAnaNumber = 0;
00857   fLayoutAnaField = 0;
00858   //--------------------------------- SubFrame: first requested evt number
00859   fFevFrame            = 0;
00860   fFevBut              = 0;
00861   fLayoutFevBut        = 0;
00862   fFevText             = 0;
00863   fEntryFevNumber      = 0;
00864   fLayoutFevFieldText  = 0;
00865   fLayoutFevFieldFrame = 0;
00866   //-------------------------------- Sub-Frame Run number (Button+Entry Field)  
00867   fRunFrame       = 0;  
00868   fRunBut         = 0;
00869   fLayoutRunBut   = 0;
00870   fRunText        = 0;
00871   fEntryRunNumber = 0;
00872   fLayoutRunField = 0;
00873 
00874  //+++++++++++++++++++++++++ Horizontal frame Nb Of Samples + Last requested evt number + Clean + submit
00875   fFevLevStexFrame       = 0;
00876   fLayoutFevLevStexFrame = 0;
00877   //-------------------------------- Sub-Frame: Nb Of Requesred Samples (Button+Entry Field)  
00878   fNorsFrame       = 0;
00879   fNorsBut         = 0;
00880   fLayoutNorsBut   = 0;
00881   fNorsText        = 0;
00882   fEntryNorsNumber = 0;
00883   fLayoutNorsField = 0;
00884   //---------------------------- SubFrame: last requested event number
00885   fLevFrame            = 0;
00886   fLevBut              = 0;
00887   fLayoutLevBut        = 0;
00888   fLevText             = 0;
00889   fEntryLevNumber      = 0;
00890   fLayoutLevFieldText  = 0;
00891   fLayoutLevFieldFrame = 0;
00892   //................................ Menu for Clean
00893   fMenuClean    = 0;
00894   fMenuBarClean = 0;
00895   //................................ Menu for SUBMIT
00896   fMenuSubmit    = 0;
00897   fMenuBarSubmit = 0;
00898 
00899   //+++++++++++++++++++++++++++++++++++ Horizontal frame StexStin number +  Nb of Req evts
00900   fCompStRqFrame       = 0;
00901   fLayoutCompStRqFrame = 0;
00902 
00903   //---------------------------- SubFrame: Stex number
00904   fStexFrame            = 0;
00905   fStexBut              = 0;
00906   fLayoutStexBut        = 0;
00907   fStexText             = 0;
00908   fEntryStexNumber      = 0;
00909   fLayoutStexFieldText  = 0;
00910   fLayoutStexFieldFrame = 0;
00911 
00912   //---------------------------- SubFrame: number of requested events
00913   fRevFrame            = 0;
00914   fRevBut              = 0;
00915   fLayoutRevBut        = 0;
00916   fRevText             = 0;
00917   fEntryRevNumber      = 0;
00918   fLayoutRevFieldText  = 0;
00919   fLayoutRevFieldFrame = 0;
00920 
00921   //+++++++++++++++++++++++++++++++++++ Horizontal frame StexStin numbering +  Nb of samp for Calc + Calculations
00922   fCompStnbFrame       = 0;
00923   fLayoutCompStnbFrame = 0;
00924 
00925   //................................ Stex Stin Numbering view (Button)
00926   fButStexNb       = 0;
00927   fLayoutStexNbBut = 0;
00928 
00929   //---------------------------- SubFrame: NbSampForCalc
00930   fNbSampForCalcFrame            = 0;
00931   fNbSampForCalcBut              = 0;
00932   fLayoutNbSampForCalcBut        = 0;
00933   fNbSampForCalcText             = 0;
00934   fEntryNbSampForCalcNumber      = 0;
00935   fLayoutNbSampForCalcFieldText  = 0;
00936   fLayoutNbSampForCalcFieldFrame = 0;
00937 
00938   //................................ Menu for Calculations
00939   fMenuComput    = 0;
00940   fMenuBarComput = 0;
00941 
00942   //=====================================================================================
00943 
00944   //+++++++++++++++++++++++++++++++++++++++++++ Frame for quantities relative to the Stex
00945   fStexUpFrame       = 0; 
00946 
00947   //................................ Menus+Ymin+Ymax for the Stex ............................
00948 
00949   //...................................... Nb of evts in the data
00950   fVmmD_NOE_ChNbFrame       = 0;
00951 
00952   fVmaxD_NOE_ChNbFrame           = 0;
00953   fVmaxD_NOE_ChNbBut             = 0;
00954   fLayoutVmaxD_NOE_ChNbBut       = 0;
00955   fVmaxD_NOE_ChNbText            = 0;
00956   fEntryVmaxD_NOE_ChNbNumber     = 0;
00957   fLayoutVmaxD_NOE_ChNbFieldText = 0;
00958   fLayoutVmaxD_NOE_ChNbFrame     = 0;
00959 
00960   fVminD_NOE_ChNbFrame           = 0;
00961   fVminD_NOE_ChNbBut             = 0;
00962   fLayoutVminD_NOE_ChNbBut       = 0;
00963   fVminD_NOE_ChNbText            = 0;
00964   fEntryVminD_NOE_ChNbNumber     = 0;
00965   fLayoutVminD_NOE_ChNbFieldText = 0;
00966   fLayoutVminD_NOE_ChNbFrame     = 0;
00967 
00968   fMenuD_NOE_ChNb           = 0;
00969   fMenuBarD_NOE_ChNb        = 0;
00970   fLayoutMenuBarD_NOE_ChNb  = 0;
00971 
00972   fLayoutVmmD_NOE_ChNbFrame = 0;
00973 
00974   //-------------------------------------------------------------
00975   fVmmD_Ped_ChNbFrame       = 0;
00976 
00977   fVmaxD_Ped_ChNbFrame           = 0;
00978   fVmaxD_Ped_ChNbBut             = 0;
00979   fLayoutVmaxD_Ped_ChNbBut       = 0;
00980   fVmaxD_Ped_ChNbText            = 0;
00981   fEntryVmaxD_Ped_ChNbNumber     = 0;
00982   fLayoutVmaxD_Ped_ChNbFieldText = 0;
00983   fLayoutVmaxD_Ped_ChNbFrame     = 0;
00984 
00985   fVminD_Ped_ChNbFrame           = 0;
00986   fVminD_Ped_ChNbBut             = 0;
00987   fLayoutVminD_Ped_ChNbBut       = 0;
00988   fVminD_Ped_ChNbText            = 0;
00989   fEntryVminD_Ped_ChNbNumber     = 0;
00990   fLayoutVminD_Ped_ChNbFieldText = 0;
00991   fLayoutVminD_Ped_ChNbFrame     = 0;
00992 
00993   fMenuD_Ped_ChNb          = 0;
00994   fMenuBarD_Ped_ChNb       = 0;
00995   fLayoutMenuBarD_Ped_ChNb = 0;
00996 
00997   fLayoutVmmD_Ped_ChNbFrame = 0;
00998 
00999   //-------------------------------------------------------------
01000   fVmmD_TNo_ChNbFrame       = 0;
01001 
01002   fVmaxD_TNo_ChNbFrame           = 0;
01003   fVmaxD_TNo_ChNbBut             = 0;
01004   fLayoutVmaxD_TNo_ChNbBut       = 0;
01005   fVmaxD_TNo_ChNbText            = 0;
01006   fEntryVmaxD_TNo_ChNbNumber     = 0;
01007   fLayoutVmaxD_TNo_ChNbFieldText = 0;
01008 
01009   fVminD_TNo_ChNbFrame           = 0;
01010   fVminD_TNo_ChNbBut             = 0;
01011   fLayoutVminD_TNo_ChNbBut       = 0;
01012   fVminD_TNo_ChNbText            = 0;
01013   fEntryVminD_TNo_ChNbNumber     = 0;
01014   fLayoutVminD_TNo_ChNbFieldText = 0;
01015   fLayoutVminD_TNo_ChNbFrame     = 0;
01016 
01017   fMenuD_TNo_ChNb          = 0;
01018   fMenuBarD_TNo_ChNb       = 0;
01019   fLayoutMenuBarD_TNo_ChNb = 0;
01020   fLayoutVmaxD_TNo_ChNbFrame = 0;
01021 
01022   fLayoutVmmD_TNo_ChNbFrame = 0;
01023 
01024   //-------------------------------------------------------------
01025   fVmmD_MCs_ChNbFrame       = 0;
01026 
01027   fVmaxD_MCs_ChNbFrame           = 0;
01028   fVmaxD_MCs_ChNbBut             = 0;
01029   fLayoutVmaxD_MCs_ChNbBut       = 0;
01030   fVmaxD_MCs_ChNbText            = 0;
01031   fEntryVmaxD_MCs_ChNbNumber     = 0;
01032   fLayoutVmaxD_MCs_ChNbFieldText = 0;
01033   fLayoutVmaxD_MCs_ChNbFrame     = 0;
01034 
01035   fVminD_MCs_ChNbFrame           = 0;
01036   fVminD_MCs_ChNbBut             = 0;
01037   fLayoutVminD_MCs_ChNbBut       = 0;
01038   fVminD_MCs_ChNbText            = 0;
01039   fEntryVminD_MCs_ChNbNumber     = 0;
01040   fLayoutVminD_MCs_ChNbFieldText = 0;
01041   fLayoutVminD_MCs_ChNbFrame     = 0;
01042 
01043   fMenuD_MCs_ChNb          = 0;
01044   fMenuBarD_MCs_ChNb       = 0;
01045   fLayoutMenuBarD_MCs_ChNb = 0;
01046   fLayoutVmmD_MCs_ChNbFrame = 0;
01047 
01048   //............................................... Frame Sig + Menus Sig
01049   fStexHozFrame       = 0; 
01050 
01051   //-------------------------------------------------------------
01052   fVmmD_LFN_ChNbFrame       = 0;
01053 
01054   fVmaxD_LFN_ChNbFrame           = 0;
01055   fVmaxD_LFN_ChNbBut             = 0;
01056   fLayoutVmaxD_LFN_ChNbBut       = 0;
01057   fVmaxD_LFN_ChNbText            = 0;
01058   fEntryVmaxD_LFN_ChNbNumber     = 0;
01059   fLayoutVmaxD_LFN_ChNbFieldText = 0;
01060   fLayoutVmaxD_LFN_ChNbFrame     = 0;
01061 
01062   fVminD_LFN_ChNbFrame           = 0;
01063   fVminD_LFN_ChNbBut             = 0;
01064   fLayoutVminD_LFN_ChNbBut       = 0;
01065   fVminD_LFN_ChNbText            = 0;
01066   fEntryVminD_LFN_ChNbNumber     = 0;
01067   fLayoutVminD_LFN_ChNbFieldText = 0;
01068   fLayoutVminD_LFN_ChNbFrame     = 0;
01069 
01070   fMenuD_LFN_ChNb          = 0;
01071   fMenuBarD_LFN_ChNb       = 0;
01072   fLayoutMenuBarD_LFN_ChNb = 0;
01073 
01074   fLayoutVmmD_LFN_ChNbFrame = 0;
01075 
01076   //-------------------------------------------------------------
01077   fVmmD_HFN_ChNbFrame       = 0;
01078 
01079   fVmaxD_HFN_ChNbFrame           = 0;
01080   fVmaxD_HFN_ChNbBut             = 0;
01081   fLayoutVmaxD_HFN_ChNbBut       = 0;
01082   fVmaxD_HFN_ChNbText            = 0;
01083   fEntryVmaxD_HFN_ChNbNumber     = 0;
01084   fLayoutVmaxD_HFN_ChNbFieldText = 0;
01085   fLayoutVmaxD_HFN_ChNbFrame     = 0;
01086 
01087   fVminD_HFN_ChNbFrame           = 0;
01088   fVminD_HFN_ChNbBut             = 0;
01089   fLayoutVminD_HFN_ChNbBut       = 0;
01090   fVminD_HFN_ChNbText            = 0;
01091   fEntryVminD_HFN_ChNbNumber     = 0;
01092   fLayoutVminD_HFN_ChNbFieldText = 0;
01093   fLayoutVminD_HFN_ChNbFrame     = 0;
01094 
01095   fMenuD_HFN_ChNb          = 0; 
01096   fMenuBarD_HFN_ChNb       = 0;
01097   fLayoutMenuBarD_HFN_ChNb = 0;
01098 
01099   fLayoutVmmD_HFN_ChNbFrame = 0;
01100 
01101   //-------------------------------------------------------------
01102   fVmmD_SCs_ChNbFrame       = 0;
01103 
01104   fVmaxD_SCs_ChNbFrame           = 0;
01105   fVmaxD_SCs_ChNbBut             = 0;
01106   fLayoutVmaxD_SCs_ChNbBut       = 0;
01107   fVmaxD_SCs_ChNbText            = 0;
01108   fEntryVmaxD_SCs_ChNbNumber     = 0;
01109   fLayoutVmaxD_SCs_ChNbFieldText = 0;
01110   fLayoutVmaxD_SCs_ChNbFrame     = 0;
01111 
01112   fVminD_SCs_ChNbFrame           = 0;
01113   fVminD_SCs_ChNbBut             = 0;
01114   fLayoutVminD_SCs_ChNbBut       = 0;
01115   fVminD_SCs_ChNbText            = 0;
01116   fEntryVminD_SCs_ChNbNumber     = 0;
01117   fLayoutVminD_SCs_ChNbFieldText = 0;
01118   fLayoutVminD_SCs_ChNbFrame     = 0;
01119 
01120   fMenuD_SCs_ChNb          = 0;
01121   fMenuBarD_SCs_ChNb       = 0;
01122   fLayoutMenuBarD_SCs_ChNb = 0;
01123 
01124   fLayoutVmmD_SCs_ChNbFrame = 0;
01125 
01126   //----------------------------------------------------------------------------------
01127 
01128   //...................................... Low Freq Cor(c,c') for each pair of  Stins
01129   fVmmLFccMosFrame       = 0;
01130 
01131   fVmaxLFccMosFrame           = 0;
01132   fVmaxLFccMosBut             = 0;
01133   fLayoutVmaxLFccMosBut       = 0;
01134   fVmaxLFccMosText            = 0;
01135   fEntryVmaxLFccMosNumber     = 0;
01136   fLayoutVmaxLFccMosFieldText = 0;
01137   fLayoutVmaxLFccMosFrame     = 0;
01138 
01139   fVminLFccMosFrame           = 0;
01140   fVminLFccMosBut             = 0;
01141   fLayoutVminLFccMosBut       = 0;
01142   fVminLFccMosText            = 0;
01143   fEntryVminLFccMosNumber     = 0;
01144   fLayoutVminLFccMosFieldText = 0;
01145   fLayoutVminLFccMosFrame     = 0;
01146 
01147   fMenuLFccMos          = 0;
01148   fMenuBarLFccMos       = 0;
01149   fLayoutMenuBarLFccMos = 0;
01150 
01151   fLayoutVmmLFccMosFrame = 0;
01152 
01153   //...................................... High Freq Cor(c,c') for each pair of  Stins
01154   fVmmHFccMosFrame       = 0;
01155 
01156   fVmaxHFccMosFrame           = 0;
01157   fVmaxHFccMosBut             = 0;
01158   fLayoutVmaxHFccMosBut       = 0;
01159   fVmaxHFccMosText            = 0;
01160   fEntryVmaxHFccMosNumber     = 0;
01161   fLayoutVmaxHFccMosFieldText = 0;
01162   fLayoutVmaxHFccMosFrame     = 0;
01163 
01164   fVminHFccMosFrame           = 0;
01165   fVminHFccMosBut             = 0;
01166   fLayoutVminHFccMosBut       = 0;
01167   fVminHFccMosText            = 0;
01168   fEntryVminHFccMosNumber     = 0;
01169   fLayoutVminHFccMosFieldText = 0;
01170   fLayoutVminHFccMosFrame     = 0;
01171 
01172   fMenuHFccMos          = 0;
01173   fMenuBarHFccMos       = 0;
01174   fLayoutMenuBarHFccMos = 0;
01175 
01176   fLayoutVmmHFccMosFrame = 0;
01177 
01178   //...................................... LF and HF Cor(c,c')
01179   fVmmLHFccFrame            = 0;
01180 
01181   fVmaxLHFccFrame           = 0;
01182   fVmaxLHFccBut             = 0;
01183   fLayoutVmaxLHFccBut       = 0;
01184   fVmaxLHFccText            = 0;
01185   fEntryVmaxLHFccNumber     = 0;
01186   fLayoutVmaxLHFccFieldText = 0;
01187   fLayoutVmaxLHFccFrame     = 0;
01188 
01189   fVminLHFccFrame           = 0;
01190   fVminLHFccBut             = 0;
01191   fLayoutVminLHFccBut       = 0;
01192   fVminLHFccText            = 0;
01193   fEntryVminLHFccNumber     = 0;
01194   fLayoutVminLHFccFieldText = 0;
01195   fLayoutVminLHFccFrame     = 0;
01196 
01197   fMenuLHFcc          = 0;
01198   fMenuBarLHFcc       = 0;
01199   fLayoutMenuBarLHFcc = 0;
01200 
01201   fLayoutVmmLHFccFrame = 0;
01202 
01203   fLayoutStexHozFrame = 0;
01204 
01205   fLayoutStexUpFrame = 0;
01206 
01207   //+++++++++++++++++++++++++++++++++++++++++ Horizontal frame Stin_A + Stin_B
01208   fStinSpFrame      = 0;
01209   fLayoutStinSpFrame = 0;
01210   
01211   //----------------------------------- SubFrame Stin_A (Button + EntryField)
01212 
01213   fTxSubFrame       = 0; 
01214   fLayoutTxSubFrame = 0;
01215 
01216   fStinAFrame     = 0;
01217   fStinABut       = 0;
01218   fLayoutStinABut = 0; 
01219 
01220   fStinAText        = 0;
01221   fEntryStinANumber = 0; 
01222   fLayoutStinAField = 0;
01223   
01224   //............................ Stin Crystal Numbering view (Button)
01225   fButChNb       = 0;
01226   fLayoutChNbBut = 0;
01227 
01228   //............................ Menus Stin_A
01229   fMenuCorssAll    = 0;
01230   fMenuBarCorssAll = 0;
01231 
01232   fMenuCovssAll    = 0;
01233   fMenuBarCovssAll = 0;
01234 
01235   //----------------------------------- SubFrame Stin_B (Button + EntryField)
01236   fTySubFrame       = 0;
01237   fLayoutTySubFrame = 0;
01238 
01239   fStinBFrame     = 0;
01240   fStinBBut       = 0;
01241   fLayoutStinBBut = 0;
01242 
01243   fStinBText        = 0;  
01244   fEntryStinBNumber = 0;
01245   fLayoutStinBField = 0;
01246 
01247   //.................................. Menus for Horizontal frame (Stin_A + Stin_B)
01248   fMenuBarLFCorcc = 0;
01249   fMenuLFCorcc    = 0; 
01250 
01251   fMenuBarHFCorcc = 0;  
01252   fMenuHFCorcc    = 0;
01253 
01254   //++++++++++++++++++++++++ Horizontal frame channel number (Stin_A crystal number) + sample number
01255   fChSpFrame       = 0;
01256   fLayoutChSpFrame = 0;
01257 
01258   //------------------------------------- SubFrame Channel (Button + EntryField)
01259   fChanFrame       = 0;
01260   fChanBut         = 0;
01261   fChanText        = 0;
01262   fEntryChanNumber = 0;
01263   fLayoutChanBut   = 0;
01264   fLayoutChanField = 0;
01265 
01266   fChSubFrame       = 0;
01267   fLayoutChSubFrame = 0;
01268 
01269   //................................ Menus Stin_A crystal number
01270   fMenuCorss    = 0;
01271   fMenuBarCorss = 0;
01272 
01273   fMenuCovss    = 0; 
01274   fMenuBarCovss = 0;
01275 
01276   fMenuD_MSp_Samp    = 0;
01277   fMenuBarD_MSp_Samp = 0;
01278 
01279   fMenuD_SSp_Samp    = 0;
01280   fMenuBarD_SSp_Samp = 0;
01281 
01282   //------------------------------------ SubFrame Sample (Button + EntryField)
01283   fSampFrame = 0;
01284   fSampBut   = 0;
01285 
01286   fSampText        = 0;  
01287   fEntrySampNumber = 0;
01288   fLayoutSampBut   = 0;
01289   fLayoutSampField = 0;
01290 
01291   fSpSubFrame       = 0;
01292   fLayoutSpSubFrame = 0;
01293 
01294   //................................ Menus Sample number
01295 
01296   //     (no menu in this SubFrame)
01297 
01298   //++++++++++++++++++++++++++++++++++++ Frame: Run List (Rul) (Button + EntryField)
01299   fRulFrame            = 0;
01300   fRulBut              = 0;
01301   fLayoutRulBut        = 0;
01302   fRulText             = 0;
01303   fEntryRulNumber      = 0;
01304   fLayoutRulFieldText  = 0;
01305   fLayoutRulFieldFrame = 0;
01306 
01307   //................................ Menus for time evolution
01308   fMenuHistory    = 0;
01309   fMenuBarHistory = 0;
01310 
01311   //++++++++++++++++++++++++++++++++++++ Menu Event Distribution
01312   fMenuAdcProj          = 0;
01313   fMenuBarAdcProj       = 0;
01314   fLayoutMenuBarAdcProj = 0;
01315 
01316   //++++++++++++++++++++++++++++++++++++ LinLog + Color Palette Frame
01317   fLinLogFrame = 0;  
01318 
01319   //---------------------------------- Lin/Log X
01320   fButLogx         = 0;
01321   fLayoutLogxBut   = 0;
01322   //---------------------------------- Lin/Log Y
01323   fButLogy         = 0;
01324   fLayoutLogyBut   = 0;
01325   //---------------------------------- Proj Y
01326   fButProjy        = 0;
01327   fLayoutProjyBut  = 0;
01328 
01329   //++++++++++++++++++++++++++++++++++++ Frame: General Title (Gent) (Button + EntryField)
01330   fGentFrame            = 0;
01331   fGentBut              = 0;
01332   fLayoutGentBut        = 0;
01333   fGentText             = 0;
01334   fEntryGentNumber      = 0;
01335   fLayoutGentFieldText  = 0;
01336   fLayoutGentFieldFrame = 0;
01337 
01338   //++++++++++++++++++++++++++++++++++++ Color + Exit
01339   //---------------------------------- Color Palette
01340   fButColPal       = 0;
01341   fLayoutColPalBut = 0;
01342   //---------------------------------- Exit
01343   fButExit       = 0;   
01344   fLayoutExitBut = 0;
01345 
01346   //++++++++++++++++++++++++++++++++++++ Last Frame
01347   fLastFrame = 0;   
01348 
01349   //--------------------------------- Clone Last Canvas (Button)
01350   fButClone       = 0;
01351   fLayoutCloneBut = 0;
01352 
01353   //--------------------------------- Root version (Button)
01354   fButRoot       = 0;
01355   fLayoutRootBut = 0;
01356 
01357   //--------------------------------- Help (Button)
01358   fButHelp       = 0;
01359   fLayoutHelpBut = 0;
01360 
01361   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end of init GUI DIALOG BOX pointers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01362 
01363   //........ Init Buttons codes with input widgets:
01364   //         run, channel, sample
01365 
01366   fAnaButC  = 1;
01367   fRunButC  = 2;
01368 
01369    //.................. Init codes Menu bars (all the numbers must be different)
01370 
01371   fMenuSubmit8nmC  = 2011;
01372   fMenuSubmit1nhC  = 2012;
01373   fMenuSubmit8nhC  = 2013;
01374   fMenuSubmit1ndC  = 2014;
01375   fMenuSubmit1nwC  = 2015;
01376 
01377   fMenuCleanSubC  = 3011;
01378   fMenuCleanJobC  = 3012;
01379   fMenuCleanPythC = 3013;
01380   fMenuCleanAllC  = 3014;
01381 
01382   fMenuComputStdC = 3111;
01383   fMenuComputSccC = 3112;
01384   fMenuComputSttC = 3113;
01385 
01386   fMenuD_NOE_ChNbFullC      = 600101;
01387   fMenuD_NOE_ChNbSameC      = 600102;
01388   fMenuD_NOE_ChNbAsciiFileC = 600104;
01389 
01390   fMenuD_Ped_ChNbFullC      = 123051;
01391   fMenuD_Ped_ChNbSameC      = 123052;
01392   fMenuD_Ped_ChNbAsciiFileC = 123054;
01393 
01394   fMenuD_TNo_ChNbFullC      = 123061;
01395   fMenuD_TNo_ChNbSameC      = 123062;
01396   fMenuD_TNo_ChNbSamePC     = 123063;
01397   fMenuD_TNo_ChNbAsciiFileC = 123064;
01398 
01399   fMenuD_MCs_ChNbFullC      = 123071;
01400   fMenuD_MCs_ChNbSameC      = 123072;
01401   fMenuD_MCs_ChNbSamePC     = 123073;
01402   fMenuD_MCs_ChNbAsciiFileC = 123074;
01403 
01404   fMenuD_LFN_ChNbFullC      = 800051;
01405   fMenuD_LFN_ChNbSameC      = 800052;
01406   fMenuD_LFN_ChNbSamePC     = 800053;
01407   fMenuD_LFN_ChNbAsciiFileC = 800054;
01408 
01409   fMenuD_HFN_ChNbFullC      = 800061;
01410   fMenuD_HFN_ChNbSameC      = 800062;
01411   fMenuD_HFN_ChNbSamePC     = 800063;
01412   fMenuD_HFN_ChNbAsciiFileC = 800064;
01413 
01414   fMenuD_SCs_ChNbFullC      = 800071;
01415   fMenuD_SCs_ChNbSameC      = 800072;
01416   fMenuD_SCs_ChNbSamePC     = 800073;
01417   fMenuD_SCs_ChNbAsciiFileC = 800074;
01418 
01419   fMenuLFccColzC = 70010;
01420   fMenuLFccLegoC = 70011;
01421   fMenuHFccColzC = 70020;
01422   fMenuHFccLegoC = 70021;
01423 
01424   fMenuLFccMosColzC = 70110;
01425   fMenuLFccMosLegoC = 70111;
01426   fMenuHFccMosColzC = 70120;
01427   fMenuHFccMosLegoC = 70121;
01428 
01429   fMenuD_NOE_ChNbHocoVecoC = 524051;
01430   fMenuD_Ped_ChNbHocoVecoC = 524052;
01431   fMenuD_TNo_ChNbHocoVecoC = 524053;
01432   fMenuD_MCs_ChNbHocoVecoC = 524054;
01433   fMenuD_LFN_ChNbHocoVecoC = 524055;
01434   fMenuD_HFN_ChNbHocoVecoC = 524056;
01435   fMenuD_SCs_ChNbHocoVecoC = 524057;
01436 
01437   fStinAButC = 90009; 
01438   fStinBButC = 90010;
01439 
01440   fChanButC = 6;
01441   fSampButC = 7;
01442 
01443   fMenuCorssAllColzC = 10;
01444   fMenuCovssAllColzC = 11;
01445  
01446   fMenuCorssColzC      = 221;
01447   fMenuCorssBoxC       = 222;
01448   fMenuCorssTextC      = 223;
01449   fMenuCorssContzC     = 224;
01450   fMenuCorssLegoC      = 225;
01451   fMenuCorssSurf1C     = 226;
01452   fMenuCorssSurf2C     = 227;
01453   fMenuCorssSurf3C     = 228;
01454   fMenuCorssSurf4C     = 229;
01455   fMenuCorssAsciiFileC = 220;
01456 
01457   fMenuCovssColzC      = 231;
01458   fMenuCovssBoxC       = 232;
01459   fMenuCovssTextC      = 233;
01460   fMenuCovssContzC     = 234;
01461   fMenuCovssLegoC      = 235;
01462   fMenuCovssSurf1C     = 236;
01463   fMenuCovssSurf2C     = 237;
01464   fMenuCovssSurf3C     = 238;
01465   fMenuCovssSurf4C     = 239;
01466   fMenuCovssAsciiFileC = 230;
01467  
01468   fMenuD_MSp_SampLineFullC = 411;
01469   fMenuD_MSp_SampLineSameC = 412;
01470 
01471   fMenuD_SSp_SampLineFullC = 421;
01472   fMenuD_SSp_SampLineSameC = 422;
01473   
01474   fMenuLFCorccColzC = 51;
01475   fMenuLFCorccLegoC = 52;
01476 
01477   fMenuHFCorccColzC = 61;
01478   fMenuHFCorccLegoC = 62;
01479   
01480   fMenuAdcProjSampLineFullC = 711;
01481   fMenuAdcProjSampLineSameC = 712;
01482   fMenuAdcProjLineLinyFullC = 713;
01483   fMenuAdcProjLineLinySameC = 714;
01484 
01485   fMenuH_Ped_DatePolmFullC = 811;
01486   fMenuH_Ped_DatePolmSameC = 812;
01487 
01488   fMenuH_TNo_DatePolmFullC  = 821;
01489   fMenuH_TNo_DatePolmSameC  = 822;
01490   fMenuH_TNo_DatePolmSamePC = 823;
01491 
01492   fMenuH_LFN_DatePolmFullC  = 824;
01493   fMenuH_LFN_DatePolmSameC  = 825;
01494   fMenuH_LFN_DatePolmSamePC = 826;
01495 
01496   fMenuH_HFN_DatePolmFullC  = 827;
01497   fMenuH_HFN_DatePolmSameC  = 828;
01498   fMenuH_HFN_DatePolmSamePC = 829;
01499 
01500   fMenuH_MCs_DatePolmFullC  = 831;
01501   fMenuH_MCs_DatePolmSameC  = 832;
01502   fMenuH_MCs_DatePolmSamePC = 833;
01503 
01504   fMenuH_SCs_DatePolmFullC  = 841;
01505   fMenuH_SCs_DatePolmSameC  = 842;
01506   fMenuH_SCs_DatePolmSamePC = 843;
01507 
01508  //...................... Init Button codes: Root version, Help, Exit
01509   fButStexNbC = 90;
01510   fButChNbC   = 91;
01511   fButCloneC  = 95;
01512   fButRootC   = 96;
01513   fButHelpC   = 97;
01514   fButExitC   = 98;
01515 
01516   //=================================== LIN/LOG + Y proj + Color palette flags
01517   MaxCar = fgMaxCar;
01518   fMemoScaleX.Resize(MaxCar);   
01519   fMemoScaleX = "LIN";
01520 
01521   MaxCar = fgMaxCar;
01522   fMemoScaleY.Resize(MaxCar); 
01523   fMemoScaleY = "LIN";
01524 
01525   MaxCar = fgMaxCar;
01526   fMemoProjY.Resize(MaxCar); 
01527   fMemoProjY = "normal";
01528 
01529   MaxCar = fgMaxCar;
01530   fMemoColPal.Resize(MaxCar); 
01531   fMemoColPal = "ECCNAColor";
01532 
01533   //=================================== Init option codes =================================
01534 
01535   MaxCar = fgMaxCar;
01536   fOptPlotFull.Resize(MaxCar);
01537   fOptPlotFull = "ONLYONE";
01538 
01539   MaxCar = fgMaxCar;
01540   fOptPlotSame.Resize(MaxCar);
01541   fOptPlotSame = "SAME";
01542 
01543   MaxCar = fgMaxCar;
01544   fOptPlotSameP.Resize(MaxCar);
01545   fOptPlotSameP = "SAME n";
01546 
01547   MaxCar = fgMaxCar;
01548   fOptAscii.Resize(MaxCar);
01549   fOptAscii = "ASCII";
01550 
01551   //================================================================================================
01552 
01553   //-------------------------------------------------------------------------
01554   //
01555   //
01556   //                      B O X     M A K I N G
01557   //
01558   //
01559   //-------------------------------------------------------------------------
01560 
01561 //......................... Background colors
01562 
01563   //TColor* my_color = new TColor();
01564   //Color_t orange  = (Color_t)my_color->GetColor("#FF6611");  // orange
01565 
01566   Pixel_t SubDetColor = GetBackground();
01567 
01568   if( fSubDet == "EB" ){SubDetColor = GetBackground();}
01569   if( fSubDet == "EE" ){SubDetColor = GetBackground();}
01570 
01571   // Bool_t GlobFont = kFALSE;
01572 
01573   //Pixel_t BkgColMainWindow  = (Pixel_t)SubDetColor;
01574   //Pixel_t BkgColChSpFrame   = (Pixel_t)SubDetColor;
01575   //Pixel_t BkgColStexUpFrame = (Pixel_t)SubDetColor;
01576 
01577   //  Pixel_t BkgColButExit     = (Pixel_t)555888;
01578 
01579   // enum ELayoutHints {
01580   //   kLHintsNoHints = 0,
01581   //   kLHintsLeft    = BIT(0),
01582   //   kLHintsCenterX = BIT(1),
01583   //   kLHintsRight   = BIT(2),
01584   //   kLHintsTop     = BIT(3),
01585   //   kLHintsCenterY = BIT(4),
01586   //   kLHintsBottom  = BIT(5),
01587   //   kLHintsExpandX = BIT(6),
01588   //   kLHintsExpandY = BIT(7),
01589   //   kLHintsNormal  = (kLHintsLeft | kLHintsTop)
01590   //   bits 8-11 used by ETableLayoutHints
01591   // };
01592 
01593   fLayoutGeneral      = new TGLayoutHints (kLHintsCenterX | kLHintsCenterY);   fCnew++;
01594   fLayoutBottLeft     = new TGLayoutHints (kLHintsLeft    | kLHintsBottom);    fCnew++;
01595   fLayoutTopLeft      = new TGLayoutHints (kLHintsLeft    | kLHintsTop);       fCnew++;
01596   fLayoutBottRight    = new TGLayoutHints (kLHintsRight   | kLHintsBottom);    fCnew++;
01597   fLayoutTopRight     = new TGLayoutHints (kLHintsRight   | kLHintsTop);       fCnew++;
01598   fLayoutCenterYLeft  = new TGLayoutHints (kLHintsLeft    | kLHintsCenterY);   fCnew++;  
01599   fLayoutCenterYRight = new TGLayoutHints (kLHintsRight   | kLHintsCenterY);   fCnew++;  
01600   fLayoutCenterXTop   = new TGLayoutHints (kLHintsCenterX | kLHintsTop);       fCnew++;  
01601 
01602   fVoidFrame = new TGCompositeFrame(this,60,20, kVerticalFrame, kSunkenFrame); fCnew++;
01603   AddFrame(fVoidFrame, fLayoutGeneral);
01604 
01605   //......................... Pads border
01606 
01607   Int_t xB1 = 0;
01608 
01609   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01610   //
01611   //                 SECTOR 1:  Python-source, Submit, File Parameters, Calculations
01612   //
01613   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01614   //TString xPyfButText = " Source file for python (DBS)";
01615 
01616   //Int_t pyf_buf_lenght = 220;
01617 
01618   //fPyfFrame = new TGCompositeFrame(this,60,20, kHorizontalFrame, kSunkenFrame); fCnew++;
01619   
01620   //fPyfBut= new TGTextButton(fPyfFrame, xPyfButText);                        fCnew++;
01621   //fPyfBut->Connect("Clicked()","TEcnaGui", this, "DoButtonPyf()");
01622   //fPyfBut->SetToolTipText
01623   //  ("Click here to register the name of the file written on the right");
01624   //fPyfBut->SetBackgroundColor(SubDetColor);
01625   //fLayoutPyfBut =
01626   //  new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);     fCnew++;
01627   //fPyfFrame->AddFrame(fPyfBut,  fLayoutPyfBut);
01628 
01629   //fEntryPyfNumber = new TGTextBuffer();                               fCnew++;
01630   //fPyfText = new TGTextEntry(fPyfFrame, fEntryPyfNumber);             fCnew++;
01631   //fPyfText->SetToolTipText("File containing the data file names \n of the python file source sector.\n Click here and enter the name of this file");
01632   //fPyfText->Resize(pyf_buf_lenght, fPyfText->GetDefaultHeight());
01633   //fPyfText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonPyf()");
01634   //fLayoutPyfFieldText =
01635   //  new TGLayoutHints(kLHintsBottom | kLHintsLeft, xB1,xB1,xB1,xB1);  fCnew++;
01636   //fPyfFrame->AddFrame(fPyfText, fLayoutPyfFieldText);
01637 
01638   //fLayoutPyfFieldFrame =
01639   //  new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);     fCnew++;
01640   //AddFrame(fPyfFrame, fLayoutPyfFieldFrame);
01641 
01642   //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01643   //
01644   //             Horizontal frame Analysis + First requested evt number + Run number
01645   //
01646   //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01647   fAnaNorsRunFrame = new TGCompositeFrame(this,60,20,kHorizontalFrame,
01648                                           GetDefaultFrameBackground());   fCnew++;
01649 
01650  //=================================== ANALYSIS NAME (type of analysis)
01651   TString xAnaButText  = " Analysis ";
01652   Int_t typ_of_ana_buf_lenght = 80;
01653   fAnaFrame =  new TGCompositeFrame(fAnaNorsRunFrame,60,20, kHorizontalFrame,
01654                                     kSunkenFrame);                    fCnew++;
01655   //..................... Button  
01656   fAnaBut = new TGTextButton(fAnaFrame, xAnaButText, fAnaButC);       fCnew++;
01657   fAnaBut->Connect("Clicked()","TEcnaGui", this, "DoButtonAna()");
01658   // fAnaBut->Resize(typ_of_ana_buf_lenght, fAnaBut->GetDefaultHeight());
01659   fAnaBut->SetToolTipText("Click here to register the analysis name written on the right");
01660   fAnaBut->SetBackgroundColor(SubDetColor);
01661   //fAnaBut->SetFont("courier", GlobFont);
01662   fLayoutAnaBut =
01663     new TGLayoutHints(kLHintsLeft | kLHintsTop, xB1,xB1,xB1,xB1);     fCnew++;
01664   fAnaFrame->AddFrame(fAnaBut,  fLayoutAnaBut);
01665   //...................... Entry field
01666   fEntryAnaNumber = new TGTextBuffer();                               fCnew++;
01667   fAnaText = new TGTextEntry(fAnaFrame, fEntryAnaNumber);             fCnew++;
01668   fAnaText->SetToolTipText
01669     ("Click and enter the analysis name (code for type of analysis)");
01670   fAnaText->Resize(typ_of_ana_buf_lenght, fAnaText->GetDefaultHeight());
01671   DisplayInEntryField(fAnaText,fKeyAnaType);
01672   fAnaText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonAna()");
01673   fLayoutAnaField =
01674     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);     fCnew++;
01675   fAnaFrame->AddFrame(fAnaText, fLayoutAnaField);
01676 
01677   //=================================== FIRST REQUESTED EVENT NUMBER
01678   TString xFirstReqEvtNumberButText = " 1st event#  ";
01679   Int_t first_evt_buf_lenght   = 65;
01680   fFevFrame =
01681     new TGCompositeFrame(fAnaNorsRunFrame,60,20, kHorizontalFrame, kSunkenFrame); fCnew++;
01682   
01683   fFevBut= new TGTextButton(fFevFrame, xFirstReqEvtNumberButText);                fCnew++;
01684   fFevBut->Connect("Clicked()","TEcnaGui", this, "DoButtonFev()");
01685   fFevBut->SetToolTipText
01686     ("Click here to register the number of the first requested event number");
01687   fFevBut->SetBackgroundColor(SubDetColor);
01688   fLayoutFevBut =
01689     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);     fCnew++;
01690   fFevFrame->AddFrame(fFevBut,  fLayoutFevBut);
01691 
01692   fEntryFevNumber = new TGTextBuffer();                               fCnew++;
01693   fFevText = new TGTextEntry(fFevFrame, fEntryFevNumber);             fCnew++;
01694   fFevText->SetToolTipText("Click and enter the first requested event number");
01695   fFevText->Resize(first_evt_buf_lenght, fFevText->GetDefaultHeight());
01696   DisplayInEntryField(fFevText,fKeyFirstReqEvtNumber);
01697   fFevText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonFev()");
01698   fLayoutFevFieldText =
01699     new TGLayoutHints(kLHintsBottom | kLHintsLeft, xB1,xB1,xB1,xB1);  fCnew++;
01700   fFevFrame->AddFrame(fFevText, fLayoutFevFieldText);
01701 
01702  //=================================== RUN
01703   TString xRunButText  = " Run ";
01704   Int_t run_buf_lenght = 65;
01705   fRunFrame = new TGCompositeFrame(fAnaNorsRunFrame,0,0,
01706                                    kHorizontalFrame, kSunkenFrame);   fCnew++;
01707   fRunBut = new TGTextButton(fRunFrame, xRunButText, fRunButC);       fCnew++;
01708   fRunBut->Connect("Clicked()","TEcnaGui", this, "DoButtonRun()");
01709   fRunBut->SetToolTipText("Click here to register the run number");
01710   fRunBut->SetBackgroundColor(SubDetColor);
01711   // fRunBut->SetFont("helvetica", GlobFont);
01712   fLayoutRunBut =
01713     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1);  fCnew++;
01714   fRunFrame->AddFrame(fRunBut,  fLayoutRunBut);
01715   fEntryRunNumber = new TGTextBuffer();                               fCnew++;
01716   fRunText = new TGTextEntry(fRunFrame, fEntryRunNumber);             fCnew++;
01717   fRunText->SetToolTipText("Click and enter the run number");
01718   fRunText->Resize(run_buf_lenght, fRunText->GetDefaultHeight());
01719   DisplayInEntryField(fRunText,fKeyRunNumber);
01720   fRunText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonRun()");
01721   fLayoutRunField =
01722     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);    fCnew++;
01723   fRunFrame->AddFrame(fRunText, fLayoutRunField);
01724 
01725   //-------------------------- display frame ana + Fev + Run
01726   fAnaNorsRunFrame->AddFrame(fAnaFrame, fLayoutTopLeft);
01727   fAnaNorsRunFrame->AddFrame(fFevFrame, fLayoutTopLeft);
01728   fAnaNorsRunFrame->AddFrame(fRunFrame,fLayoutTopRight);
01729   fLayoutAnaNorsRunFrame =  new TGLayoutHints(kLHintsTop | kLHintsExpandX,
01730                                               xB1, xB1, xB1, xB1);    fCnew++;
01731 
01732   AddFrame(fAnaNorsRunFrame, fLayoutAnaNorsRunFrame);
01733 
01734   //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01735   //
01736   //    Horizontal frame Nb Of Samples + last requested evt number + Clean + Submit       
01737   //
01738   //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01739   fFevLevStexFrame = new TGCompositeFrame(this,60,20,kHorizontalFrame,
01740                                           GetDefaultFrameBackground());            fCnew++;
01741 
01742  //=================================== Number Of Requested Samples
01743   TString xNorsButText  = "Nb Samp in File";
01744   Int_t nors_buf_lenght = 45;
01745   fNorsFrame = new TGCompositeFrame(fFevLevStexFrame,0,0, kHorizontalFrame,
01746                                     kSunkenFrame);                                 fCnew++;  
01747   //..................... Button  
01748   fNorsBut = new TGTextButton(fNorsFrame, xNorsButText, fNorsButC);                fCnew++;
01749   fNorsBut->Connect("Clicked()","TEcnaGui", this, "DoButtonNors()");
01750   //fNorsBut->Resize(nors_buf_lenght, fNorsBut->GetDefaultHeight());
01751   fNorsBut->SetToolTipText("Click here to register the value written on the right");
01752   fNorsBut->SetBackgroundColor(SubDetColor);
01753   //fNorsBut->SetFont("courier", GlobFont);
01754   fLayoutNorsBut =
01755     new TGLayoutHints(kLHintsLeft | kLHintsTop, xB1,xB1,xB1,xB1);                 fCnew++;
01756   fNorsFrame->AddFrame(fNorsBut,  fLayoutNorsBut);
01757   //...................... Entry field
01758   fEntryNorsNumber = new TGTextBuffer();                                          fCnew++;
01759   fNorsText = new TGTextEntry(fNorsFrame, fEntryNorsNumber);                      fCnew++;
01760   fNorsText->SetToolTipText("Click and enter the number of required samples");
01761   fNorsText->Resize(nors_buf_lenght, fNorsText->GetDefaultHeight());
01762   DisplayInEntryField(fNorsText,fKeyNbOfSamples);
01763   fNorsText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonNors()");
01764   fLayoutNorsField =
01765     new TGLayoutHints(kLHintsTop | kLHintsCenterX, xB1,xB1,xB1,xB1);              fCnew++;
01766   fNorsFrame->AddFrame(fNorsText, fLayoutNorsField);
01767 
01768   //=================================== LAST REQUESTED EVENT NUMBER
01769   TString xLastReqEvtButText  = " Last event# ";
01770   Int_t last_evt_buf_lenght = 65;
01771   fLevFrame =
01772     new TGCompositeFrame(fFevLevStexFrame,60,20, kHorizontalFrame, kSunkenFrame); fCnew++;
01773   
01774   fLevBut = new TGTextButton(fLevFrame, xLastReqEvtButText);                      fCnew++;
01775   fLevBut->Connect("Clicked()","TEcnaGui", this, "DoButtonLev()");
01776   fLevBut->SetToolTipText("Click here to register the last requested event number");
01777   fLevBut->SetBackgroundColor(SubDetColor);
01778   fLayoutLevBut =
01779     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                 fCnew++;
01780   fLevFrame->AddFrame(fLevBut,  fLayoutLevBut);
01781 
01782   fEntryLevNumber = new TGTextBuffer();                                           fCnew++;
01783   fLevText = new TGTextEntry(fLevFrame, fEntryLevNumber);                         fCnew++;
01784   fLevText->SetToolTipText("Click and enter the last requested event number");
01785   fLevText->Resize(last_evt_buf_lenght, fLevText->GetDefaultHeight());
01786   DisplayInEntryField(fLevText,fKeyLastReqEvtNumber);
01787   fLevText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonLev()");
01788   fLayoutLevFieldText =
01789     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);             fCnew++;
01790   fLevFrame->AddFrame(fLevText, fLayoutLevFieldText);
01791 
01792   //----------------------------------- Clean
01793   TString xMenuBarClean  = "Clean  ";
01794 
01795   fMenuClean = new TGPopupMenu(gClient->GetRoot());                                fCnew++;
01796   fMenuClean->AddEntry("Submission scripts",fMenuCleanSubC);
01797   fMenuClean->AddEntry("LSFJOB reports",fMenuCleanJobC);
01798   fMenuClean->AddEntry("Python files",fMenuCleanPythC);
01799   fMenuClean->AddEntry("All",fMenuCleanAllC);
01800 
01801   fMenuClean->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
01802   fMenuBarClean = new TGMenuBar(fFevLevStexFrame , 1, 1, kHorizontalFrame);        fCnew++;
01803   fMenuBarClean->AddPopup(xMenuBarClean, fMenuClean, fLayoutTopLeft);
01804 
01805   //--------------------------------- SUBMIT IN BATCH MODE
01806   TString xMenuBarSubmit  = " Submit ";
01807   fMenuSubmit = new TGPopupMenu(gClient->GetRoot());                               fCnew++;
01808 
01809   fMenuSubmit->AddEntry(" -q 8nm ",fMenuSubmit8nmC);
01810   fMenuSubmit->AddEntry(" -q 1nh ",fMenuSubmit1nhC);
01811   fMenuSubmit->AddEntry(" -q 8nh ",fMenuSubmit8nhC);
01812   fMenuSubmit->AddEntry(" -q 1nd ",fMenuSubmit1ndC);
01813   fMenuSubmit->AddEntry(" -q 1nw ",fMenuSubmit1nwC);
01814 
01815   fMenuSubmit->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
01816   fMenuBarSubmit = new TGMenuBar(fFevLevStexFrame, 1, 1, kHorizontalFrame);        fCnew++;
01817   fMenuBarSubmit->AddPopup(xMenuBarSubmit, fMenuSubmit, fLayoutTopLeft);
01818 
01819   //-------------------------- display frame Nors + Lev + Clean + Submit
01820   fFevLevStexFrame->AddFrame(fNorsFrame,fLayoutTopLeft);
01821   fFevLevStexFrame->AddFrame(fLevFrame, fLayoutTopLeft);
01822   fFevLevStexFrame->AddFrame(fMenuBarSubmit, fLayoutTopRight);
01823   fFevLevStexFrame->AddFrame(fMenuBarClean, fLayoutTopRight);
01824 
01825   fLayoutFevLevStexFrame =  new TGLayoutHints(kLHintsTop | kLHintsExpandX,
01826                                               xB1, xB1, xB1, xB1);                 fCnew++;
01827 
01828   AddFrame(fFevLevStexFrame, fLayoutFevLevStexFrame);
01829 
01830 
01831   //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01832   //
01833   //      Horizontal Frame: StexNumber + Nb of Requested events
01834   //
01835   //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01836   fCompStRqFrame = new TGCompositeFrame(this,60,20,kHorizontalFrame,
01837                                        GetDefaultFrameBackground());              fCnew++;
01838 
01839   //----------------------------------- STEX NUMBER
01840   TString xSumoButText;
01841   if( fSubDet == "EB" ){xSumoButText = "  SM#   (0=EB)  ";}
01842   if( fSubDet == "EE" ){xSumoButText = " Dee#  (0=EE)  ";} 
01843 
01844   Int_t stex_number_buf_lenght = 36;
01845   fStexFrame =
01846     new TGCompositeFrame(fCompStRqFrame,60,20, kHorizontalFrame, kSunkenFrame);   fCnew++;
01847 
01848   fStexBut = new TGTextButton(fStexFrame, xSumoButText);                          fCnew++;
01849   fStexBut->Connect("Clicked()","TEcnaGui", this, "DoButtonStex()");
01850   fStexBut->SetToolTipText("Click here to register the number written on the right");
01851   fStexBut->SetBackgroundColor(SubDetColor);
01852   //fStexBut->SetFont("courier", GlobFont);
01853   fLayoutStexBut = new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);  fCnew++;
01854   fStexFrame->AddFrame(fStexBut,  fLayoutStexBut);
01855 
01856   fEntryStexNumber = new TGTextBuffer();                                          fCnew++;
01857   fStexText = new TGTextEntry(fStexFrame, fEntryStexNumber);                      fCnew++;
01858 
01859   TString xStexNumber;
01860   if( fSubDet == "EB" ){xStexNumber = "Click and enter the SM number";}
01861   if( fSubDet == "EE" ){xStexNumber = "Click and enter the Dee number";}
01862   fStexText->SetToolTipText(xStexNumber);
01863   fStexText->Resize(stex_number_buf_lenght, fStexText->GetDefaultHeight());
01864   DisplayInEntryField(fStexText, fKeyStexNumber);
01865   fStexText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonStex()");
01866   
01867   fLayoutStexFieldText =
01868     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);             fCnew++;
01869   fStexFrame->AddFrame(fStexText, fLayoutStexFieldText);
01870   
01871   //=================================== NUMBER OF REQUESTED EVENTS
01872   TString xNbOfReqEvtButText  = " Nb of events ";
01873   Int_t nbof_evt_buf_lenght = 65;
01874   fRevFrame =
01875     new TGCompositeFrame(fCompStRqFrame,60,20, kHorizontalFrame, kSunkenFrame); fCnew++;
01876   
01877   fRevBut = new TGTextButton(fRevFrame, xNbOfReqEvtButText);                      fCnew++;
01878   fRevBut->Connect("Clicked()","TEcnaGui", this, "DoButtonRev()");
01879   fRevBut->SetToolTipText("Click here to register the requested number of events");
01880   fRevBut->SetBackgroundColor(SubDetColor);
01881   fLayoutRevBut = new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                 fCnew++;
01882   fRevFrame->AddFrame(fRevBut,  fLayoutRevBut);
01883 
01884   fEntryRevNumber = new TGTextBuffer();                                           fCnew++;
01885   fRevText = new TGTextEntry(fRevFrame, fEntryRevNumber);                         fCnew++;
01886   fRevText->SetToolTipText("Click and enter the requested number of events");
01887   fRevText->Resize(nbof_evt_buf_lenght, fRevText->GetDefaultHeight());
01888   DisplayInEntryField(fRevText,fKeyReqNbOfEvts);
01889   fRevText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonRev()");
01890   fLayoutRevFieldText =
01891     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);             fCnew++;
01892   fRevFrame->AddFrame(fRevText, fLayoutRevFieldText);
01893 
01894   //-------------------------- display frame stex number + Nb of req evts
01895   fCompStRqFrame->AddFrame(fStexFrame,fLayoutTopLeft);
01896   fCompStRqFrame->AddFrame(fRevFrame,fLayoutTopLeft);
01897 
01898   fLayoutCompStRqFrame =  new TGLayoutHints(kLHintsTop | kLHintsExpandX,
01899                                             xB1, xB1, xB1, xB1);                  fCnew++;
01900   AddFrame(fCompStRqFrame, fLayoutCompStRqFrame);
01901   AddFrame(fVoidFrame, fLayoutGeneral);
01902 
01903 
01904   //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01905   //
01906   //      Horizontal Frame: StexStin numbering + NbSampForCalc + Calculations
01907   //
01908   //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01909   fCompStnbFrame = new TGCompositeFrame(this,60,20,kHorizontalFrame,
01910                                        GetDefaultFrameBackground());              fCnew++;
01911 
01912 
01913   // ---------------------------------STEX STIN NUMBERING VIEW BUTTON
01914   //............ Button texts and lenghts of the input widgets
01915   TString xStexNbButText;
01916   if( fSubDet == "EB" ){xStexNbButText = "SM Tower Numbering";}
01917   if( fSubDet == "EE" ){xStexNbButText = "Dee SC Numbering";}
01918   fButStexNb = new TGTextButton(fCompStnbFrame, xStexNbButText, fButStexNbC);     fCnew++;
01919   fButStexNb->Connect("Clicked()","TEcnaGui", this, "DoButtonStexNb()");
01920   fButStexNb->SetBackgroundColor(SubDetColor); 
01921 
01922   //----------------------------------- Nb Of Samples For Calculations
01923   TString xNbSampForCalcButText = "Nb Samp Calc";
01924   Int_t nb_of_samp_calc_buf_lenght = 28;
01925   fNbSampForCalcFrame =
01926     new TGCompositeFrame(fCompStnbFrame,60,20, kHorizontalFrame, kSunkenFrame);   fCnew++;
01927 
01928   fNbSampForCalcBut = new TGTextButton(fNbSampForCalcFrame, xNbSampForCalcButText);                          fCnew++;
01929   fNbSampForCalcBut->Connect("Clicked()","TEcnaGui", this, "DoButtonNbSampForCalc()");
01930   fNbSampForCalcBut->SetToolTipText("Click here to register the number written on the right");
01931   fNbSampForCalcBut->SetBackgroundColor(SubDetColor);
01932   //fNbSampForCalcBut->SetFont("courier", GlobFont);
01933   fLayoutNbSampForCalcBut = new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);  fCnew++;
01934   fNbSampForCalcFrame->AddFrame(fNbSampForCalcBut,  fLayoutNbSampForCalcBut);
01935 
01936   fEntryNbSampForCalcNumber = new TGTextBuffer();                                          fCnew++;
01937   fNbSampForCalcText = new TGTextEntry(fNbSampForCalcFrame, fEntryNbSampForCalcNumber);                      fCnew++;
01938 
01939   TString xNbSampForCalcNumber = "Click and enter the nb of samples for calculations";
01940   fNbSampForCalcText->SetToolTipText(xNbSampForCalcNumber);
01941   fNbSampForCalcText->Resize(nb_of_samp_calc_buf_lenght, fNbSampForCalcText->GetDefaultHeight());
01942   DisplayInEntryField(fNbSampForCalcText, fKeyNbOfSampForCalc);
01943   fNbSampForCalcText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonNbSampForCalc()");
01944   
01945   fLayoutNbSampForCalcFieldText =
01946     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);             fCnew++;
01947   fNbSampForCalcFrame->AddFrame(fNbSampForCalcText, fLayoutNbSampForCalcFieldText);
01948   
01949   //--------------------------------- Calculations Menu
01950   TString xMenuBarComput  = "Calculations  ";
01951   fMenuComput = new TGPopupMenu(gClient->GetRoot());                              fCnew++;
01952   fMenuComput->AddEntry("Standard ( Pedestals, Noises, Cor(s,s) )",fMenuComputStdC);
01953   fMenuComput->AddEntry("Standard + |Cor(t,t')|  (long time)",fMenuComputSttC);
01954   fMenuComput->AddEntry("Standard + |Cor(t,t')| + |Cor(c,c')|  (long time + big file)",fMenuComputSccC);
01955 
01956   fMenuComput->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
01957   fMenuBarComput = new TGMenuBar(fCompStnbFrame , 1, 1, kHorizontalFrame);        fCnew++;
01958   fMenuBarComput->AddPopup(xMenuBarComput, fMenuComput, fLayoutTopLeft);
01959 
01960   //-------------------------- display frame stexstin numbering + Nb samp for calc + Calculations
01961   fCompStnbFrame->AddFrame(fButStexNb,fLayoutTopLeft);
01962   fCompStnbFrame->AddFrame(fMenuBarComput,fLayoutTopRight);
01963   fCompStnbFrame->AddFrame(fNbSampForCalcFrame,fLayoutTopRight);
01964 
01965   fLayoutCompStnbFrame =  new TGLayoutHints(kLHintsTop | kLHintsExpandX,
01966                                             xB1, xB1, xB1, xB1);                  fCnew++;
01967   AddFrame(fCompStnbFrame, fLayoutCompStnbFrame);
01968   AddFrame(fVoidFrame, fLayoutGeneral);
01969 
01970   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01971   //
01972   //                             SECTOR 2: Stex's if SM # 0 or Stas's if SM =0 
01973   //
01974   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01975   Int_t minmax_buf_lenght = 45;
01976 
01977   fStexUpFrame = new TGCompositeFrame
01978     (this,60,20,kVerticalFrame, GetDefaultFrameBackground());                    fCnew++;
01979   TString xYminButText = " Ymin ";
01980   TString xYmaxButText = " Ymax ";
01981   //########################################### Composite frame number of events found in the data
01982   fVmmD_NOE_ChNbFrame = new TGCompositeFrame
01983     (fStexUpFrame,60,20, kHorizontalFrame, kSunkenFrame);                        fCnew++;
01984   //...................................... Menu number of events found in the data
01985 
01986   //...................................... Frame for Ymax
01987   fVmaxD_NOE_ChNbFrame = new TGCompositeFrame
01988     (fVmmD_NOE_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                 fCnew++;
01989   //...................................... Button Max + Entry field 
01990   fVmaxD_NOE_ChNbBut = new TGTextButton(fVmaxD_NOE_ChNbFrame, xYmaxButText);     fCnew++;
01991   fVmaxD_NOE_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVmaxD_NOE_ChNb()");
01992   fVmaxD_NOE_ChNbBut->SetToolTipText("Click here to register ymax for the display of the quantity");
01993   fVmaxD_NOE_ChNbBut->SetBackgroundColor(SubDetColor); 
01994   fLayoutVmaxD_NOE_ChNbBut =
01995     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                fCnew++;
01996   fVmaxD_NOE_ChNbFrame->AddFrame(fVmaxD_NOE_ChNbBut,  fLayoutVmaxD_NOE_ChNbBut);
01997   fEntryVmaxD_NOE_ChNbNumber = new TGTextBuffer();                               fCnew++;
01998   fVmaxD_NOE_ChNbText =
01999     new TGTextEntry(fVmaxD_NOE_ChNbFrame, fEntryVmaxD_NOE_ChNbNumber);           fCnew++;
02000   fVmaxD_NOE_ChNbText->SetToolTipText("Click and enter ymax");
02001   fVmaxD_NOE_ChNbText->Resize(minmax_buf_lenght, fVmaxD_NOE_ChNbText->GetDefaultHeight());
02002   DisplayInEntryField(fVmaxD_NOE_ChNbText, fKeyVmaxD_NOE_ChNb);
02003   fVmaxD_NOE_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVmaxD_NOE_ChNb()");
02004 
02005   fLayoutVmaxD_NOE_ChNbFieldText =
02006     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);            fCnew++;
02007   fVmaxD_NOE_ChNbFrame->AddFrame(fVmaxD_NOE_ChNbText, fLayoutVmaxD_NOE_ChNbFieldText);
02008   fLayoutVmaxD_NOE_ChNbFrame =
02009     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);               fCnew++;
02010   fVmmD_NOE_ChNbFrame->AddFrame(fVmaxD_NOE_ChNbFrame, fLayoutVmaxD_NOE_ChNbFrame);
02011 
02012   //...................................... Frame for Ymin
02013   fVminD_NOE_ChNbFrame = new TGCompositeFrame       
02014     (fVmmD_NOE_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                 fCnew++;
02015   //...................................... Button Min + Entry field 
02016   fVminD_NOE_ChNbBut = new TGTextButton(fVminD_NOE_ChNbFrame, xYminButText);     fCnew++;
02017   fVminD_NOE_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVminD_NOE_ChNb()");
02018   fVminD_NOE_ChNbBut->SetToolTipText("Click here to register ymin for the display of the quantity");
02019   fVminD_NOE_ChNbBut->SetBackgroundColor(SubDetColor);
02020   fLayoutVminD_NOE_ChNbBut =
02021     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);               fCnew++;
02022   fVminD_NOE_ChNbFrame->AddFrame(fVminD_NOE_ChNbBut,  fLayoutVminD_NOE_ChNbBut);
02023   fEntryVminD_NOE_ChNbNumber = new TGTextBuffer();                              fCnew++;
02024   fVminD_NOE_ChNbText =
02025     new TGTextEntry(fVminD_NOE_ChNbFrame, fEntryVminD_NOE_ChNbNumber);          fCnew++;
02026   fVminD_NOE_ChNbText->SetToolTipText("Click and enter ymin");
02027   fVminD_NOE_ChNbText->Resize(minmax_buf_lenght, fVminD_NOE_ChNbText->GetDefaultHeight());
02028   DisplayInEntryField(fVminD_NOE_ChNbText,fKeyVminD_NOE_ChNb);
02029   fVminD_NOE_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVminD_NOE_ChNb()");
02030   fLayoutVminD_NOE_ChNbFieldText =
02031     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);           fCnew++;
02032   fVminD_NOE_ChNbFrame->AddFrame(fVminD_NOE_ChNbText, fLayoutVminD_NOE_ChNbFieldText);
02033   fLayoutVminD_NOE_ChNbFrame =
02034     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);              fCnew++;
02035   fVmmD_NOE_ChNbFrame->AddFrame(fVminD_NOE_ChNbFrame, fLayoutVminD_NOE_ChNbFrame);
02036 
02037   //...................................... MenuBar strings
02038   TString xHistoChannels = "1D Histo";
02039   TString xHistoChannelsSame = "1D Histo SAME" ;
02040   TString xHistoChannelsSameP = "1D Histo SAME n";
02041   TString xHistoProjection = "1D Histo Projection";
02042   TString xHistoProjectionSame = "1D Histo Projection SAME";
02043   TString xHistoProjectionSameP = "1D Histo Projection SAME n";
02044   TString xHocoVecoViewSorS = "2D, Histo";
02045   if( fSubDet == "EB" ){xHocoVecoViewSorS = "2D, Histo (eta,phi)";}
02046   if( fSubDet == "EE" ){xHocoVecoViewSorS = "2D, Histo (IX,IY)";}
02047   TString xAsciiFileStex = "1D Histo, write in ASCII file";
02048 
02049   //...................................... Frame
02050   TString xMenuD_NOE_ChNb = "Numbers of events ";
02051   fMenuD_NOE_ChNb = new TGPopupMenu(gClient->GetRoot());                                   fCnew++;
02052   fMenuD_NOE_ChNb->AddEntry(xHistoChannels,fMenuD_NOE_ChNbFullC);
02053   fMenuD_NOE_ChNb->AddEntry(xHistoChannelsSame,fMenuD_NOE_ChNbSameC);
02054   fMenuD_NOE_ChNb->AddSeparator();
02055   fMenuD_NOE_ChNb->AddEntry(xHocoVecoViewSorS,fMenuD_NOE_ChNbHocoVecoC);
02056   fMenuD_NOE_ChNb->AddSeparator();
02057   fMenuD_NOE_ChNb->AddEntry(xAsciiFileStex,fMenuD_NOE_ChNbAsciiFileC);
02058   fMenuD_NOE_ChNb->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02059   fMenuBarD_NOE_ChNb = new TGMenuBar(fVmmD_NOE_ChNbFrame, 1, 1, kHorizontalFrame);         fCnew++;
02060 
02061   //fMenuBarD_NOE_ChNb->SetMinWidth(200);    // <= N'A STRICTEMENT AUCUN EFFET.
02062 
02063   fMenuBarD_NOE_ChNb->AddPopup(xMenuD_NOE_ChNb, fMenuD_NOE_ChNb, fLayoutGeneral);
02064   fLayoutMenuBarD_NOE_ChNb = new TGLayoutHints(kLHintsRight, xB1,xB1,xB1,xB1);             fCnew++;
02065   fVmmD_NOE_ChNbFrame->AddFrame(fMenuBarD_NOE_ChNb, fLayoutMenuBarD_NOE_ChNb);
02066   fLayoutVmmD_NOE_ChNbFrame =
02067     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                         fCnew++;
02068   fStexUpFrame->AddFrame(fVmmD_NOE_ChNbFrame, fLayoutVmmD_NOE_ChNbFrame);
02069 
02070   //............................. Expectation values + Sigmas Vertical frame
02071   fStexHozFrame =
02072     new TGCompositeFrame(fStexUpFrame,60,20,kVerticalFrame,
02073                          GetDefaultFrameBackground());                   fCnew++;
02074 
02075   //########################################### Composite frame ev of ev (pedestals)
02076   fVmmD_Ped_ChNbFrame = new TGCompositeFrame
02077     (fStexHozFrame,60,20, kHorizontalFrame, kSunkenFrame);          fCnew++;
02078 
02079   //...................................... Menu ev of ev
02080 
02081   //...................................... Frame for Ymax
02082   fVmaxD_Ped_ChNbFrame = new TGCompositeFrame
02083     (fVmmD_Ped_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                           fCnew++;
02084   //...................................... Button Max + Entry field 
02085   fVmaxD_Ped_ChNbBut = new TGTextButton(fVmaxD_Ped_ChNbFrame, xYmaxButText);               fCnew++;
02086   fVmaxD_Ped_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVmaxD_Ped_ChNb()");
02087   fVmaxD_Ped_ChNbBut->SetToolTipText("Click here to register ymax for the display of the quantity");
02088   fLayoutVmaxD_Ped_ChNbBut = new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1); fCnew++;
02089   fVmaxD_Ped_ChNbBut->SetBackgroundColor(SubDetColor);
02090   fVmaxD_Ped_ChNbFrame->AddFrame(fVmaxD_Ped_ChNbBut,  fLayoutVmaxD_Ped_ChNbBut);
02091   fEntryVmaxD_Ped_ChNbNumber = new TGTextBuffer();                                         fCnew++;
02092   fVmaxD_Ped_ChNbText = new TGTextEntry(fVmaxD_Ped_ChNbFrame, fEntryVmaxD_Ped_ChNbNumber); fCnew++;
02093   fVmaxD_Ped_ChNbText->SetToolTipText("Click and enter ymax");
02094   fVmaxD_Ped_ChNbText->Resize(minmax_buf_lenght, fVmaxD_Ped_ChNbText->GetDefaultHeight());
02095   DisplayInEntryField(fVmaxD_Ped_ChNbText,fKeyVmaxD_Ped_ChNb);
02096   fVmaxD_Ped_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVmaxD_Ped_ChNb()");
02097   fLayoutVmaxD_Ped_ChNbFieldText =
02098     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                      fCnew++;
02099   fVmaxD_Ped_ChNbFrame->AddFrame(fVmaxD_Ped_ChNbText, fLayoutVmaxD_Ped_ChNbFieldText);
02100   fLayoutVmaxD_Ped_ChNbFrame =
02101     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                         fCnew++;
02102   fVmmD_Ped_ChNbFrame->AddFrame(fVmaxD_Ped_ChNbFrame, fLayoutVmaxD_Ped_ChNbFrame);
02103 
02104   //...................................... Frame for Ymin
02105   fVminD_Ped_ChNbFrame = new TGCompositeFrame
02106     (fVmmD_Ped_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                           fCnew++;
02107   //...................................... Button Min + Entry field 
02108   fVminD_Ped_ChNbBut = new TGTextButton(fVminD_Ped_ChNbFrame, xYminButText);               fCnew++;
02109   fVminD_Ped_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVminD_Ped_ChNb()");
02110   fVminD_Ped_ChNbBut->SetToolTipText("Click here to register ymin for the display of the quantity");
02111   fVminD_Ped_ChNbBut->SetBackgroundColor(SubDetColor);
02112   fLayoutVminD_Ped_ChNbBut =
02113     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                          fCnew++;
02114   fVminD_Ped_ChNbFrame->AddFrame(fVminD_Ped_ChNbBut,  fLayoutVminD_Ped_ChNbBut);
02115 
02116   fEntryVminD_Ped_ChNbNumber = new TGTextBuffer();                                         fCnew++;
02117   fVminD_Ped_ChNbText = new TGTextEntry(fVminD_Ped_ChNbFrame, fEntryVminD_Ped_ChNbNumber); fCnew++;
02118   fVminD_Ped_ChNbText->SetToolTipText("Click and enter ymin");
02119   fVminD_Ped_ChNbText->Resize(minmax_buf_lenght, fVminD_Ped_ChNbText->GetDefaultHeight());
02120   DisplayInEntryField(fVminD_Ped_ChNbText,fKeyVminD_Ped_ChNb);
02121   fVminD_Ped_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVminD_Ped_ChNb()");
02122   fLayoutVminD_Ped_ChNbFieldText =
02123     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                  fCnew++;
02124   fVminD_Ped_ChNbFrame->AddFrame(fVminD_Ped_ChNbText, fLayoutVminD_Ped_ChNbFieldText);
02125   fLayoutVminD_Ped_ChNbFrame =
02126     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                     fCnew++;
02127   fVmmD_Ped_ChNbFrame->AddFrame(fVminD_Ped_ChNbFrame, fLayoutVminD_Ped_ChNbFrame);
02128 
02129   //...................................... Frame
02130   TString xMenuD_Ped_ChNb = "       Pedestals ";
02131   fMenuD_Ped_ChNb = new TGPopupMenu(gClient->GetRoot());                               fCnew++;
02132   fMenuD_Ped_ChNb->AddEntry(xHistoChannels,fMenuD_Ped_ChNbFullC);
02133   fMenuD_Ped_ChNb->AddEntry(xHistoChannelsSame,fMenuD_Ped_ChNbSameC);
02134   fMenuD_Ped_ChNb->AddSeparator();
02135   fMenuD_Ped_ChNb->AddEntry(xHocoVecoViewSorS,fMenuD_Ped_ChNbHocoVecoC);
02136   fMenuD_Ped_ChNb->AddSeparator();
02137   fMenuD_Ped_ChNb->AddEntry(xAsciiFileStex,fMenuD_Ped_ChNbAsciiFileC);
02138   fMenuD_Ped_ChNb->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02139   fMenuBarD_Ped_ChNb = new TGMenuBar(fVmmD_Ped_ChNbFrame, 1, 1, kHorizontalFrame);     fCnew++;
02140   fMenuBarD_Ped_ChNb->AddPopup(xMenuD_Ped_ChNb, fMenuD_Ped_ChNb, fLayoutGeneral);
02141   fLayoutMenuBarD_Ped_ChNb = new TGLayoutHints(kLHintsRight, xB1,xB1,xB1,xB1);         fCnew++;
02142   fVmmD_Ped_ChNbFrame->AddFrame(fMenuBarD_Ped_ChNb, fLayoutMenuBarD_Ped_ChNb);  
02143 
02144   fLayoutVmmD_Ped_ChNbFrame =
02145     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                     fCnew++;
02146   fStexHozFrame->AddFrame(fVmmD_Ped_ChNbFrame, fLayoutVmmD_Ped_ChNbFrame);
02147 
02148   //########################################### Composite frame for TOTAL NOISE
02149   fVmmD_TNo_ChNbFrame = new TGCompositeFrame
02150     (fStexHozFrame,60,20, kHorizontalFrame, kSunkenFrame);                                  fCnew++;
02151 
02152   //...................................... Menu ev of sig 
02153   //...................................... Frame for Ymax
02154   fVmaxD_TNo_ChNbFrame = new TGCompositeFrame
02155     (fVmmD_TNo_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                            fCnew++;
02156   //...................................... Button Max + Entry field 
02157   fVmaxD_TNo_ChNbBut = new TGTextButton(fVmaxD_TNo_ChNbFrame, xYmaxButText);                fCnew++;
02158   fVmaxD_TNo_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVmaxD_TNo_ChNb()");
02159   fVmaxD_TNo_ChNbBut->SetToolTipText("Click here to register ymax for the display of the quantity");
02160   fVmaxD_TNo_ChNbBut->SetBackgroundColor(SubDetColor);
02161   fLayoutVmaxD_TNo_ChNbBut =
02162     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                           fCnew++;
02163   fVmaxD_TNo_ChNbFrame->AddFrame(fVmaxD_TNo_ChNbBut,  fLayoutVmaxD_TNo_ChNbBut);
02164   fEntryVmaxD_TNo_ChNbNumber = new TGTextBuffer();                                          fCnew++;
02165   fVmaxD_TNo_ChNbText = new TGTextEntry(fVmaxD_TNo_ChNbFrame, fEntryVmaxD_TNo_ChNbNumber);  fCnew++;
02166   fVmaxD_TNo_ChNbText->SetToolTipText("Click and enter ymax");
02167   fVmaxD_TNo_ChNbText->Resize(minmax_buf_lenght, fVmaxD_TNo_ChNbText->GetDefaultHeight());
02168   DisplayInEntryField(fVmaxD_TNo_ChNbText,fKeyVmaxD_TNo_ChNb);
02169   fVmaxD_TNo_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVmaxD_TNo_ChNb()");
02170   fLayoutVmaxD_TNo_ChNbFieldText =
02171     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                       fCnew++;
02172   fVmaxD_TNo_ChNbFrame->AddFrame(fVmaxD_TNo_ChNbText, fLayoutVmaxD_TNo_ChNbFieldText);
02173   fLayoutVmaxD_TNo_ChNbFrame =
02174     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                          fCnew++;
02175   fVmmD_TNo_ChNbFrame->AddFrame(fVmaxD_TNo_ChNbFrame, fLayoutVmaxD_TNo_ChNbFrame);
02176 
02177   //...................................... Frame for Ymin
02178   fVminD_TNo_ChNbFrame = new TGCompositeFrame
02179     (fVmmD_TNo_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                            fCnew++;
02180   //...................................... Button Min + Entry field 
02181   fVminD_TNo_ChNbBut = new TGTextButton(fVminD_TNo_ChNbFrame, xYminButText);                fCnew++;
02182   fVminD_TNo_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVminD_TNo_ChNb()");
02183   fVminD_TNo_ChNbBut->SetToolTipText("Click here to register ymin for the display of the quantity");
02184   fVminD_TNo_ChNbBut->SetBackgroundColor(SubDetColor);
02185   fLayoutVminD_TNo_ChNbBut =
02186     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                           fCnew++;
02187   fVminD_TNo_ChNbFrame->AddFrame(fVminD_TNo_ChNbBut,  fLayoutVminD_TNo_ChNbBut);
02188 
02189   fEntryVminD_TNo_ChNbNumber = new TGTextBuffer();                                          fCnew++;
02190   fVminD_TNo_ChNbText = new TGTextEntry(fVminD_TNo_ChNbFrame, fEntryVminD_TNo_ChNbNumber);  fCnew++;
02191   fVminD_TNo_ChNbText->SetToolTipText("Click and enter ymin");
02192   fVminD_TNo_ChNbText->Resize(minmax_buf_lenght, fVminD_TNo_ChNbText->GetDefaultHeight());
02193   DisplayInEntryField(fVminD_TNo_ChNbText,fKeyVminD_TNo_ChNb);
02194   fVminD_TNo_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVminD_TNo_ChNb()");
02195   fLayoutVminD_TNo_ChNbFieldText =
02196     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                 fCnew++;
02197   fVminD_TNo_ChNbFrame->AddFrame(fVminD_TNo_ChNbText, fLayoutVminD_TNo_ChNbFieldText);
02198   fLayoutVminD_TNo_ChNbFrame =
02199     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                    fCnew++;
02200   fVmmD_TNo_ChNbFrame->AddFrame(fVminD_TNo_ChNbFrame, fLayoutVminD_TNo_ChNbFrame);
02201 
02202   //...................................... Frame
02203   TString xMenuD_TNo_ChNb =  "        Total Noise ";
02204   fMenuD_TNo_ChNb = new TGPopupMenu(gClient->GetRoot());                              fCnew++;
02205   fMenuD_TNo_ChNb->AddEntry(xHistoChannels,fMenuD_TNo_ChNbFullC);
02206   fMenuD_TNo_ChNb->AddEntry(xHistoChannelsSame,fMenuD_TNo_ChNbSameC);
02207   fMenuD_TNo_ChNb->AddEntry(xHistoChannelsSameP,fMenuD_TNo_ChNbSamePC);
02208   fMenuD_TNo_ChNb->AddSeparator();
02209   fMenuD_TNo_ChNb->AddEntry(xHocoVecoViewSorS,fMenuD_TNo_ChNbHocoVecoC);
02210   fMenuD_TNo_ChNb->AddSeparator();
02211   fMenuD_TNo_ChNb->AddEntry(xAsciiFileStex,fMenuD_TNo_ChNbAsciiFileC);
02212   fMenuD_TNo_ChNb->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02213   fMenuBarD_TNo_ChNb = new TGMenuBar(fVmmD_TNo_ChNbFrame, 1, 1, kHorizontalFrame);    fCnew++;
02214   fMenuBarD_TNo_ChNb->AddPopup(xMenuD_TNo_ChNb, fMenuD_TNo_ChNb, fLayoutGeneral);
02215   fLayoutMenuBarD_TNo_ChNb = new TGLayoutHints(kLHintsRight, xB1,xB1,xB1,xB1);        fCnew++;
02216   fVmmD_TNo_ChNbFrame->AddFrame(fMenuBarD_TNo_ChNb, fLayoutMenuBarD_TNo_ChNb);
02217 
02218   fLayoutVmmD_TNo_ChNbFrame =
02219     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                     fCnew++;
02220   fStexHozFrame->AddFrame(fVmmD_TNo_ChNbFrame, fLayoutVmmD_TNo_ChNbFrame);
02221 
02222   //########################################### Composite frame for LOW FREQUENCY NOISE
02223   fVmmD_LFN_ChNbFrame = new TGCompositeFrame
02224     (fStexHozFrame,60,20, kHorizontalFrame, kSunkenFrame);                                     fCnew++;
02225 
02226   //...................................... Menu sig of ev (LOW FREQUENCY NOISE)
02227   //...................................... Frame for Ymax
02228   fVmaxD_LFN_ChNbFrame = new TGCompositeFrame
02229     (fVmmD_LFN_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                               fCnew++;
02230   //...................................... Button Max + Entry field 
02231   fVmaxD_LFN_ChNbBut = new TGTextButton(fVmaxD_LFN_ChNbFrame, xYmaxButText);                   fCnew++;
02232   fVmaxD_LFN_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVmaxD_LFN_ChNb()");
02233   fVmaxD_LFN_ChNbBut->SetToolTipText("Click here to register ymax for the display of the quantity");
02234   fVmaxD_LFN_ChNbBut->SetBackgroundColor(SubDetColor);
02235   fLayoutVmaxD_LFN_ChNbBut =
02236     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                              fCnew++;
02237   fVmaxD_LFN_ChNbFrame->AddFrame(fVmaxD_LFN_ChNbBut,  fLayoutVmaxD_LFN_ChNbBut);
02238   fEntryVmaxD_LFN_ChNbNumber = new TGTextBuffer();                                             fCnew++;
02239   fVmaxD_LFN_ChNbText = new TGTextEntry(fVmaxD_LFN_ChNbFrame, fEntryVmaxD_LFN_ChNbNumber);     fCnew++;
02240   fVmaxD_LFN_ChNbText->SetToolTipText("Click and enter ymax");
02241   fVmaxD_LFN_ChNbText->Resize(minmax_buf_lenght, fVmaxD_LFN_ChNbText->GetDefaultHeight());
02242   DisplayInEntryField(fVmaxD_LFN_ChNbText,fKeyVmaxD_LFN_ChNb);
02243   fVmaxD_LFN_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVmaxD_LFN_ChNb()");
02244   fLayoutVmaxD_LFN_ChNbFieldText =
02245     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                          fCnew++;
02246   fVmaxD_LFN_ChNbFrame->AddFrame(fVmaxD_LFN_ChNbText, fLayoutVmaxD_LFN_ChNbFieldText);
02247   fLayoutVmaxD_LFN_ChNbFrame =
02248     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                             fCnew++;
02249   fVmmD_LFN_ChNbFrame->AddFrame(fVmaxD_LFN_ChNbFrame, fLayoutVmaxD_LFN_ChNbFrame);
02250 
02251   //...................................... Frame for Ymin
02252   fVminD_LFN_ChNbFrame = new TGCompositeFrame
02253     (fVmmD_LFN_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                               fCnew++;
02254   //...................................... Button Min + Entry field 
02255   fVminD_LFN_ChNbBut = new TGTextButton(fVminD_LFN_ChNbFrame, xYminButText);                   fCnew++;
02256   fVminD_LFN_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVminD_LFN_ChNb()");
02257   fVminD_LFN_ChNbBut->SetToolTipText("Click here to register ymin for the display of the quantity");
02258   fVminD_LFN_ChNbBut->SetBackgroundColor(SubDetColor);
02259   fLayoutVminD_LFN_ChNbBut =
02260     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                             fCnew++;
02261   fVminD_LFN_ChNbFrame->AddFrame(fVminD_LFN_ChNbBut,  fLayoutVminD_LFN_ChNbBut);
02262   fEntryVminD_LFN_ChNbNumber = new TGTextBuffer();                                            fCnew++;
02263   fVminD_LFN_ChNbText = new TGTextEntry(fVminD_LFN_ChNbFrame, fEntryVminD_LFN_ChNbNumber);    fCnew++;
02264   fVminD_LFN_ChNbText->SetToolTipText("Click and enter ymin");
02265   fVminD_LFN_ChNbText->Resize(minmax_buf_lenght, fVminD_LFN_ChNbText->GetDefaultHeight());
02266   DisplayInEntryField(fVminD_LFN_ChNbText,fKeyVminD_LFN_ChNb);
02267   fVminD_LFN_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVminD_LFN_ChNb()");
02268   fLayoutVminD_LFN_ChNbFieldText =
02269     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                         fCnew++;
02270   fVminD_LFN_ChNbFrame->AddFrame(fVminD_LFN_ChNbText, fLayoutVminD_LFN_ChNbFieldText);
02271   fLayoutVminD_LFN_ChNbFrame =
02272     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                            fCnew++;
02273   fVmmD_LFN_ChNbFrame->AddFrame(fVminD_LFN_ChNbFrame, fLayoutVminD_LFN_ChNbFrame);
02274 
02275   //...................................... Frame
02276   TString xMenuD_LFN_ChNb =      " Low Frequency Noise ";
02277   fMenuD_LFN_ChNb = new TGPopupMenu(gClient->GetRoot());                                      fCnew++;
02278   fMenuD_LFN_ChNb->AddEntry(xHistoChannels,fMenuD_LFN_ChNbFullC);
02279   fMenuD_LFN_ChNb->AddEntry(xHistoChannelsSame,fMenuD_LFN_ChNbSameC);
02280   fMenuD_LFN_ChNb->AddEntry(xHistoChannelsSameP,fMenuD_LFN_ChNbSamePC);
02281   fMenuD_LFN_ChNb->AddSeparator();
02282   fMenuD_LFN_ChNb->AddEntry(xHocoVecoViewSorS,fMenuD_LFN_ChNbHocoVecoC);
02283   fMenuD_LFN_ChNb->AddSeparator();
02284   fMenuD_LFN_ChNb->AddEntry(xAsciiFileStex,fMenuD_LFN_ChNbAsciiFileC);
02285   fMenuD_LFN_ChNb->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02286   fMenuBarD_LFN_ChNb = new TGMenuBar(fVmmD_LFN_ChNbFrame, 1, 1, kHorizontalFrame);            fCnew++;
02287   fMenuBarD_LFN_ChNb->AddPopup(xMenuD_LFN_ChNb, fMenuD_LFN_ChNb, fLayoutGeneral);
02288   fLayoutMenuBarD_LFN_ChNb = new TGLayoutHints(kLHintsRight, xB1,xB1,xB1,xB1);                fCnew++;
02289   fVmmD_LFN_ChNbFrame->AddFrame(fMenuBarD_LFN_ChNb, fLayoutMenuBarD_LFN_ChNb);
02290   fLayoutVmmD_LFN_ChNbFrame =
02291     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                            fCnew++;
02292   fStexHozFrame->AddFrame(fVmmD_LFN_ChNbFrame, fLayoutVmmD_LFN_ChNbFrame);
02293 
02294   //########################################### Composite frame for HIGH FREQUENCY NOISE
02295   fVmmD_HFN_ChNbFrame = new TGCompositeFrame
02296     (fStexHozFrame,60,20, kHorizontalFrame, kSunkenFrame);                                    fCnew++;
02297 
02298   //...................................... Menu sig of sig (HIGH FREQUENCY NOISE)
02299   //...................................... Frame for Ymax
02300   fVmaxD_HFN_ChNbFrame = new TGCompositeFrame
02301     (fVmmD_HFN_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                              fCnew++;
02302   //...................................... Button Max + Entry field
02303   fVmaxD_HFN_ChNbBut = new TGTextButton(fVmaxD_HFN_ChNbFrame, xYmaxButText);                  fCnew++; 
02304   fVmaxD_HFN_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVmaxD_HFN_ChNb()");
02305   fVmaxD_HFN_ChNbBut->SetToolTipText("Click here to register ymax for the display of the quantity");
02306   fVmaxD_HFN_ChNbBut->SetBackgroundColor(SubDetColor);
02307   fLayoutVmaxD_HFN_ChNbBut =
02308     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                             fCnew++;
02309   fVmaxD_HFN_ChNbFrame->AddFrame(fVmaxD_HFN_ChNbBut,  fLayoutVmaxD_HFN_ChNbBut);
02310   fEntryVmaxD_HFN_ChNbNumber = new TGTextBuffer();                                            fCnew++;
02311   fVmaxD_HFN_ChNbText = new TGTextEntry(fVmaxD_HFN_ChNbFrame, fEntryVmaxD_HFN_ChNbNumber);    fCnew++;
02312   fVmaxD_HFN_ChNbText->SetToolTipText("Click and enter ymax");
02313   fVmaxD_HFN_ChNbText->Resize(minmax_buf_lenght, fVmaxD_HFN_ChNbText->GetDefaultHeight());
02314   DisplayInEntryField(fVmaxD_HFN_ChNbText,fKeyVmaxD_HFN_ChNb);
02315   fVmaxD_HFN_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVmaxD_HFN_ChNb()");
02316   fLayoutVmaxD_HFN_ChNbFieldText =
02317     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                         fCnew++;
02318   fVmaxD_HFN_ChNbFrame->AddFrame(fVmaxD_HFN_ChNbText, fLayoutVmaxD_HFN_ChNbFieldText);
02319   fLayoutVmaxD_HFN_ChNbFrame =
02320     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                            fCnew++;
02321   fVmmD_HFN_ChNbFrame->AddFrame(fVmaxD_HFN_ChNbFrame, fLayoutVmaxD_HFN_ChNbFrame);
02322 
02323   //...................................... Frame for Ymin
02324   fVminD_HFN_ChNbFrame = new TGCompositeFrame
02325     (fVmmD_HFN_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                              fCnew++;
02326   //...................................... Button Min + Entry field
02327   fVminD_HFN_ChNbBut = new TGTextButton(fVminD_HFN_ChNbFrame, xYminButText);                  fCnew++;
02328   fVminD_HFN_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVminD_HFN_ChNb()");
02329   fVminD_HFN_ChNbBut->SetToolTipText("Click here to register ymin for the display of the quantity");
02330   fVminD_HFN_ChNbBut->SetBackgroundColor(SubDetColor);
02331   fLayoutVminD_HFN_ChNbBut =
02332     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                          fCnew++;
02333   fVminD_HFN_ChNbFrame->AddFrame(fVminD_HFN_ChNbBut,  fLayoutVminD_HFN_ChNbBut);
02334   fEntryVminD_HFN_ChNbNumber = new TGTextBuffer();                                         fCnew++;
02335   fVminD_HFN_ChNbText = new TGTextEntry(fVminD_HFN_ChNbFrame, fEntryVminD_HFN_ChNbNumber); fCnew++;
02336   fVminD_HFN_ChNbText->SetToolTipText("Click and enter ymin");
02337   fVminD_HFN_ChNbText->Resize(minmax_buf_lenght, fVminD_HFN_ChNbText->GetDefaultHeight());
02338   DisplayInEntryField(fVminD_HFN_ChNbText,fKeyVminD_HFN_ChNb);
02339   fVminD_HFN_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVminD_HFN_ChNb()");
02340   fLayoutVminD_HFN_ChNbFieldText =
02341     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                      fCnew++;
02342   fVminD_HFN_ChNbFrame->AddFrame(fVminD_HFN_ChNbText, fLayoutVminD_HFN_ChNbFieldText);
02343   fLayoutVminD_HFN_ChNbFrame =
02344     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                         fCnew++;
02345   fVmmD_HFN_ChNbFrame->AddFrame(fVminD_HFN_ChNbFrame, fLayoutVminD_HFN_ChNbFrame);
02346 
02347   //...................................... Frame
02348   TString xMenuD_HFN_ChNb =  " High Frequency Noise ";
02349   fMenuD_HFN_ChNb = new TGPopupMenu(gClient->GetRoot());                              fCnew++;
02350   fMenuD_HFN_ChNb->AddEntry(xHistoChannels,fMenuD_HFN_ChNbFullC);
02351   fMenuD_HFN_ChNb->AddEntry(xHistoChannelsSame,fMenuD_HFN_ChNbSameC);
02352   fMenuD_HFN_ChNb->AddEntry(xHistoChannelsSameP,fMenuD_HFN_ChNbSamePC);
02353   fMenuD_HFN_ChNb->AddSeparator();
02354   fMenuD_HFN_ChNb->AddEntry(xHocoVecoViewSorS,fMenuD_HFN_ChNbHocoVecoC);
02355   fMenuD_HFN_ChNb->AddSeparator();
02356   fMenuD_HFN_ChNb->AddEntry(xAsciiFileStex,fMenuD_HFN_ChNbAsciiFileC);
02357   fMenuD_HFN_ChNb->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02358   fMenuBarD_HFN_ChNb = new TGMenuBar(fVmmD_HFN_ChNbFrame, 1, 1, kHorizontalFrame);    fCnew++;
02359   fMenuBarD_HFN_ChNb->AddPopup(xMenuD_HFN_ChNb, fMenuD_HFN_ChNb, fLayoutGeneral);
02360   fLayoutMenuBarD_HFN_ChNb = new TGLayoutHints(kLHintsRight, xB1,xB1,xB1,xB1);        fCnew++;
02361   fVmmD_HFN_ChNbFrame->AddFrame(fMenuBarD_HFN_ChNb, fLayoutMenuBarD_HFN_ChNb);
02362 
02363   fLayoutVmmD_HFN_ChNbFrame =
02364     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                    fCnew++;
02365   fStexHozFrame->AddFrame(fVmmD_HFN_ChNbFrame, fLayoutVmmD_HFN_ChNbFrame);
02366 
02367   //########################################### Composite frame for MEAN OF COR(s,s')
02368   fVmmD_MCs_ChNbFrame = new TGCompositeFrame
02369     (fStexHozFrame,60,20, kHorizontalFrame, kSunkenFrame);                            fCnew++;
02370 
02371   //...................................... Menu ev of Corss
02372 
02373   //...................................... Frame
02374   fVmaxD_MCs_ChNbFrame = new TGCompositeFrame
02375     (fVmmD_MCs_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                              fCnew++;
02376   //...................................... Button Max + Entry field 
02377   fVmaxD_MCs_ChNbBut = new TGTextButton(fVmaxD_MCs_ChNbFrame, xYmaxButText);                  fCnew++;
02378   fVmaxD_MCs_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVmaxD_MCs_ChNb()");
02379   fVmaxD_MCs_ChNbBut->SetToolTipText("Click here to register ymax for the display of the quantity");
02380   fVmaxD_MCs_ChNbBut->SetBackgroundColor(SubDetColor);
02381   fLayoutVmaxD_MCs_ChNbBut =
02382     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                             fCnew++;
02383   fVmaxD_MCs_ChNbFrame->AddFrame(fVmaxD_MCs_ChNbBut,  fLayoutVmaxD_MCs_ChNbBut);
02384   fEntryVmaxD_MCs_ChNbNumber = new TGTextBuffer();                                            fCnew++;
02385   fVmaxD_MCs_ChNbText = new TGTextEntry(fVmaxD_MCs_ChNbFrame, fEntryVmaxD_MCs_ChNbNumber);    fCnew++;
02386   fVmaxD_MCs_ChNbText->SetToolTipText("Click and enter ymax");
02387   fVmaxD_MCs_ChNbText->Resize(minmax_buf_lenght, fVmaxD_MCs_ChNbText->GetDefaultHeight());
02388   DisplayInEntryField(fVmaxD_MCs_ChNbText, fKeyVmaxD_MCs_ChNb);
02389   fVmaxD_MCs_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVmaxD_MCs_ChNb()");
02390   fLayoutVmaxD_MCs_ChNbFieldText =
02391     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                         fCnew++;
02392   fVmaxD_MCs_ChNbFrame->AddFrame(fVmaxD_MCs_ChNbText, fLayoutVmaxD_MCs_ChNbFieldText);
02393   fLayoutVmaxD_MCs_ChNbFrame =
02394     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                            fCnew++;
02395   fVmmD_MCs_ChNbFrame->AddFrame(fVmaxD_MCs_ChNbFrame, fLayoutVmaxD_MCs_ChNbFrame);
02396 
02397   //...................................... Frame for Ymin
02398   fVminD_MCs_ChNbFrame = new TGCompositeFrame
02399     (fVmmD_MCs_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                              fCnew++;
02400   //...................................... Button Min + Entry field 
02401   fVminD_MCs_ChNbBut = new TGTextButton(fVminD_MCs_ChNbFrame, xYminButText);                  fCnew++;
02402   fVminD_MCs_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVminD_MCs_ChNb()");
02403   fVminD_MCs_ChNbBut->SetToolTipText("Click here to register ymin for the display of the quantity");
02404   fVminD_MCs_ChNbBut->SetBackgroundColor(SubDetColor);
02405   fLayoutVminD_MCs_ChNbBut =
02406     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                             fCnew++;
02407   fVminD_MCs_ChNbFrame->AddFrame(fVminD_MCs_ChNbBut,  fLayoutVminD_MCs_ChNbBut);
02408   fEntryVminD_MCs_ChNbNumber = new TGTextBuffer();                                            fCnew++;
02409   fVminD_MCs_ChNbText = new TGTextEntry(fVminD_MCs_ChNbFrame, fEntryVminD_MCs_ChNbNumber);    fCnew++;
02410   fVminD_MCs_ChNbText->SetToolTipText("Click and enter ymin");
02411   fVminD_MCs_ChNbText->Resize(minmax_buf_lenght, fVminD_MCs_ChNbText->GetDefaultHeight());
02412   DisplayInEntryField(fVminD_MCs_ChNbText,fKeyVminD_MCs_ChNb);
02413   fVminD_MCs_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVminD_MCs_ChNb()");
02414   fLayoutVminD_MCs_ChNbFieldText =
02415     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                         fCnew++;
02416   fVminD_MCs_ChNbFrame->AddFrame(fVminD_MCs_ChNbText, fLayoutVminD_MCs_ChNbFieldText);
02417   fLayoutVminD_MCs_ChNbFrame =
02418     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                            fCnew++;
02419   fVmmD_MCs_ChNbFrame->AddFrame(fVminD_MCs_ChNbFrame, fLayoutVminD_MCs_ChNbFrame);
02420 
02421   //...................................... Frame for Mean of cor(s,s')
02422   TString xMenuD_MCs_ChNb = "     Mean of cor(s,s') ";
02423   fMenuD_MCs_ChNb = new TGPopupMenu(gClient->GetRoot());                                   fCnew++;
02424   fMenuD_MCs_ChNb->AddEntry(xHistoChannels,fMenuD_MCs_ChNbFullC);
02425   fMenuD_MCs_ChNb->AddEntry(xHistoChannelsSame,fMenuD_MCs_ChNbSameC);
02426   fMenuD_MCs_ChNb->AddEntry(xHistoChannelsSameP,fMenuD_MCs_ChNbSamePC);
02427   fMenuD_MCs_ChNb->AddSeparator();
02428   fMenuD_MCs_ChNb->AddEntry(xHocoVecoViewSorS,fMenuD_MCs_ChNbHocoVecoC);
02429   fMenuD_MCs_ChNb->AddSeparator();
02430   fMenuD_MCs_ChNb->AddEntry(xAsciiFileStex,fMenuD_MCs_ChNbAsciiFileC);
02431   fMenuD_MCs_ChNb->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02432   fMenuBarD_MCs_ChNb = new TGMenuBar(fVmmD_MCs_ChNbFrame, 1, 1, kHorizontalFrame);         fCnew++;
02433   fMenuBarD_MCs_ChNb->AddPopup(xMenuD_MCs_ChNb, fMenuD_MCs_ChNb, fLayoutGeneral);
02434   fLayoutMenuBarD_MCs_ChNb = new TGLayoutHints(kLHintsRight, xB1,xB1,xB1,xB1);             fCnew++;
02435   fVmmD_MCs_ChNbFrame->AddFrame(fMenuBarD_MCs_ChNb, fLayoutMenuBarD_MCs_ChNb);
02436 
02437   fLayoutVmmD_MCs_ChNbFrame =
02438     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                         fCnew++;
02439   fStexHozFrame->AddFrame(fVmmD_MCs_ChNbFrame, fLayoutVmmD_MCs_ChNbFrame);
02440 
02441   //########################################### Composite frame for SIG OF COR(s,s')
02442   fVmmD_SCs_ChNbFrame = new TGCompositeFrame 
02443     (fStexHozFrame,60,20, kHorizontalFrame, kSunkenFrame);                                 fCnew++;
02444 
02445   //...................................... Menu sig of Corss
02446   //...................................... Frame for Ymax
02447   fVmaxD_SCs_ChNbFrame = new TGCompositeFrame
02448     (fVmmD_SCs_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                           fCnew++;
02449   //...................................... Button Max + Entry field
02450   fVmaxD_SCs_ChNbBut = new TGTextButton(fVmaxD_SCs_ChNbFrame, xYmaxButText);               fCnew++;
02451   fVmaxD_SCs_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVmaxD_SCs_ChNb()");
02452   fVmaxD_SCs_ChNbBut->SetToolTipText("Click here to register ymax for the display of the quantity");
02453   fVmaxD_SCs_ChNbBut->SetBackgroundColor(SubDetColor);
02454   fLayoutVmaxD_SCs_ChNbBut =
02455     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                          fCnew++;
02456   fVmaxD_SCs_ChNbFrame->AddFrame(fVmaxD_SCs_ChNbBut,  fLayoutVmaxD_SCs_ChNbBut);
02457   fEntryVmaxD_SCs_ChNbNumber = new TGTextBuffer();                                         fCnew++;
02458   fVmaxD_SCs_ChNbText = new TGTextEntry(fVmaxD_SCs_ChNbFrame, fEntryVmaxD_SCs_ChNbNumber); fCnew++;
02459   fVmaxD_SCs_ChNbText->SetToolTipText("Click and enter ymax");
02460   fVmaxD_SCs_ChNbText->Resize(minmax_buf_lenght, fVmaxD_SCs_ChNbText->GetDefaultHeight());
02461   DisplayInEntryField(fVmaxD_SCs_ChNbText,fKeyVmaxD_SCs_ChNb);
02462   fVmaxD_SCs_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVmaxD_SCs_ChNb()");
02463   fLayoutVmaxD_SCs_ChNbFieldText =
02464     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                      fCnew++;
02465   fVmaxD_SCs_ChNbFrame->AddFrame(fVmaxD_SCs_ChNbText, fLayoutVmaxD_SCs_ChNbFieldText);
02466   fLayoutVmaxD_SCs_ChNbFrame =
02467     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                         fCnew++;
02468   fVmmD_SCs_ChNbFrame->AddFrame(fVmaxD_SCs_ChNbFrame, fLayoutVmaxD_SCs_ChNbFrame);
02469 
02470   //...................................... Frame for Ymin
02471   fVminD_SCs_ChNbFrame = new TGCompositeFrame
02472     (fVmmD_SCs_ChNbFrame,60,20, kHorizontalFrame, kSunkenFrame);                           fCnew++;
02473   //...................................... Button Min + Entry field 
02474   fVminD_SCs_ChNbBut = new TGTextButton(fVminD_SCs_ChNbFrame, xYminButText);               fCnew++;
02475   fVminD_SCs_ChNbBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVminD_SCs_ChNb()");
02476   fVminD_SCs_ChNbBut->SetToolTipText("Click here to register ymin for the display of the quantity");
02477   fVminD_SCs_ChNbBut->SetBackgroundColor(SubDetColor);
02478   fLayoutVminD_SCs_ChNbBut =
02479     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                          fCnew++;
02480   fVminD_SCs_ChNbFrame->AddFrame(fVminD_SCs_ChNbBut,  fLayoutVminD_SCs_ChNbBut);
02481   fEntryVminD_SCs_ChNbNumber = new TGTextBuffer();                                         fCnew++;
02482   fVminD_SCs_ChNbText = new TGTextEntry(fVminD_SCs_ChNbFrame, fEntryVminD_SCs_ChNbNumber); fCnew++;
02483   fVminD_SCs_ChNbText->SetToolTipText("Click and enter ymin");
02484   fVminD_SCs_ChNbText->Resize(minmax_buf_lenght, fVminD_SCs_ChNbText->GetDefaultHeight());
02485   DisplayInEntryField(fVminD_SCs_ChNbText,fKeyVminD_SCs_ChNb);
02486   fVminD_SCs_ChNbText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVminD_SCs_ChNb()");
02487   fLayoutVminD_SCs_ChNbFieldText =
02488     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                 fCnew++;
02489   fVminD_SCs_ChNbFrame->AddFrame(fVminD_SCs_ChNbText, fLayoutVminD_SCs_ChNbFieldText);
02490   fLayoutVminD_SCs_ChNbFrame =
02491     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                    fCnew++;
02492   fVmmD_SCs_ChNbFrame->AddFrame(fVminD_SCs_ChNbFrame, fLayoutVminD_SCs_ChNbFrame);
02493 
02494   //...................................... Frame
02495   TString xMenuD_SCs_ChNb = "   Sigma of cor(s,s') ";
02496   fMenuD_SCs_ChNb = new TGPopupMenu(gClient->GetRoot());                              fCnew++;
02497   fMenuD_SCs_ChNb->AddEntry(xHistoChannels,fMenuD_SCs_ChNbFullC);
02498   fMenuD_SCs_ChNb->AddEntry(xHistoChannelsSame,fMenuD_SCs_ChNbSameC);
02499   fMenuD_SCs_ChNb->AddEntry(xHistoChannelsSameP,fMenuD_SCs_ChNbSamePC);
02500   fMenuD_SCs_ChNb->AddSeparator();
02501   fMenuD_SCs_ChNb->AddEntry(xHocoVecoViewSorS,fMenuD_SCs_ChNbHocoVecoC);
02502   fMenuD_SCs_ChNb->AddSeparator();
02503   fMenuD_SCs_ChNb->AddEntry(xAsciiFileStex,fMenuD_SCs_ChNbAsciiFileC);
02504   fMenuD_SCs_ChNb->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02505   fMenuBarD_SCs_ChNb = new TGMenuBar(fVmmD_SCs_ChNbFrame, 1, 1, kHorizontalFrame);    fCnew++;
02506   fMenuBarD_SCs_ChNb->AddPopup(xMenuD_SCs_ChNb, fMenuD_SCs_ChNb, fLayoutGeneral);
02507   fLayoutMenuBarD_SCs_ChNb = new TGLayoutHints(kLHintsRight, xB1,xB1,xB1,xB1);        fCnew++;
02508   fVmmD_SCs_ChNbFrame->AddFrame(fMenuBarD_SCs_ChNb, fLayoutMenuBarD_SCs_ChNb);
02509 
02510   fLayoutVmmD_SCs_ChNbFrame =
02511     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                    fCnew++;
02512   fStexHozFrame->AddFrame(fVmmD_SCs_ChNbFrame, fLayoutVmmD_SCs_ChNbFrame);
02513 
02514   //######################################################################################################"
02515 
02516   //------------------------------------------- subframe
02517   fLayoutStexHozFrame =
02518     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1, xB1, xB1, xB1);                fCnew++;
02519   fStexUpFrame->AddFrame(fStexHozFrame, fLayoutStexHozFrame);
02520   AddFrame(fVoidFrame, fLayoutGeneral);
02521 
02522   //########################################### Composite frame corcc in Stins
02523   fVmmLHFccFrame = new TGCompositeFrame
02524     (fStexUpFrame,60,20, kHorizontalFrame, kSunkenFrame);                            fCnew++;
02525  
02526   //............ Menu Low and High Frequency correlations between channels for each Stin of Stex
02527 
02528   //...................................... Frame for Ymax
02529   fVmaxLHFccFrame = new TGCompositeFrame
02530     (fVmmLHFccFrame,60,20, kHorizontalFrame, kSunkenFrame);                          fCnew++;
02531   //...................................... Button Max + Entry field 
02532   fVmaxLHFccBut = new TGTextButton(fVmaxLHFccFrame, xYmaxButText);                   fCnew++;
02533   fVmaxLHFccBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVmaxLHFcc()");
02534   fVmaxLHFccBut->SetToolTipText("Click here to register ymax for the display of the quantity");
02535   fVmaxLHFccBut->SetBackgroundColor(SubDetColor);
02536   fLayoutVmaxLHFccBut =
02537     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                    fCnew++;
02538   //fVmaxLHFccFrame->AddFrame(fVmaxLHFccBut,  fLayoutVmaxLHFccBut);
02539   fEntryVmaxLHFccNumber = new TGTextBuffer();                                        fCnew++;
02540   fVmaxLHFccText = new TGTextEntry(fVmaxLHFccFrame, fEntryVmaxLHFccNumber);          fCnew++;
02541   fVmaxLHFccText->SetToolTipText("Click and enter ymax");
02542   fVmaxLHFccText->Resize(minmax_buf_lenght, fVmaxLHFccText->GetDefaultHeight());
02543   DisplayInEntryField(fVmaxLHFccText, fKeyVmaxLHFcc);
02544   fVmaxLHFccText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVmaxLHFcc()");
02545 
02546   fLayoutVmaxLHFccFieldText =
02547     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                fCnew++;
02548   //fVmaxLHFccFrame->AddFrame(fVmaxLHFccText, fLayoutVmaxLHFccFieldText);
02549   fLayoutVmaxLHFccFrame =
02550     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                   fCnew++;
02551   //fVmmLHFccFrame->AddFrame(fVmaxLHFccFrame, fLayoutVmaxLHFccFrame);
02552 
02553   //...................................... Frame for Ymin
02554   fVminLHFccFrame = new TGCompositeFrame
02555     (fVmmLHFccFrame,60,20, kHorizontalFrame, kSunkenFrame);                          fCnew++;
02556   //...................................... Button Min + Entry field
02557   fVminLHFccBut = new TGTextButton(fVminLHFccFrame, xYminButText);                   fCnew++;
02558   fVminLHFccBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVminLHFcc()");
02559   fVminLHFccBut->SetToolTipText("Click here to register ymin for the display of the quantity");
02560   fVminLHFccBut->SetBackgroundColor(SubDetColor);
02561   fLayoutVminLHFccBut =
02562     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                    fCnew++;
02563   //fVminLHFccFrame->AddFrame(fVminLHFccBut,  fLayoutVminLHFccBut);
02564   fEntryVminLHFccNumber = new TGTextBuffer();                                        fCnew++;
02565   fVminLHFccText = new TGTextEntry(fVminLHFccFrame, fEntryVminLHFccNumber);          fCnew++;
02566   fVminLHFccText->SetToolTipText("Click and enter ymin");
02567   fVminLHFccText->Resize(minmax_buf_lenght, fVminLHFccText->GetDefaultHeight());
02568   DisplayInEntryField(fVminLHFccText,fKeyVminLHFcc);
02569   fVminLHFccText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVminLHFcc()");
02570   fLayoutVminLHFccFieldText =
02571     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                fCnew++;
02572   //fVminLHFccFrame->AddFrame(fVminLHFccText, fLayoutVminLHFccFieldText);
02573   fLayoutVminLHFccFrame =
02574     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                   fCnew++;
02575   //fVmmLHFccFrame->AddFrame(fVminLHFccFrame, fLayoutVminLHFccFrame);
02576 
02577   //........................................... Frame
02578   TString xLFccViewSorS;
02579   if( fSubDet == "EB" ){xLFccViewSorS = "Low Frequency Cor(c,c'), 2D view SM ";}
02580   if( fSubDet == "EE" ){xLFccViewSorS = "Low Frequency Cor(c,c'), 2D view Dee";}
02581   TString xHFccViewSorS;
02582   if( fSubDet == "EB" ){xHFccViewSorS = "High Frequency Cor(c,c'), 2D view SM ";}
02583   if( fSubDet == "EE" ){xHFccViewSorS = "High Frequency Cor(c,c'), 2D view Dee";}
02584 
02585   TString xMenuLHFcc;
02586   if( fSubDet == "EB" ){xMenuLHFcc = "LF, HF Cor(c,c') for each tower";}
02587   if( fSubDet == "EE" ){xMenuLHFcc = "LF, HF Cor(c,c') for each SC";}
02588   fMenuLHFcc = new TGPopupMenu(gClient->GetRoot());                                  fCnew++;
02589   fMenuLHFcc->AddEntry(xLFccViewSorS,fMenuLFccColzC);
02590   fMenuLHFcc->AddEntry(xHFccViewSorS,fMenuHFccColzC);
02591   fMenuLHFcc->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02592   fMenuBarLHFcc = new TGMenuBar(fVmmLHFccFrame, 1, 1, kHorizontalFrame);             fCnew++;
02593   fMenuBarLHFcc->AddPopup(xMenuLHFcc, fMenuLHFcc, fLayoutGeneral);
02594   fLayoutMenuBarLHFcc = new TGLayoutHints(kLHintsRight, xB1,xB1,xB1,xB1);            fCnew++;
02595   //fVmmLHFccFrame->AddFrame(fMenuBarLHFcc, fLayoutMenuBarLHFcc);
02596    fLayoutVmmLHFccFrame =
02597     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                   fCnew++;
02598    fStexUpFrame->AddFrame(fVmmLHFccFrame, fLayoutVmmLHFccFrame);
02599 
02600   //################################# Composite frame Low Freq Cor(c,c') for each pair of Stins
02601   fVmmLFccMosFrame = new TGCompositeFrame
02602     (fStexUpFrame,60,20, kHorizontalFrame, kSunkenFrame);                            fCnew++;
02603  
02604   //...................................... Menu correlations between Stins 
02605   //...................................... Frame
02606   fVmaxLFccMosFrame = new TGCompositeFrame
02607     (fVmmLFccMosFrame,60,20, kHorizontalFrame, kSunkenFrame);                        fCnew++;
02608   //...................................... Button Max + Entry field 
02609   fVmaxLFccMosBut = new TGTextButton(fVmaxLFccMosFrame, xYmaxButText);               fCnew++;
02610   fVmaxLFccMosBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVmaxLFccMos()");
02611   fVmaxLFccMosBut->SetToolTipText("Click here to register ymax for the display of the quantity");
02612   fVmaxLFccMosBut->SetBackgroundColor(SubDetColor);
02613   fLayoutVmaxLFccMosBut =
02614     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                    fCnew++;
02615   fVmaxLFccMosFrame->AddFrame(fVmaxLFccMosBut,  fLayoutVmaxLFccMosBut);
02616   fEntryVmaxLFccMosNumber = new TGTextBuffer();                                      fCnew++;
02617   fVmaxLFccMosText = new TGTextEntry(fVmaxLFccMosFrame, fEntryVmaxLFccMosNumber);    fCnew++;
02618   fVmaxLFccMosText->SetToolTipText("Click and enter ymax");
02619   fVmaxLFccMosText->Resize(minmax_buf_lenght, fVmaxLFccMosText->GetDefaultHeight());
02620   DisplayInEntryField(fVmaxLFccMosText, fKeyVmaxLFccMos);
02621   fVmaxLFccMosText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVmaxLFccMos()");
02622 
02623   fLayoutVmaxLFccMosFieldText =
02624     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                fCnew++;
02625   fVmaxLFccMosFrame->AddFrame(fVmaxLFccMosText, fLayoutVmaxLFccMosFieldText);
02626   fLayoutVmaxLFccMosFrame =
02627     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                   fCnew++;
02628   fVmmLFccMosFrame->AddFrame(fVmaxLFccMosFrame, fLayoutVmaxLFccMosFrame);
02629 
02630   //...................................... Frame for Ymin
02631   fVminLFccMosFrame = new TGCompositeFrame
02632     (fVmmLFccMosFrame,60,20, kHorizontalFrame, kSunkenFrame);                        fCnew++;
02633   //...................................... Button Min + Entry field 
02634   fVminLFccMosBut = new TGTextButton(fVminLFccMosFrame, xYminButText);               fCnew++;
02635   fVminLFccMosBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVminLFccMos()");
02636   fVminLFccMosBut->SetToolTipText("Click here to register ymin for the display of the quantity");
02637   fVminLFccMosBut->SetBackgroundColor(SubDetColor);
02638   fLayoutVminLFccMosBut =
02639     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                    fCnew++;
02640   fVminLFccMosFrame->AddFrame(fVminLFccMosBut,  fLayoutVminLFccMosBut);
02641   fEntryVminLFccMosNumber = new TGTextBuffer();                                      fCnew++;
02642   fVminLFccMosText = new TGTextEntry(fVminLFccMosFrame, fEntryVminLFccMosNumber);    fCnew++;
02643   fVminLFccMosText->SetToolTipText("Click and enter ymin");
02644   fVminLFccMosText->Resize(minmax_buf_lenght, fVminLFccMosText->GetDefaultHeight());
02645   DisplayInEntryField(fVminLFccMosText,fKeyVminLFccMos);
02646   fVminLFccMosText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVminLFccMos()");
02647   fLayoutVminLFccMosFieldText =
02648     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                fCnew++;
02649   fVminLFccMosFrame->AddFrame(fVminLFccMosText, fLayoutVminLFccMosFieldText);
02650   fLayoutVminLFccMosFrame =
02651     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                   fCnew++;
02652   fVmmLFccMosFrame->AddFrame(fVminLFccMosFrame, fLayoutVminLFccMosFrame);
02653 
02654   //...................................... Frame
02655   TString xMenuLFccMos;
02656   if( fSubDet == "EB" ){xMenuLFccMos = "Mean LF |Cor(c,c')| in (tow,tow')";}
02657   if( fSubDet == "EE" ){xMenuLFccMos = "Mean LF |Cor(c,c')| in (SC,SC')";}
02658 
02659   fMenuLFccMos = new TGPopupMenu(gClient->GetRoot());                                fCnew++;
02660   fMenuLFccMos->AddEntry("2D, COLZ ",fMenuLFccMosColzC);
02661   fMenuLFccMos->AddEntry("3D, LEGO2Z" ,fMenuLFccMosLegoC);
02662   fMenuLFccMos->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02663   fMenuBarLFccMos = new TGMenuBar(fVmmLFccMosFrame, 1, 1, kHorizontalFrame);         fCnew++;
02664   fMenuBarLFccMos->AddPopup(xMenuLFccMos, fMenuLFccMos, fLayoutGeneral);
02665   fLayoutMenuBarLFccMos = new TGLayoutHints(kLHintsRight, xB1,xB1,xB1,xB1);          fCnew++;
02666   fVmmLFccMosFrame->AddFrame(fMenuBarLFccMos, fLayoutMenuBarLFccMos);
02667   fLayoutVmmLFccMosFrame =
02668     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                   fCnew++;
02669   fStexUpFrame->AddFrame(fVmmLFccMosFrame, fLayoutVmmLFccMosFrame);
02670  
02671   //################################# Composite frame High Freq Cor(c,c') for each pair of Stins
02672   fVmmHFccMosFrame = new TGCompositeFrame
02673     (fStexUpFrame,60,20, kHorizontalFrame, kSunkenFrame);                            fCnew++;
02674  
02675   //...................................... Menu correlations between Stins 
02676   //...................................... Frame
02677   fVmaxHFccMosFrame = new TGCompositeFrame
02678     (fVmmHFccMosFrame,60,20, kHorizontalFrame, kSunkenFrame);                        fCnew++;
02679   //...................................... Button Max + Entry field 
02680   fVmaxHFccMosBut = new TGTextButton(fVmaxHFccMosFrame, xYmaxButText);               fCnew++;
02681   fVmaxHFccMosBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVmaxHFccMos()");
02682   fVmaxHFccMosBut->SetToolTipText("Click here to register ymax for the display of the quantity");
02683   fVmaxHFccMosBut->SetBackgroundColor(SubDetColor);
02684   fLayoutVmaxHFccMosBut =
02685     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                    fCnew++;
02686   fVmaxHFccMosFrame->AddFrame(fVmaxHFccMosBut,  fLayoutVmaxHFccMosBut);
02687   fEntryVmaxHFccMosNumber = new TGTextBuffer();                                      fCnew++;
02688   fVmaxHFccMosText = new TGTextEntry(fVmaxHFccMosFrame, fEntryVmaxHFccMosNumber);    fCnew++;
02689   fVmaxHFccMosText->SetToolTipText("Click and enter ymax");
02690   fVmaxHFccMosText->Resize(minmax_buf_lenght, fVmaxHFccMosText->GetDefaultHeight());
02691   DisplayInEntryField(fVmaxHFccMosText, fKeyVmaxHFccMos);
02692   fVmaxHFccMosText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVmaxHFccMos()");
02693 
02694   fLayoutVmaxHFccMosFieldText =
02695     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                fCnew++;
02696   fVmaxHFccMosFrame->AddFrame(fVmaxHFccMosText, fLayoutVmaxHFccMosFieldText);
02697   fLayoutVmaxHFccMosFrame =
02698     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                   fCnew++;
02699   fVmmHFccMosFrame->AddFrame(fVmaxHFccMosFrame, fLayoutVmaxHFccMosFrame);
02700 
02701   //...................................... Frame for Ymin
02702   fVminHFccMosFrame = new TGCompositeFrame
02703     (fVmmHFccMosFrame,60,20, kHorizontalFrame, kSunkenFrame);                        fCnew++;
02704   //...................................... Button Min + Entry field 
02705   fVminHFccMosBut = new TGTextButton(fVminHFccMosFrame, xYminButText);               fCnew++;
02706   fVminHFccMosBut->Connect("Clicked()","TEcnaGui", this, "DoButtonVminHFccMos()");
02707   fVminHFccMosBut->SetToolTipText("Click here to register ymin for the display of the quantity");
02708   fVminHFccMosBut->SetBackgroundColor(SubDetColor);
02709   fLayoutVminHFccMosBut =
02710     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);                    fCnew++;
02711   fVminHFccMosFrame->AddFrame(fVminHFccMosBut,  fLayoutVminHFccMosBut);
02712   fEntryVminHFccMosNumber = new TGTextBuffer();                                      fCnew++;
02713   fVminHFccMosText = new TGTextEntry(fVminHFccMosFrame, fEntryVminHFccMosNumber);    fCnew++;
02714   fVminHFccMosText->SetToolTipText("Click and enter ymin");
02715   fVminHFccMosText->Resize(minmax_buf_lenght, fVminHFccMosText->GetDefaultHeight());
02716   DisplayInEntryField(fVminHFccMosText,fKeyVminHFccMos);
02717   fVminHFccMosText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonVminHFccMos()");
02718   fLayoutVminHFccMosFieldText =
02719     new TGLayoutHints(kLHintsBottom | kLHintsRight, xB1,xB1,xB1,xB1);                fCnew++;
02720   fVminHFccMosFrame->AddFrame(fVminHFccMosText, fLayoutVminHFccMosFieldText);
02721   fLayoutVminHFccMosFrame =
02722     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                   fCnew++;
02723   fVmmHFccMosFrame->AddFrame(fVminHFccMosFrame, fLayoutVminHFccMosFrame);
02724 
02725   //...................................... Frame
02726   TString xMenuHFccMos;
02727   if( fSubDet == "EB" ){xMenuHFccMos = "Mean HF |Cor(c,c')| in (tow,tow')";}
02728   if( fSubDet == "EE" ){xMenuHFccMos = "Mean HF |Cor(c,c')| in (SC,SC')";}
02729 
02730   fMenuHFccMos = new TGPopupMenu(gClient->GetRoot());                                fCnew++;
02731   fMenuHFccMos->AddEntry("2D, COLZ ",fMenuHFccMosColzC);
02732   fMenuHFccMos->AddEntry("3D, LEGO2Z" ,fMenuHFccMosLegoC);
02733   fMenuHFccMos->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02734   fMenuBarHFccMos = new TGMenuBar(fVmmHFccMosFrame, 1, 1, kHorizontalFrame);         fCnew++;
02735   fMenuBarHFccMos->AddPopup(xMenuHFccMos, fMenuHFccMos, fLayoutGeneral);
02736   fLayoutMenuBarHFccMos = new TGLayoutHints(kLHintsRight, xB1,xB1,xB1,xB1);          fCnew++;
02737   fVmmHFccMosFrame->AddFrame(fMenuBarHFccMos, fLayoutMenuBarHFccMos);
02738   fLayoutVmmHFccMosFrame =
02739     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1);                   fCnew++;
02740   fStexUpFrame->AddFrame(fVmmHFccMosFrame, fLayoutVmmHFccMosFrame);
02741  
02742 
02743   //======================================= "Stex" frame =====================================
02744   fLayoutStexUpFrame =
02745     new TGLayoutHints(kLHintsTop | kLHintsCenterX, xB1, xB1, xB1, xB1);              fCnew++;
02746   AddFrame(fStexUpFrame, fLayoutStexUpFrame);
02747 
02748   AddFrame(fVoidFrame, fLayoutGeneral);
02749 
02750   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02751   //
02752   //                             SECTOR 3: Stin's
02753   //
02754   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02755 
02756   //-------------------------------- Stin A & Stin B FRAME
02757   fStinSpFrame =
02758     new TGCompositeFrame(this,60,20,kHorizontalFrame,
02759                          GetDefaultFrameBackground());                               fCnew++;
02760 
02761   TString xStinAButText = "?";
02762   TString xStinBButText = "?";
02763   Int_t Stin_buf_lenght = 10;
02764 
02765   if ( fSubDet == "EB" )
02766     {xStinAButText = "      Tower# [1,68]     "; xStinBButText  = "     Tower'# [1,68]      "; Stin_buf_lenght =  50;}
02767   if ( fSubDet == "EE" && ( fKeyStexNumber == 1 || fKeyStexNumber == 3 ) )
02768     {xStinAButText = "SC# for const. [150,298] "; xStinBButText  = "SC'# for const. [150,298] "; Stin_buf_lenght =  50;}
02769   if ( fSubDet == "EE" && ( fKeyStexNumber == 2 || fKeyStexNumber == 4 ) )
02770     {xStinAButText = "SC# for const. [  1,149] "; xStinBButText  = "SC'# for const. [  1,149] "; Stin_buf_lenght =  50;}
02771 
02772   //============================= STIN A =====================================
02773   TString xStinNumberText;
02774   if ( fSubDet == "EB" )
02775     {xStinNumberText = "Click here to register the tower number written on the right";}
02776   if ( fSubDet == "EE" )
02777     {xStinNumberText = "Click here to register the SC number written on the right";}
02778 
02779   TString xStinNumberValue;
02780   if ( fSubDet == "EB" )
02781     {xStinNumberValue = "Click and enter the tower number";}
02782   if ( fSubDet == "EE" )
02783     {xStinNumberValue = "Click and enter the SC number";}
02784 
02785   fTxSubFrame = new TGCompositeFrame
02786     (fStinSpFrame,60,20,kVerticalFrame, GetDefaultFrameBackground());     fCnew++;
02787 
02788   fStinAFrame = new TGCompositeFrame
02789     (fTxSubFrame,60,20,kHorizontalFrame,kSunkenFrame);                    fCnew++;
02790 
02791   fStinABut = new TGTextButton(fStinAFrame, xStinAButText, fStinAButC);   fCnew++;
02792   fStinABut->Connect("Clicked()","TEcnaGui", this, "DoButtonStinA()");
02793   fStinABut->SetToolTipText(xStinNumberText);
02794   fStinABut->Resize(Stin_buf_lenght, fStinABut->GetDefaultHeight());
02795   fStinABut->SetBackgroundColor(SubDetColor);
02796   fLayoutStinABut =
02797     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);         fCnew++;
02798   fStinAFrame->AddFrame(fStinABut,  fLayoutStinABut);
02799 
02800   fEntryStinANumber = new TGTextBuffer();                                 fCnew++;
02801   fStinAText = new TGTextEntry(fStinAFrame, fEntryStinANumber);           fCnew++;
02802   fStinAText->SetToolTipText(xStinNumberValue);
02803   fStinAText->Resize(Stin_buf_lenght, fStinAText->GetDefaultHeight());
02804 
02805   Int_t StinAValue = 0;
02806   if( fSubDet == "EB"){StinAValue = fKeyStinANumber;}
02807   if( fSubDet == "EE" && fKeyStexNumber != 0 )
02808     {StinAValue = fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fKeyStexNumber, fKeyStinANumber);}
02809   DisplayInEntryField(fStinAText,StinAValue);
02810 
02811   fStinAText->Connect("ReturnPressed()", "TEcnaGui",this, "DoButtonStinA()");
02812   fLayoutStinAField =
02813     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1 );        fCnew++;
02814   fStinAFrame->AddFrame(fStinAText, fLayoutStinAField);
02815   fTxSubFrame->AddFrame(fStinAFrame, fLayoutGeneral);
02816 
02817   //========================== STIN A CRYSTAL NUMBERING VIEW
02818   TString xChNbButText;
02819   if ( fSubDet == "EB" ){xChNbButText = "Tower Xtal Numbering ";}
02820   if ( fSubDet == "EE" ){xChNbButText = "   SC Xtal Numbering  ";}
02821 
02822   fButChNb = new TGTextButton(fTxSubFrame, xChNbButText, fButChNbC);      fCnew++;
02823   fButChNb->Connect("Clicked()","TEcnaGui", this, "DoButtonChNb()");
02824   fButChNb->SetBackgroundColor(SubDetColor);
02825   fLayoutChNbBut =
02826     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1);      fCnew++;
02827   fTxSubFrame->AddFrame(fButChNb, fLayoutChNbBut); 
02828 
02829   //---------------- menus relative to the Stin A subframe 
02830 
02831   //===================== Menus relative to the Stin A ======================
02832   TString xMenuBarCorGlob;
02833   if ( fSubDet == "EB" ){xMenuBarCorGlob = " Cor(s,s') in Xtals (Tower view)";}
02834   if ( fSubDet == "EE" ){xMenuBarCorGlob = " Cor(s,s') in Xtals (SC view)";}
02835 
02836   TString xMenuBarCovGlob;
02837   if ( fSubDet == "EB" ){xMenuBarCovGlob = " Cov(s,s') in Xtals (Tower view)";}
02838   if ( fSubDet == "EE" ){xMenuBarCovGlob = " Cov(s,s') in Xtals (SC view)";}
02839 
02840   //................. Menu correlations between samples for all the channels. Global view
02841   fMenuCorssAll = new TGPopupMenu(gClient->GetRoot());                      fCnew++;
02842   fMenuCorssAll->AddEntry("2D, COLZ",fMenuCorssAllColzC);
02843   fMenuCorssAll->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02844   fMenuBarCorssAll =  new TGMenuBar(fTxSubFrame, 1, 1, kHorizontalFrame);   fCnew++;
02845   fMenuBarCorssAll->AddPopup(xMenuBarCorGlob, fMenuCorssAll, fLayoutGeneral);
02846   //fTxSubFrame->AddFrame(fMenuBarCorssAll, fLayoutTopLeft);
02847 
02848   //................. Menu covariances between samples for all the channels. Global view
02849   fMenuCovssAll = new TGPopupMenu(gClient->GetRoot());                      fCnew++;
02850   fMenuCovssAll->AddEntry("2D, COLZ",fMenuCovssAllColzC);
02851   fMenuCovssAll->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02852   fMenuBarCovssAll =  new TGMenuBar(fTxSubFrame, 1, 1, kHorizontalFrame);   fCnew++;
02853   fMenuBarCovssAll->AddPopup(xMenuBarCovGlob, fMenuCovssAll, fLayoutGeneral);
02854   //fTxSubFrame->AddFrame(fMenuBarCovssAll, fLayoutTopLeft);
02855 
02856   //------------------ Add Stin A frame to the subframe 
02857   fLayoutTxSubFrame = 
02858     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1);        fCnew++;
02859   fStinSpFrame->AddFrame(fTxSubFrame, fLayoutTxSubFrame);
02860 
02861   //============================= STIN B =====================================
02862   fTySubFrame = new TGCompositeFrame
02863     (fStinSpFrame,60,20,kVerticalFrame, GetDefaultFrameBackground());  fCnew++;
02864 
02865   fStinBFrame = new TGCompositeFrame
02866     (fTySubFrame,60,20,kHorizontalFrame,kSunkenFrame);                 fCnew++;
02867 
02868   fStinBBut =
02869     new TGTextButton(fStinBFrame, xStinBButText, fStinBButC);          fCnew++;
02870   fStinBBut->Connect("Clicked()","TEcnaGui", this, "DoButtonStinB()");
02871   fStinBBut->SetToolTipText(xStinNumberText);
02872   fStinBBut->Resize(Stin_buf_lenght, fStinBBut->GetDefaultHeight());
02873   fStinBBut->SetBackgroundColor(SubDetColor);
02874   fLayoutStinBBut = new TGLayoutHints(kLHintsLeft, xB1,xB1,xB1,xB1);   fCnew++;
02875   fStinBFrame->AddFrame(fStinBBut,  fLayoutStinBBut);
02876 
02877   fEntryStinBNumber = new TGTextBuffer();                              fCnew++;
02878   fStinBText = new TGTextEntry(fStinBFrame, fEntryStinBNumber);        fCnew++;
02879   fStinBText->SetToolTipText(xStinNumberValue);
02880   fStinBText->Resize(Stin_buf_lenght, fStinBText->GetDefaultHeight());
02881 
02882   Int_t StinBValue = 0;
02883   if( fSubDet == "EB"){StinBValue = fKeyStinBNumber;}
02884   if( fSubDet == "EE" && fKeyStexNumber != 0 )
02885     {StinBValue = fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fKeyStexNumber, fKeyStinBNumber);}
02886   DisplayInEntryField(fStinBText, StinBValue);
02887 
02888   fStinBText->Connect("ReturnPressed()", "TEcnaGui",this, "DoButtonStinB()");
02889   fLayoutStinBField =
02890     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1 );    fCnew++;
02891   fStinBFrame->AddFrame(fStinBText, fLayoutStinBField);
02892   fTySubFrame->AddFrame(fStinBFrame, fLayoutGeneral);
02893 
02894   //---------------- menus relative to the Stin B subframe 
02895 
02896   //                    (no such menus )
02897 
02898   //------------------ Add Stin B subframe to the frame 
02899   fLayoutTySubFrame =  new TGLayoutHints
02900     (kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1);                   fCnew++;
02901 
02902   fStinSpFrame->AddFrame(fTySubFrame, fLayoutTySubFrame);
02903 
02904   //---------------------- composite frame (Stin X, Stin Y)
02905   fLayoutStinSpFrame =  new TGLayoutHints
02906     (kLHintsTop | kLHintsCenterX, xB1, xB1, xB1, xB1);                fCnew++;
02907   AddFrame(fStinSpFrame, fLayoutStinSpFrame);
02908 
02909   //------------------ menus relatives to the Horizontal frame (Stin_A + Stin_B)
02910   TString xMenuBarLFCorcc;
02911   if ( fSubDet == "EB" ){xMenuBarLFCorcc = " Low Frequency Cor(Xtal tower, Xtal tower')";}
02912   if ( fSubDet == "EE" ){xMenuBarLFCorcc = " Low Frequency Cor(Xtal SC, Xtal SC')";}
02913 
02914   TString xMenuBarHFCorcc;
02915   if ( fSubDet == "EB" ){xMenuBarHFCorcc = " High Frequency Cor(Xtal tower, Xtal tower')";}
02916   if ( fSubDet == "EE" ){xMenuBarHFCorcc = " High Frequency Cor(Xtal SC, Xtal SC')";}
02917 
02918   //...................... Menu LF correlations between channels
02919   fMenuLFCorcc = new TGPopupMenu(gClient->GetRoot());                   fCnew++;
02920   fMenuLFCorcc->AddEntry("2D, COLZ",fMenuLFCorccColzC);
02921   fMenuLFCorcc->AddSeparator();
02922   fMenuLFCorcc->AddEntry("3D, LEGO2Z",fMenuLFCorccLegoC);
02923   fMenuLFCorcc->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
02924   fMenuBarLFCorcc = new TGMenuBar(this, 1, 1, kHorizontalFrame);        fCnew++;
02925   fMenuBarLFCorcc->AddPopup(xMenuBarLFCorcc, fMenuLFCorcc, fLayoutTopRight);
02926   AddFrame(fMenuBarLFCorcc, fLayoutGeneral);
02927 
02928   //...................... Menu HF correlations between channels
02929   fMenuHFCorcc = new TGPopupMenu(gClient->GetRoot());                   fCnew++;
02930   fMenuHFCorcc->AddEntry("2D, COLZ",fMenuHFCorccColzC);
02931   fMenuHFCorcc->AddSeparator();
02932   fMenuHFCorcc->AddEntry("3D, LEGO2Z",fMenuHFCorccLegoC);
02933   fMenuHFCorcc->Connect("Activated(Int_t)", "TEcnaGui", this,"HandleMenu(Int_t)");
02934   fMenuBarHFCorcc = new TGMenuBar(this, 1, 1, kHorizontalFrame);        fCnew++;
02935   fMenuBarHFCorcc->AddPopup(xMenuBarHFCorcc, fMenuHFCorcc, fLayoutTopRight);
02936   AddFrame(fMenuBarHFCorcc, fLayoutGeneral);
02937 
02938   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02939   //
02940   //                             SECTOR 4: Channels, Samples
02941   //
02942   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02943 
02944   fChSpFrame = new TGCompositeFrame(this,60,20,kHorizontalFrame,
02945                                     GetDefaultFrameBackground());     fCnew++;
02946 
02947   TString xChanButText;
02948   if ( fSubDet == "EB" ){xChanButText = " Channel# in tower [0,24] ";}
02949   if ( fSubDet == "EE" ){xChanButText = " Crystal# in SC [1,25] ";}
02950 
02951   TString xSampButText  = " Sample# [1,10] ";
02952 
02953   Int_t chan_buf_lenght =  50;
02954   Int_t samp_buf_lenght =  50;
02955 
02956   TString xMenuBarCorss    = " Correlations between samples";
02957   TString xMenuBarCovss    = " Covariances between samples";
02958   TString xMenuBarEvs      = " Expectation values of the samples";
02959   TString xMenuBarSigs     = " Sigmas of the samples";
02960 
02961   //=================================== CHANNEL (CRYSTAL)
02962   fChSubFrame = new TGCompositeFrame
02963     (fChSpFrame,60,20,kVerticalFrame, GetDefaultFrameBackground());   fCnew++;
02964 
02965   fChanFrame = new TGCompositeFrame
02966     (fChSubFrame,60,20,kHorizontalFrame,kSunkenFrame);                fCnew++;
02967 
02968   fChanBut =
02969     new TGTextButton(fChanFrame, xChanButText, fChanButC);            fCnew++;
02970   fChanBut->Connect("Clicked()","TEcnaGui", this, "DoButtonChan()");
02971   fChanBut->SetToolTipText("Click here to register the channel number written to the right");
02972   fChanBut->Resize(chan_buf_lenght, fChanBut->GetDefaultHeight());
02973   fChanBut->SetBackgroundColor(SubDetColor);
02974   fLayoutChanBut = new TGLayoutHints(kLHintsLeft, xB1,xB1,xB1,xB1);   fCnew++;
02975   fChanFrame->AddFrame(fChanBut,  fLayoutChanBut);
02976 
02977   fEntryChanNumber = new TGTextBuffer();                              fCnew++;
02978   fChanText = new TGTextEntry(fChanFrame, fEntryChanNumber);          fCnew++;
02979   fChanText->SetToolTipText("Click and enter the channel number");
02980   fChanText->Resize(chan_buf_lenght, fChanText->GetDefaultHeight());
02981 
02982   Int_t xReadChanNumber = 0;
02983   if( fSubDet == "EB" ){xReadChanNumber = 0;}         // offset =  0 (EB: electronic channel number)
02984   if( fSubDet == "EE" ){xReadChanNumber = 1;}         // offset = +1 (EE: xtal number for construction)
02985   DisplayInEntryField(fChanText, xReadChanNumber);
02986 
02987   fChanText->Connect("ReturnPressed()", "TEcnaGui",this, "DoButtonChan()");
02988   fLayoutChanField =
02989     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1 );    fCnew++;
02990   fChanFrame->AddFrame(fChanText, fLayoutChanField);
02991   fChSubFrame->AddFrame(fChanFrame, fLayoutGeneral);
02992 
02993   //--------------------- Menus relative to the channel SubFrame -------------
02994   //...................... Menu correlations between samples
02995 
02996   fMenuCorss = new TGPopupMenu(gClient->GetRoot());                   fCnew++;
02997   fMenuCorss->AddEntry("2D, COLZ", fMenuCorssColzC);
02998   fMenuCorss->AddEntry("2D, BOX",  fMenuCorssBoxC);
02999   fMenuCorss->AddEntry("2D, TEXT", fMenuCorssTextC);
03000   fMenuCorss->AddEntry("2D, CONTZ",fMenuCorssContzC);
03001   fMenuCorss->AddSeparator();
03002   fMenuCorss->AddEntry("3D, LEGO2Z",fMenuCorssLegoC);
03003   fMenuCorss->AddEntry("3D, SURF1Z",fMenuCorssSurf1C);
03004   fMenuCorss->AddEntry("3D, SURF2Z",fMenuCorssSurf2C);
03005   fMenuCorss->AddEntry("3D, SURF3Z",fMenuCorssSurf3C);
03006   fMenuCorss->AddEntry("3D, SURF4" ,fMenuCorssSurf4C);
03007   fMenuCorss->AddSeparator();
03008   fMenuCorss->AddEntry("2D, Write in ASCII file",fMenuCorssAsciiFileC);
03009   fMenuCorss->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
03010   fMenuBarCorss = new TGMenuBar(fChSubFrame, 1, 1, kHorizontalFrame); fCnew++;
03011   fMenuBarCorss->AddPopup(xMenuBarCorss, fMenuCorss, fLayoutTopLeft);
03012   fChSubFrame->AddFrame(fMenuBarCorss, fLayoutTopLeft);
03013 
03014   //...................... Menu covariances between samples
03015 
03016   fMenuCovss = new TGPopupMenu(gClient->GetRoot());                   fCnew++;
03017   fMenuCovss->AddEntry("2D, COLZ", fMenuCovssColzC);
03018   fMenuCovss->AddEntry("2D, BOX",  fMenuCovssBoxC);
03019   fMenuCovss->AddEntry("2D, TEXT", fMenuCovssTextC);
03020   fMenuCovss->AddEntry("2D, CONTZ",fMenuCovssContzC);
03021   fMenuCovss->AddSeparator();
03022   fMenuCovss->AddEntry("3D, LEGO2Z",fMenuCovssLegoC);
03023   fMenuCovss->AddEntry("3D, SURF1Z",fMenuCovssSurf1C);
03024   fMenuCovss->AddEntry("3D, SURF2Z",fMenuCovssSurf2C);
03025   fMenuCovss->AddEntry("3D, SURF3Z",fMenuCovssSurf3C);
03026   fMenuCovss->AddEntry("3D, SURF4" ,fMenuCovssSurf4C);
03027   fMenuCovss->AddSeparator();
03028   fMenuCovss->AddEntry("2D, Write in ASCII file",fMenuCovssAsciiFileC);
03029   fMenuCovss->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
03030   fMenuBarCovss = new TGMenuBar(fChSubFrame, 1, 1, kHorizontalFrame); fCnew++;
03031   fMenuBarCovss->AddPopup(xMenuBarCovss, fMenuCovss, fLayoutTopLeft);
03032   fChSubFrame->AddFrame(fMenuBarCovss, fLayoutTopLeft);
03033 
03034   //...................... Menu expectation values of the samples
03035 
03036   fMenuD_MSp_Samp = new TGPopupMenu(gClient->GetRoot());                      fCnew++;
03037   fMenuD_MSp_Samp->AddEntry("1D Histo ",fMenuD_MSp_SampLineFullC);
03038   fMenuD_MSp_Samp->AddEntry("1D Histo SAME",fMenuD_MSp_SampLineSameC);
03039   fMenuD_MSp_Samp->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
03040   fMenuBarD_MSp_Samp = new TGMenuBar(fChSubFrame, 1, 1, kHorizontalFrame);    fCnew++;
03041   fMenuBarD_MSp_Samp->AddPopup(xMenuBarEvs, fMenuD_MSp_Samp, fLayoutTopLeft);
03042   fChSubFrame->AddFrame(fMenuBarD_MSp_Samp, fLayoutTopLeft);
03043 
03044   //...................... Menu sigmas/variances of the samples
03045 
03046   fMenuD_SSp_Samp = new TGPopupMenu(gClient->GetRoot());                     fCnew++;
03047   fMenuD_SSp_Samp->AddEntry("1D Histo ",fMenuD_SSp_SampLineFullC);
03048   fMenuD_SSp_Samp->AddEntry("1D Histo SAME",fMenuD_SSp_SampLineSameC);
03049   fMenuD_SSp_Samp->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
03050   fMenuBarD_SSp_Samp = new TGMenuBar(fChSubFrame, 1, 1, kHorizontalFrame);   fCnew++;
03051   fMenuBarD_SSp_Samp->AddPopup(xMenuBarSigs, fMenuD_SSp_Samp, fLayoutTopLeft);
03052   fChSubFrame->AddFrame(fMenuBarD_SSp_Samp, fLayoutTopLeft);
03053 
03054   //------------------ Add Channel subframe to the frame 
03055   fLayoutChSubFrame =  new TGLayoutHints
03056     (kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1);                   fCnew++;
03057   fChSpFrame->AddFrame(fChSubFrame, fLayoutChSubFrame);
03058 
03059   //=================================== SAMPLE
03060   fSpSubFrame = new TGCompositeFrame
03061     (fChSpFrame,60,20,kVerticalFrame, GetDefaultFrameBackground());   fCnew++;
03062 
03063   fSampFrame = new TGCompositeFrame
03064     (fSpSubFrame,60,20,kHorizontalFrame, kSunkenFrame);               fCnew++;
03065 
03066   fSampBut = new TGTextButton(fSampFrame, xSampButText, fSampButC);   fCnew++;
03067   fSampBut->Connect("Clicked()","TEcnaGui", this, "DoButtonSamp()");
03068   fSampBut->SetToolTipText("Click here to register the sample number written to the right");
03069   fSampBut->Resize(samp_buf_lenght, fSampBut->GetDefaultHeight());
03070   fSampBut->SetBackgroundColor(SubDetColor);
03071   fLayoutSampBut =
03072     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);     fCnew++;
03073   fSampFrame->AddFrame(fSampBut, fLayoutSampBut);
03074 
03075   fEntrySampNumber = new TGTextBuffer();                              fCnew++;
03076   fSampText = new TGTextEntry(fSampFrame, fEntrySampNumber);          fCnew++;
03077   fSampText->SetToolTipText("Click and enter the sample number");
03078   fSampText->Resize(samp_buf_lenght, fSampText->GetDefaultHeight());
03079   Int_t xKeySampNumber = fKeySampNumber+1;
03080   DisplayInEntryField(fSampText, xKeySampNumber);
03081   fSampText->Connect("ReturnPressed()", "TEcnaGui",this, "DoButtonSamp()");
03082   fLayoutSampField =
03083     new TGLayoutHints(kLHintsTop | kLHintsRight, xB1,xB1,xB1,xB1 );   fCnew++;
03084   fSampFrame->AddFrame(fSampText, fLayoutSampField);
03085 
03086   fSpSubFrame->AddFrame(fSampFrame,fLayoutGeneral);
03087 
03088   fLayoutSpSubFrame =  new TGLayoutHints
03089     (kLHintsTop | kLHintsRight, xB1, xB1, xB1, xB1);                  fCnew++;
03090   fChSpFrame->AddFrame(fSpSubFrame, fLayoutSpSubFrame);
03091 
03092   //---------------------- composite frame (channel/sample+menus)
03093   fLayoutChSpFrame =  new TGLayoutHints
03094     (kLHintsTop | kLHintsCenterX, xB1, xB1, xB1, xB1);                fCnew++;
03095   AddFrame(fChSpFrame, fLayoutChSpFrame);
03096 
03097  //====================== Menu histogram of the distribution
03098  //                       for a given (channel, sample)
03099   fMenuAdcProj = new TGPopupMenu(gClient->GetRoot());                 fCnew++;
03100   fMenuAdcProj->AddEntry("1D Histo ",fMenuAdcProjSampLineFullC);
03101   fMenuAdcProj->AddEntry("1D Histo SAME",fMenuAdcProjSampLineSameC);
03102   fMenuAdcProj->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
03103 
03104   fMenuBarAdcProj = new TGMenuBar(this, 1, 1, kHorizontalFrame);      fCnew++;
03105 
03106   TString xEvtDistrib;
03107   xEvtDistrib = "ADC sample values for (Xtal, Sample)";
03108 
03109   fMenuBarAdcProj->AddPopup(xEvtDistrib, fMenuAdcProj, fLayoutGeneral);
03110 
03111   fLayoutMenuBarAdcProj =
03112     new TGLayoutHints(kLHintsCenterX, xB1,xB1,xB1,xB1);               fCnew++;
03113   AddFrame(fMenuBarAdcProj, fLayoutMenuBarAdcProj);
03114 
03115   AddFrame(fVoidFrame, fLayoutGeneral);
03116 
03117   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
03118   //
03119   //                             SECTOR 5: Time Evolution / history plots
03120   //
03121   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
03122   TString xRunListButText = " List of run file name for history plots ";
03123   Int_t run_list_buf_lenght = 170;
03124 
03125   fRulFrame = new TGCompositeFrame(this,60,20, kHorizontalFrame, kSunkenFrame); fCnew++;
03126   
03127   fRulBut= new TGTextButton(fRulFrame, xRunListButText);                        fCnew++;
03128   fRulBut->Connect("Clicked()","TEcnaGui", this, "DoButtonRul()");
03129   fRulBut->SetToolTipText
03130     ("Click here to register the name of the file \n containing the run list (written on the right)");
03131   fRulBut->SetBackgroundColor(SubDetColor);
03132   fLayoutRulBut =
03133     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);     fCnew++;
03134   fRulFrame->AddFrame(fRulBut,  fLayoutRulBut);
03135 
03136   fEntryRulNumber = new TGTextBuffer();                               fCnew++;
03137   fRulText = new TGTextEntry(fRulFrame, fEntryRulNumber);             fCnew++;
03138   fRulText->SetToolTipText("Click and enter the name of the file \n containing the run list");
03139   fRulText->Resize(run_list_buf_lenght, fRulText->GetDefaultHeight());
03140   fRulText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonRul()");
03141   fLayoutRulFieldText =
03142     new TGLayoutHints(kLHintsBottom | kLHintsLeft, xB1,xB1,xB1,xB1);  fCnew++;
03143   fRulFrame->AddFrame(fRulText, fLayoutRulFieldText);
03144 
03145   fLayoutRulFieldFrame =
03146     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);     fCnew++;
03147   AddFrame(fRulFrame, fLayoutRulFieldFrame);
03148 
03149   //...................... Menu history plot (evolution in time)
03150   TString xMenuBarHistory = " Menu for history plots";
03151   fMenuHistory = new TGPopupMenu(gClient->GetRoot());                 fCnew++;
03152   fMenuHistory->AddEntry("1D, Pedestals ",fMenuH_Ped_DatePolmFullC);
03153   fMenuHistory->AddEntry("1D, Pedestals SAME",fMenuH_Ped_DatePolmSameC);
03154   fMenuHistory->AddSeparator();
03155   fMenuHistory->AddEntry("1D, Total Noise ",fMenuH_TNo_DatePolmFullC);
03156   fMenuHistory->AddEntry("1D, Total Noise SAME",fMenuH_TNo_DatePolmSameC);
03157   fMenuHistory->AddEntry("1D, Total Noise SAME n",fMenuH_TNo_DatePolmSamePC);
03158   fMenuHistory->AddSeparator();
03159   fMenuHistory->AddEntry("1D, Low Frequency Noise ",fMenuH_LFN_DatePolmFullC);
03160   fMenuHistory->AddEntry("1D, Low Frequency Noise SAME",fMenuH_LFN_DatePolmSameC);
03161   fMenuHistory->AddEntry("1D, Low Frequency Noise SAME n",fMenuH_LFN_DatePolmSamePC);
03162   fMenuHistory->AddSeparator();
03163   fMenuHistory->AddEntry("1D, High Frequency Noise ",fMenuH_HFN_DatePolmFullC);
03164   fMenuHistory->AddEntry("1D, High Frequency Noise SAME",fMenuH_HFN_DatePolmSameC);
03165   fMenuHistory->AddEntry("1D, High Frequency Noise SAME n",fMenuH_HFN_DatePolmSamePC);
03166   fMenuHistory->AddSeparator();
03167   fMenuHistory->AddEntry("1D, Mean of cor(s,s') ",fMenuH_MCs_DatePolmFullC);
03168   fMenuHistory->AddEntry("1D, Mean of cor(s,s') SAME",fMenuH_MCs_DatePolmSameC);
03169   fMenuHistory->AddEntry("1D, Mean of cor(s,s') SAME n",fMenuH_MCs_DatePolmSamePC);
03170   fMenuHistory->AddSeparator();
03171   fMenuHistory->AddEntry("1D, Sigma of cor(s,s') ",fMenuH_SCs_DatePolmFullC);
03172   fMenuHistory->AddEntry("1D, Sigma of cor(s,s') SAME",fMenuH_SCs_DatePolmSameC);
03173   fMenuHistory->AddEntry("1D, Sigma of cor(s,s') SAME n",fMenuH_SCs_DatePolmSamePC);
03174 
03175   fMenuHistory->Connect("Activated(Int_t)", "TEcnaGui", this, "HandleMenu(Int_t)");
03176   fMenuBarHistory = new TGMenuBar(this , 1, 1, kHorizontalFrame);        fCnew++;
03177   fMenuBarHistory->AddPopup(xMenuBarHistory, fMenuHistory, fLayoutTopLeft);
03178   AddFrame(fMenuBarHistory, fLayoutTopLeft);
03179 
03180   AddFrame(fVoidFrame, fLayoutGeneral);
03181 
03182   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
03183   //
03184   //                             SECTOR 6: Last Buttons
03185   //
03186   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
03187 
03188   //========================== LinLog frame: buttons: LinX/LogX, LinY/LogY, Projection on Y Axis
03189 
03190   fLinLogFrame = new TGCompositeFrame(this,60,20, kHorizontalFrame, kSunkenFrame);    fCnew++;
03191 
03192   //-------------------------- Lin X <-> Log X
03193   TString xLogxButText     = " LOG X ";
03194   fButLogx = new TGCheckButton(fLinLogFrame, xLogxButText, fButLogxC);                fCnew++;
03195   fButLogx->Connect("Clicked()","TEcnaGui", this, "DoButtonLogx()");
03196   fButLogx->SetBackgroundColor(SubDetColor);
03197   fLayoutLogxBut = new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1);   fCnew++;
03198   fLinLogFrame->AddFrame(fButLogx, fLayoutLogxBut);
03199 
03200   //-------------------------- Lin Y <-> Log Y
03201   TString xLogyButText     = " LOG Y ";
03202   fButLogy = new TGCheckButton(fLinLogFrame, xLogyButText, fButLogyC);                fCnew++;
03203   fButLogy->Connect("Clicked()","TEcnaGui", this, "DoButtonLogy()");
03204   fButLogy->SetBackgroundColor(SubDetColor);
03205   fLayoutLogyBut = new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1);   fCnew++;
03206   fLinLogFrame->AddFrame(fButLogy, fLayoutLogyBut);
03207 
03208   //-------------------------- Projection
03209   TString xProjyButText     = " Y projection ";
03210   fButProjy = new TGCheckButton(fLinLogFrame, xProjyButText, fButProjyC);             fCnew++;
03211   fButProjy->Connect("Clicked()","TEcnaGui", this, "DoButtonProjy()");
03212   fButProjy->SetBackgroundColor(SubDetColor);
03213   fLayoutProjyBut = new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1);  fCnew++;
03214   fLinLogFrame->AddFrame(fButProjy, fLayoutProjyBut);
03215 
03216   AddFrame(fVoidFrame, fLayoutBottRight);
03217   AddFrame(fLinLogFrame, fLayoutGeneral);
03218 
03219   //======================================== GENERAL TITLE FOR THE PLOTS
03220   TString xGenTitleButText  = " General title for plots ";
03221   Int_t gen_title_buf_lenght  = 220;
03222 
03223   fGentFrame = new TGCompositeFrame(this,60,20, kHorizontalFrame, kSunkenFrame); fCnew++;
03224   
03225   fGentBut= new TGTextButton(fGentFrame, xGenTitleButText);                      fCnew++;
03226   fGentBut->Connect("Clicked()","TEcnaGui", this, "DoButtonGent()");
03227   fGentBut->SetToolTipText
03228     ("Click here to register the general title (written on the right)");
03229   fGentBut->SetBackgroundColor(SubDetColor);
03230   fLayoutGentBut =
03231     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);       fCnew++;
03232   fGentFrame->AddFrame(fGentBut,  fLayoutGentBut);
03233 
03234   fEntryGentNumber = new TGTextBuffer();                                fCnew++;
03235   fGentText = new TGTextEntry(fGentFrame, fEntryGentNumber);            fCnew++;
03236   fGentText->SetToolTipText("Click and enter the general title");
03237   fGentText->Resize(gen_title_buf_lenght, fGentText->GetDefaultHeight());
03238   DisplayInEntryField(fGentText, fKeyGeneralTitle);
03239   fGentText->Connect("ReturnPressed()", "TEcnaGui", this, "DoButtonGent()");
03240   fLayoutGentFieldText =
03241     new TGLayoutHints(kLHintsBottom | kLHintsLeft, xB1,xB1,xB1,xB1);    fCnew++;
03242   fGentFrame->AddFrame(fGentText, fLayoutGentFieldText);
03243 
03244   fLayoutGentFieldFrame =
03245     new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1,xB1,xB1,xB1);       fCnew++;
03246   AddFrame(fGentFrame, fLayoutGentFieldFrame);
03247   AddFrame(fVoidFrame);
03248 
03249   //========================== Color Palette + EXIT
03250   fColorExitFrame = new TGCompositeFrame(this,60,20, kHorizontalFrame,
03251                                          GetDefaultFrameBackground());  fCnew++;
03252 
03253   //-------------------------- Black/Red/Blue <-> Rainbow
03254   TString xColPalButText     = " Colors ";
03255   fButColPal = new TGCheckButton(fColorExitFrame, xColPalButText, fButColPalC);       fCnew++;
03256   fButColPal->Connect("Clicked()","TEcnaGui", this, "DoButtonColPal()");
03257   fButColPal->SetBackgroundColor(SubDetColor);
03258   fLayoutColPalBut = new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1); fCnew++;
03259   fColorExitFrame->AddFrame(fButColPal, fLayoutColPalBut);
03260 
03261   //-------------------------- Exit
03262   TString xExitButText     = " Exit ";
03263   fButExit = new TGTextButton(fColorExitFrame, xExitButText, fButExitC);              fCnew++;
03264   fButExit->Connect("Clicked()","TEcnaGui", this, "DoButtonExit()");
03265   fButExit->SetBackgroundColor(SubDetColor);
03266   fLayoutExitBut = new TGLayoutHints(kLHintsTop | kLHintsRight, xB1, xB1, xB1, xB1);  fCnew++;
03267   fColorExitFrame->AddFrame(fButExit, fLayoutExitBut);
03268  
03269   fLayoutColorExitFrame =  new TGLayoutHints(kLHintsTop | kLHintsExpandX,
03270                                             xB1, xB1, xB1, xB1);     fCnew++;
03271 
03272   //AddFrame(fVoidFrame, fLayoutBottRight);
03273   AddFrame(fColorExitFrame, fLayoutColorExitFrame);
03274 
03275   //========================== Last frame: buttons: ROOT version, Help
03276 
03277   fLastFrame = new TGCompositeFrame(this,60,20, kHorizontalFrame, kSunkenFrame);      fCnew++;
03278 
03279   //-------------------------- Clone Last Canvas
03280   TString xCloneButText     = " Clone Last Canvas ";
03281   fButClone = new TGTextButton(fLastFrame, xCloneButText, fButCloneC);                fCnew++;
03282   fButClone->Connect("Clicked()","TEcnaGui", this, "DoButtonClone()");
03283   fButClone->SetBackgroundColor(SubDetColor);
03284   fLayoutCloneBut = new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1);  fCnew++;
03285   fLastFrame->AddFrame(fButClone, fLayoutCloneBut);
03286 
03287   //-------------------------- ROOT version
03288   TString xRootButText     = " ROOT Version ";
03289   fButRoot = new TGTextButton(fLastFrame, xRootButText, fButRootC);                   fCnew++;
03290   fButRoot->Connect("Clicked()","TEcnaGui", this, "DoButtonRoot()");
03291   fButRoot->SetBackgroundColor(SubDetColor);
03292   fLayoutRootBut = new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1);   fCnew++;
03293   fLastFrame->AddFrame(fButRoot, fLayoutRootBut);
03294 
03295   //-------------------------- HELP
03296   TString xHelpButText     = " Help ";
03297   fButHelp = new TGTextButton(fLastFrame, xHelpButText, fButHelpC);                   fCnew++;
03298   fButHelp->Connect("Clicked()","TEcnaGui", this, "DoButtonHelp()");
03299   fButHelp->SetBackgroundColor(SubDetColor);
03300   fLayoutHelpBut = new TGLayoutHints(kLHintsTop | kLHintsLeft, xB1, xB1, xB1, xB1);   fCnew++;
03301   fLastFrame->AddFrame(fButHelp, fLayoutHelpBut);
03302 
03303   AddFrame(fLastFrame, fLayoutGeneral);
03304 
03305   //................................. Window
03306 
03307   MapSubwindows();
03308   Layout();
03309 
03310   if( fSubDet == "EB" ){SetWindowName("CMS  Ecal Correlated Noise Analysis  <EB>");}
03311   if( fSubDet == "EE" ){SetWindowName("CMS  Ecal Correlated Noise Analysis  <EE>");}
03312 
03313   SetBackgroundColor(SubDetColor);
03314   SetIconName("CNA");
03315   MapWindow();
03316 }
03317 //   end of constructor with arguments
03318 
03319 //###################################################################
03320 //
03321 //                        M E T H O D S
03322 //
03323 //###################################################################
03324 
03325 //===============================================================
03326 //
03327 //                          Buttons
03328 //
03329 //===============================================================
03330 
03331 //----------------------------------------------------------------------
03332 //void TEcnaGui::DoButtonPyf()
03333 //{
03336   
03337 //  //........................... get info from the entry field
03338 //  char* listchain = (char*)fPyfText->GetBuffer()->GetString();  
03339 //  fKeyPyf = listchain;
03340   
03341 //  fCnaCommand++;
03342 //  cout << "   *TEcnaGui [" << fCnaCommand
03343 //       << "]> Registration of file name for python file source sector -> "
03344 //       << fKeyPyf.Data() << endl;
03345 //}
03346 //----------------------------------------------------------------------
03347 void TEcnaGui::DoButtonAna()
03348 {
03349 //Registration of the type of the analysis
03350 
03351   char* bufferchain;
03352   bufferchain = (char*)fAnaText->GetBuffer()->GetString();
03353 
03354   fKeyAnaType = bufferchain;
03355   
03356   fCnaCommand++;
03357   cout << "   *TEcnaGui [" << fCnaCommand
03358        << "]> Registration of analysis name -> "
03359        << fKeyAnaType << endl;
03360 }
03361 
03362 //----------------------------------------------------------------------
03363 void TEcnaGui::DoButtonNors()
03364 {
03365 //Registration of the number of samples (ROOT file)
03366 
03367   char* bufferchain;
03368   bufferchain = (char*)fNorsText->GetBuffer()->GetString();
03369   fKeyNbOfSamplesString = bufferchain;
03370   fKeyNbOfSamples = atoi(bufferchain);
03371 
03372   if ( !(fKeyNbOfSamples >= 1 && fKeyNbOfSamples <= fEcal->MaxSampADC()) )
03373     {
03374       fCnaError++;
03375       cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===>"
03376            << " Number of required samples for reading ROOT file = " << fKeyNbOfSamples
03377            << ": OUT OF RANGE, " << endl 
03378            << "                                        forced to the default value (="
03379            << fEcal->MaxSampADC() << ")." << fTTBELL << endl;
03380       fKeyNbOfSamples = fEcal->MaxSampADC();
03381       DisplayInEntryField(fNorsText,fKeyNbOfSamples);
03382     }
03383 
03384   //................... Update of Sample Button Text according to the number of sample
03385   TString xSampButText = " Sample [?,?] ";
03386   
03387   if( fKeyNbOfSamples ==  1 ){xSampButText  = " Sample [1,1] ";}
03388   if( fKeyNbOfSamples ==  2 ){xSampButText  = " Sample [1,2] ";}
03389   if( fKeyNbOfSamples ==  3 ){xSampButText  = " Sample [1,3] ";}
03390   if( fKeyNbOfSamples ==  4 ){xSampButText  = " Sample [1,4] ";}
03391   if( fKeyNbOfSamples ==  5 ){xSampButText  = " Sample [1,5] ";}
03392   if( fKeyNbOfSamples ==  6 ){xSampButText  = " Sample [1,6] ";}
03393   if( fKeyNbOfSamples ==  7 ){xSampButText  = " Sample [1,7] ";}
03394   if( fKeyNbOfSamples ==  8 ){xSampButText  = " Sample [1,8] ";}
03395   if( fKeyNbOfSamples ==  9 ){xSampButText  = " Sample [1,9] ";}
03396   if( fKeyNbOfSamples == 10 ){xSampButText  = " Sample [1,10] ";}
03397   
03398   fSampBut->SetText(xSampButText);
03399   
03400   fCnaCommand++;
03401   cout << "   *TEcnaGui [" << fCnaCommand
03402        << "]> Registration of number of samples in ROOT file -> "
03403        << fKeyNbOfSamples << endl;
03404 }
03405 //----------------------------------------------------------------------
03406 void TEcnaGui::DoButtonNbSampForCalc()
03407 {
03408 //Registration of the number of samples (ROOT file)
03409 
03410   char* bufferchain;
03411   bufferchain = (char*)fNbSampForCalcText->GetBuffer()->GetString();
03412   fKeyNbOfSampForCalcString = bufferchain;
03413   fKeyNbOfSampForCalc = atoi(bufferchain);
03414 
03415   if ( !(fKeyNbOfSampForCalc >= 1 && fKeyNbOfSampForCalc <= fKeyNbOfSamples) )
03416     {
03417       fCnaError++;
03418       cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===>"
03419            << " Number of required samples for calculations = " << fKeyNbOfSampForCalc
03420            << ": OUT OF RANGE, " << endl 
03421            << "                                        forced to the default value (="
03422            << fKeyNbOfSamples << ")." << fTTBELL << endl;
03423       fKeyNbOfSampForCalc = fKeyNbOfSamples;
03424       DisplayInEntryField(fNbSampForCalcText,fKeyNbOfSampForCalc);
03425     }
03426   fCnaCommand++;
03427   cout << "   *TEcnaGui [" << fCnaCommand
03428        << "]> Registration of number of samples for calculations -> "
03429        << fKeyNbOfSampForCalc << endl;
03430 }
03431 
03432 //----------------------------------------------------------------------
03433 void TEcnaGui::DoButtonRun()
03434 {
03435 //Register run number
03436   
03437   //........................... get info from the entry field
03438   char* bufferchain = (char*)fRunText->GetBuffer()->GetString();
03439   fKeyRunNumberString = bufferchain;
03440   fKeyRunNumber = atoi(bufferchain);
03441   fCnaCommand++;
03442   cout << "   *TEcnaGui [" << fCnaCommand
03443        << "]> Registration of run number -> "
03444        << fKeyRunNumber << endl;
03445 }
03446 //-------------------------------------------------------------------
03447 
03448 void TEcnaGui::DoButtonFev()
03449 {
03450 //Registration of the first requested event number
03451 
03452   char* bufferchain;
03453   bufferchain = (char*)fFevText->GetBuffer()->GetString();
03454   fKeyFirstReqEvtNumberString = bufferchain;
03455   fKeyFirstReqEvtNumber = atoi(bufferchain);
03456 
03457   if ( fKeyFirstReqEvtNumber <= 0)
03458     {
03459       fCnaError++;
03460       cout << "   !TEcnaGui (" << fCnaError << ") *ERROR* ===> "
03461            << " First event number = " << fKeyFirstReqEvtNumber
03462            << ": negative. " << endl 
03463            << fTTBELL << endl;
03464     }
03465 
03466   fCnaCommand++;
03467   cout << "   *TEcnaGui [" << fCnaCommand
03468        << "]> Registration of first requested event number -> "
03469        << fKeyFirstReqEvtNumber << endl;
03470 }
03471 //-------------------------------------------------------------------
03472 void TEcnaGui::DoButtonLev()
03473 {
03474 //Registration of the last requested event number
03475 
03476   char* bufferchain;
03477   bufferchain = (char*)fLevText->GetBuffer()->GetString();
03478   fKeyLastReqEvtNumberString = bufferchain;
03479   fKeyLastReqEvtNumber = atoi(bufferchain);
03480 
03481   if ( fKeyLastReqEvtNumber <= fKeyFirstReqEvtNumber )
03482     {
03483       fCnaError++;
03484       cout << "   !TEcnaGui (" << fCnaError << ") *WARNING* ===> "
03485            << " Last requested event number = " << fKeyLastReqEvtNumber
03486            << ": less than first requested event number (= " << fKeyFirstReqEvtNumber << ")." 
03487            << endl;
03488     }
03489 
03490   fCnaCommand++;
03491   cout << "   *TEcnaGui [" << fCnaCommand
03492        << "]> Registration of last requested event number -> "
03493        << fKeyLastReqEvtNumber << endl;
03494 }
03495 //-------------------------------------------------------------------
03496 void TEcnaGui::DoButtonRev()
03497 {
03498 //Registration of the nb ofrequested events
03499 
03500   char* bufferchain;
03501   bufferchain = (char*)fRevText->GetBuffer()->GetString();
03502   fKeyReqNbOfEvtsString = bufferchain;
03503   fKeyReqNbOfEvts = atoi(bufferchain);
03504 
03505   Int_t nb_range_evts = fKeyLastReqEvtNumber - fKeyFirstReqEvtNumber + 1;
03506 
03507   if( fKeyLastReqEvtNumber < fKeyFirstReqEvtNumber)
03508     {
03509       fCnaError++;
03510       cout << "   !TEcnaGui (" << fCnaError << ") *WARNING* ===> "
03511            << " Last requested event number = " << fKeyLastReqEvtNumber
03512            << " less than first requested event number = " << fKeyFirstReqEvtNumber
03513            << endl;
03514     }
03515 
03516   if ( fKeyLastReqEvtNumber >= fKeyFirstReqEvtNumber && fKeyReqNbOfEvts > nb_range_evts )
03517     {
03518       fCnaError++;
03519       cout << "   !TEcnaGui (" << fCnaError << ") *WARNING* ===> "
03520            << " Nb of requested events = " << fKeyReqNbOfEvts
03521            << ": out of range (range = " << fKeyFirstReqEvtNumber << ","
03522            << fKeyLastReqEvtNumber << ") => " << nb_range_evts << " events."
03523            << endl;
03524     }
03525 
03526   fCnaCommand++;
03527   cout << "   *TEcnaGui [" << fCnaCommand
03528        << "]> Registration of requested number of events -> "
03529        << fKeyReqNbOfEvts << endl;
03530 }
03531 
03532 //-------------------------------------------------------------------
03533 void TEcnaGui::DoButtonStex()
03534 {
03535 //Registration of the Stex number
03536 
03537   char* bufferchain;
03538   bufferchain = (char*)fStexText->GetBuffer()->GetString();
03539   fKeyStexNumberString = bufferchain;
03540   fKeyStexNumber = atoi(bufferchain);
03541 
03542   if( fSubDet == "EB" )
03543     {
03544       fCnaCommand++;
03545       cout << "   *TEcnaGui [" << fCnaCommand
03546            << "]> Registration of SuperModule number -> "
03547            << fKeyStexNumber << endl;
03548 
03549       //.......... Positive number for EB- [-1,-18] -> [19,36]  
03550       if( fKeyStexNumber < 0 ){fKeyStexNumber = - fKeyStexNumber + fEcal->MaxSMInEB()/2;}
03551 
03552       if( (fKeyStexNumber < 0) || (fKeyStexNumber > fEcal->MaxSMInEB() )  )
03553         {
03554           fCnaError++;
03555           cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> "
03556                << " EB / SM number = " << fKeyStexNumber
03557                << ": out of range. Range = 0 (EB) or [ 1 ," << fEcal->MaxSMInEB() << " ] (SM)"
03558                << " or [ -" << fEcal->MaxSMInEBMinus() << ", +" <<  fEcal->MaxSMInEBPlus() << "] (SM)"
03559                << fTTBELL << endl;
03560         }
03561     }
03562 
03563   if( fSubDet == "EE" )
03564     {
03565       //................... Update of SC Button Text according to the Dee Number
03566       TString xStinAButText = "?";
03567       TString xStinBButText = "?";
03568       Int_t Stin_buf_lenght = 10;
03569       if ( fSubDet == "EE" && ( fKeyStexNumber == 1 || fKeyStexNumber == 3 ) )
03570         {xStinAButText = "SC for const. [150,298] "; xStinBButText  = "SC' for const. [150,298] ";
03571         Stin_buf_lenght =  50; fStinABut->SetText(xStinAButText); fStinBBut->SetText(xStinBButText);}
03572       if ( fSubDet == "EE" && ( fKeyStexNumber == 2 || fKeyStexNumber == 4 ) )
03573         {xStinAButText = "SC for const. [  1,149] "; xStinBButText  = "SC' for const. [  1,149] ";
03574         Stin_buf_lenght =  50; fStinABut->SetText(xStinAButText); fStinBBut->SetText(xStinBButText);}
03575 
03576       if ( fSubDet == "EE" && ( fKeyStexNumber == 0 ) )
03577         {xStinAButText = "SC for const.           "; xStinBButText  = "SC' for const.           ";
03578         Stin_buf_lenght =  50; fStinABut->SetText(xStinAButText); fStinBBut->SetText(xStinBButText);}
03579       
03580       //................... Update of SC widget according to the Dee Number
03581       if( fKeyStexNumber > 0 )
03582         {
03583           Int_t StinAValue = fKeyStinANumber;
03584           if( fSubDet == "EE" )
03585             {StinAValue = fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fKeyStexNumber, fKeyStinANumber);}
03586           DisplayInEntryField(fStinAText,StinAValue);
03587           Int_t StinBValue = fKeyStinBNumber;
03588           if( fSubDet == "EE" )
03589             {StinBValue = fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fKeyStexNumber, fKeyStinBNumber);}
03590           DisplayInEntryField(fStinBText,StinBValue);
03591         }
03592       //............................................ Command message
03593       fCnaCommand++;
03594       cout << "   *TEcnaGui [" << fCnaCommand
03595            << "]> Registration of Dee number -> "
03596            << fKeyStexNumber << endl;
03597       
03598       if ( (fKeyStexNumber < 0) || (fKeyStexNumber > fEcal->MaxDeeInEE() )  )
03599         {
03600           fCnaError++;
03601           cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> "
03602                << " EE / Dee number = " << fKeyStexNumber
03603                << ": out of range. Range = 0 (EE) or [ 1 ," << fEcal->MaxDeeInEE() << " ] (Dee)"
03604                << fTTBELL << endl;
03605         }
03606     }  // -- end of if( fSubDet == "EE" ) -------
03607 }
03608 //-------------------------------------------------------------------
03609 
03610 void TEcnaGui::DoButtonVminD_NOE_ChNb()
03611 {
03612 //Registration of Ymin for number of events
03613 
03614   char* bufferchain;
03615   bufferchain = (char*)fVminD_NOE_ChNbText->GetBuffer()->GetString();
03616 
03617   fKeyVminD_NOE_ChNb = (Double_t)atof(bufferchain);
03618 
03619   fCnaCommand++;
03620   cout << "   *TEcnaGui [" << fCnaCommand
03621        << "]> Registration of Ymin for plot 'number of events' -> "
03622        << fKeyVminD_NOE_ChNb << endl;
03623 }
03624 //-------------------------------------------------------------------
03625 
03626 void TEcnaGui::DoButtonVmaxD_NOE_ChNb()
03627 {
03628 //Registration of Ymax for number of events
03629 
03630   char* bufferchain;
03631   bufferchain = (char*)fVmaxD_NOE_ChNbText->GetBuffer()->GetString();
03632 
03633   fKeyVmaxD_NOE_ChNb = (Double_t)atof(bufferchain);
03634 
03635   fCnaCommand++;
03636   cout << "   *TEcnaGui [" << fCnaCommand
03637        << "]> Registration of Ymax for plot 'number of events' -> "
03638        << fKeyVmaxD_NOE_ChNb << endl;
03639 }
03640 //-------------------------------------------------------------------
03641 
03642 void TEcnaGui::DoButtonVminD_Ped_ChNb()
03643 {
03644 //Registration of Ymin for pedestals
03645 
03646   char* bufferchain;
03647   bufferchain = (char*)fVminD_Ped_ChNbText->GetBuffer()->GetString();
03648 
03649   fKeyVminD_Ped_ChNb = (Double_t)atof(bufferchain);
03650 
03651   fCnaCommand++;
03652   cout << "   *TEcnaGui [" << fCnaCommand
03653        << "]> Registration of Ymin for plot 'pedestal' -> "
03654        << fKeyVminD_Ped_ChNb << endl;
03655 }
03656 //-------------------------------------------------------------------
03657 
03658 void TEcnaGui::DoButtonVmaxD_Ped_ChNb()
03659 {
03660 //Registration of Ymax for pedestals
03661 
03662   char* bufferchain;
03663   bufferchain = (char*)fVmaxD_Ped_ChNbText->GetBuffer()->GetString();
03664 
03665   fKeyVmaxD_Ped_ChNb = (Double_t)atof(bufferchain);
03666 
03667   fCnaCommand++;
03668   cout << "   *TEcnaGui [" << fCnaCommand
03669        << "]> Registration of Ymax for plot 'pedestal' -> "
03670        << fKeyVmaxD_Ped_ChNb << endl;
03671 }
03672 //-------------------------------------------------------------------
03673 
03674 void TEcnaGui::DoButtonVminD_TNo_ChNb()
03675 {
03676 //Registration of Ymin for mean of sample sigmas (noise)
03677 
03678   char* bufferchain;
03679   bufferchain = (char*)fVminD_TNo_ChNbText->GetBuffer()->GetString();
03680 
03681   fKeyVminD_TNo_ChNb = (Double_t)atof(bufferchain);
03682 
03683   fCnaCommand++;
03684   cout << "   *TEcnaGui [" << fCnaCommand
03685        << "]> Registration of Ymin for plot 'total noise' -> "
03686        << fKeyVminD_TNo_ChNb << endl;
03687 }
03688 //-------------------------------------------------------------------
03689 
03690 void TEcnaGui::DoButtonVmaxD_TNo_ChNb()
03691 {
03692 //Registration of Ymax for mean of sample sigmas (noise)
03693 
03694   char* bufferchain;
03695   bufferchain = (char*)fVmaxD_TNo_ChNbText->GetBuffer()->GetString();
03696 
03697   fKeyVmaxD_TNo_ChNb = (Double_t)atof(bufferchain);
03698 
03699   fCnaCommand++;
03700   cout << "   *TEcnaGui [" << fCnaCommand
03701        << "]> Registration of Ymax for plot 'total noise' -> "
03702        << fKeyVmaxD_TNo_ChNb << endl;
03703 }
03704 //-------------------------------------------------------------------
03705 
03706 void TEcnaGui::DoButtonVminD_MCs_ChNb()
03707 {
03708 //Registration of Ymin for mean of cor(s,s')
03709 
03710   char* bufferchain;
03711   bufferchain = (char*)fVminD_MCs_ChNbText->GetBuffer()->GetString();
03712 
03713   fKeyVminD_MCs_ChNb = (Double_t)atof(bufferchain);
03714 
03715   fCnaCommand++;
03716   cout << "   *TEcnaGui [" << fCnaCommand
03717        << "]> Registration of Ymin for plot 'mean of cor(s,s')' -> "
03718        << fKeyVminD_MCs_ChNb << endl;
03719 }
03720 //-------------------------------------------------------------------
03721 
03722 void TEcnaGui::DoButtonVmaxD_MCs_ChNb()
03723 {
03724 //Registration of Ymax for mean of cor(s,s')
03725 
03726   char* bufferchain;
03727   bufferchain = (char*)fVmaxD_MCs_ChNbText->GetBuffer()->GetString();
03728 
03729   fKeyVmaxD_MCs_ChNb = (Double_t)atof(bufferchain);
03730 
03731   fCnaCommand++;
03732   cout << "   *TEcnaGui [" << fCnaCommand
03733        << "]> Registration of Ymax for plot 'mean of cor(s,s')' -> "
03734        << fKeyVmaxD_MCs_ChNb << endl;
03735 }
03736 //-------------------------------------------------------------------
03737 
03738 
03739 void TEcnaGui::DoButtonVminD_LFN_ChNb()
03740 {
03741 //Registration of Ymin for sigmas of sample means
03742 
03743   char* bufferchain;
03744   bufferchain = (char*)fVminD_LFN_ChNbText->GetBuffer()->GetString();
03745 
03746   fKeyVminD_LFN_ChNb = (Double_t)atof(bufferchain);
03747 
03748   fCnaCommand++;
03749   cout << "   *TEcnaGui [" << fCnaCommand
03750        << "]> Registration of Ymin for plot 'low frequency noise' -> "
03751        << fKeyVminD_LFN_ChNb << endl;
03752 }
03753 //-------------------------------------------------------------------
03754 
03755 void TEcnaGui::DoButtonVmaxD_LFN_ChNb()
03756 {
03757 //Registration of Ymax for sigmas of sample means 
03758 
03759   char* bufferchain;
03760   bufferchain = (char*)fVmaxD_LFN_ChNbText->GetBuffer()->GetString();
03761 
03762   fKeyVmaxD_LFN_ChNb = (Double_t)atof(bufferchain);
03763 
03764   fCnaCommand++;
03765   cout << "   *TEcnaGui [" << fCnaCommand
03766        << "]> Registration of Ymax for plot 'low frequency noise' -> "
03767        << fKeyVmaxD_LFN_ChNb << endl;
03768 }
03769 //-------------------------------------------------------------------
03770 
03771 void TEcnaGui::DoButtonVminD_HFN_ChNb()
03772 {
03773 //Registration of Ymin for sigmas of sample sigmas
03774 
03775   char* bufferchain;
03776   bufferchain = (char*)fVminD_HFN_ChNbText->GetBuffer()->GetString();
03777 
03778   fKeyVminD_HFN_ChNb = (Double_t)atof(bufferchain);
03779 
03780   fCnaCommand++;
03781   cout << "   *TEcnaGui [" << fCnaCommand
03782        << "]> Registration of Ymin for plot 'high frequency noise' -> "
03783        << fKeyVminD_HFN_ChNb << endl;
03784 }
03785 //-------------------------------------------------------------------
03786 
03787 void TEcnaGui::DoButtonVmaxD_HFN_ChNb()
03788 {
03789 //Registration of Ymax for sigmas of sample sigmas
03790 
03791   char* bufferchain;
03792   bufferchain = (char*)fVmaxD_HFN_ChNbText->GetBuffer()->GetString();
03793 
03794   fKeyVmaxD_HFN_ChNb = (Double_t)atof(bufferchain);
03795 
03796   fCnaCommand++;
03797   cout << "   *TEcnaGui [" << fCnaCommand
03798        << "]> Registration of Ymax for plot 'high frequency noise' -> "
03799        << fKeyVmaxD_HFN_ChNb << endl;
03800 }
03801 //-------------------------------------------------------------------
03802 
03803 void TEcnaGui::DoButtonVminD_SCs_ChNb()
03804 {
03805 //Registration of Ymin for sigmas of cor(s,s')
03806 
03807   char* bufferchain;
03808   bufferchain = (char*)fVminD_SCs_ChNbText->GetBuffer()->GetString();
03809 
03810   fKeyVminD_SCs_ChNb = (Double_t)atof(bufferchain);
03811 
03812   fCnaCommand++;
03813   cout << "   *TEcnaGui [" << fCnaCommand
03814        << "]> Registration of Ymin for plot 'sigma of cor(s,s')' -> "
03815        << fKeyVminD_SCs_ChNb << endl;
03816 }
03817 //-------------------------------------------------------------------
03818 
03819 void TEcnaGui::DoButtonVmaxD_SCs_ChNb()
03820 {
03821 //Registration of Ymax for sigmas of cor(s,s')
03822 
03823   char* bufferchain;
03824   bufferchain = (char*)fVmaxD_SCs_ChNbText->GetBuffer()->GetString();
03825 
03826   fKeyVmaxD_SCs_ChNb = (Double_t)atof(bufferchain);
03827 
03828   fCnaCommand++;
03829   cout << "   *TEcnaGui [" << fCnaCommand
03830        << "]> Registration of Ymax for plot 'sigma of cor(s,s')' -> "
03831        << fKeyVmaxD_SCs_ChNb << endl;
03832 }
03833 //-------------------------------------------------------------------
03834 
03835 void TEcnaGui::DoButtonVminLFccMos()
03836 {
03837 //Registration of Ymin for LF Mean Cor(c,c')
03838 
03839   char* bufferchain;
03840   bufferchain = (char*)fVminLFccMosText->GetBuffer()->GetString();
03841 
03842   fKeyVminLFccMos = (Double_t)atof(bufferchain);
03843 
03844   fCnaCommand++;
03845   cout << "   *TEcnaGui [" << fCnaCommand
03846        << "]> Registration of Ymin for plot 'mean LF |cor(c,c')|' -> "
03847        << fKeyVminLFccMos << endl;
03848 }
03849 //-------------------------------------------------------------------
03850 
03851 void TEcnaGui::DoButtonVmaxLFccMos()
03852 {
03853 //Registration of Ymax for LF Mean Cor(c,c')
03854 
03855   char* bufferchain;
03856   bufferchain = (char*)fVmaxLFccMosText->GetBuffer()->GetString();
03857 
03858   fKeyVmaxLFccMos = (Double_t)atof(bufferchain);
03859 
03860   fCnaCommand++;
03861   cout << "   *TEcnaGui [" << fCnaCommand
03862        << "]> Registration of Ymax for plot 'mean LF |cor(c,c')|' -> "
03863        << fKeyVmaxLFccMos << endl;
03864 }
03865 //-------------------------------------------------------------------
03866 
03867 void TEcnaGui::DoButtonVminHFccMos()
03868 {
03869 //Registration of Ymin for HF Mean Cor(c,c')
03870 
03871   char* bufferchain;
03872   bufferchain = (char*)fVminHFccMosText->GetBuffer()->GetString();
03873 
03874   fKeyVminHFccMos = (Double_t)atof(bufferchain);
03875 
03876   fCnaCommand++;
03877   cout << "   *TEcnaGui [" << fCnaCommand
03878        << "]> Registration of Ymin for plot 'mean HF |cor(c,c')|' -> "
03879        << fKeyVminHFccMos << endl;
03880 }
03881 //-------------------------------------------------------------------
03882 
03883 void TEcnaGui::DoButtonVmaxHFccMos()
03884 {
03885 //Registration of Ymax for HF Mean Cor(c,c')
03886 
03887   char* bufferchain;
03888   bufferchain = (char*)fVmaxHFccMosText->GetBuffer()->GetString();
03889 
03890   fKeyVmaxHFccMos = (Double_t)atof(bufferchain);
03891 
03892   fCnaCommand++;
03893   cout << "   *TEcnaGui [" << fCnaCommand
03894        << "]> Registration of Ymax for plot 'mean HF |cor(c,c')|' -> "
03895        << fKeyVmaxHFccMos << endl;
03896 }
03897 
03898 //-------------------------------------------------------------------
03899 
03900 void TEcnaGui::DoButtonVminLHFcc()
03901 {
03902 //Registration of Ymin for cov(c,c') in Stins
03903 
03904   char* bufferchain;
03905   bufferchain = (char*)fVminLHFccText->GetBuffer()->GetString();
03906 
03907   fKeyVminLHFcc = (Double_t)atof(bufferchain);
03908 
03909   fCnaCommand++;
03910   cout << "   *TEcnaGui [" << fCnaCommand
03911        << "]> Registration of Ymin for plot 'cor(c,c') in "
03912        << fStinName.Data() << "s' -> " << fKeyVminLHFcc << endl;
03913 }
03914 //-------------------------------------------------------------------
03915 
03916 void TEcnaGui::DoButtonVmaxLHFcc()
03917 {
03918 //Registration of Ymax for cov(c,c') in Stins
03919 
03920   char* bufferchain;
03921   bufferchain = (char*)fVmaxLHFccText->GetBuffer()->GetString();
03922 
03923   fKeyVmaxLHFcc = (Double_t)atof(bufferchain);
03924 
03925   fCnaCommand++;
03926   cout << "   *TEcnaGui [" << fCnaCommand
03927        << "]> Registration of Ymax for plot 'cor(c,c') in "
03928        << fStinName.Data() << "s' -> " << fKeyVmaxLHFcc << endl;
03929 }
03930 
03931 //-------------------------------------------------------------------
03932 
03933 void TEcnaGui::DoButtonStexNb()
03934 {
03935   ViewStexStinNumbering();  // message in the method
03936 }
03937 //-------------------------------------------------------------------
03938 void TEcnaGui::DoButtonStinA()
03939 {
03940 //Registration of the Stin A number (A = X coordinate for cor(c,c') plots)
03941 
03942   char* bufferchain;
03943   bufferchain = (char*)fStinAText->GetBuffer()->GetString();
03944 
03945   Int_t xReadStinANumberForCons = atoi(bufferchain);
03946 
03947   if( fSubDet == "EB" ){fKeyStinANumber = xReadStinANumberForCons;}
03948   if( fSubDet == "EE" )
03949     {fKeyStinANumber = fEcalNumbering->Get1DeeSCEcnaFromDeeSCCons(fKeyStexNumber, xReadStinANumberForCons);}
03950 
03951   if( fSubDet == "EB" )
03952     {
03953       fCnaCommand++;
03954       cout << "   *TEcnaGui [" << fCnaCommand
03955            << "]> Registration of " << fStinName.Data() << " number -> "
03956            << xReadStinANumberForCons << endl;
03957 
03958       if ( (fKeyStinANumber < 1) || (fKeyStinANumber > fEcal->MaxStinEcnaInStex())  )
03959         {
03960           fCnaError++;
03961           cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " << fStinName.Data()
03962                << " number = " << fKeyStinANumber
03963                << ": out of range ( range = [ 1 ," << fEcal->MaxStinEcnaInStex() << " ] ) "
03964                << fTTBELL << endl;
03965         }
03966     }
03967   
03968   if( fSubDet == "EE" )
03969     {
03970       fCnaCommand++;
03971       cout << "   *TEcnaGui [" << fCnaCommand
03972            << "]> Registration of " << fStinName.Data() << " number for construction -> "
03973            << xReadStinANumberForCons << endl;
03974 
03975       if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxDeeInEE() )
03976         {
03977           Int_t off_set_cons = 0;
03978           if( fKeyStexNumber == 1 || fKeyStexNumber == 3 ){off_set_cons = fEcal->MaxSCForConsInDee();}
03979           
03980           if( xReadStinANumberForCons <= off_set_cons ||
03981               xReadStinANumberForCons > fEcal->MaxSCForConsInDee()+off_set_cons )
03982             {
03983               fCnaError++;
03984               cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> SC nb for construction = "
03985                    << xReadStinANumberForCons << ". Out of range ( range = [ " << off_set_cons+1
03986                    << "," << fEcal->MaxSCForConsInDee()+off_set_cons << "] )"
03987                    << fTTBELL << endl;
03988             }
03989         }
03990       else
03991         {
03992           fCnaError++;
03993           cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> DeeNumber = " <<  fKeyStexNumber
03994                << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )"
03995                << fTTBELL << endl;
03996         }      
03997     }
03998 }
03999 
04000 //-------------------------------------------------------------------
04001 void TEcnaGui::DoButtonStinB()
04002 {
04003 //Registration of the Stin B number (B = Y coordinate for cor(c,c') plots)
04004 
04005   char* bufferchain;
04006   bufferchain = (char*)fStinBText->GetBuffer()->GetString();
04007 
04008   Int_t xReadStinBNumberForCons = atoi(bufferchain);
04009 
04010   if( fSubDet == "EB" ){fKeyStinBNumber = xReadStinBNumberForCons;}
04011   if( fSubDet == "EE" )
04012     {fKeyStinBNumber = fEcalNumbering->Get1DeeSCEcnaFromDeeSCCons(fKeyStexNumber, xReadStinBNumberForCons);}
04013 
04014   fCnaCommand++;
04015   cout << "   *TEcnaGui [" << fCnaCommand
04016        << "]> Registration of " << fStinName.Data() << "' number -> "
04017        << xReadStinBNumberForCons << endl;
04018 
04019   if( fSubDet == "EB" )
04020     {
04021       if ( (fKeyStinBNumber < 1) || (fKeyStinBNumber > fEcal->MaxStinEcnaInStex())  )
04022         {
04023           fCnaError++;
04024           cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> " << fStinName.Data()
04025                << "' number = " << fKeyStinBNumber
04026                << ": out of range ( range = [ 1 ," << fEcal->MaxStinEcnaInStex() << " ] ) "
04027                << fTTBELL << endl;
04028         }
04029     }
04030   
04031   if( fSubDet == "EE" )
04032     {
04033       if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxDeeInEE() )
04034         {
04035           Int_t off_set_cons = 0;
04036           if( fKeyStexNumber == 1 || fKeyStexNumber == 3 ){off_set_cons = fEcal->MaxSCForConsInDee();}
04037           
04038           if( xReadStinBNumberForCons < off_set_cons ||
04039               xReadStinBNumberForCons > fEcal->MaxSCForConsInDee()+off_set_cons )
04040             {
04041               fCnaError++;
04042               cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> SC nb for construction = "
04043                    << xReadStinBNumberForCons << ". Out of range ( range = [ " << off_set_cons+1
04044                    << "," << fEcal->MaxSCForConsInDee()+off_set_cons << "] )"
04045                    << fTTBELL << endl;
04046             }
04047         }
04048       else
04049         {
04050           fCnaError++;
04051           cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> DeeNumber = " <<  fKeyStexNumber
04052                << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )"
04053                << fTTBELL << endl;
04054         }      
04055     }
04056 }
04057 //-------------------------------------------------------------------
04058 void TEcnaGui::DoButtonChNb()
04059 {
04060 //Display of StinA Channel numbering
04061   ViewStinCrystalNumbering(fKeyStinANumber);
04062 }
04063 
04064 //-------------------------------------------------------------------
04065 void TEcnaGui::DoButtonChan()
04066 {
04067 //Registration of the channel number
04068 
04069   char* bufferchain;
04070   bufferchain = (char*)fChanText->GetBuffer()->GetString();
04071   Int_t xReadNumber = atoi(bufferchain);
04072 
04073   Int_t Choffset = -1;
04074   TString ChString = "?";
04075 
04076   if( fSubDet == "EB"){Choffset = 0; ChString = "channel";}
04077   if( fSubDet == "EE"){Choffset = 1; ChString = "crystal";}
04078 
04079   fKeyChanNumber = xReadNumber-Choffset;   // fKeyChanNumber : range = [0,25]
04080   fCnaCommand++;
04081   cout << "   *TEcnaGui [" << fCnaCommand
04082        << "]> Registration of " << ChString.Data() << " number -> "
04083        << xReadNumber << endl;
04084   
04085   if ( (fKeyChanNumber < 0) || (fKeyChanNumber > fEcal->MaxCrysInStin()-1 )  )
04086     {
04087       fCnaError++;
04088       cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> "
04089            << ChString.Data() << " number in " << fStinName.Data() << " = " << xReadNumber
04090            << ": out of range ( range = [" << Choffset << ","
04091            << fEcal->MaxCrysInStin()-1+Choffset << "] )"
04092            << fTTBELL << endl;
04093     } 
04094 }
04095 //-------------------------------------------------------------------
04096 void TEcnaGui::DoButtonSamp()
04097 {
04098 //Registration of the sample number
04099 
04100   char* bufferchain;
04101   bufferchain = (char*)fSampText->GetBuffer()->GetString();
04102   Int_t xKeySampNumber = atoi(bufferchain);
04103 
04104   fCnaCommand++;
04105   cout << "   *TEcnaGui [" << fCnaCommand
04106        << "]> Registration of sample number -> "
04107        << xKeySampNumber << endl;
04108 
04109   if ( (xKeySampNumber < 1) || (xKeySampNumber > fKeyNbOfSamples )  )
04110     {
04111       fCnaError++;
04112       cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> "
04113            << " Sample number = " << xKeySampNumber
04114            << ": out of range ( range = [ 1 ," << fKeyNbOfSamples << " ] )"
04115            << fTTBELL << endl;
04116     }
04117 
04118   fKeySampNumber = xKeySampNumber-1;
04119 }
04120 
04121 //----------------------------------------------------------------------
04122 void TEcnaGui::DoButtonRul()
04123 {
04124 //Register the name of the file containing the list of run parameters
04125 
04126   //........................... get info from the entry field
04127   char* listchain = (char*)fRulText->GetBuffer()->GetString();
04128   if( listchain[0] == '\0' )
04129     {
04130       fCnaError++;
04131       cout << "   !TEcnaGui (" << fCnaError << ") *ERROR* ===> "
04132            << " Empty file name in entry for TIME EVOLUTION plots."
04133            << fTTBELL << endl;
04134       fKeyFileNameRunList = fKeyRunListInitCode;
04135     }
04136   else
04137     {
04138       char tchiffr[10] = {'0', '1', '2',  '3',  '4',  '5',  '6',  '7',  '8',  '9' };
04139       
04140       //............. test of the first character (figure => run number, letter => file name)
04141       if( listchain[0] == tchiffr [0] || listchain[0] == tchiffr [1] ||
04142           listchain[0] == tchiffr [2] || listchain[0] == tchiffr [3] ||
04143           listchain[0] == tchiffr [4] || listchain[0] == tchiffr [5] ||
04144           listchain[0] == tchiffr [6] || listchain[0] == tchiffr [7] ||
04145           listchain[0] == tchiffr [8] || listchain[0] == tchiffr [9] )
04146         {
04147           fCnaError++;
04148           cout << "   !TEcnaGui (" << fCnaError << ") *ERROR* ===> "
04149                << " Please, enter a file name beginning with an alphabetic letter."
04150                << fTTBELL << endl;
04151         }
04152       else
04153         {
04154           fKeyFileNameRunList = listchain;
04155           
04156           fCnaCommand++;
04157           cout << "   *TEcnaGui [" << fCnaCommand
04158                << "]> Registration of run list file name for history plots -> "
04159                << fKeyFileNameRunList.Data() << endl;
04160         }
04161     }
04162 }
04163 
04164 //----------------------------------------------------------------------
04165 void TEcnaGui::DoButtonGent()
04166 {
04167 //Register the general title
04168   //........................... get info from the entry field
04169   char* listchain = (char*)fGentText->GetBuffer()->GetString();  
04170   fKeyGeneralTitle = listchain;
04171   
04172   fCnaCommand++;
04173   cout << "   *TEcnaGui [" << fCnaCommand
04174        << "]> Registration of general title -> "
04175        << fKeyGeneralTitle.Data() << endl;
04176 }
04177 //-------------------------------------------------------------------
04178 //
04179 //                        Last buttons methods
04180 //
04181 //-------------------------------------------------------------------
04182 //======================= LIN/LOG + Projy FRAME
04183 
04184 void TEcnaGui::DoButtonLogx()
04185 {
04186   if( fMemoScaleX == "LOG"){fKeyScaleX = "LIN";}
04187   if( fMemoScaleX == "LIN"){fKeyScaleX = "LOG";}
04188   fMemoScaleX = fKeyScaleX;
04189 
04190   fCnaCommand++;
04191   cout << "   *TEcnaGui [" << fCnaCommand
04192        << "]> X axis -> " << fKeyScaleX << " scale " << endl;
04193 }
04194 void TEcnaGui::DoButtonLogy()
04195 {
04196   if( fMemoScaleY == "LOG" ){fKeyScaleY = "LIN";}
04197   if( fMemoScaleY == "LIN" ){fKeyScaleY = "LOG";}
04198   fMemoScaleY = fKeyScaleY;
04199 
04200   fCnaCommand++;
04201   cout << "   *TEcnaGui [" << fCnaCommand
04202        << "]> Y axis -> " << fKeyScaleY << " scale " << endl;
04203 }
04204 
04205 void TEcnaGui::DoButtonProjy()
04206 {
04207   if( fMemoProjY == "Y projection" ){fKeyProjY = "normal";}
04208   if( fMemoProjY == "normal"       ){fKeyProjY = "Y projection";}
04209   fMemoProjY = fKeyProjY;
04210 
04211   fCnaCommand++;
04212   cout << "   *TEcnaGui [" << fCnaCommand
04213        << "]> 1D Histo display -> " << fKeyProjY << " mode " << endl;
04214 }
04215 
04216 //------------------------------------------------------------------- Colors + Exit
04217 
04218 void TEcnaGui::DoButtonColPal()
04219 {
04220   if( fMemoColPal == "ECCNAColor"   ){fKeyColPal = "Rainbow";}
04221   if( fMemoColPal == "Rainbow" ){fKeyColPal = "ECCNAColor";}
04222   fMemoColPal = fKeyColPal;
04223 
04224   TString sColPalComment = "?";
04225   if( fKeyColPal == "ECCNAColor" )
04226     {sColPalComment = "ECNAColor option: black-red-blue-green-brown-purple (default)";}
04227   if( fKeyColPal == "Rainbow"    )
04228     {sColPalComment = "Rainbow option:   red-orange-yellow-green-blue-indigo-purple";}
04229 
04230   fCnaCommand++;
04231   cout << "   *TEcnaGui [" << fCnaCommand
04232        << "]> Color palette -> " << sColPalComment << endl;
04233 }
04234 
04235 void TEcnaGui::DoButtonExit()
04236 {
04237   fCnaCommand++;
04238   cout << "   *TEcnaGui [" << fCnaCommand
04239        << "]> Exit CNA session."
04240        << endl;
04241   //............................ Quit the ROOT session
04242   fButExit->SetCommand(".q");
04243 }
04244 
04245 //======================= LAST FRAME
04246 //-------------------------------------------------------------------
04247 void TEcnaGui::DoButtonClone()
04248 {
04249   fCnaCommand++;
04250   cout << "   *TEcnaGui [" << fCnaCommand
04251        << "]> Clone last canvas. " << endl;
04252 
04253   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());      /*fCnew++*/ ;}
04254   fHistos->PlotCloneOfCurrentCanvas();
04255 }
04256 //-------------------------------------------------------------------
04257 void TEcnaGui::DoButtonRoot()
04258 {
04259   fCnaCommand++;
04260   cout << "   *TEcnaGui [" << fCnaCommand
04261        << "]> This is ROOT version " << gROOT->GetVersion()
04262        << endl;
04263 }
04264 //-------------------------------------------------------------------
04265 void TEcnaGui::DoButtonHelp()
04266 {
04267   fCnaCommand++;
04268   cout << "   *TEcnaGui [" << fCnaCommand
04269        << "]> HELP: for documentation, see the ECNA web page: " << endl
04270        << "    http://cms-fabbro.web.cern.ch/cms-fabbro/cna_new/Correlated_Noise_analysis/ECNA_main_page.htm"
04271        << endl;
04272 }
04273 
04274 //===================================================================
04275 //
04276 //                       HandleMenu
04277 //
04278 //===================================================================
04279 void TEcnaGui::HandleMenu(Int_t id)
04280 {
04281   //HandleMenu
04282   //.................... SUBMIT on batch system
04283 
04284   if( id == fMenuSubmit8nmC ){SubmitOnBatchSystem("8nm");}
04285   if( id == fMenuSubmit1nhC ){SubmitOnBatchSystem("1nh");}
04286   if( id == fMenuSubmit8nhC ){SubmitOnBatchSystem("8nh");}
04287   if( id == fMenuSubmit1ndC ){SubmitOnBatchSystem("1nd");}
04288   if( id == fMenuSubmit1nwC ){SubmitOnBatchSystem("1nw");}
04289 
04290   //.................... Clean
04291   if( id == fMenuCleanSubC  ){CleanBatchFiles("Sub");}
04292   if( id == fMenuCleanJobC  ){CleanBatchFiles("Job");}
04293   if( id == fMenuCleanPythC ){CleanBatchFiles("Pyth");}
04294   if( id == fMenuCleanAllC  ){CleanBatchFiles("All");}
04295 
04296   //.................... Calculations
04297   if( id == fMenuComputStdC ){Calculations("Std");}
04298   if( id == fMenuComputSttC ){Calculations("Stt");}
04299   if( id == fMenuComputSccC ){Calculations("Scc");}
04300 
04301   //.................... Nb of events in Stex
04302   if( id == fMenuD_NOE_ChNbFullC )
04303     {
04304       if( fMemoProjY == "normal"      ){ViewHistoSorSNumberOfEventsOfCrystals(fOptPlotFull);}
04305       if( fMemoProjY == "Y projection"){ViewHistoSorSNumberOfEventsDistribution(fOptPlotFull);}
04306     }
04307   if( id == fMenuD_NOE_ChNbSameC )
04308     {
04309       if( fMemoProjY == "normal"      ){ViewHistoSorSNumberOfEventsOfCrystals(fOptPlotSame);}
04310       if( fMemoProjY == "Y projection"){ViewHistoSorSNumberOfEventsDistribution(fOptPlotSame);}
04311     }
04312   if( id == fMenuD_NOE_ChNbHocoVecoC   ){ViewSorSNumberOfEvents();}
04313   if( id == fMenuD_NOE_ChNbAsciiFileC  ){ViewHistoSorSNumberOfEventsOfCrystals(fOptAscii);}
04314 
04315   //.................... Pedestal in Stex                  (HandleMenu)
04316   if( id == fMenuD_Ped_ChNbFullC )
04317     {
04318       if( fMemoProjY == "normal"      ){ViewHistoSorSPedestalsOfCrystals(fOptPlotFull);}
04319       if( fMemoProjY == "Y projection"){ViewHistoSorSPedestalsDistribution(fOptPlotFull);}
04320     }
04321   if( id == fMenuD_Ped_ChNbSameC )
04322     {
04323       if( fMemoProjY == "normal"      ){ViewHistoSorSPedestalsOfCrystals(fOptPlotSame);}
04324       if( fMemoProjY == "Y projection"){ViewHistoSorSPedestalsDistribution(fOptPlotSame);}
04325     }
04326   if( id == fMenuD_Ped_ChNbHocoVecoC   ){ViewSorSPedestals();}
04327   if( id == fMenuD_Ped_ChNbAsciiFileC  ){ViewHistoSorSPedestalsOfCrystals(fOptAscii);}
04328 
04329   //.................... Total noise in Stex                 (HandleMenu)
04330   if( id == fMenuD_TNo_ChNbFullC )
04331     {
04332       if( fMemoProjY == "normal"      ){ViewHistoSorSTotalNoiseOfCrystals(fOptPlotFull);}
04333       if( fMemoProjY == "Y projection"){ViewHistoSorSTotalNoiseDistribution(fOptPlotFull);}
04334     }
04335   if( id == fMenuD_TNo_ChNbSameC )
04336     {
04337       if( fMemoProjY == "normal"      ){ViewHistoSorSTotalNoiseOfCrystals(fOptPlotSame);}
04338       if( fMemoProjY == "Y projection"){ViewHistoSorSTotalNoiseDistribution(fOptPlotSame);}
04339     }
04340   if( id == fMenuD_TNo_ChNbSamePC)
04341     {
04342       if( fMemoProjY == "normal"      ){ViewHistoSorSTotalNoiseOfCrystals(fOptPlotSameP);}
04343       if( fMemoProjY == "Y projection"){ViewHistoSorSTotalNoiseDistribution(fOptPlotSameP);}
04344     }
04345   if( id == fMenuD_TNo_ChNbHocoVecoC   ){ViewSorSTotalNoise();}
04346   if( id == fMenuD_TNo_ChNbAsciiFileC  ){ViewHistoSorSTotalNoiseOfCrystals(fOptAscii);}
04347 
04348   //.................... Low Frequency noise in Stex                 (HandleMenu)
04349   if( id == fMenuD_LFN_ChNbFullC )
04350     {
04351       if( fMemoProjY == "normal"      ){ViewHistoSorSLowFrequencyNoiseOfCrystals(fOptPlotFull);}
04352       if( fMemoProjY == "Y projection"){ViewHistoSorSLowFrequencyNoiseDistribution(fOptPlotFull);}
04353     }
04354   if( id == fMenuD_LFN_ChNbSameC )
04355     {
04356       if( fMemoProjY == "normal"      ){ViewHistoSorSLowFrequencyNoiseOfCrystals(fOptPlotSame);}
04357       if( fMemoProjY == "Y projection"){ViewHistoSorSLowFrequencyNoiseDistribution(fOptPlotSame);}
04358     }
04359   if( id == fMenuD_LFN_ChNbSamePC)
04360     {
04361       if( fMemoProjY == "normal"      ){ViewHistoSorSLowFrequencyNoiseOfCrystals(fOptPlotSameP);}
04362       if( fMemoProjY == "Y projection"){ViewHistoSorSLowFrequencyNoiseDistribution(fOptPlotSameP);}
04363     }
04364   if( id == fMenuD_LFN_ChNbHocoVecoC   ){ViewSorSLowFrequencyNoise();}
04365   if( id == fMenuD_LFN_ChNbAsciiFileC  ){ViewHistoSorSLowFrequencyNoiseOfCrystals(fOptAscii);}
04366 
04367   //.................... High Frequency noise in Stex                 (HandleMenu)
04368   if( id == fMenuD_HFN_ChNbFullC )
04369     {
04370       if( fMemoProjY == "normal"      ){ViewHistoSorSHighFrequencyNoiseOfCrystals(fOptPlotFull);}
04371       if( fMemoProjY == "Y projection"){ViewHistoSorSHighFrequencyNoiseDistribution(fOptPlotFull);}
04372     }
04373   if( id == fMenuD_HFN_ChNbSameC )
04374     {
04375       if( fMemoProjY == "normal"      ){ViewHistoSorSHighFrequencyNoiseOfCrystals(fOptPlotSame);}
04376       if( fMemoProjY == "Y projection"){ViewHistoSorSHighFrequencyNoiseDistribution(fOptPlotSame);}
04377     }
04378   if( id == fMenuD_HFN_ChNbSamePC)
04379     {
04380       if( fMemoProjY == "normal"      ){ViewHistoSorSHighFrequencyNoiseOfCrystals(fOptPlotSameP);}
04381       if( fMemoProjY == "Y projection"){ViewHistoSorSHighFrequencyNoiseDistribution(fOptPlotSameP);}
04382     }
04383   if( id == fMenuD_HFN_ChNbHocoVecoC   ){ViewSorSHighFrequencyNoise();}
04384   if( id == fMenuD_HFN_ChNbAsciiFileC  ){ViewHistoSorSHighFrequencyNoiseOfCrystals(fOptAscii);}
04385 
04386   //.................... Mean of Corss in Stex                 (HandleMenu)
04387   if( id == fMenuD_MCs_ChNbFullC )
04388     {
04389       if( fMemoProjY == "normal"      ){ViewHistoSorSMeanOfCorssOfCrystals(fOptPlotFull);}
04390       if( fMemoProjY == "Y projection"){ViewHistoSorSMeanOfCorssDistribution(fOptPlotFull);}
04391     }
04392   if( id == fMenuD_MCs_ChNbSameC )
04393     {
04394       if( fMemoProjY == "normal"      ){ViewHistoSorSMeanOfCorssOfCrystals(fOptPlotSame);}
04395       if( fMemoProjY == "Y projection"){ViewHistoSorSMeanOfCorssDistribution(fOptPlotSame);}
04396     }
04397   if( id == fMenuD_MCs_ChNbSamePC)
04398     {
04399       if( fMemoProjY == "normal"      ){ViewHistoSorSMeanOfCorssOfCrystals(fOptPlotSameP);}
04400       if( fMemoProjY == "Y projection"){ViewHistoSorSMeanOfCorssDistribution(fOptPlotSameP);}
04401     }
04402   if( id == fMenuD_MCs_ChNbHocoVecoC   ){ViewSorSMeanOfCorss();}
04403   if( id == fMenuD_MCs_ChNbAsciiFileC  ){ViewHistoSorSMeanOfCorssOfCrystals(fOptAscii);}
04404 
04405   //.................... Sigma of Corss in the Stex                 (HandleMenu)
04406   if( id == fMenuD_SCs_ChNbFullC )
04407     {
04408       if( fMemoProjY == "normal"      ){ViewHistoSorSSigmaOfCorssOfCrystals(fOptPlotFull);}
04409       if( fMemoProjY == "Y projection"){ViewHistoSorSSigmaOfCorssDistribution(fOptPlotFull);}
04410     }
04411   if( id == fMenuD_SCs_ChNbSameC )
04412     {
04413       if( fMemoProjY == "normal"      ){ViewHistoSorSSigmaOfCorssOfCrystals(fOptPlotSame);}
04414       if( fMemoProjY == "Y projection"){ViewHistoSorSSigmaOfCorssDistribution(fOptPlotSame);}
04415     }
04416   if( id == fMenuD_SCs_ChNbSamePC)
04417     {
04418       if( fMemoProjY == "normal"      ){ViewHistoSorSSigmaOfCorssOfCrystals(fOptPlotSameP);}
04419       if( fMemoProjY == "Y projection"){ViewHistoSorSSigmaOfCorssDistribution(fOptPlotSameP);}
04420     }
04421   if( id == fMenuD_SCs_ChNbHocoVecoC   ){ViewSorSSigmaOfCorss();}
04422   if( id == fMenuD_SCs_ChNbAsciiFileC  ){ViewHistoSorSSigmaOfCorssOfCrystals(fOptAscii);}
04423 
04424   //............................... Low Freq Mean Cor(c,c') for each pair of Stins                 (HandleMenu)
04425   if( id == fMenuLFccMosColzC ){ViewMatrixLowFrequencyMeanCorrelationsBetweenStins("COLZ");}
04426   if( id == fMenuLFccMosLegoC ){ViewMatrixLowFrequencyMeanCorrelationsBetweenStins("LEGO2Z");}
04427   //............................... High Freq Mean Cor(c,c') for each pair of Stins
04428   if( id == fMenuHFccMosColzC ){ViewMatrixHighFrequencyMeanCorrelationsBetweenStins("COLZ");}
04429   if( id == fMenuHFccMosLegoC ){ViewMatrixHighFrequencyMeanCorrelationsBetweenStins("LEGO2Z");}
04430 
04431   //............................... Corcc for each Stin in the Stex
04432   if( id == fMenuLFccColzC ){ViewStexLowFrequencyCorcc();}
04433   if( id == fMenuHFccColzC ){ViewStexHighFrequencyCorcc();}
04434 
04435   //--------> Nb for Cons for Stin numbers in case of EE
04436   Int_t cKeyStinANumber = fKeyStinANumber;
04437   if( fSubDet == "EE" && fKeyStexNumber != 0 )
04438     {cKeyStinANumber = fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fKeyStexNumber, fKeyStinANumber);}
04439   Int_t cKeyStinBNumber = fKeyStinBNumber;
04440   if( fSubDet == "EE" && fKeyStexNumber != 0 )
04441     {cKeyStinBNumber = fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fKeyStexNumber, fKeyStinBNumber);}
04442 
04443   //............................... Low Frequency Correlations and covariances between channels
04444   if( id == fMenuLFCorccColzC )
04445     {ViewMatrixLowFrequencyCorrelationsBetweenChannels(cKeyStinANumber, cKeyStinBNumber, "COLZ");}
04446   if( id == fMenuLFCorccLegoC )
04447     {ViewMatrixLowFrequencyCorrelationsBetweenChannels(cKeyStinANumber, cKeyStinBNumber, "LEGO2Z");}
04448 
04449   if( id == fMenuHFCorccColzC )
04450     {ViewMatrixHighFrequencyCorrelationsBetweenChannels(cKeyStinANumber, cKeyStinBNumber, "COLZ");}
04451   if( id == fMenuHFCorccLegoC )
04452     {ViewMatrixHighFrequencyCorrelationsBetweenChannels(cKeyStinANumber, cKeyStinBNumber, "LEGO2Z");}
04453 
04454   //.................................... Correlations and covariances between samples     (HandleMenu)
04455   if( id == fMenuCorssColzC      ){ViewMatrixCorrelationSamples(cKeyStinANumber, fKeyChanNumber, "COLZ");}
04456   if( id == fMenuCorssBoxC       ){ViewMatrixCorrelationSamples(cKeyStinANumber, fKeyChanNumber, "BOX");}
04457   if( id == fMenuCorssTextC      ){ViewMatrixCorrelationSamples(cKeyStinANumber, fKeyChanNumber, "TEXT");}
04458   if( id == fMenuCorssContzC     ){ViewMatrixCorrelationSamples(cKeyStinANumber, fKeyChanNumber, "CONTZ");}
04459   if( id == fMenuCorssLegoC      ){ViewMatrixCorrelationSamples(cKeyStinANumber, fKeyChanNumber, "LEGO2Z");}
04460   if( id == fMenuCorssSurf1C     ){ViewMatrixCorrelationSamples(cKeyStinANumber, fKeyChanNumber, "SURF1Z");}
04461   if( id == fMenuCorssSurf2C     ){ViewMatrixCorrelationSamples(cKeyStinANumber, fKeyChanNumber, "SURF2Z");}
04462   if( id == fMenuCorssSurf3C     ){ViewMatrixCorrelationSamples(cKeyStinANumber, fKeyChanNumber, "SURF3Z");}
04463   if( id == fMenuCorssSurf4C     ){ViewMatrixCorrelationSamples(cKeyStinANumber, fKeyChanNumber, "SURF4");}
04464   if( id == fMenuCorssAsciiFileC ){ViewMatrixCorrelationSamples(cKeyStinANumber, fKeyChanNumber, "ASCII");}
04465 
04466   if( id == fMenuCovssColzC      ){ViewMatrixCovarianceSamples(cKeyStinANumber, fKeyChanNumber, "COLZ");}
04467   if( id == fMenuCovssBoxC       ){ViewMatrixCovarianceSamples(cKeyStinANumber, fKeyChanNumber, "BOX");}
04468   if( id == fMenuCovssTextC      ){ViewMatrixCovarianceSamples(cKeyStinANumber, fKeyChanNumber, "TEXT");}
04469   if( id == fMenuCovssContzC     ){ViewMatrixCovarianceSamples(cKeyStinANumber, fKeyChanNumber, "CONTZ");}
04470   if( id == fMenuCovssLegoC      ){ViewMatrixCovarianceSamples(cKeyStinANumber, fKeyChanNumber, "LEGO2Z");}
04471   if( id == fMenuCovssSurf1C     ){ViewMatrixCovarianceSamples(cKeyStinANumber, fKeyChanNumber, "SURF1Z");}
04472   if( id == fMenuCovssSurf2C     ){ViewMatrixCovarianceSamples(cKeyStinANumber, fKeyChanNumber, "SURF2Z");}
04473   if( id == fMenuCovssSurf3C     ){ViewMatrixCovarianceSamples(cKeyStinANumber, fKeyChanNumber, "SURF3Z");}
04474   if( id == fMenuCovssSurf4C     ){ViewMatrixCovarianceSamples(cKeyStinANumber, fKeyChanNumber, "SURF4");}
04475   if( id == fMenuCovssAsciiFileC ){ViewMatrixCovarianceSamples(cKeyStinANumber, fKeyChanNumber, "ASCII");}
04476 
04477   //.................... Correlations and covariances between samples for all channels of a Stin
04478   if( id == fMenuCorssAllColzC ){ViewStinCorrelationSamples(cKeyStinANumber);}
04479   if( id == fMenuCovssAllColzC ){ViewStinCovarianceSamples(cKeyStinANumber);}
04480      
04481   //..................................... Expectation values of the samples (pedestals)       (HandleMenu)
04482   if( id == fMenuD_MSp_SampLineFullC )
04483     {ViewHistoCrystalSampleMeans(cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04484   if( id == fMenuD_MSp_SampLineSameC )
04485     {ViewHistoCrystalSampleMeans(cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04486   
04487   //..................................... Sigmas of the samples
04488   if( id == fMenuD_SSp_SampLineFullC )
04489     {ViewHistoCrystalSigmasOfSamples(cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04490   if( id == fMenuD_SSp_SampLineSameC )
04491     {ViewHistoCrystalSigmasOfSamples(cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04492   
04493   //..................................... Evolution in time (ViewHistime, except EvolSamp -> Viewhisto)
04494   if(   id == fMenuH_Ped_DatePolmFullC || id == fMenuH_Ped_DatePolmSameC  
04495      || id == fMenuH_TNo_DatePolmFullC || id == fMenuH_TNo_DatePolmSameC || id == fMenuH_TNo_DatePolmSamePC
04496      || id == fMenuH_LFN_DatePolmFullC || id == fMenuH_LFN_DatePolmSameC || id == fMenuH_LFN_DatePolmSamePC
04497      || id == fMenuH_HFN_DatePolmFullC || id == fMenuH_HFN_DatePolmSameC || id == fMenuH_HFN_DatePolmSamePC
04498      || id == fMenuH_MCs_DatePolmFullC || id == fMenuH_MCs_DatePolmSameC || id == fMenuH_MCs_DatePolmSamePC
04499      || id == fMenuH_SCs_DatePolmFullC || id == fMenuH_SCs_DatePolmSameC || id == fMenuH_SCs_DatePolmSamePC)
04500     {
04501       if(fKeyFileNameRunList == fKeyRunListInitCode )
04502         {fCnaError++;
04503           cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===> "
04504                << " EMPTY STRING for list of run file name (TIME EVOLUTION plots)." << fTTBELL << endl;}
04505       else
04506         {
04507           //........................................ Pedestals                 (HandleMenu / ViewHistime)
04508           if( id == fMenuH_Ped_DatePolmFullC )
04509             {
04510               if( fMemoProjY == "normal"      )
04511                 {ViewHistimeCrystalPedestals(fKeyFileNameRunList.Data(),
04512                                              cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04513               if( fMemoProjY == "Y projection")
04514                 {ViewHistimeCrystalPedestalsRuns(fKeyFileNameRunList.Data(),
04515                                                  cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04516             }
04517           if( id == fMenuH_Ped_DatePolmSameC )
04518             { if( fMemoProjY == "normal"      )
04519               {ViewHistimeCrystalPedestals(fKeyFileNameRunList.Data(),
04520                                            cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04521             if( fMemoProjY == "Y projection")
04522               {ViewHistimeCrystalPedestalsRuns(fKeyFileNameRunList.Data(),
04523                                                cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04524             }
04525 
04526           //........................................ Total noise
04527           if( id == fMenuH_TNo_DatePolmFullC )
04528             {
04529               if( fMemoProjY == "normal"      )
04530                 {ViewHistimeCrystalTotalNoise(fKeyFileNameRunList.Data(),
04531                                               cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04532               if( fMemoProjY == "Y projection")
04533                 {ViewHistimeCrystalTotalNoiseRuns(fKeyFileNameRunList.Data(),
04534                                                   cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04535             }
04536           if( id == fMenuH_TNo_DatePolmSameC )
04537             {
04538               if( fMemoProjY == "normal"      )
04539                 {ViewHistimeCrystalTotalNoise(fKeyFileNameRunList.Data(),
04540                                               cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04541               if( fMemoProjY == "Y projection")
04542                 {ViewHistimeCrystalTotalNoiseRuns(fKeyFileNameRunList.Data(),
04543                                                   cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04544             }
04545           if( id == fMenuH_TNo_DatePolmSamePC )
04546             {
04547               if( fMemoProjY == "normal"      )
04548                 {ViewHistimeCrystalTotalNoise(fKeyFileNameRunList.Data(),
04549                                               cKeyStinANumber, fKeyChanNumber, fOptPlotSameP);}
04550               if( fMemoProjY == "Y projection")
04551                 {ViewHistimeCrystalTotalNoiseRuns(fKeyFileNameRunList.Data(),
04552                                                   cKeyStinANumber, fKeyChanNumber, fOptPlotSameP);}
04553             }
04554 
04555           //........................................ Low frequency noise                 (HandleMenu / ViewHistime)
04556           if( id == fMenuH_LFN_DatePolmFullC )
04557             {
04558               if( fMemoProjY == "normal"      )
04559                 {ViewHistimeCrystalLowFrequencyNoise(fKeyFileNameRunList.Data(),
04560                                                      cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04561               if( fMemoProjY == "Y projection")
04562                 {ViewHistimeCrystalLowFrequencyNoiseRuns(fKeyFileNameRunList.Data(),
04563                                                          cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04564             }
04565           if( id == fMenuH_LFN_DatePolmSameC )
04566             {
04567               if( fMemoProjY == "normal"      )
04568                 {ViewHistimeCrystalLowFrequencyNoise(fKeyFileNameRunList.Data(),
04569                                                      cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04570               if( fMemoProjY == "Y projection")
04571                 {ViewHistimeCrystalLowFrequencyNoiseRuns(fKeyFileNameRunList.Data(),
04572                                                          cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04573             }
04574           if( id == fMenuH_LFN_DatePolmSamePC )
04575             {
04576               if( fMemoProjY == "normal"      )
04577                 {ViewHistimeCrystalLowFrequencyNoise(fKeyFileNameRunList.Data(),
04578                                                      cKeyStinANumber, fKeyChanNumber, fOptPlotSameP);}
04579               if( fMemoProjY == "Y projection")
04580                 {ViewHistimeCrystalLowFrequencyNoiseRuns(fKeyFileNameRunList.Data(),
04581                                                          cKeyStinANumber, fKeyChanNumber, fOptPlotSameP);}
04582             }
04583           
04584           //........................................ High frequency noise
04585           if( id == fMenuH_HFN_DatePolmFullC )
04586             {
04587               if( fMemoProjY == "normal"      )
04588                 {ViewHistimeCrystalHighFrequencyNoise(fKeyFileNameRunList.Data(),
04589                                                       cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04590               if( fMemoProjY == "Y projection")
04591                 {ViewHistimeCrystalHighFrequencyNoiseRuns(fKeyFileNameRunList.Data(),
04592                                                           cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04593             }
04594           if( id == fMenuH_HFN_DatePolmSameC )
04595             {
04596               if( fMemoProjY == "normal"      )
04597                 {ViewHistimeCrystalHighFrequencyNoise(fKeyFileNameRunList.Data(),
04598                                                       cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04599               if( fMemoProjY == "Y projection")
04600                 {ViewHistimeCrystalHighFrequencyNoiseRuns(fKeyFileNameRunList.Data(),
04601                                                           cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04602             }
04603           if( id == fMenuH_HFN_DatePolmSamePC )
04604             {
04605               if( fMemoProjY == "normal"      )
04606                 {ViewHistimeCrystalHighFrequencyNoise(fKeyFileNameRunList.Data(),
04607                                                       cKeyStinANumber, fKeyChanNumber, fOptPlotSameP);}
04608               if( fMemoProjY == "Y projection")
04609                 {ViewHistimeCrystalHighFrequencyNoiseRuns(fKeyFileNameRunList.Data(),
04610                                                           cKeyStinANumber, fKeyChanNumber, fOptPlotSameP);}
04611             }
04612           
04613           //........................................ Mean of Corss                 (HandleMenu / ViewHistime)
04614           if( id == fMenuH_MCs_DatePolmFullC )
04615             {
04616               if( fMemoProjY == "normal"      )
04617                 {ViewHistimeCrystalMeanOfCorss(fKeyFileNameRunList.Data(),
04618                                                cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04619               if( fMemoProjY == "Y projection")
04620                 {ViewHistimeCrystalMeanOfCorssRuns(fKeyFileNameRunList.Data(),
04621                                                    cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04622             }
04623           if( id == fMenuH_MCs_DatePolmSameC )
04624             {
04625               if( fMemoProjY == "normal"      )
04626                 {ViewHistimeCrystalMeanOfCorss(fKeyFileNameRunList.Data(),
04627                                                cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04628               if( fMemoProjY == "Y projection")
04629                 {ViewHistimeCrystalMeanOfCorssRuns(fKeyFileNameRunList.Data(),
04630                                                    cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04631             }
04632           if( id == fMenuH_MCs_DatePolmSamePC )
04633             {
04634               if( fMemoProjY == "normal"      )
04635                 {ViewHistimeCrystalMeanOfCorss(fKeyFileNameRunList.Data(),
04636                                                cKeyStinANumber, fKeyChanNumber, fOptPlotSameP);}
04637               if( fMemoProjY == "Y projection")
04638                 {ViewHistimeCrystalMeanOfCorssRuns(fKeyFileNameRunList.Data(),
04639                                                    cKeyStinANumber, fKeyChanNumber, fOptPlotSameP);}
04640             }
04641           
04642           //........................................ Sigmas of Corss
04643           if( id == fMenuH_SCs_DatePolmFullC )
04644             {
04645               if( fMemoProjY == "normal"      )
04646                 {ViewHistimeCrystalSigmaOfCorss(fKeyFileNameRunList.Data(),
04647                                                 cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04648               if( fMemoProjY == "Y projection")
04649                 {ViewHistimeCrystalSigmaOfCorssRuns(fKeyFileNameRunList.Data(),
04650                                                     cKeyStinANumber, fKeyChanNumber, fOptPlotFull);}
04651             }
04652           if( id == fMenuH_SCs_DatePolmSameC )
04653             {
04654               if( fMemoProjY == "normal"      )
04655                 {ViewHistimeCrystalSigmaOfCorss(fKeyFileNameRunList.Data(),
04656                                                 cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04657               if( fMemoProjY == "Y projection")
04658                 {ViewHistimeCrystalSigmaOfCorssRuns(fKeyFileNameRunList.Data(),
04659                                                     cKeyStinANumber, fKeyChanNumber, fOptPlotSame);}
04660             }
04661           if( id == fMenuH_SCs_DatePolmSamePC )
04662             {
04663               if( fMemoProjY == "normal"      )
04664                 {ViewHistimeCrystalSigmaOfCorss(fKeyFileNameRunList.Data(),
04665                                                 cKeyStinANumber, fKeyChanNumber, fOptPlotSameP);}
04666               if( fMemoProjY == "Y projection")
04667                 {ViewHistimeCrystalSigmaOfCorssRuns(fKeyFileNameRunList.Data(),
04668                                                     cKeyStinANumber, fKeyChanNumber, fOptPlotSameP);}
04669             }
04670         }
04671     }
04672 
04673   //...................................... SampTime                               (HandleMenu / ADC)
04674   if( id == fMenuAdcProjSampLineFullC )
04675     {
04676       if( fMemoProjY == "normal"      )
04677         {ViewHistoCrystalSampleValues(cKeyStinANumber, fKeyChanNumber, fKeySampNumber, fOptPlotFull);}
04678       if( fMemoProjY == "Y projection")
04679         {ViewHistoSampleEventDistribution(cKeyStinANumber, fKeyChanNumber, fKeySampNumber, fOptPlotFull);}
04680     }
04681   if( id == fMenuAdcProjSampLineSameC )
04682     {
04683       if( fMemoProjY == "normal"      )
04684         {ViewHistoCrystalSampleValues(cKeyStinANumber, fKeyChanNumber, fKeySampNumber, fOptPlotSame);}
04685       if( fMemoProjY == "Y projection")
04686         {ViewHistoSampleEventDistribution(cKeyStinANumber, fKeyChanNumber, fKeySampNumber, fOptPlotSame);}
04687     }
04688 }
04689 // ------------- ( end of HandleMenu(...) ) -------------
04690 
04691 //==========================================================================
04692 //
04693 //             SubmitOnBatchSystem()   M E T H O D 
04694 //
04695 //==========================================================================
04696 void TEcnaGui::SubmitOnBatchSystem(const TString QueueCode)
04697 {
04698   //Submit job in batch mode
04699   
04700   if( (fConfirmSubmit == 1) && (fConfirmRunNumber == fKeyRunNumber) )
04701     {
04702       fCnaCommand++;
04703       cout << "   *TEcnaGui [" << fCnaCommand
04704            << "]> Submitting job in batch mode for run " << fConfirmRunNumber << endl;
04705 
04706       //.......................... get the path "modules/data"
04707       // /afs/cern.ch/user/U/USERNAME/cmssw/CMSSW_X_Y_Z/src/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/data/
04708       TString ModulesdataPath = fCnaParPaths->PathModulesData();
04709 
04710       //---------------------------------- python file building script: command text
04711       TString CnaPythonCommand = ModulesdataPath;
04712 
04713       //......................................... Script for python file building: script name
04714       TString PythonScriptName = "EcnaSystemScriptPython";
04715       const Text_t *t_PythonScriptName = (const Text_t *)PythonScriptName.Data();
04716       CnaPythonCommand.Append(t_PythonScriptName);
04717 
04718       //......................................... Script for python file building: arguments
04719       //  In the calling command, TString arguments must be of the form: \"STRING1\"  \"STRING2\"  etc...
04720 
04721       //......................................... arguments -> Run number
04722       //.......... ${1}
04723       CnaPythonCommand.Append(' ');
04724       CnaPythonCommand.Append(fConfirmRunNumberString);
04725 
04726       //......................................... arguments -> Analyzer parameters
04727       //.......... ${2}
04728       CnaPythonCommand.Append(' ');
04729       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04730       const Text_t *t_StringAnaType = (const Text_t *)fKeyAnaType.Data();
04731       CnaPythonCommand.Append(t_StringAnaType);
04732       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04733 
04734       //.......... ${3}
04735       CnaPythonCommand.Append(' ');
04736       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04737       const Text_t *t_NbOfSamplesString = (const Text_t *)fKeyNbOfSamplesString.Data();
04738       CnaPythonCommand.Append(t_NbOfSamplesString);
04739       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04740 
04741       //.......... ${4}
04742       CnaPythonCommand.Append(' ');
04743       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04744       const Text_t *t_FirstReqEvtNumberString = (const Text_t *)fKeyFirstReqEvtNumberString.Data();
04745       CnaPythonCommand.Append(t_FirstReqEvtNumberString);
04746       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04747 
04748       //.......... ${5}
04749       CnaPythonCommand.Append(' ');
04750       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04751       const Text_t *t_LastReqEvtNumberString = (const Text_t *)fKeyLastReqEvtNumberString.Data();
04752       CnaPythonCommand.Append(t_LastReqEvtNumberString);
04753       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04754 
04755       //.......... ${6}
04756       CnaPythonCommand.Append(' ');
04757       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04758       const Text_t *t_ReqNbOfEvtsString = (const Text_t *)fKeyReqNbOfEvtsString.Data();
04759       CnaPythonCommand.Append(t_ReqNbOfEvtsString);
04760       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04761 
04762       //.......... ${7}
04763       CnaPythonCommand.Append(' ');
04764       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04765       const Text_t *t_fStexName = (const Text_t *)fStexName.Data();
04766       CnaPythonCommand.Append(t_fStexName);
04767       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04768 
04769       //.......... ${8}
04770       CnaPythonCommand.Append(' ');
04771       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04772       const Text_t *t_StexNumberString = (const Text_t *)fKeyStexNumberString.Data();
04773       CnaPythonCommand.Append(t_StexNumberString);
04774       CnaPythonCommand.Append('\\'); CnaPythonCommand.Append('\"');
04775 
04776       //......................................... arguments -> python file name
04777       //.......... ${9}
04778       // - - - - - - - - - - - - - - - - - Build the name
04779       fPythonFileName = "EcnaPython_";
04780 
04781       fPythonFileName.Append(t_StringAnaType);
04782       fPythonFileName.Append('_');
04783 
04784       fPythonFileName.Append('S');
04785       fPythonFileName.Append('1');
04786       fPythonFileName.Append('_');
04787       fPythonFileName.Append(t_NbOfSamplesString);
04788       fPythonFileName.Append('_');
04789       fPythonFileName.Append('R');
04790 
04791       const Text_t *t_fConfirmRunNumberString = (const Text_t *)fConfirmRunNumberString.Data();
04792       fPythonFileName.Append(t_fConfirmRunNumberString);
04793       fPythonFileName.Append('_');
04794 
04795       fPythonFileName.Append(t_FirstReqEvtNumberString);
04796       fPythonFileName.Append('_');
04797 
04798       fPythonFileName.Append(t_LastReqEvtNumberString);
04799       fPythonFileName.Append('_');
04800 
04801       fPythonFileName.Append(t_ReqNbOfEvtsString);
04802       fPythonFileName.Append('_');
04803 
04804       fPythonFileName.Append(t_fStexName);
04805 
04806       fPythonFileName.Append(t_StexNumberString);      //  <== (python file name without extension .py)
04807       // - - - - - - - - - - - - - - - - - 
04808 
04809       CnaPythonCommand.Append(' ');
04810       const Text_t *t_fPythonFileName = (const Text_t *)fPythonFileName.Data();
04811       CnaPythonCommand.Append(t_fPythonFileName);
04812 
04813       //......................................... arguments -> modules:data path
04814       //.......... ${9}
04815       CnaPythonCommand.Append(' ');
04816       const Text_t *t_modules_data_path = (const Text_t *)ModulesdataPath.Data();
04817       CnaPythonCommand.Append(t_modules_data_path);
04818 
04819       //......................................... arguments -> last evt number (without "")
04820       //.......... ${10}
04821       //CnaPythonCommand.Append(' ');
04822       //CnaPythonCommand.Append(t_LastReqEvtNumberString);
04823 
04824       //......................................... arguments -> SourceForPythonFileName
04825       //.......... ${11}
04826       //CnaPythonCommand.Append(' ');
04827       //const Text_t *t_Pyf = (const Text_t *)fKeyPyf.Data();
04828       //CnaPythonCommand.Append(t_Pyf);
04829 
04830       //---------------------------------- Exec python file building command (csh before command text)  
04831       const Text_t *t_cnapythoncommand = (const Text_t *)CnaPythonCommand.Data();
04832       TString CnaExecPythonCommand = "csh ";
04833       CnaExecPythonCommand.Append(t_cnapythoncommand);
04834 
04835       Int_t i_exec_python = gSystem->Exec(CnaExecPythonCommand.Data());
04836 
04837       if( i_exec_python != 0 )
04838         {
04839           cout << "*TEcnaGui> Script for python file building was executed with error code = "
04840                << i_exec_python << "." << endl
04841                << "           Check if CMSSW version in command below is the same as in file ~/ECNA/CMSSW_parameters"
04842                << endl
04843                << "           Command: " << CnaExecPythonCommand.Data() << endl
04844                << "           Run number = " << fConfirmRunNumber << endl
04845                << fTTBELL << endl;
04846         }
04847       else
04848         {
04849           cout << "*TEcnaGui> Script for python file building was successfully executed." << endl
04850                << "          python file: " << fPythonFileName.Data() << ".py" << endl
04851                << "          (Command: " << CnaExecPythonCommand.Data() << ")" << endl;
04852 
04853           //========================================================== Job submission script
04854           TString CnaSubmitCommand = ModulesdataPath;
04855 
04856           //......................................... Script for job submission: command name
04857           TString SubmitScriptName = "EcnaSystemScriptSubmit";
04858           const Text_t *t_SubmitScriptName= (const Text_t *)SubmitScriptName.Data();
04859           CnaSubmitCommand.Append(t_SubmitScriptName);
04860 
04861           //......................................... Script for job submission: arguments
04862           const Text_t *t_cmssw_version = (const Text_t *)fCnaParPaths->CMSSWVersion().Data();
04863           CnaSubmitCommand.Append(' ');
04864           CnaSubmitCommand.Append(t_cmssw_version);
04865           CnaSubmitCommand.Append(' ');
04866 
04867           const Text_t *t_cmssw_subsystem = (const Text_t *)fCnaParPaths->CMSSWSubsystem().Data();
04868           CnaSubmitCommand.Append(t_cmssw_subsystem);
04869           CnaSubmitCommand.Append(' ');
04870 
04871           const Text_t *t_cfgp_file = (const Text_t *)fPythonFileName.Data();
04872           CnaSubmitCommand.Append(t_cfgp_file);
04873           CnaSubmitCommand.Append(' ');
04874       
04875           const Text_t *t_QueueCode = (const Text_t *)QueueCode.Data();
04876           CnaSubmitCommand.Append(t_QueueCode);
04877 
04878           //----------------------------------------- Exec Submit Command (csh before command text)
04879           const Text_t *t_cnasubmitcommand = (const Text_t *)CnaSubmitCommand.Data();
04880           TString CnaExecSubmitCommand = "csh ";
04881           CnaExecSubmitCommand.Append(t_cnasubmitcommand);
04882 
04883           Int_t i_exec_submit = gSystem->Exec(CnaExecSubmitCommand.Data());
04884       
04885           if( i_exec_submit != 0 )
04886             {
04887               cout << "*TEcnaGui> Script for job submission was executed with error code = "
04888                    << i_exec_submit << "."  << endl
04889                    << "          Command: " << CnaExecSubmitCommand.Data() << endl
04890                    << "          The following CMSSW parameters may be wrong:" << endl
04891                    << "          CMSSW version, subsystem name, subdirectory name in test/" << endl
04892                    << "          Check these parameters in file $HOME/ECNA/cmssw_parameters" << endl
04893                    << "          and make change if necessary."  << endl
04894                    << "          Then, exit and restart before SUBMIT again." << endl
04895                    << fTTBELL << endl;
04896             }
04897           else
04898             {
04899               cout << "*TEcnaGui> Job with configuration file: " << fPythonFileName.Data()
04900                    << " was successfully submitted." << endl
04901                    << "          (Command: " << CnaExecSubmitCommand.Data() << ")" << endl;       
04902             }
04903       
04904           fConfirmSubmit          = 0;
04905           fConfirmRunNumber       = 0;
04906           fConfirmRunNumberString = "0";
04907         }
04908     }
04909   else
04910     {
04911       if( fKeyAnaType.BeginsWith("Adc") )
04912         {
04913           fCnaCommand++;
04914           cout << "   *TEcnaGui [" << fCnaCommand
04915                << "]> Request for submitting job in batch mode for run " << fKeyRunNumber
04916                << ". Syntax OK. Please, click again to confirm."
04917                << fTTBELL << endl;
04918           
04919           fConfirmSubmit          = 1;
04920           fConfirmRunNumber       = fKeyRunNumber;
04921           fConfirmRunNumberString = fKeyRunNumberString;
04922         }
04923       else
04924         {
04925           fCnaError++;
04926           cout << "   !TEcnaGui (" << fCnaError << ") *** ERROR *** ===>"
04927                << " Analysis name = " << fKeyAnaType
04928                << ": should begin with 'Adc'."
04929                << " Please, change the analysis name." << fTTBELL << endl;
04930           
04931           fConfirmSubmit          = 0;
04932           fConfirmRunNumber       = 0;
04933           fConfirmRunNumberString = "0";
04934         }
04935     }
04936 }
04937 //------------------------------------------- end of SubmitOnBatchSystem() ------------------------
04938 
04939 //==========================================================================
04940 //
04941 //             CleanBatchFiles()   M E T H O D 
04942 //
04943 //==========================================================================
04944 void TEcnaGui::CleanBatchFiles(const TString clean_code)
04945 {
04946   //Clean of python files, submission scripts,...
04947 
04948   fCnaCommand++;
04949   cout << "   *TEcnaGui [" << fCnaCommand
04950        << "]> Clean requested with code: " << clean_code
04951        << endl;
04952 
04953   //================================ CLEAN SUBMISSION SCRIPTS ===================================
04954   if( clean_code == "Sub"  || clean_code == "All")
04955     {
04956       //.......................... get the path "modules/data"
04957       // /afs/cern.ch/user/U/USERNAME/cmssw/CMSSW_X_Y_Z/src/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/data/
04958       TString ModulesdataPath = fCnaParPaths->PathModulesData();
04959 
04960       //----------------------------------------- submission clean script: command text
04961       //......................................... submission clean script: script name
04962       TString CnaCleanSubmissionCommand = ModulesdataPath;
04963       TString CleanSubmissionScriptName = "EcnaSystemScriptCleanSubmissionScripts";
04964       const Text_t *t_CleanSubmissionScriptName = (const Text_t *)CleanSubmissionScriptName.Data();
04965       CnaCleanSubmissionCommand.Append(t_CleanSubmissionScriptName);
04966 
04967       //......................................... arguments -> test/slc... path
04968       //.......................... get the path "test/slc4_ia32_gcc345"
04969       // /afs/cern.ch/user/U/USERNAME/cmssw/CMSSW_X_Y_Z/test/slc4_ia32_gcc345/
04970       TString TestslcPath = fCnaParPaths->PathTestSlc();
04971       CnaCleanSubmissionCommand.Append(' ');
04972       const Text_t *t_modules_data_path = (const Text_t *)TestslcPath.Data();
04973       CnaCleanSubmissionCommand.Append(t_modules_data_path);
04974 
04975       //----------------------------------------- Exec CleanSubmission Command (csh before command text)
04976       const Text_t *t_cnacleansubmissioncommand = (const Text_t *)CnaCleanSubmissionCommand.Data();
04977       TString CnaExecCleanSubmissionCommand = "csh ";
04978       CnaExecCleanSubmissionCommand.Append(t_cnacleansubmissioncommand);
04979 
04980       Int_t i_exec_cleansubmission = gSystem->Exec(CnaExecCleanSubmissionCommand.Data());
04981 
04982       if( i_exec_cleansubmission != 0 )
04983         {
04984           cout << "*TEcnaGui> Script for submission script clean was executed with error code = "
04985                << i_exec_cleansubmission << "."  << endl
04986                << "          Command: " << CnaExecCleanSubmissionCommand.Data() << endl
04987                << fTTBELL << endl;
04988         }
04989       else
04990         {
04991           cout << "*TEcnaGui> Script for submission script clean"
04992                << " was successfully executed." << endl
04993                << "          (Command: " << CnaExecCleanSubmissionCommand.Data() << ")" << endl;          
04994         }
04995 
04996     }
04997 
04998   //================================= CLEAN LSFJOB REPORTS ======================================
04999   if( clean_code == "Job"  || clean_code == "All")
05000     {
05001       //.......................... get the path "modules/data"
05002       // /afs/cern.ch/user/U/USERNAME/cmssw/CMSSW_X_Y_Z/src/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/data/
05003       TString ModulesdataPath = fCnaParPaths->PathModulesData();
05004 
05005       //----------------------------------------- jobreport clean script: command text
05006       //......................................... jobreport clean script: script name
05007       TString CnaCleanJobreportCommand = ModulesdataPath;
05008       TString CleanJobreportScriptName = "EcnaSystemScriptCleanLSFJOBReports";
05009       const Text_t *t_CleanJobreportScriptName = (const Text_t *)CleanJobreportScriptName.Data();
05010       CnaCleanJobreportCommand.Append(t_CleanJobreportScriptName);
05011 
05012       //......................................... arguments -> test/slc... path
05013       //.......................... get the path "test/slc4_ia32_gcc345"
05014       // /afs/cern.ch/user/U/USERNAME/cmssw/CMSSW_X_Y_Z/test/slc4_ia32_gcc345/
05015       TString TestslcPath = fCnaParPaths->PathTestSlc();
05016       CnaCleanJobreportCommand.Append(' ');
05017       const Text_t *t_modules_data_path = (const Text_t *)TestslcPath.Data();
05018       CnaCleanJobreportCommand.Append(t_modules_data_path);
05019 
05020       //----------------------------------------- Exec CleanJobreport Command (csh before command text)
05021       const Text_t *t_cnacleanjobreportcommand = (const Text_t *)CnaCleanJobreportCommand.Data();
05022       TString CnaExecCleanJobreportCommand = "csh ";
05023       CnaExecCleanJobreportCommand.Append(t_cnacleanjobreportcommand);
05024 
05025       Int_t i_exec_cleanjobreport = gSystem->Exec(CnaExecCleanJobreportCommand.Data());
05026 
05027       if( i_exec_cleanjobreport != 0 )
05028         {
05029           cout << "*TEcnaGui> Script for LSFJOB report clean was executed with error code = "
05030                << i_exec_cleanjobreport << "."  << endl
05031                << "          Command: " << CnaExecCleanJobreportCommand.Data() << endl
05032                << fTTBELL << endl;
05033         }
05034       else
05035         {
05036           cout << "*TEcnaGui> Script for LSFJOB report clean"
05037                << " was successfully executed." << endl
05038                << "          (Command: " << CnaExecCleanJobreportCommand.Data() << ")" << endl;   
05039         }
05040     }
05041 
05042   //==================================== CLEAN PYTHON FILES =====================================
05043   if( clean_code == "Pyth" || clean_code == "All")
05044     {
05045       //.......................... get the path "modules/data"
05046       // /afs/cern.ch/user/U/USERNAME/cmssw/CMSSW_X_Y_Z/src/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/data/
05047       TString ModulesdataPath = fCnaParPaths->PathModulesData();
05048 
05049       //----------------------------------------- python file clean script: command text
05050       //......................................... python file clean script: script name
05051       TString CnaCleanPythonCommand = ModulesdataPath;
05052       TString CleanPythonScriptName = "EcnaSystemScriptCleanPythonFiles";
05053       const Text_t *t_CleanPythonScriptName = (const Text_t *)CleanPythonScriptName.Data();
05054       CnaCleanPythonCommand.Append(t_CleanPythonScriptName);
05055 
05056       //......................................... arguments -> modules:data path
05057       CnaCleanPythonCommand.Append(' ');
05058       const Text_t *t_modules_data_path = (const Text_t *)ModulesdataPath.Data();
05059       CnaCleanPythonCommand.Append(t_modules_data_path);
05060 
05061       //----------------------------------------- Exec CleanPython Command (csh before command text)
05062       const Text_t *t_cnacleanpythoncommand = (const Text_t *)CnaCleanPythonCommand.Data();
05063       TString CnaExecCleanPythonCommand = "csh ";
05064       CnaExecCleanPythonCommand.Append(t_cnacleanpythoncommand);
05065 
05066       Int_t i_exec_cleanpython = gSystem->Exec(CnaExecCleanPythonCommand.Data());
05067 
05068       if( i_exec_cleanpython != 0 )
05069         {
05070           cout << "*TEcnaGui> Script for python file clean was executed with error code = "
05071                << i_exec_cleanpython << "."  << endl
05072                << "          Command: " << CnaExecCleanPythonCommand.Data() << endl
05073                << fTTBELL << endl;
05074         }
05075       else
05076         {
05077           cout << "*TEcnaGui> Script for python file clean"
05078                << " was successfully executed." << endl
05079                << "          (Command: " << CnaExecCleanPythonCommand.Data() << ")" << endl;      
05080         }
05081     }
05082 }
05083 //------------------------------------------- end of CleanBatchFiles() -----------------------
05084 
05085 //==========================================================================
05086 //
05087 //             Calculations()   M E T H O D 
05088 //
05089 //==========================================================================
05090 void TEcnaGui::Calculations(const TString calc_code)
05091 {
05092   //Calculations of quantities (Pedestals, correlations, ... )
05093 
05094   fCnaCommand++;
05095   cout << "   *TEcnaGui [" << fCnaCommand
05096        << "]> Calculations requested with code: " << calc_code
05097        << endl;
05098 
05099   //===== Check if Analysis name is right 
05100   if( fKeyAnaType == "AdcPed1"   || fKeyAnaType == "AdcSPed1"  ||   
05101       fKeyAnaType == "AdcPed6"   || fKeyAnaType == "AdcSPed6"  || 
05102       fKeyAnaType == "AdcPed12"  || fKeyAnaType == "AdcSPed12" || 
05103       fKeyAnaType == "AdcPeg12"  || fKeyAnaType == "AdcSPeg12" ||
05104       fKeyAnaType == "AdcLaser"  || fKeyAnaType == "AdcSLaser" || 
05105       fKeyAnaType == "AdcPes12"  || fKeyAnaType == "AdcSPes12"  )
05106     {
05107       //------------ Check if Std or (Scc or Stt)-Confirmed
05108       if( calc_code == "Std" || ( ( calc_code == "Scc" || calc_code == "Stt" ) && fConfirmCalcScc == 1 ) )
05109         {
05110           if( fKeyNbOfSamples >= fKeyNbOfSampForCalc )
05111             {
05112               Int_t nStexMin = fKeyStexNumber;
05113               Int_t nStexMax = fKeyStexNumber;
05114               if( fKeyStexNumber == 0 ){nStexMin = 1; nStexMax = fEcal->MaxStexInStas();}
05115 
05116               for( Int_t nStex = nStexMin; nStex<= nStexMax; nStex++)
05117                 {
05118                   Int_t n_samp_fic = fKeyNbOfSamples;
05119 
05120                   //....................... READ the "ADC" (AdcPed.., AdcLaser..., ...) file
05121                   TEcnaRun* MyRun = 0; 
05122                   if ( MyRun == 0 ){MyRun = new TEcnaRun(fSubDet.Data(), n_samp_fic);       fCnew++;}
05123 
05124                   MyRun->GetReadyToReadData(fKeyAnaType.Data(),    fKeyRunNumber,
05125                                             fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, nStex);
05126 
05127                   if( MyRun->ReadEventDistributions(fKeyNbOfSampForCalc) == kTRUE )
05128                     {
05129                       cout << "*TEcnaGui::Calculations> File "
05130                            << MyRun->GetRootFileNameShort() << " has been found. Starting calculations."
05131                            << endl;
05132                       //............... Calculations
05133                       if( calc_code == "Std" ||
05134                           ( (calc_code == "Scc" || calc_code == "Stt") && fConfirmCalcScc == 1 ) )
05135                         {
05136                           //-------------- Standard calculations: pedestals, noises, correlations between samples
05137                           MyRun->GetReadyToCompute();
05138 
05139                           MyRun->SampleMeans();
05140                           MyRun->SampleSigmas();
05141                           MyRun->CorrelationsBetweenSamples();
05142           
05143                           MyRun->Pedestals();                          // Mean, Noise => mean over Xtal's
05144                           MyRun->TotalNoise();
05145                           MyRun->LowFrequencyNoise();
05146                           MyRun->HighFrequencyNoise();
05147                           MyRun->MeanOfCorrelationsBetweenSamples();
05148                           MyRun->SigmaOfCorrelationsBetweenSamples();
05149 
05150                           MyRun->AveragedPedestals();                   // Averaged => mean over Stin's
05151                           MyRun->AveragedTotalNoise();
05152                           MyRun->AveragedLowFrequencyNoise();
05153                           MyRun->AveragedHighFrequencyNoise();
05154                           MyRun->AveragedMeanOfCorrelationsBetweenSamples();
05155                           MyRun->AveragedSigmaOfCorrelationsBetweenSamples();
05156                         }
05157                       if( (calc_code == "Scc" || calc_code == "Stt") && fConfirmCalcScc == 1 )
05158                         {
05159                           if( calc_code == "Scc" )
05160                             {
05161                               //------ Additional calculations:
05162                               //       "correlations" between Xtals and Stins (long time, big file)
05163                               cout << "*TEcnaGui::Calculations> Please, wait." << endl;
05164                           
05165                               MyRun->LowFrequencyCorrelationsBetweenChannels();     //   (big file)
05166                               MyRun->HighFrequencyCorrelationsBetweenChannels();    //   (big file) 
05167                           
05168                               MyRun->LowFrequencyMeanCorrelationsBetweenStins();
05169                               MyRun->HighFrequencyMeanCorrelationsBetweenStins();
05170                             }
05171                       
05172                           if( calc_code == "Stt" )
05173                             {
05174                               //---Additional calculations:
05175                               //   "correlations" between Stins (long time, "normal" size file)
05176                               cout << "*TEcnaGui::Calculations> Please, wait." << endl;
05177                           
05178                               // if MyRun->LowFrequencyCorrelationsBetweenChannels() is not called by the user,
05179                               // it is automatically called by MyRun->LowFrequencyMeanCorrelationsBetweenStins()
05180                               // but the corresponding file is not written.
05181                               //  (idem for "HighFrequency")
05182                           
05183                               MyRun->HighFrequencyMeanCorrelationsBetweenStins();
05184                               MyRun->LowFrequencyMeanCorrelationsBetweenStins();
05185                             }
05186                         }
05187                       //.......................... WRITE results in file 
05188                       TString calc_file_name = "?";
05189                       if( calc_code == "Std" )
05190                         {
05191                           if( fKeyAnaType == "AdcPed1"   ){calc_file_name = "StdPed1";}
05192                           if( fKeyAnaType == "AdcPed6"   ){calc_file_name = "StdPed6";}
05193                           if( fKeyAnaType == "AdcPed12"  ){calc_file_name = "StdPed12";}
05194                           if( fKeyAnaType == "AdcPeg12"  ){calc_file_name = "StdPeg12";}
05195                           if( fKeyAnaType == "AdcLaser"  ){calc_file_name = "StdLaser";}
05196                           if( fKeyAnaType == "AdcPes12"  ){calc_file_name = "StdPes12";}
05197 
05198                           if( fKeyAnaType == "AdcSPed1"  ){calc_file_name = "StdSPed1";}
05199                           if( fKeyAnaType == "AdcSPed6"  ){calc_file_name = "StdSPed6";}
05200                           if( fKeyAnaType == "AdcSPed12" ){calc_file_name = "StdSPed12";}
05201                           if( fKeyAnaType == "AdcSPeg12" ){calc_file_name = "StdSPeg12";}
05202                           if( fKeyAnaType == "AdcSLaser" ){calc_file_name = "StdSLaser";}
05203                           if( fKeyAnaType == "AdcSPes12" ){calc_file_name = "StdSPes12";}
05204                         }
05205                       if( calc_code == "Scc" )
05206                         {
05207                           if( fKeyAnaType == "AdcPed1"   ){calc_file_name = "SccPed1";}
05208                           if( fKeyAnaType == "AdcPed6"   ){calc_file_name = "SccPed6";}
05209                           if( fKeyAnaType == "AdcPed12"  ){calc_file_name = "SccPed12";}
05210                           if( fKeyAnaType == "AdcPeg12"  ){calc_file_name = "SccPeg12";}
05211                           if( fKeyAnaType == "AdcLaser"  ){calc_file_name = "SccLaser";}
05212                           if( fKeyAnaType == "AdcPes12"  ){calc_file_name = "SccPes12" ;}
05213 
05214                           if( fKeyAnaType == "AdcSPed1"  ){calc_file_name = "SccSPed1";}
05215                           if( fKeyAnaType == "AdcSPed6"  ){calc_file_name = "SccSPed6";}
05216                           if( fKeyAnaType == "AdcSPed12" ){calc_file_name = "SccSPed12";}
05217                           if( fKeyAnaType == "AdcSPeg12" ){calc_file_name = "SccSPeg12";}
05218                           if( fKeyAnaType == "AdcSLaser" ){calc_file_name = "SccSLaser";}
05219                           if( fKeyAnaType == "AdcSPes12" ){calc_file_name = "SccSPes12";}
05220                         }
05221 
05222                       if( calc_code == "Stt" )
05223                         {
05224                           if( fKeyAnaType == "AdcPed1"   ){calc_file_name = "SttPed1";}
05225                           if( fKeyAnaType == "AdcPed6"   ){calc_file_name = "SttPed6";}
05226                           if( fKeyAnaType == "AdcPed12"  ){calc_file_name = "SttPed12";}
05227                           if( fKeyAnaType == "AdcPeg12"  ){calc_file_name = "SttPeg12";}
05228                           if( fKeyAnaType == "AdcLaser"  ){calc_file_name = "SttLaser";}
05229                           if( fKeyAnaType == "AdcPes12"  ){calc_file_name = "SttPes12" ;}
05230 
05231                           if( fKeyAnaType == "AdcSPed1"  ){calc_file_name = "SttSPed1";}
05232                           if( fKeyAnaType == "AdcSPed6"  ){calc_file_name = "SttSPed6";}
05233                           if( fKeyAnaType == "AdcSPed12" ){calc_file_name = "SttSPed12";}
05234                           if( fKeyAnaType == "AdcSPeg12" ){calc_file_name = "SttSPeg12";}
05235                           if( fKeyAnaType == "AdcSLaser" ){calc_file_name = "SttSLaser";}
05236                           if( fKeyAnaType == "AdcSPes12" ){calc_file_name = "SttSPes12";}
05237                         }
05238 
05239                       if( MyRun->WriteNewRootFile(calc_file_name.Data()) == kTRUE )
05240                         {
05241                           cout << "*TEcnaGui::Calculations> Done. Write ROOT file: "
05242                                << MyRun->GetNewRootFileNameShort() << " OK" << endl << endl;
05243                         }
05244                       else 
05245                         {
05246                           cout << "!TEcnaGui::Calculations> Writing ROOT file failure for file "
05247                                << MyRun->GetNewRootFileNameShort()
05248                                << fTTBELL << endl << endl;
05249                         }
05250                     }
05251                   else
05252                     {
05253                       cout << "!TEcnaGui::Calculations> " << MyRun->GetRootFileNameShort() << ": file not found."
05254                            << fTTBELL << endl << endl;
05255                     }
05256                   //.......................................................................
05257                   delete MyRun; MyRun = 0;                    fCdelete++;
05258                 } // end of for( Int_t nStex = nStexMin; nStex<= nStexMax; nStex++)
05259               fConfirmCalcScc = 0;
05260             } // end of if( fKeyNbOfSamples >= fKeyNbOfSampForCalc )
05261           else
05262             {
05263               cout << "!TEcnaGui::Calculations> *** ERROR *** Number of samples in file (=" << fKeyNbOfSamples
05264                    << ") less than number of samples for calculations (= " << fKeyNbOfSampForCalc << "). " << endl;
05265             }
05266         } // end of if( calc_code == "Std" || ( ( calc_code == "Scc" || calc_code == "Stt" ) && fConfirmCalcScc == 1 ) )
05267       else
05268         {
05269           cout << "   *TEcnaGui [" << fCnaCommand
05270                << "]> Calculation requested with option " << calc_code
05271                << ". This can last more than 5 minutes. Please, click again to confirm."
05272                << fTTBELL << endl;
05273           fConfirmCalcScc = 1;
05274         }
05275     }
05276   else
05277     {
05278       cout << "!TEcnaGui::Calculations> fKeyAnaType = " << fKeyAnaType
05279            << "  : wrong code in analysis name. Code should be 'Adc'" << endl
05280            << "                        List of available standard analysis names for calculations: " << endl
05281            << "                        AdcPed1,  AdcPed6,  AdcPed12,  AdcPeg12,  AdcLaser,  AdcPes12," << endl
05282            << "                        AdcSPed1, AdcSPed6, AdcSPed12, AdcSPeg12, AdcSLaser, AdcSPes12."
05283            << fTTBELL << endl;
05284     }
05285 }
05286 //==========================================================================
05287 //
05288 //                       "View"    M E T H O D S
05289 //
05290 //==========================================================================
05291 //---------- common messages
05292 
05293 void TEcnaGui::MessageCnaCommandReplyA(const TString first_same_plot)
05294 {
05295   // reply message of the Cna command
05296 
05297   cout << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber
05298        << ", 1st req. evt#: " << fKeyFirstReqEvtNumber
05299        << ", last req. evt#: " << fKeyLastReqEvtNumber << endl;
05300   
05301   if( first_same_plot == "ASCII" )
05302     {
05303       cout  << "                   " << fStexName.Data() << ": " << fKeyStexNumber
05304             << ", option: " << first_same_plot << endl;
05305     }
05306 }
05307 
05308 void TEcnaGui::MessageCnaCommandReplyB(const TString first_same_plot)
05309 {
05310   // reply message of the Cna command
05311 
05312   if( first_same_plot == "ASCII" )
05313     {
05314       if(fKeyStexNumber > 0)
05315         {
05316           if( fHistos->StatusFileFound() == kTRUE && fHistos->StatusDataExist() == kTRUE )
05317             {
05318               TString xAsciiFileName = fHistos->AsciiFileName();
05319               if( xAsciiFileName != "?" )
05320                 {cout  << "               Histo written in ASCII file: " << xAsciiFileName.Data();}
05321             }
05322         }
05323       else
05324         {
05325           cout  << "               No writing in ASCII file since "
05326                 << fStexName.Data() << " number = " << fKeyStexNumber;
05327         }
05328       cout << endl;
05329     }
05330 }
05331 
05332 //==========================================================================
05333 //
05334 //                  View  Matrix
05335 //
05336 //==========================================================================
05337 void TEcnaGui::ViewMatrixLowFrequencyMeanCorrelationsBetweenStins(const TString option_plot)
05338 {
05339   // Plot of Low Frequency Mean Cor(c,c') for each pair of Stins
05340 
05341   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05342   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05343                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05344 
05345   fCnaCommand++;
05346   cout << "   *TEcnaGui [" << fCnaCommand
05347        << "]> Low Frequency Mean Cor(c,c') for each pair of " << fStinName.Data()
05348        << "s. Option: "
05349        << option_plot;
05350   MessageCnaCommandReplyA(option_plot);
05351 
05352   fHistos->SetHistoMin(fKeyVminLFccMos);
05353   fHistos->SetHistoMax(fKeyVmaxLFccMos);
05354   fHistos->SetGeneralTitle(fKeyGeneralTitle);    
05355   fHistos->LowFrequencyMeanCorrelationsBetweenStins(option_plot);
05356 
05357   MessageCnaCommandReplyB(option_plot);
05358 }
05359 void TEcnaGui::ViewMatrixHighFrequencyMeanCorrelationsBetweenStins(const TString option_plot)
05360 {
05361   // Plot of Low Frequency Mean Cor(c,c') for each pair of Stins
05362 
05363   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05364   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05365                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05366 
05367   fCnaCommand++;
05368   cout << "   *TEcnaGui [" << fCnaCommand
05369        << "]> High Frequency Mean Cor(c,c') for each pair of " << fStinName.Data()
05370        << "s. Option: "
05371        << option_plot;
05372   MessageCnaCommandReplyA(option_plot);
05373 
05374   fHistos->SetHistoMin(fKeyVminHFccMos);
05375   fHistos->SetHistoMax(fKeyVmaxHFccMos);
05376   fHistos->SetGeneralTitle(fKeyGeneralTitle);    
05377   fHistos->HighFrequencyMeanCorrelationsBetweenStins(option_plot);
05378 
05379   MessageCnaCommandReplyB(option_plot);
05380 }
05381 //-------------------------------------------------------------
05382 void TEcnaGui::ViewMatrixLowFrequencyCorrelationsBetweenChannels(const Int_t&  cStexStin_A,
05383                                                                 const Int_t&  cStexStin_B,
05384                                                                 const TString option_plot)
05385 {
05386   // Low Frequency Correlation matrix (crystal of Stin X, crystal of Stin X) for each Stin
05387 
05388   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05389   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05390                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05391   
05392   fCnaCommand++;
05393   cout << "   *TEcnaGui [" << fCnaCommand
05394        << "]> Low Frequency Correlation matrix between channels. "
05395        << fStinName.Data() << " A: " << cStexStin_A
05396        << ", " << fStinName.Data() << " B: " << cStexStin_B
05397        << ", option: " << option_plot;
05398   MessageCnaCommandReplyA(option_plot);
05399 
05400   fHistos->SetHistoMin(fKeyVminLHFcc);
05401   fHistos->SetHistoMax(fKeyVmaxLHFcc); 
05402   fHistos->SetGeneralTitle(fKeyGeneralTitle);  
05403   fHistos->LowFrequencyCorrelationsBetweenChannels(cStexStin_A, cStexStin_B, option_plot);
05404 
05405   MessageCnaCommandReplyB(option_plot);
05406 }
05407 
05408 void TEcnaGui::ViewMatrixHighFrequencyCorrelationsBetweenChannels(const Int_t&  cStexStin_A, const Int_t& cStexStin_B,
05409                                                                  const TString option_plot)
05410 {
05411 // High Frequency Correlation matrix (crystal of Stin X, crystal of Stin X) for each Stin
05412 
05413   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05414   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05415                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05416   
05417   fCnaCommand++;
05418   cout << "   *TEcnaGui [" << fCnaCommand
05419        << "]> High Frequency Correlation matrix between channels. "
05420        << fStinName.Data() << " A: " << cStexStin_A
05421        << ", " << fStinName.Data() << " B: " << cStexStin_B
05422        << ", option: " << option_plot;
05423   MessageCnaCommandReplyA(option_plot);
05424 
05425   fHistos->SetHistoMin(fKeyVminLHFcc);
05426   fHistos->SetHistoMax(fKeyVmaxLHFcc); 
05427   fHistos->SetGeneralTitle(fKeyGeneralTitle);      
05428   fHistos->HighFrequencyCorrelationsBetweenChannels(cStexStin_A, cStexStin_B, option_plot);
05429   
05430   MessageCnaCommandReplyB(option_plot);
05431 }
05432 
05433 void TEcnaGui::ViewMatrixCorrelationSamples(const Int_t&  cStexStin_A, const Int_t& i0StinEcha,
05434                                            const TString option_plot)
05435 {
05436 // Plot of correlation matrix between samples for a given channel
05437 
05438   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05439   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05440                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05441   
05442   Int_t ChOffset = 0;
05443   if(fSubDet == "EE"){ChOffset = 1;}
05444 
05445   fCnaCommand++;
05446   cout << "   *TEcnaGui [" << fCnaCommand
05447        << "]> Correlation matrix between samples. "
05448        << fStinName.Data() << ": " << cStexStin_A  << ", channel " << i0StinEcha + ChOffset
05449        << ", option: " << option_plot;
05450   MessageCnaCommandReplyA(option_plot);
05451 
05452   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05453   fHistos->SetHistoMin(fKeyVminD_MCs_ChNb);
05454   fHistos->SetHistoMax(fKeyVmaxD_MCs_ChNb); 
05455   fHistos->CorrelationsBetweenSamples(cStexStin_A, i0StinEcha, option_plot);
05456 
05457   MessageCnaCommandReplyB(option_plot);
05458 }
05459 
05460 void TEcnaGui::ViewMatrixCovarianceSamples(const Int_t&  cStexStin_A, const Int_t& i0StinEcha,
05461                                           const TString option_plot)
05462 {
05463 // Plot of covariance matrix between samples for a given channel
05464 
05465   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05466   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05467                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05468 
05469   Int_t ChOffset = 0;
05470   if(fSubDet == "EE"){ChOffset = 1;}
05471   
05472   fCnaCommand++;
05473   cout << "   *TEcnaGui [" << fCnaCommand
05474        << "]> Covariance matrix between samples. "
05475        << fStinName.Data() << ": " << cStexStin_A  << ", channel " << i0StinEcha + ChOffset
05476        << ", option: " << option_plot;
05477   MessageCnaCommandReplyA(option_plot);
05478 
05479   fHistos->SetHistoMin(fKeyVminD_TNo_ChNb);  // same as mean of sample sigmas
05480   fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb);
05481   fHistos->SetGeneralTitle(fKeyGeneralTitle);       
05482   fHistos->CovariancesBetweenSamples(cStexStin_A, i0StinEcha, option_plot);
05483 
05484   MessageCnaCommandReplyB(option_plot);
05485 }
05486 
05487 //==========================================================================
05488 //
05489 //                         ViewStin...     
05490 //
05491 //     StexStin ==> (sample,sample) matrices for all the crystal of cStexStin              
05492 //
05493 //==========================================================================
05494 void TEcnaGui::ViewStinCorrelationSamples(const Int_t& cStexStin)
05495 {
05496   // Plot of (sample,sample) correlation matrices for all the crystal of a given Stin  
05497 
05498   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05499   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05500                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05501   
05502   fCnaCommand++;
05503   cout << "   *TEcnaGui [" << fCnaCommand
05504        << "]> Correlation matrices between samples for each channel of "
05505        << fStinName.Data() << " " << cStexStin;
05506   MessageCnaCommandReplyA("DUMMY"); 
05507 
05508   fHistos->SetHistoMin(fKeyVminD_MCs_ChNb);
05509   fHistos->SetHistoMax(fKeyVmaxD_MCs_ChNb);
05510   fHistos->SetGeneralTitle(fKeyGeneralTitle);  
05511   fHistos->CorrelationsBetweenSamples(cStexStin);
05512   
05513   MessageCnaCommandReplyB("DUMMY");
05514 }
05515 
05516 void TEcnaGui::ViewStinCovarianceSamples(const Int_t& cStexStin)
05517 {
05518   // Plot of (sample,sample) covariance matrices for all the crystal of a given Stin  
05519 
05520   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05521   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05522                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05523   
05524   fCnaCommand++;
05525   cout << "   *TEcnaGui [" << fCnaCommand
05526        << "]> Covariance matrices between samples for each channel of "
05527        << fStinName.Data() << " " << cStexStin;
05528   MessageCnaCommandReplyA("DUMMY");
05529 
05530   fHistos->SetHistoMin(fKeyVminD_TNo_ChNb);   // same as mean of sample sigmas
05531   fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb);
05532   fHistos->SetGeneralTitle(fKeyGeneralTitle);    
05533   fHistos->CovariancesBetweenSamples(cStexStin);
05534   
05535   MessageCnaCommandReplyB("DUMMY");
05536 }
05537 //==========================================================================
05538 //
05539 //                         ViewSorS (eta,phi)
05540 //
05541 //==========================================================================
05542 
05543 void TEcnaGui::ViewSorSNumberOfEvents()
05544 {
05545   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;} 
05546 
05547   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() )
05548     {
05549       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05550                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);      
05551       fCnaCommand++;
05552       cout << "   *TEcnaGui [" << fCnaCommand
05553            << "]> Number of Events. 2D histo. "
05554            << fStexName.Data() << ": " << fKeyStexNumber;
05555     }
05556   if( fKeyStexNumber == 0 )
05557     {
05558       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05559                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0);
05560       fCnaCommand++;
05561       cout << "   *TEcnaGui [" << fCnaCommand
05562            << "]> Averaged Number of Events. 2D histo for "
05563            << fSubDet.Data();
05564     }
05565 
05566   MessageCnaCommandReplyA("DUMMY");
05567 
05568   fHistos->SetHistoMin(fKeyVminD_NOE_ChNb);
05569   fHistos->SetHistoMax(fKeyVmaxD_NOE_ChNb); 
05570   fHistos->SetGeneralTitle(fKeyGeneralTitle);    
05571   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() ){fHistos->StexHocoVecoNumberOfEvents();}
05572   if( fKeyStexNumber == 0 ){fHistos->StasHocoVecoAveragedNumberOfEvents();}
05573 
05574   MessageCnaCommandReplyB("DUMMY");
05575 }
05576 
05577 void TEcnaGui::ViewSorSPedestals()
05578 {
05579   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;} 
05580 
05581   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() )
05582     {
05583       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05584                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);      
05585       fCnaCommand++;
05586       cout << "   *TEcnaGui [" << fCnaCommand
05587            << "]> Pedestals. 2D histo. "
05588            << fStexName.Data() << ": " << fKeyStexNumber;
05589     }
05590   if( fKeyStexNumber == 0 )
05591     {
05592       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05593                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0);
05594       fCnaCommand++;
05595       cout << "   *TEcnaGui [" << fCnaCommand
05596            << "]> Pedestals. 2D histo for "
05597            << fSubDet.Data();
05598     }
05599   MessageCnaCommandReplyA("DUMMY");
05600 
05601   fHistos->SetHistoMin(fKeyVminD_Ped_ChNb);
05602   fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb); 
05603   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05604      
05605   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() ){fHistos->StexHocoVecoPedestals();}
05606   if( fKeyStexNumber == 0 ){fHistos->StasHocoVecoAveragedPedestals();}
05607 
05608   MessageCnaCommandReplyB("DUMMY");
05609 }
05610 
05611 void TEcnaGui::ViewSorSTotalNoise()
05612 {
05613   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;} 
05614 
05615   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() )
05616     {
05617       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05618                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);      
05619       fCnaCommand++;
05620       cout << "   *TEcnaGui [" << fCnaCommand
05621            << "]> Total noise. 2D histo. "
05622            << fStexName.Data() << ": " << fKeyStexNumber;
05623     }
05624   if( fKeyStexNumber == 0 )
05625     {
05626       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05627                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0);
05628       fCnaCommand++;
05629       cout << "   *TEcnaGui [" << fCnaCommand
05630            << "]> Averaged total noise. 2D histo for "
05631            << fSubDet.Data();
05632     }
05633   MessageCnaCommandReplyA("DUMMY");
05634 
05635   fHistos->SetHistoMin(fKeyVminD_TNo_ChNb);
05636   fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb); 
05637   fHistos->SetGeneralTitle(fKeyGeneralTitle);      
05638   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() ){fHistos->StexHocoVecoTotalNoise();}
05639   if( fKeyStexNumber == 0 ){fHistos->StasHocoVecoAveragedTotalNoise();}
05640 
05641   MessageCnaCommandReplyB("DUMMY");
05642 }
05643 
05644 void TEcnaGui::ViewSorSMeanOfCorss()
05645 {
05646   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;} 
05647 
05648   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() )
05649     {
05650       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05651                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);      
05652       fCnaCommand++;
05653       cout << "   *TEcnaGui [" << fCnaCommand
05654            << "]> Mean of cor(s,s'). 2D histo. "
05655            << fStexName.Data() << ": " << fKeyStexNumber;
05656     }
05657   if( fKeyStexNumber == 0 )
05658     {
05659       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05660                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0);
05661       fCnaCommand++;
05662       cout << "   *TEcnaGui [" << fCnaCommand
05663            << "]> Averaged mean of cor(s,s'). 2D histo for "
05664            << fSubDet.Data();
05665     }
05666   MessageCnaCommandReplyA("DUMMY");
05667 
05668   fHistos->SetHistoMin(fKeyVminD_MCs_ChNb);
05669   fHistos->SetHistoMax(fKeyVmaxD_MCs_ChNb);
05670   fHistos->SetGeneralTitle(fKeyGeneralTitle);     
05671   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() ){fHistos->StexHocoVecoMeanOfCorss();}
05672   if( fKeyStexNumber == 0 ){fHistos->StasHocoVecoAveragedMeanOfCorss();}
05673 
05674   MessageCnaCommandReplyB("DUMMY");
05675 }
05676 
05677 void TEcnaGui::ViewSorSLowFrequencyNoise()
05678 {
05679   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05680 
05681   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() )
05682     {
05683       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05684                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);      
05685       fCnaCommand++;
05686       cout << "   *TEcnaGui [" << fCnaCommand
05687            << "]> Low frequency noise. 2D histo. "
05688            << fStexName.Data() << ": " << fKeyStexNumber;
05689     }
05690   if( fKeyStexNumber == 0 )
05691     {
05692       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05693                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0);
05694       fCnaCommand++;
05695       cout << "   *TEcnaGui [" << fCnaCommand
05696            << "]> Averaged low frequency noise. 2D histo for "
05697            << fSubDet.Data();
05698     }
05699   MessageCnaCommandReplyA("DUMMY");
05700 
05701   fHistos->SetHistoMin(fKeyVminD_LFN_ChNb);
05702   fHistos->SetHistoMax(fKeyVmaxD_LFN_ChNb);
05703   fHistos->SetGeneralTitle(fKeyGeneralTitle);     
05704   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() ){fHistos->StexHocoVecoLowFrequencyNoise();}
05705   if( fKeyStexNumber == 0 ){fHistos->StasHocoVecoAveragedLowFrequencyNoise();}
05706 
05707   MessageCnaCommandReplyB("DUMMY");
05708 }
05709 
05710 void TEcnaGui::ViewSorSHighFrequencyNoise()
05711 {
05712   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05713 
05714   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() )
05715     {
05716       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05717                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);      
05718       fCnaCommand++;
05719       cout << "   *TEcnaGui [" << fCnaCommand
05720            << "]> High frequency noise. 2D histo. "
05721            << fStexName.Data() << ": " << fKeyStexNumber;
05722     }
05723   if( fKeyStexNumber == 0 )
05724     {
05725       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05726                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0);
05727       fCnaCommand++;
05728       cout << "   *TEcnaGui [" << fCnaCommand
05729            << "]> Averaged high frequency noise. 2D histo for "
05730            << fSubDet.Data();
05731     }
05732   MessageCnaCommandReplyA("DUMMY");
05733 
05734   fHistos->SetHistoMin(fKeyVminD_HFN_ChNb);
05735   fHistos->SetHistoMax(fKeyVmaxD_HFN_ChNb); 
05736   fHistos->SetGeneralTitle(fKeyGeneralTitle);       
05737   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() ){fHistos->StexHocoVecoHighFrequencyNoise();}
05738   if( fKeyStexNumber == 0 ){fHistos->StasHocoVecoAveragedHighFrequencyNoise();}
05739 
05740   MessageCnaCommandReplyB("DUMMY");
05741 }
05742 
05743 void TEcnaGui::ViewSorSSigmaOfCorss()
05744 {
05745   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05746 
05747   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() )
05748     {
05749       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05750                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);      
05751       fCnaCommand++;
05752       cout << "   *TEcnaGui [" << fCnaCommand
05753            << "]> Sigma of Cor(s,s'). 2D histo. "
05754            << fStexName.Data() << ": " << fKeyStexNumber;
05755     }
05756   if( fKeyStexNumber == 0 )
05757     {
05758       fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05759                               fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, 0);
05760       fCnaCommand++;
05761       cout << "   *TEcnaGui [" << fCnaCommand
05762            << "]> Averaged sigma of Cor(s,s'). 2D histo for "
05763            << fSubDet.Data();
05764     }
05765   MessageCnaCommandReplyA("DUMMY");
05766 
05767   fHistos->SetHistoMin(fKeyVminD_SCs_ChNb);
05768   fHistos->SetHistoMax(fKeyVmaxD_SCs_ChNb);
05769   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05770   if( fKeyStexNumber > 0 && fKeyStexNumber <= fEcal->MaxStexInStas() ){fHistos->StexHocoVecoSigmaOfCorss();}
05771   if( fKeyStexNumber == 0 ){fHistos->StasHocoVecoAveragedSigmaOfCorss();}
05772 
05773   MessageCnaCommandReplyB("DUMMY");
05774 }
05775 
05776 void TEcnaGui::ViewStexLowFrequencyCorcc()
05777 {
05778   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05779   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05780                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05781 
05782   fCnaCommand++;
05783   cout << "   *TEcnaGui [" << fCnaCommand
05784        << "]> LF Correlations between channels for each " << fStinName.Data()
05785        << " in " << fStexName.Data() << ". 2D histo. "
05786        << fStexName.Data() << ": " << fKeyStexNumber;
05787   MessageCnaCommandReplyA("DUMMY");
05788 
05789   fHistos->SetHistoMin(fKeyVminLHFcc);
05790   fHistos->SetHistoMax(fKeyVmaxLHFcc);
05791   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05792   fHistos->StexHocoVecoLHFCorcc("LF");
05793 
05794   MessageCnaCommandReplyB("DUMMY");
05795 }
05796 
05797 void TEcnaGui::ViewStexHighFrequencyCorcc()
05798 {
05799   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;} 
05800   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05801                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05802 
05803   fCnaCommand++;
05804   cout << "   *TEcnaGui [" << fCnaCommand
05805        << "]> HF Correlations between channels for each " << fStinName.Data()
05806        << " in " << fStexName.Data() << ". 2D histo. "
05807        << fStexName.Data() << ": " << fKeyStexNumber;
05808   MessageCnaCommandReplyA("DUMMY");
05809 
05810   fHistos->SetHistoMin(fKeyVminLHFcc);
05811   fHistos->SetHistoMax(fKeyVmaxLHFcc);
05812   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05813   fHistos->StexHocoVecoLHFCorcc("HF");
05814 
05815   MessageCnaCommandReplyB("DUMMY");
05816 }
05817 //=======================================================================================
05818 //
05819 //                        ViewStinCrystalNumbering
05820 //
05821 //=======================================================================================  
05822 void TEcnaGui::ViewStinCrystalNumbering(const Int_t& StexStinEcna)
05823 {
05824   // Plot the crystal numbering of one Stin
05825 
05826   Int_t StinNumber = -1;
05827   if( fSubDet == "EB" ){StinNumber = StexStinEcna;}
05828   if( fSubDet == "EE"  && fKeyStexNumber != 0 )
05829     {StinNumber = fEcalNumbering->GetDeeSCConsFrom1DeeSCEcna(fKeyStexNumber,StexStinEcna);}
05830 
05831   fCnaCommand++;
05832   cout << "   *TEcnaGui [" << fCnaCommand
05833        << "]> Crystal numbering for " << " " << fStexName.Data() << " "
05834        << fKeyStexNumber << ", " << fStinName.Data() << " " << StinNumber << endl;
05835 
05836   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;} 
05837   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05838   fHistos->StinCrystalNumbering(fKeyStexNumber, StinNumber);
05839 }
05840 //---------------->  end of ViewStinCrystalNumbering()
05841 
05842 //===========================================================================
05843 //
05844 //                        ViewStexStinNumbering
05845 //
05846 //===========================================================================  
05847 void TEcnaGui::ViewStexStinNumbering()
05848 {
05849   // Plot the Stin numbering of one Stex.
05850   // No argument here since the Stex number is a part of the ROOT file name
05851   // and is in the entry field of the Stex button (fKeyStexNumber)
05852 
05853   fCnaCommand++;
05854   cout << "   *TEcnaGui [" << fCnaCommand
05855        << "]> " << fStinName.Data() << " numbering for " << fStexName.Data()
05856        << " " << fKeyStexNumber << endl;
05857 
05858   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05859   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05860   fHistos->StexStinNumbering(fKeyStexNumber);
05861 }
05862 //---------------->  end of ViewStexStinNumbering()
05863 
05864 //===============================================================================
05865 //
05866 //                         ViewHisto...
05867 //
05868 //===============================================================================
05869 //......................... Nb of evts
05870 
05871 void TEcnaGui::ViewHistoSorSNumberOfEventsOfCrystals(const TString first_same_plot)
05872 {
05873 // Plot the 1D histogram of the number of events (found in the data)
05874 // as a function of crystals (grouped by Stins)
05875 
05876   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05877   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05878                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05879 
05880   fCnaCommand++;
05881   cout << "   *TEcnaGui [" << fCnaCommand
05882        << "]> Number of events for crystals";
05883   MessageCnaCommandReplyA(first_same_plot);
05884 
05885   fHistos->SetHistoMin(fKeyVminD_NOE_ChNb);
05886   fHistos->SetHistoMax(fKeyVmaxD_NOE_ChNb);
05887   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
05888   fHistos->SetHistoColorPalette(fKeyColPal);
05889   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05890   fHistos->StexXtalsNumberOfEvents(first_same_plot);
05891 
05892   MessageCnaCommandReplyB(first_same_plot);
05893 }
05894 
05895 void TEcnaGui::ViewHistoSorSNumberOfEventsDistribution(const TString first_same_plot)
05896 {
05897 // Plot the 1D histogram of the number of events distribution for a Stex
05898 
05899   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05900   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05901                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05902 
05903   fCnaCommand++;
05904   cout << "   *TEcnaGui [" << fCnaCommand
05905        << "]> Number of events distribution";
05906   MessageCnaCommandReplyA(first_same_plot);
05907 
05908   fHistos->SetHistoMin(fKeyVminD_NOE_ChNb);
05909   fHistos->SetHistoMax(fKeyVmaxD_NOE_ChNb); 
05910   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
05911   fHistos->SetHistoColorPalette(fKeyColPal);
05912   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05913   fHistos->StexNumberOfEventsXtals(first_same_plot);
05914 
05915   MessageCnaCommandReplyB(first_same_plot);
05916 }
05917 
05918 //........................... Ev
05919 
05920 void TEcnaGui::ViewHistoSorSPedestalsOfCrystals(const TString first_same_plot)
05921 {
05922 // Plot the 1D histogram of the pedestals as a function of crystals (grouped by Stins)
05923 
05924   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05925   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05926                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05927 
05928   fCnaCommand++;
05929   cout << "   *TEcnaGui [" << fCnaCommand
05930        << "]> Pedestals";
05931   MessageCnaCommandReplyA(first_same_plot);
05932 
05933   fHistos->SetHistoMin(fKeyVminD_Ped_ChNb);
05934   fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb);
05935   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
05936   fHistos->SetHistoColorPalette(fKeyColPal);
05937   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05938   fHistos->StexXtalsPedestals(first_same_plot);
05939 
05940   MessageCnaCommandReplyB(first_same_plot);
05941 }
05942 
05943 void TEcnaGui::ViewHistoSorSPedestalsDistribution(const TString first_same_plot)
05944 {
05945 // Plot the 1D histogram of the pedestals distribution for a Stex
05946 
05947   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05948   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05949                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05950 
05951   fCnaCommand++;
05952   cout << "   *TEcnaGui [" << fCnaCommand
05953        << "]> Pedestals distribution";
05954   MessageCnaCommandReplyA(first_same_plot);
05955 
05956   fHistos->SetHistoMin(fKeyVminD_Ped_ChNb);
05957   fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb);
05958   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
05959   fHistos->SetHistoColorPalette(fKeyColPal);
05960   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05961   fHistos->StexPedestalsXtals(first_same_plot);
05962 
05963   MessageCnaCommandReplyB(first_same_plot);
05964 }
05965 
05966 void TEcnaGui::ViewHistoSorSTotalNoiseOfCrystals(const TString first_same_plot)
05967 {
05968 // Plot the 1D histogram of the mean of sample sigmas as a function of crystals (grouped by Stins)
05969 
05970   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05971   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05972                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
05973 
05974   fCnaCommand++;
05975   cout << "   *TEcnaGui [" << fCnaCommand
05976        << "]> Total noise";
05977   MessageCnaCommandReplyA(first_same_plot);
05978 
05979   fHistos->SetHistoMin(fKeyVminD_TNo_ChNb);
05980   fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb);
05981   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
05982   fHistos->SetHistoColorPalette(fKeyColPal);
05983   fHistos->SetGeneralTitle(fKeyGeneralTitle);
05984   fHistos->StexXtalsTotalNoise(first_same_plot);
05985 
05986   MessageCnaCommandReplyB(first_same_plot);
05987 }
05988 
05989 void TEcnaGui::ViewHistoSorSTotalNoiseDistribution(const TString first_same_plot)
05990 {
05991 // Plot the 1D histogram of the mean of sample sigmas distribution for a Stex
05992 
05993   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
05994   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
05995                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);  
05996 
05997   fCnaCommand++;
05998   cout << "   *TEcnaGui [" << fCnaCommand
05999        << "]> Total noise distribution";
06000   MessageCnaCommandReplyA(first_same_plot);
06001 
06002   fHistos->SetHistoMin(fKeyVminD_TNo_ChNb);
06003   fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb);  
06004   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
06005   fHistos->SetHistoColorPalette(fKeyColPal);
06006   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06007   fHistos->StexTotalNoiseXtals(first_same_plot);
06008 
06009   MessageCnaCommandReplyB(first_same_plot);
06010 }
06011 
06012 void TEcnaGui::ViewHistoSorSMeanOfCorssOfCrystals(const TString first_same_plot)
06013 {
06014 // Plot the 1D histogram of the mean of cor(s,s') as a function of crystals (grouped by Stins)
06015 
06016   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06017   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06018                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06019 
06020   fCnaCommand++;
06021   cout << "   *TEcnaGui [" << fCnaCommand
06022        << "]> Mean of cor(s,s')";
06023   MessageCnaCommandReplyA(first_same_plot);
06024 
06025   fHistos->SetHistoMin(fKeyVminD_MCs_ChNb);
06026   fHistos->SetHistoMax(fKeyVmaxD_MCs_ChNb);
06027   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06028   fHistos->SetHistoColorPalette(fKeyColPal);
06029   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06030   fHistos->StexXtalsMeanOfCorss(first_same_plot);
06031 
06032   MessageCnaCommandReplyB(first_same_plot);
06033 }
06034 
06035 void TEcnaGui::ViewHistoSorSMeanOfCorssDistribution(const TString first_same_plot)
06036 {
06037 // Plot the 1D histogram of the mean of cor(s,s') sigmas distribution for a Stex
06038 
06039   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06040   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06041                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06042 
06043   fCnaCommand++;
06044   cout << "   *TEcnaGui [" << fCnaCommand
06045        << "]> Mean of cor(s,s') distribution";
06046   MessageCnaCommandReplyA(first_same_plot);
06047 
06048   fHistos->SetHistoMin(fKeyVminD_MCs_ChNb);
06049   fHistos->SetHistoMax(fKeyVmaxD_MCs_ChNb);
06050   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
06051   fHistos->SetHistoColorPalette(fKeyColPal);
06052   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06053   fHistos->StexMeanOfCorssXtals(first_same_plot);
06054 
06055   MessageCnaCommandReplyB(first_same_plot);
06056 }
06057 
06058 //............................ Sig
06059 
06060 void TEcnaGui::ViewHistoSorSLowFrequencyNoiseOfCrystals(const TString first_same_plot)
06061 {
06062 // Plot the 1D histogram of the pedestals as a function of crystals (grouped by Stins)
06063 
06064   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06065   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06066                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06067 
06068   fCnaCommand++;
06069   cout << "   *TEcnaGui [" << fCnaCommand
06070        << "]> Low frequency noise";
06071   MessageCnaCommandReplyA(first_same_plot);
06072 
06073   fHistos->SetHistoMin(fKeyVminD_LFN_ChNb);
06074   fHistos->SetHistoMax(fKeyVmaxD_LFN_ChNb);
06075   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
06076   fHistos->SetHistoColorPalette(fKeyColPal);
06077   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06078   fHistos->StexXtalsLowFrequencyNoise(first_same_plot);
06079 
06080   MessageCnaCommandReplyB(first_same_plot);
06081 }
06082 
06083 void TEcnaGui::ViewHistoSorSLowFrequencyNoiseDistribution(const TString first_same_plot)
06084 {
06085 // Plot the 1D histogram of the pedestals distribution for a Stex
06086 
06087   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06088   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06089                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06090 
06091   fCnaCommand++;
06092   cout << "   *TEcnaGui [" << fCnaCommand
06093        << "]> Low frequency noise distribution";
06094   MessageCnaCommandReplyA(first_same_plot);
06095 
06096   fHistos->SetHistoMin(fKeyVminD_LFN_ChNb);
06097   fHistos->SetHistoMax(fKeyVmaxD_LFN_ChNb);
06098   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
06099   fHistos->SetHistoColorPalette(fKeyColPal);
06100   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06101   fHistos->StexLowFrequencyNoiseXtals(first_same_plot);
06102 
06103   MessageCnaCommandReplyB(first_same_plot);
06104 }
06105 
06106 void TEcnaGui::ViewHistoSorSHighFrequencyNoiseOfCrystals(const TString first_same_plot)
06107 {
06108 // Plot the 1D histogram of the mean of sample sigmas as a function of crystals (grouped by Stins)
06109 
06110   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06111   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06112                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06113 
06114   fCnaCommand++;
06115   cout << "   *TEcnaGui [" << fCnaCommand
06116        << "]> High frequency noise";
06117   MessageCnaCommandReplyA(first_same_plot);
06118 
06119   fHistos->SetHistoMin(fKeyVminD_HFN_ChNb);
06120   fHistos->SetHistoMax(fKeyVmaxD_HFN_ChNb);
06121   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
06122   fHistos->SetHistoColorPalette(fKeyColPal);
06123   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06124   fHistos->StexXtalsHighFrequencyNoise(first_same_plot);
06125 
06126   MessageCnaCommandReplyB(first_same_plot);
06127 }
06128 
06129 void TEcnaGui::ViewHistoSorSHighFrequencyNoiseDistribution(const TString first_same_plot)
06130 {
06131 // Plot the 1D histogram of the mean of sample sigmas distribution for a Stex
06132 
06133   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06134   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06135                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06136 
06137   fCnaCommand++;
06138   cout << "   *TEcnaGui [" << fCnaCommand
06139        << "]> High frequency noise distribution";
06140   MessageCnaCommandReplyA(first_same_plot);
06141 
06142   fHistos->SetHistoMin(fKeyVminD_HFN_ChNb);
06143   fHistos->SetHistoMax(fKeyVmaxD_HFN_ChNb);  
06144   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06145   fHistos->SetHistoColorPalette(fKeyColPal);
06146   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06147   fHistos->StexHighFrequencyNoiseXtals(first_same_plot);
06148 
06149   MessageCnaCommandReplyB(first_same_plot);
06150 }
06151 
06152 void TEcnaGui::ViewHistoSorSSigmaOfCorssOfCrystals(const TString first_same_plot)
06153 {
06154 // Plot the 1D histogram of the mean of cor(s,s') as a function of crystals (grouped by Stins)
06155 
06156   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06157   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06158                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06159 
06160   fCnaCommand++;
06161   cout << "   *TEcnaGui [" << fCnaCommand
06162        << "]> Sigma of cor(s,s')";
06163   MessageCnaCommandReplyA(first_same_plot);
06164 
06165   fHistos->SetHistoMin(fKeyVminD_SCs_ChNb);
06166   fHistos->SetHistoMax(fKeyVmaxD_SCs_ChNb);
06167   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
06168   fHistos->SetHistoColorPalette(fKeyColPal);
06169   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06170   fHistos->StexXtalsSigmaOfCorss(first_same_plot);
06171 
06172   MessageCnaCommandReplyB(first_same_plot);
06173 }
06174 
06175 void TEcnaGui::ViewHistoSorSSigmaOfCorssDistribution(const TString first_same_plot)
06176 {
06177 // Plot the 1D histogram of the mean of cor(s,s') sigmas distribution for a Stex
06178 
06179   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06180   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06181                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06182 
06183   fCnaCommand++;
06184   cout << "   *TEcnaGui [" << fCnaCommand
06185        << "]> Sigma of cor(s,s') distribution";
06186   MessageCnaCommandReplyA(first_same_plot);
06187 
06188   fHistos->SetHistoMin(fKeyVminD_SCs_ChNb);
06189   fHistos->SetHistoMax(fKeyVmaxD_SCs_ChNb);
06190   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
06191   fHistos->SetHistoColorPalette(fKeyColPal);
06192   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06193   fHistos->StexSigmaOfCorssXtals(first_same_plot);
06194 
06195   MessageCnaCommandReplyB(first_same_plot);
06196 }
06197 
06198 //........................................................................................................
06199 void TEcnaGui::ViewHistoCrystalSampleMeans(const Int_t& cStexStin_A, const Int_t& crystal,
06200                                                          const TString first_same_plot)
06201 {
06202 // Plot the 1D histogram of the mean of the sample ADC for a crystal
06203 
06204   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06205   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06206                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06207 
06208   fCnaCommand++;
06209   cout << "   *TEcnaGui [" << fCnaCommand
06210        << "]> Expectation values of the samples"
06211        << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber
06212        << ", 1st req. evt#: " << fKeyFirstReqEvtNumber << ", last req. evt#: " << fKeyLastReqEvtNumber
06213        << ", Stex: " << fKeyStexNumber << ", " << fStinName.Data() << ": " << cStexStin_A << ", crystal" << crystal
06214        << ", option: " << first_same_plot << endl;
06215 
06216   fHistos->SetHistoMin(fKeyVminD_Ped_ChNb);
06217   fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb);
06218   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
06219   fHistos->SetHistoColorPalette(fKeyColPal);
06220   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06221   fHistos->XtalSamplesEv(cStexStin_A, crystal, first_same_plot);
06222 }
06223 
06224 void TEcnaGui::ViewHistoCrystalSigmasOfSamples(const Int_t&  cStexStin_A, const Int_t& crystal,
06225                                               const TString first_same_plot)
06226 {
06227 // Plot the 1D histogram of the sigmas of the sample ADC for a crystal
06228 
06229   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06230   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06231                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06232 
06233   fCnaCommand++;
06234   cout << "   *TEcnaGui [" << fCnaCommand
06235        << "]> Sigmas of the samples"
06236        << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber
06237        << ", 1st req. evt#: " << fKeyFirstReqEvtNumber << ", last req. evt#: " << fKeyLastReqEvtNumber
06238        << ", Stex: " << fKeyStexNumber << ", " << fStinName.Data() << ": " << cStexStin_A << ", crystal:" << crystal
06239        << ", option: " << first_same_plot << endl;
06240 
06241   fHistos->SetHistoMin(fKeyVminD_TNo_ChNb);
06242   fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb); 
06243   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
06244   fHistos->SetHistoColorPalette(fKeyColPal);
06245   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06246   fHistos->XtalSamplesSigma(cStexStin_A, crystal, first_same_plot);
06247 }
06248 
06249 //............................ Sample values
06250 
06251 void TEcnaGui::ViewHistoCrystalSampleValues(const Int_t& cStexStin_A, const Int_t& crystal,
06252                                            const Int_t& sample,     const TString first_same_plot)
06253 {
06254 // Plot the 1D histogram of the pedestals as a function of the event number for a crystal
06255 
06256   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06257   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06258                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06259 
06260   fCnaCommand++;
06261   cout << "   *TEcnaGui [" << fCnaCommand
06262        << "]> ADC sample values"
06263        << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber
06264        << ", 1st req. evt#: " << fKeyFirstReqEvtNumber << ", last req. evt#: " << fKeyLastReqEvtNumber
06265        << ", Stex: " << fKeyStexNumber << ", " << fStinName.Data() << ": " << cStexStin_A << ", crystal: " << crystal
06266        << ", sample: " << sample << ", option: " << first_same_plot << endl;
06267 
06268   fHistos->SetHistoMin(fKeyVminD_Ped_ChNb);
06269   fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb); 
06270   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
06271   fHistos->SetHistoColorPalette(fKeyColPal);
06272   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06273 
06274   fHistos->XtalSampleValues(cStexStin_A, crystal, sample, first_same_plot);
06275 }
06276 
06277 void TEcnaGui::ViewHistoSampleEventDistribution(const Int_t& cStexStin_A, const Int_t& crystal,
06278                                                const Int_t& sample,     const TString first_same_plot)
06279 {
06280 // Plot the 1D histogram of the ADC event distribution for a sample
06281 
06282   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06283   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, fKeyRunNumber,
06284                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber); 
06285 
06286   fCnaCommand++;
06287   cout << "   *TEcnaGui [" << fCnaCommand
06288        << "]> ADC event distribution"
06289        << ". Analysis: " << fKeyAnaType << ", Run: " << fKeyRunNumber
06290        << ", 1st req. evt#: " << fKeyFirstReqEvtNumber << ", last req. evt#: " << fKeyLastReqEvtNumber
06291        << ", Stex: " << fKeyStexNumber << ", " << fStinName.Data() << ": " << cStexStin_A << ", crystal: " << crystal
06292        << " Sample " << sample << ", option: " << first_same_plot << endl;
06293  
06294   fHistos->SetHistoMin(fKeyVminD_Ped_ChNb);
06295   fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb);
06296   fHistos->SetHistoScaleY(fKeyScaleY);    fHistos->SetHistoScaleX(fKeyScaleX);
06297   fHistos->SetHistoColorPalette(fKeyColPal);
06298   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06299   fHistos->SampleADCEvents(cStexStin_A, crystal, sample, first_same_plot);
06300 }
06301 
06302 //.................. Evolution in time (as a function of run date)
06303 
06304 void TEcnaGui::ViewHistimeCrystalPedestals(const TString  run_par_file_name,
06305                                           const Int_t&   cStexStin_A, const Int_t& i0StinEcha,
06306                                           const TString  first_same_plot)
06307 {
06308 // Plot the graph of Pedestals evolution for a given channel
06309 
06310   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06311 
06312   fCnaCommand++;
06313   cout << "   *TEcnaGui [" << fCnaCommand
06314        << "]> Pedestal history"
06315        << ". Run parameters file name: " << run_par_file_name
06316        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06317        << ", option: " << first_same_plot << endl;
06318 
06319   fHistos->SetHistoMin(fKeyVminD_Ped_ChNb);
06320   fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb); 
06321   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06322   fHistos->SetHistoColorPalette(fKeyColPal);
06323   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06324   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06325                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06326   fHistos->XtalTimePedestals(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06327 }
06328 
06329 void TEcnaGui::ViewHistimeCrystalPedestalsRuns(const TString  run_par_file_name,
06330                                               const Int_t&   cStexStin_A, const Int_t& i0StinEcha,
06331                                               const TString  first_same_plot)
06332 {
06333 // Plot the graph of Pedestals evolution for a given channel
06334 
06335   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06336 
06337   fCnaCommand++;
06338   cout << "   *TEcnaGui [" << fCnaCommand
06339        << "]> Pedestal history distribution"
06340        << ". Run parameters file name: " << run_par_file_name
06341        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06342        << ", option: " << first_same_plot << endl;
06343 
06344   fHistos->SetHistoMin(fKeyVminD_Ped_ChNb);
06345   fHistos->SetHistoMax(fKeyVmaxD_Ped_ChNb); 
06346   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06347   fHistos->SetHistoColorPalette(fKeyColPal);
06348   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06349   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06350                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06351   fHistos->XtalPedestalsRuns(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06352 }
06353 
06354 //....................................................................................................
06355 void TEcnaGui::ViewHistimeCrystalTotalNoise(const TString  run_par_file_name,
06356                                            const Int_t&   cStexStin_A,    const Int_t&  i0StinEcha,
06357                                            const TString  first_same_plot)
06358 {
06359 // Plot the graph of total noise evolution for a given channel
06360   
06361   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06362 
06363   fCnaCommand++;
06364   cout << "   *TEcnaGui [" << fCnaCommand
06365        << "]> Total noise history"
06366        << ". Run parameters file name: " << run_par_file_name
06367        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06368        << ", option: " << first_same_plot << endl;
06369 
06370   fHistos->SetHistoMin(fKeyVminD_TNo_ChNb);
06371   fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb); 
06372   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06373   fHistos->SetHistoColorPalette(fKeyColPal);
06374   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06375   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06376                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06377   fHistos->XtalTimeTotalNoise(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06378 }
06379 
06380 void TEcnaGui::ViewHistimeCrystalTotalNoiseRuns(const TString  run_par_file_name,
06381                                                const Int_t&   cStexStin_A,    const Int_t&  i0StinEcha,
06382                                                const TString  first_same_plot)
06383 {
06384 // Plot the graph of total noise evolution for a given channel
06385   
06386   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06387 
06388   fCnaCommand++;
06389   cout << "   *TEcnaGui [" << fCnaCommand
06390        << "]> Total noise history distribution"
06391        << ". Run parameters file name: " << run_par_file_name
06392        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06393        << ", option: " << first_same_plot << endl;
06394 
06395   fHistos->SetHistoMin(fKeyVminD_TNo_ChNb);
06396   fHistos->SetHistoMax(fKeyVmaxD_TNo_ChNb); 
06397   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06398   fHistos->SetHistoColorPalette(fKeyColPal);
06399   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06400   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06401                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06402   fHistos->XtalTotalNoiseRuns(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06403 }
06404 //....................................................................................................
06405 void TEcnaGui::ViewHistimeCrystalLowFrequencyNoise(const TString  run_par_file_name,
06406                                                   const Int_t&   cStexStin_A,    const Int_t&  i0StinEcha,
06407                                                   const TString  first_same_plot)
06408 {
06409 // Plot the graph of Low Frequency Noise evolution for a given channel
06410   
06411   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06412 
06413   fCnaCommand++;
06414   cout << "   *TEcnaGui [" << fCnaCommand
06415        << "]> Low frequency noise history"
06416        << ". Run parameters file name: " << run_par_file_name
06417        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06418        << ", option: " << first_same_plot << endl;
06419 
06420   fHistos->SetHistoMin(fKeyVminD_LFN_ChNb);
06421   fHistos->SetHistoMax(fKeyVmaxD_LFN_ChNb); 
06422   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06423   fHistos->SetHistoColorPalette(fKeyColPal);
06424   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06425   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06426                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06427   fHistos->XtalTimeLowFrequencyNoise(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06428 }
06429 
06430 void TEcnaGui::ViewHistimeCrystalLowFrequencyNoiseRuns(const TString  run_par_file_name,
06431                                                       const Int_t&   cStexStin_A,    const Int_t&  i0StinEcha,
06432                                                       const TString  first_same_plot)
06433 {
06434 // Plot the graph of Low Frequency Noise evolution for a given channel
06435   
06436   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06437 
06438   fCnaCommand++;
06439   cout << "   *TEcnaGui [" << fCnaCommand
06440        << "]> Low frequency noise history distribution"
06441        << ". Run parameters file name: " << run_par_file_name
06442        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06443        << ", option: " << first_same_plot << endl;
06444 
06445   fHistos->SetHistoMin(fKeyVminD_LFN_ChNb);
06446   fHistos->SetHistoMax(fKeyVmaxD_LFN_ChNb); 
06447   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06448   fHistos->SetHistoColorPalette(fKeyColPal);
06449   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06450   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06451                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06452   fHistos->XtalLowFrequencyNoiseRuns(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06453 }
06454 //....................................................................................................
06455 void TEcnaGui::ViewHistimeCrystalHighFrequencyNoise(const TString  run_par_file_name,
06456                                                    const Int_t&   cStexStin_A,    const Int_t&  i0StinEcha,
06457                                                    const TString  first_same_plot)
06458 {
06459 // Plot the graph of High Frequency Noise evolution for a given channel
06460   
06461   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06462 
06463   fCnaCommand++;
06464   cout << "   *TEcnaGui [" << fCnaCommand
06465        << "]> High frequency noise history"
06466        << ". Run parameters file name: " << run_par_file_name
06467        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06468        << ", option: " << first_same_plot << endl;
06469 
06470   fHistos->SetHistoMin(fKeyVminD_HFN_ChNb);
06471   fHistos->SetHistoMax(fKeyVmaxD_HFN_ChNb); 
06472   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06473   fHistos->SetHistoColorPalette(fKeyColPal);
06474   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06475   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06476                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06477   fHistos->XtalTimeHighFrequencyNoise(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06478 }
06479 
06480 void TEcnaGui::ViewHistimeCrystalHighFrequencyNoiseRuns(const TString  run_par_file_name,
06481                                                        const Int_t&   cStexStin_A,    const Int_t&  i0StinEcha,
06482                                                        const TString  first_same_plot)
06483 {
06484 // Plot the graph of High Frequency Noise evolution for a given channel
06485   
06486   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06487 
06488   fCnaCommand++;
06489   cout << "   *TEcnaGui [" << fCnaCommand
06490        << "]> High frequency noise history distribution"
06491        << ". Run parameters file name: " << run_par_file_name
06492        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06493        << ", option: " << first_same_plot << endl;
06494 
06495   fHistos->SetHistoMin(fKeyVminD_HFN_ChNb);
06496   fHistos->SetHistoMax(fKeyVmaxD_HFN_ChNb); 
06497   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06498   fHistos->SetHistoColorPalette(fKeyColPal);
06499   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06500   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06501                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06502   fHistos->XtalHighFrequencyNoiseRuns(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06503 }
06504 //....................................................................................................
06505 void TEcnaGui::ViewHistimeCrystalMeanOfCorss(const TString  run_par_file_name,
06506                                             const Int_t&   cStexStin_A,    const Int_t& i0StinEcha,
06507                                             const TString  first_same_plot)
06508 {
06509 // Plot the graph for Mean of Corss evolution for a given channel
06510 
06511   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06512 
06513   fCnaCommand++;
06514   cout << "   *TEcnaGui [" << fCnaCommand
06515        << "]> Mean of corss history"
06516        << ". Run parameters file name: " << run_par_file_name
06517        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06518        << ", option: " << first_same_plot << endl;
06519 
06520   fHistos->SetHistoMin(fKeyVminD_MCs_ChNb);
06521   fHistos->SetHistoMax(fKeyVmaxD_MCs_ChNb);
06522   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06523   fHistos->SetHistoColorPalette(fKeyColPal);
06524   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06525   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06526                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06527   fHistos->XtalTimeMeanOfCorss(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06528 }
06529 
06530 void TEcnaGui::ViewHistimeCrystalMeanOfCorssRuns(const TString  run_par_file_name,
06531                                                 const Int_t&   cStexStin_A,    const Int_t& i0StinEcha,
06532                                                 const TString  first_same_plot)
06533 {
06534 // Plot the graph for Mean of Corss evolution for a given channel
06535 
06536   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/ ;}
06537 
06538   fCnaCommand++;
06539   cout << "   *TEcnaGui [" << fCnaCommand
06540        << "]> Mean of corss history distribution"
06541        << ". Run parameters file name: " << run_par_file_name
06542        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06543        << ", option: " << first_same_plot << endl;
06544 
06545   fHistos->SetHistoMin(fKeyVminD_MCs_ChNb);
06546   fHistos->SetHistoMax(fKeyVmaxD_MCs_ChNb);
06547   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06548   fHistos->SetHistoColorPalette(fKeyColPal);
06549   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06550   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06551                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06552   fHistos->XtalMeanOfCorssRuns(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06553 }
06554 //....................................................................................................
06555 void TEcnaGui::ViewHistimeCrystalSigmaOfCorss(const TString run_par_file_name,
06556                                              const Int_t&  cStexStin_A, const Int_t& i0StinEcha,
06557                                              const TString first_same_plot)
06558 {
06559 // Plot the graph of Mean Corss evolution for a given channel
06560 
06561   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/;}
06562 
06563   fCnaCommand++;
06564   cout << "   *TEcnaGui [" << fCnaCommand
06565        << "]> Sigma of corss history"
06566        << ". Run parameters file name: " << run_par_file_name
06567        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06568        << ", option: " << first_same_plot << endl;
06569 
06570   fHistos->SetHistoMin(fKeyVminD_SCs_ChNb);
06571   fHistos->SetHistoMax(fKeyVmaxD_SCs_ChNb);
06572   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06573   fHistos->SetHistoColorPalette(fKeyColPal);
06574   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06575   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06576                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06577   fHistos->XtalTimeSigmaOfCorss(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06578 }
06579 
06580 void TEcnaGui::ViewHistimeCrystalSigmaOfCorssRuns(const TString run_par_file_name,
06581                                                  const Int_t&  cStexStin_A, const Int_t& i0StinEcha,
06582                                                  const TString first_same_plot)
06583 {
06584 // Plot the graph of Mean Corss evolution for a given channel
06585 
06586   if( fHistos == 0 ){fHistos = new TEcnaHistos(fSubDet.Data());       /*fCnew++*/;}
06587 
06588   fCnaCommand++;
06589   cout << "   *TEcnaGui [" << fCnaCommand
06590        << "]> Sigma of corss history distribution"
06591        << ". Run parameters file name: " << run_par_file_name
06592        << ", " << fStinName.Data() << ": " << cStexStin_A << ", channel: " << i0StinEcha
06593        << ", option: " << first_same_plot << endl;
06594 
06595   fHistos->SetHistoMin(fKeyVminD_SCs_ChNb);
06596   fHistos->SetHistoMax(fKeyVmaxD_SCs_ChNb);
06597   fHistos->SetHistoScaleY(fKeyScaleY);  fHistos->SetHistoScaleX(fKeyScaleX);
06598   fHistos->SetHistoColorPalette(fKeyColPal);
06599   fHistos->SetGeneralTitle(fKeyGeneralTitle);
06600   fHistos->FileParameters(fKeyAnaType, fKeyNbOfSamples, 0,
06601                           fKeyFirstReqEvtNumber, fKeyLastReqEvtNumber, fKeyReqNbOfEvts, fKeyStexNumber);
06602   fHistos->XtalSigmaOfCorssRuns(run_par_file_name, cStexStin_A, i0StinEcha, first_same_plot);
06603 }
06604 
06605 //====================================================================================================
06606 
06607 void TEcnaGui::InitKeys()
06608 {
06609   //.....Input widgets for: analysis, run, channel, sample,
06610   //                        number of events, first event number, etc...
06611   
06612   //fKeyPyf = "";
06613 
06614   fKeyAnaType = "StdPed12";
06615   Int_t MaxCar = fgMaxCar;
06616   fKeyRunListInitCode.Resize(MaxCar);
06617   fKeyRunListInitCode = "0123";
06618 
06619   MaxCar = fgMaxCar;
06620   fKeyFileNameRunList.Resize(MaxCar);
06621   fKeyFileNameRunList = fKeyRunListInitCode.Data();
06622 
06623   fKeyNbOfSamples = fEcal->MaxSampADC();
06624   fKeyNbOfSamplesString = "10";  // ! THE NUMBER IN STRING MUST BE EQUAL TO fKeyNbOfSamples VALUE
06625 
06626   fKeyNbOfSampForCalc = fEcal->MaxSampADC();
06627   fKeyNbOfSampForCalcString = "10";  // ! THE NUMBER IN STRING MUST BE EQUAL TO fKeyNbOfSampForCalc VALUE
06628 
06629   fKeyRunNumber  = 0;
06630 
06631   fKeyFirstReqEvtNumber = 1;
06632   fKeyFirstReqEvtNumberString = "1";  // ! THE NUMBER IN STRING MUST BE EQUAL TO fKeyFirstReqEvtNumber VALUE
06633 
06634   fKeyLastReqEvtNumber = 0;
06635   fKeyLastReqEvtNumberString = "0";  // ! THE NUMBER IN STRING MUST BE EQUAL TO fKeyLastReqEvtNumber VALUE
06636 
06637   fKeyReqNbOfEvts = 150;
06638   fKeyReqNbOfEvtsString = "150";  // ! THE NUMBER IN STRING MUST BE EQUAL TO fKeyReqNbOfEvts VALUE
06639 
06640   fKeyStexNumber = 1;
06641   fKeyStexNumberString = "1";  // ! THE NUMBER IN STRING MUST BE EQUAL TO fKeyStexNumber VALUE
06642 
06643   fKeyChanNumber = 0;
06644   fKeySampNumber = 0;
06645 
06646   fKeyStinANumber = 1;
06647   fKeyStinBNumber = 1;
06648   if( fSubDet == "EE" )
06649     {if( fKeyStexNumber == 1 || fKeyStexNumber == 3 )
06650       {
06651         fKeyStinANumber = fEcalNumbering->Get1DeeSCEcnaFromDeeSCCons(fKeyStexNumber, 150);
06652         fKeyStinBNumber = fEcalNumbering->Get1DeeSCEcnaFromDeeSCCons(fKeyStexNumber, 150);
06653       }
06654     }
06655 
06656   MaxCar = fgMaxCar;
06657   fKeyScaleX.Resize(MaxCar); 
06658   fKeyScaleX = "LIN";
06659   MaxCar = fgMaxCar;
06660   fKeyScaleY.Resize(MaxCar); 
06661   fKeyScaleY = "LIN";
06662   fKeyGeneralTitle = "Ecal Correlated Noise Analysis";
06663 
06664   fKeyColPal = "ECCNAColor";
06665 
06666   //.... ymin and ymax values => values which are displayed on the dialog box
06667 
06668   fKeyVminD_NOE_ChNb = (Double_t)0.; 
06669   fKeyVmaxD_NOE_ChNb = (Double_t)1000.;
06670  
06671   fKeyVminD_Ped_ChNb = (Double_t)0.; 
06672   fKeyVmaxD_Ped_ChNb = (Double_t)0.;
06673 
06674   fKeyVminD_TNo_ChNb = (Double_t)0.; 
06675   fKeyVmaxD_TNo_ChNb = (Double_t)0.;
06676 
06677   fKeyVminD_LFN_ChNb = (Double_t)0.; 
06678   fKeyVmaxD_LFN_ChNb = (Double_t)0.;
06679 
06680   fKeyVminD_HFN_ChNb = (Double_t)0.;
06681   fKeyVmaxD_HFN_ChNb = (Double_t)0.;
06682 
06683   fKeyVminD_MCs_ChNb = (Double_t)(-1.); 
06684   fKeyVmaxD_MCs_ChNb = (Double_t)1.;
06685 
06686   fKeyVminD_SCs_ChNb = (Double_t)0.; 
06687   fKeyVmaxD_SCs_ChNb = (Double_t)0.; 
06688 
06689   fKeyVminLHFcc = fKeyVminD_MCs_ChNb;
06690   fKeyVmaxLHFcc = fKeyVmaxD_MCs_ChNb;
06691 
06692   fKeyVminLFccMos = (Double_t)-1.; 
06693   fKeyVmaxLFccMos = (Double_t)1.;
06694   fKeyVminHFccMos = (Double_t)0.; 
06695   fKeyVmaxHFccMos = (Double_t)1.;
06696 
06697   fKeyFileNameRunList = "";
06698 }
06699 
06700 void  TEcnaGui::DisplayInEntryField(TGTextEntry* StringOfField, Int_t& value)
06701 {
06702   char* f_in = new char[20];          fCnew++;
06703   sprintf( f_in, "%d", value );
06704   StringOfField->SetText(f_in);
06705   delete [] f_in;                     fCdelete++;
06706 }
06707 
06708 void  TEcnaGui::DisplayInEntryField(TGTextEntry* StringOfField, Double_t& value)
06709 {
06710   char* f_in = new char[20];          fCnew++;
06711   sprintf( f_in, "%g", value );
06712   StringOfField->SetText(f_in);
06713   delete [] f_in;                     fCdelete++;
06714 }
06715 void  TEcnaGui::DisplayInEntryField(TGTextEntry* StringOfField, const TString value)
06716 {
06717   //StringOfField->Insert(value);
06718   StringOfField->SetText(value);
06719 }