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

beamtime/gsi-aug12/hd/go4/ROSSENDORF/TRossendorfMapParam.cxx (r4864/r3172)

Go to the documentation of this file.
00001 /* Generated by Together */
00002 
00003 #include "TRossendorfMapParam.h"
00004 
00005 
00006 TRossendorfMapParam::TRossendorfMapParam(const char* name) : TGo4Parameter(name)
00007 {
00008         for(Int_t i=0;i<3;i++)
00009         {
00010                 for(Int_t j=0;j<8;j++)
00011                 {
00012                         tdcMap[i][j].tdc_left=-1;
00013                         tdcMap[i][j].tdc_right=-1;
00014                         tdcMap[i][j].ch_left=-1;
00015                         tdcMap[i][j].ch_right=-1;
00016 
00017                         qdcMap[i][j].tdc_left=-1;
00018                         qdcMap[i][j].tdc_right=-1;
00019                         qdcMap[i][j].ch_left=-1;
00020                         qdcMap[i][j].ch_right=-1;
00021                 }
00022         }
00023 }
00024 
00025 Int_t TRossendorfMapParam::getTdcMap(Int_t rpc, Int_t strip, Int_t *tdcLeft, Int_t *tdcRight, Int_t *chLeft, Int_t *chRight)
00026 {
00027         if((strip > -1) && (strip <8))
00028         {
00029                 *tdcLeft = tdcMap[rpc][strip].tdc_left;
00030                 *tdcRight = tdcMap[rpc][strip].tdc_right;
00031                 *chLeft = tdcMap[rpc][strip].ch_left;
00032                 *chRight = tdcMap[rpc][strip].ch_right;
00033                 return 0;
00034         }
00035         else return -1;
00036 }
00037 
00038 Int_t TRossendorfMapParam::getQdcMap(Int_t rpc, Int_t strip, Int_t *qdcLeft, Int_t *qdcRight, Int_t *chLeft, Int_t *chRight)
00039 {
00040         if((strip > -1) && (strip <8))
00041         {
00042                 *qdcLeft = qdcMap[rpc][strip].tdc_left;
00043                 *qdcRight = qdcMap[rpc][strip].tdc_right;
00044                 *chLeft = qdcMap[rpc][strip].ch_left;
00045                 *chRight = qdcMap[rpc][strip].ch_right;
00046                 return 0;
00047         }
00048         else return -1;
00049 }
00050 
00051 void TRossendorfMapParam::setTdcMap(Int_t rpc, Int_t strip, Int_t tdcLeft, Int_t chLeft, Int_t tdcRight, Int_t chRight)
00052 {
00053         tdcMap[rpc][strip].tdc_left = tdcLeft+5;
00054         tdcMap[rpc][strip].tdc_right = tdcRight+5;
00055         tdcMap[rpc][strip].ch_left = chLeft;
00056         tdcMap[rpc][strip].ch_right = chRight;
00057 }
00058 
00059  void TRossendorfMapParam::setQdcMap(Int_t rpc, Int_t strip, Int_t qdcLeft, Int_t chLeft, Int_t qdcRight, Int_t chRight)
00060 {
00061         qdcMap[rpc][strip].tdc_left = qdcLeft;
00062         qdcMap[rpc][strip].tdc_right = qdcRight;
00063         qdcMap[rpc][strip].ch_left = chLeft;
00064         qdcMap[rpc][strip].ch_right = chRight;
00065         
00066 }

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