Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4GUI/TGo4CreateNewHistogram.ui.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 void TGo4CreateNewHistogram::init()
00017 {
00018     TGo4GUIRegistry *fxTGo4GUIRegistry;
00019     fxTGo4GUIRegistry = TGo4GUIRegistry::Instance();
00020     HisTypeId=0;
00021     HisTypeNo=0;
00022     HisClassId=0;
00023     fxTGo4CreateNewHistogramSlots = dynamic_cast <TGo4CreateNewHistogramSlots *>
00024                 (fxTGo4GUIRegistry->GetSlotClass("TGo4CreateNewHistogramSlots"));
00025    if(fxTGo4CreateNewHistogramSlots !=0) {
00026       fxTGo4CreateNewHistogramSlots->SetGUI(this);
00027     }else{
00028       fxTGo4CreateNewHistogramSlots =
00029          new TGo4CreateNewHistogramSlots ("TGo4CreateNewHistogramSlots", "Slots Class for Qt GUI", this);
00030     }
00031     fxTGo4CreateNewHistogramStatus = (TGo4CreateNewHistogramStatus *)  fxTGo4CreateNewHistogramSlots->GetStatus();
00032     fxTGo4CreateNewHistogramSlots->GetDefaultsValues(0);
00033 
00034 }
00035 
00036 void TGo4CreateNewHistogram::CreateNewHist()
00037 {
00038    fxTGo4CreateNewHistogramSlots->CreateLocalHist(GetHistoType());
00039 }
00040 
00041 
00042 
00043 void TGo4CreateNewHistogram::SetHistoType( int Type )
00044 {
00045     switch(Type)
00046     {
00047     case 1:
00048       HisClassId=1;
00049       HisTypeId=1;
00050    break;
00051     case 2:
00052       HisClassId=1;
00053       HisTypeId=2;
00054    break;
00055     case 3:
00056       HisClassId=1;
00057       HisTypeId=3;
00058    break;
00059     case 4:
00060       HisClassId=1;
00061       HisTypeId=4;
00062    break;
00063     case 5:
00064       HisClassId=2;
00065       HisTypeId=1;
00066    break;
00067     case 6:
00068       HisClassId=2;
00069       HisTypeId=2;
00070    break;
00071     case 7:
00072       HisClassId=2;
00073       HisTypeId=3;
00074    break;
00075     case 8:
00076       HisClassId=2;
00077       HisTypeId=4;
00078    break;
00079     case 9:
00080       HisClassId=3;
00081       HisTypeId=1;
00082    break;
00083     case 10:
00084       HisClassId=3;
00085       HisTypeId=2;
00086    break;
00087     case 11:
00088       HisClassId=3;
00089       HisTypeId=3;
00090    break;
00091     case 12:
00092       HisClassId=3;
00093       HisTypeId=4;
00094    break;
00095     default:
00096    break;
00097 
00098    }
00099    HisClassType->setButton(HisClassId);
00100    HisType->setButton(HisTypeId);
00101    HisTypeNo=Type;
00102 
00103 }
00104 
00105 int TGo4CreateNewHistogram::GetHistoType()
00106 {
00107    switch(HisClassId)
00108    {
00109          case 1:    //TH1
00110             switch(HisTypeId)
00111             {
00112                case 1:
00113                   HisTypeNo=1;  //TH1S
00114                break;
00115                case 2:
00116                   HisTypeNo=2;  //TH1D
00117                break;
00118                case 3:
00119                   HisTypeNo=3;  //TH1F
00120                break;
00121                case 4:
00122                   HisTypeNo=4;  //TH1I
00123                break;
00124 
00125             }
00126          break;
00127 
00128          case 2:    //TH2
00129             switch(HisTypeId)
00130             {
00131                case 1:
00132                   HisTypeNo=5;  //TH2S
00133                break;
00134                case 2:
00135                   HisTypeNo=6;  //TH2D
00136                break;
00137                case 3:
00138                   HisTypeNo=7;  //TH2F
00139                break;
00140                case 4:
00141                   HisTypeNo=8;  //TH2I
00142                break;
00143 
00144             }
00145 
00146          break;
00147 
00148          case 3:    //TH3
00149             switch(HisTypeId)
00150             {
00151                case 1:
00152                   HisTypeNo=9;   //TH3S
00153                break;
00154                case 2:
00155                   HisTypeNo=10;  //TH3D
00156                break;
00157                case 3:
00158                   HisTypeNo=11;  //TH3F
00159                break;
00160                case 4:
00161                   HisTypeNo=12;  //TH3I
00162                break;
00163 
00164             }
00165 
00166          break;
00167 
00168          default:
00169         break;
00170    }
00171    return HisTypeNo;
00172 
00173 }
00174 
00175 void TGo4CreateNewHistogram::HisTyp( int id )
00176 {
00177     HisTypeId=id;
00178 }
00179 
00180 void TGo4CreateNewHistogram::HisClass( int id )
00181 {
00182     HisClassId=id;
00183 }
00184 
00185 void TGo4CreateNewHistogram::CreateRemoteHis()
00186 {
00187     fxTGo4CreateNewHistogramSlots->CreateRemoteHis(
00188          GetHistoType(),HisName->text(), HisTitle->text(),
00189          XNoOfBins->text().toInt()  , Xmin->text().toLong(), Xmax->text().toLong(),
00190          YNoOfBins->text().toInt()  , Ymin->text().toLong(), Ymax->text().toLong(),
00191          ZNoOfBins->text().toInt()  , Zmin->text().toLong(), Zmax->text().toLong());
00192 }
00193 
00194 void TGo4CreateNewHistogram::SetAsDefaultValues()
00195 {
00196     fxTGo4CreateNewHistogramSlots->SetAsDefaultValues(GetHistoType());
00197 }
00198 
00199 
00200 void TGo4CreateNewHistogram::GetDefaultsValues()
00201 {
00202     fxTGo4CreateNewHistogramSlots->GetDefaultsValues(GetHistoType());
00203 }
00204 
00205 
00206 
00207 
00208 
00209 
00210 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:59 2005 for Go4-v2.10-5 by doxygen1.2.15