LCOV - code coverage report
Current view: top level - ITS/ITSrec - AliITSOnlineSPDfoInfo.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 31 3.2 %
Date: 2016-06-14 17:26:59 Functions: 1 11 9.1 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 2008-2010, 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             : /* $Id$ */
      17             : 
      18             : ////////////////////////////////////////////////////////////////
      19             : // Author: A. Mastroserio                                     // 
      20             : // This class is used within the detector algorithm framework //
      21             : // to collect information on how the scan was arranged.       //
      22             : ////////////////////////////////////////////////////////////////
      23             : 
      24             : #include "AliITSOnlineSPDfoInfo.h"
      25             : #include "AliLog.h"
      26             : 
      27         116 : ClassImp(AliITSOnlineSPDfoInfo)
      28             :   
      29             : //_____________________________________________________________________
      30           0 : AliITSOnlineSPDfoInfo::AliITSOnlineSPDfoInfo(): 
      31           0 :  fRunNumber(0), fRouter(999), fNumTriggers(0),
      32           0 :  fDBversion(0), fNumDACindex(0), fDACindex(0),
      33           0 :  fActiveChipsAndHS()
      34           0 : {
      35           0 : for(Int_t i=0; i<60; i++) fActiveChipsAndHS.SetBitNumber(i,kFALSE);
      36           0 : }
      37             : //_____________________________________________________________________
      38             : AliITSOnlineSPDfoInfo::~AliITSOnlineSPDfoInfo() 
      39           0 : {}
      40             : //_____________________________________________________________________
      41             : void AliITSOnlineSPDfoInfo::ClearThis() {
      42             :   // reset all values for this object
      43           0 :   fRunNumber=0;
      44           0 :   fRouter=999;
      45           0 :   fNumTriggers=0;
      46           0 :   fDBversion=0;
      47           0 :   fNumDACindex=0;
      48           0 :   fDACindex.Reset();
      49           0 :   for(Int_t i=0; i<60; i++) fActiveChipsAndHS.SetBitNumber(i,kFALSE);
      50           0 : }
      51             : //_____________________________________________________________________
      52             : void AliITSOnlineSPDfoInfo::AddDACindex(Short_t index) {
      53             :   // add a new DAC index, allocate space for TArrayS
      54           0 :   fNumDACindex++;
      55           0 :   fDACindex.Set(fNumDACindex);
      56           0 :   fDACindex.AddAt(index, fNumDACindex-1);
      57           0 : }
      58             : //_____________________________________________________________________
      59             : Short_t AliITSOnlineSPDfoInfo::GetDACindex(UShort_t id) const {
      60             :   // returns the DAC index at position id of TArrayS
      61           0 :   if (id>=fNumDACindex) return -1;
      62           0 :   else                  return fDACindex.At(id);
      63           0 : }
      64             : //_____________________________________________________________________
      65             : Bool_t AliITSOnlineSPDfoInfo::IsActiveHS(UInt_t hs) const {
      66             :   Bool_t isHS =kFALSE;
      67           0 :   for(Int_t iChip =0; iChip<10; iChip++) isHS = IsActiveChip(hs,iChip);
      68           0 :   return isHS;
      69             : }
      70             : //_____________________________________________________________________
      71             : Bool_t AliITSOnlineSPDfoInfo::IsActiveChip(UInt_t hs, UInt_t chip) const {
      72           0 :   if(hs > 5 || chip > 9) {
      73           0 :     AliError(Form("hs %i or  chip %i  is out of range [hs=0-5  chip=0=9]\n",hs,chip));
      74           0 :   return kFALSE;
      75             :   }
      76           0 :   return fActiveChipsAndHS.TestBitNumber(10*hs+chip);
      77           0 : }
      78             : //_____________________________________________________________________
      79             : 

Generated by: LCOV version 1.11