• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

beamtime/tof-tdctest/go4/TGsiAug12Param.cxx (r4864/r4847)

Go to the documentation of this file.
00001 #include "TGsiAug12Param.h"
00002 
00003 #include "TGo4Version.h"
00004 #if __GO4BUILDVERSION__ > 40502
00005    #include "go4iostream.h"
00006 #else
00007    #include "Riostream.h"
00008 #endif
00009 
00010 TGsiAug12Param::TGsiAug12Param(const char* name) :
00011    TGo4Parameter(name)
00012 {
00013    // Unpacking step
00014    bWithTriglog     = kTRUE; // flag indicates usage of MBS TRIGLOG info
00015    bWithMbs         = kTRUE; // flag indicates usage of MBS
00016    bWithGet4        = kFALSE; // flag indicates usage of ROC+GET4 v1.0
00017    bWithEpics       = kFALSE; // flag indicates usage of EPICS
00018 
00019    // Calibration step
00020    bWithVftxCalib   = kTRUE; // flag indicates usage of VFTX calibration
00021 
00022    // Detectors reconstruction step
00023    bWithScalersRate = kTRUE; // flag indicates usage of scalers rate calculation
00024    uNbRpc           =  2;    // Gives the nb of RPC to be reconstructed
00025    uNbPadRpc        =  0;    // Gives the nb of PAD RPC to be reconstructed
00026    uNbPlastics      =  1;    // Gives the nb of Plastic scint. data types to be reconstructed
00027 
00028    // Detectors matching & comparison step
00029    bWithMatching    = kTRUE; // flag indicates usage of matching between detectors
00030 
00031    // Output to ROOT tree step (output independent indpt of GO4 classes)
00032    bWithTreeOutput  = kTRUE; // flag indicates usage of ROOT tree output
00033 
00034    // Rejection for a pulser trigger: trigger index
00035    // -1 disable rejection
00036    iTriggerRejection = -1;
00037 }
00038 
00039 void TGsiAug12Param::CheckOptionConsistency()
00040 {
00041    // Calibration step
00042    if( kFALSE == bWithMbs && kTRUE == bWithVftxCalib )
00043    {
00044       cout<<" TGsiAug12Param: Switching ON the MBS Unpack processor as VFTX calib. is ON !!!"<<endl;
00045       bWithMbs = kTRUE;
00046    } // if( kFALSE == bWithMbs && kTRUE == bWithVftxCalib )
00047 
00048    // Detectors reconstruction step
00049    if( ( kFALSE == bWithTriglog || kFALSE == bWithMbs ) && kTRUE == bWithScalersRate )
00050    {
00051       cout<<" TGsiAug12Param: Switching ON the TRIGLOG and MBS Unpack processor as Scaler Rate is ON !!!"<<endl;
00052       bWithTriglog = kTRUE;
00053       bWithMbs = kTRUE;
00054    } // if( ( kFALSE == bWithTriglog || kFALSE == bWithTriglog ) && kTRUE == bWithScalersRate )
00055    if( NB_RPC < uNbRpc )
00056    {
00057       cout<<" TGsiAug12Param: Reducing number of RPC detector processor as bigger than limit in GenericDefines.h =>";
00058       cout<<NB_RPC<<endl;
00059       uNbRpc = NB_RPC;
00060    } // if( NB_RPC < uNbRpc )
00061    if( NB_PAD_RPC < uNbPadRpc )
00062    {
00063       cout<<" TGsiAug12Param: Reducing number of PAD RPC detector processor as bigger than limit in GenericDefines.h =>";
00064       cout<<NB_PAD_RPC<<endl;
00065       uNbPadRpc = NB_PAD_RPC;
00066    } // if( NB_PAD_RPC < uNbPadRpc )
00067    if( NB_PLASTICS < uNbPlastics )
00068    {
00069       cout<<" TGsiAug12Param: Reducing number of Plastic detector processor as bigger than limit in GenericDefines.h =>";
00070       cout<<NB_PLASTICS<<endl;
00071       uNbPlastics = NB_PLASTICS;
00072    } // if( NB_PLASTICS < uNbPlastics )
00073 
00074    if( kFALSE == bWithScalersRate &&
00075        0 == uNbRpc && 0 == uNbPadRpc && 0 == uNbPlastics &&
00076        kTRUE == bWithMatching )
00077    {
00078       // Detectors matching & comparison step
00079       cout<<" TGsiAug12Param: Switching OFF the Matching processor as no Detector step ON !!!"<<endl;
00080       bWithMatching = kFALSE;
00081    }
00082    // Output to ROOT tree step (output independent indpt of GO4 classes)
00083    /*
00084    if( kFALSE == bWithMatching && kTRUE == bWithTreeOutput )
00085    {
00086       cout<<" TGsiAug12Param: Switching OFF the Root Output processor as no Matching step ON !!!"<<endl;
00087       bWithTreeOutput = kFALSE;
00088    }
00089    */
00090 
00091    PrintOptions();
00092 }
00093 
00094 void TGsiAug12Param::PrintOptions()
00095 {
00096    cout<<"************************* Analysis parameters **************************"<<endl;
00097    // Unpacking step
00098    if( kTRUE == bWithTriglog )
00099       cout<<"TRIGLOG Unpacker:                   ON"<<endl;
00100       else cout<<"TRIGLOG Unpacker:                   OFF"<<endl;
00101    if( kTRUE == bWithMbs )
00102       cout<<"MBS Unpacker:                       ON"<<endl;
00103       else cout<<"MBS Unpacker:                       OFF"<<endl;
00104    if( kTRUE == bWithGet4 )
00105       cout<<"GET4 v1.x Unpacker:                 ON"<<endl;
00106       else cout<<"GET4 v1.x Unpacker:                 OFF"<<endl;
00107    if( kTRUE == bWithEpics )
00108       cout<<"EPICS Unpacker:                     ON"<<endl;
00109       else cout<<"EPICS Unpacker:                     OFF"<<endl;
00110 
00111    cout<<"------------------------------------------------------------------------"<<endl;
00112    // Calibration step
00113    if( kTRUE == bWithVftxCalib )
00114       cout<<"VFTX Calibration:                   ON"<<endl;
00115       else cout<<"VFTX Calibration:                   OFF"<<endl;
00116 
00117    cout<<"------------------------------------------------------------------------"<<endl;
00118    // Detectors reconstruction step
00119    if( kTRUE == bWithScalersRate )
00120       cout<<"Scalers rates:                      ON"<<endl;
00121       else cout<<"Scalers rates:                      OFF"<<endl;
00122    if( 0 < uNbRpc )
00123       cout<<"Nb strip RPCs:                      "<<uNbRpc<<endl;
00124       else cout<<"Strip RPC:                          OFF"<<endl;
00125    if( 0 < uNbPadRpc )
00126       cout<<"Nb pad RPCs:                        "<<uNbPadRpc<<endl;
00127       else cout<<"Pad RPC:                            OFF"<<endl;
00128    if( 0 < uNbPlastics )
00129       cout<<"Nb Plastics:                        "<<uNbPlastics<<endl;
00130       else cout<<"Plastics:                           OFF"<<endl;
00131 
00132    cout<<"------------------------------------------------------------------------"<<endl;
00133    // Detectors matching & comparison step
00134    if( kTRUE == bWithMatching )
00135       cout<<"Matching:                           ON"<<endl;
00136       else cout<<"Matching:                           OFF"<<endl;
00137 
00138    cout<<"------------------------------------------------------------------------"<<endl;
00139    // Output to ROOT tree step (output independent indpt of GO4 classes)
00140    if( kTRUE == bWithTreeOutput )
00141       cout<<"ROOT Tree output:                   ON"<<endl;
00142       else cout<<"ROOT Tree output:                   OFF"<<endl;
00143    cout<<"************************************************************************"<<endl;
00144 }

Generated on Tue Dec 10 2013 04:52:21 for ROCsoft by  doxygen 1.7.1