LCOV - code coverage report
Current view: top level - PHOS/PHOSbase - AliPHOSTriggerRawDigit.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 4 39 10.3 %
Date: 2016-06-14 17:26:59 Functions: 3 11 27.3 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       3             :  *                                                                        *
       4             :  * Author: The ALICE Off-line Project.                                    *
       5             :  * Contributors are mentioned in the code where appropriate.              *
       6             :  *                                                                        *
       7             :  * Permission to use, copy, modify and distribute this software and its   *
       8             :  * documentation strictly for non-commercial purposes is hereby granted   *
       9             :  * without fee, provided that the above copyright notice appears in all   *
      10             :  * copies and that both the copyright notice and this permission notice   *
      11             :  * appear in the supporting documentation. The authors make no claims     *
      12             :  * about the suitability of this software for any purpose. It is          *
      13             :  * provided "as is" without express or implied warranty.                  *
      14             :  **************************************************************************/
      15             : /* 
      16             :    4x4 TRU represented by position and amplitude.
      17             :    Author: Boris Polishchuk (Boris.Polishchuk@cern.ch)
      18             : */
      19             : 
      20             : // --- AliRoot header files ---
      21             : #include "AliPHOSTriggerRawDigit.h"
      22             : 
      23          22 : ClassImp(AliPHOSTriggerRawDigit)
      24             : 
      25             : AliPHOSTriggerRawDigit::AliPHOSTriggerRawDigit() : 
      26           2 : AliDigitNew(),fType(0),fMod(-1),fXloc(-1),fZloc(-1),fXIdx(-1),fZIdx(-1),fTRURow(-1),fBranch(-1),fL1Threshold(-1)
      27           5 : {
      28             :   //Default constructor.
      29           2 : }
      30             : 
      31             : AliPHOSTriggerRawDigit::AliPHOSTriggerRawDigit(Int_t module, Int_t xIdx, Int_t zIdx, Int_t TRURow, Int_t branch, Int_t amp) :
      32           0 :   AliDigitNew(),fType(0),fMod(module),fXloc(-1),fZloc(-1),fXIdx(xIdx),fZIdx(zIdx),fTRURow(TRURow),fBranch(branch),fL1Threshold(-1)
      33           0 : {
      34           0 :   fAmp = amp;
      35           0 : }
      36             : 
      37             : AliPHOSTriggerRawDigit::AliPHOSTriggerRawDigit(Int_t module, Int_t x, Int_t z, Int_t L1_Threshold, Int_t amp) :
      38           0 :   AliDigitNew(),fType(1),fMod(module),fXloc(x),fZloc(z),fXIdx(-1),fZIdx(-1),fTRURow(-1),fBranch(-1),fL1Threshold(L1_Threshold)
      39           0 : {
      40           0 :   fAmp = amp;
      41           0 : }
      42             : 
      43             : AliPHOSTriggerRawDigit::AliPHOSTriggerRawDigit(const AliPHOSTriggerRawDigit & tdigit) :
      44           0 :   AliDigitNew(tdigit),fType(tdigit.fType),fMod(tdigit.fMod),fXloc(tdigit.fXloc),fZloc(tdigit.fZloc),fXIdx(tdigit.fXIdx),fZIdx(tdigit.fZIdx),
      45           0 :   fTRURow(tdigit.fTRURow),fBranch(tdigit.fBranch),fL1Threshold(tdigit.fL1Threshold)
      46           0 : {
      47           0 :   fAmp = tdigit.fAmp;
      48           0 : }
      49             : 
      50             : AliPHOSTriggerRawDigit& AliPHOSTriggerRawDigit::operator=(const AliPHOSTriggerRawDigit & tdigit)
      51             : {
      52           0 :   if (&tdigit != this) {
      53           0 :     AliDigitNew::operator=(tdigit);
      54           0 :     fType = tdigit.fType;
      55           0 :     fMod = tdigit.fMod;
      56           0 :     fXloc = tdigit.fXloc;
      57           0 :     fZloc = tdigit.fZloc;
      58           0 :     fXIdx = tdigit.fXIdx;
      59           0 :     fZIdx = tdigit.fZIdx;
      60           0 :     fTRURow = tdigit.fTRURow;
      61           0 :     fBranch = tdigit.fBranch;
      62           0 :     fL1Threshold = tdigit.fL1Threshold;
      63           0 :   }
      64             : 
      65           0 :   return *this;
      66             : }
      67             : 
      68             : void AliPHOSTriggerRawDigit::GetModXZ(Int_t& mod, Int_t& modX, Int_t& modZ)
      69             : {
      70             :   //Return 4x4 region bottom left cell position.
      71             : 
      72           0 :   if(fType==1) {
      73           0 :     mod = fMod;
      74           0 :     modX = fXloc;
      75           0 :     modZ = fZloc;
      76           0 :     return;
      77             :   }
      78             :   
      79             :   Int_t kN2x2XPrTRURow = 8;
      80             :   Int_t kN2x2ZPrBranch = 14;
      81             :   
      82           0 :   modX = (fXIdx + fTRURow * kN2x2XPrTRURow)*2;
      83           0 :   modZ = (fZIdx + fBranch * kN2x2ZPrBranch)*2;
      84           0 :   mod = fMod;
      85             :   
      86           0 : }

Generated by: LCOV version 1.11