LCOV - code coverage report
Current view: top level - ITS/ITSrec - AliITSOnlineSPDscanInfo.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 55 1.8 %
Date: 2016-06-14 17:26:59 Functions: 1 13 7.7 %

          Line data    Source code
       1             : /////////////////////////////////////////////////////////////////
       2             : // Author: Henrik Tydesjo                                      //
       3             : // This class is used as a container online.                   //
       4             : // It holds information needed for a scan.                     //
       5             : // This class should only be used through the interface of the //
       6             : // AliITSOnlineSPDscan class.                                  //
       7             : /////////////////////////////////////////////////////////////////
       8             : 
       9             : #include "AliITSOnlineSPDscanInfo.h"
      10             : 
      11         116 : ClassImp(AliITSOnlineSPDscanInfo)
      12             : 
      13           0 : AliITSOnlineSPDscanInfo::AliITSOnlineSPDscanInfo(): 
      14           0 :   fType(999),
      15           0 :   fDataFormat(999),
      16           0 :   fRunNr(0),
      17           0 :   fRouterNr(999),
      18           0 :   fNSteps(0),
      19           0 :   fTriggers(0),
      20           0 :   fRowStart(0),
      21           0 :   fRowEnd(255),
      22           0 :   fDacStep(1),
      23           0 :   fDacStart(0),
      24           0 :   fDacEnd(255),
      25           0 :   fDCSVersion(0)
      26           0 : {
      27           0 :   ClearThis();
      28           0 : }
      29             : 
      30           0 : AliITSOnlineSPDscanInfo::~AliITSOnlineSPDscanInfo() {
      31           0 : }
      32             : 
      33             : void AliITSOnlineSPDscanInfo::ClearThis() {
      34             :   // reset all values for this object
      35           0 :   fNSteps=0;
      36           0 :   fTriggers=0;
      37           0 :   fType=999;
      38           0 :   fRunNr=0;
      39           0 :   fRouterNr=999;
      40           0 :   fRowStart=0;
      41           0 :   fRowEnd=255;
      42           0 :   for (Int_t hs=0; hs<6; hs++) {
      43           0 :     fHalfStaveScanned[hs]=kFALSE;
      44             :   }
      45           0 :   for (Int_t i=0; i<10; i++) {
      46           0 :     fChipPresent[i]=kTRUE;
      47             :   }
      48           0 : }
      49             : 
      50             : UInt_t AliITSOnlineSPDscanInfo::AddScanStep() {
      51             :   // add a new scan step, allocate space for TArrayI
      52           0 :   fNSteps++;
      53           0 :   fTriggers.Set(fNSteps);
      54           0 :   fTriggers.AddAt(0, fNSteps-1);
      55           0 :   return fNSteps-1;
      56             : }
      57             : void AliITSOnlineSPDscanInfo::IncrementTriggers(UInt_t nsi) {
      58             :   // increment the nr of triggers for step nsi
      59           0 :   if (nsi<fNSteps) {
      60           0 :     fTriggers.AddAt(GetTriggers(nsi)+1,nsi);
      61           0 :   }
      62           0 : }
      63             : void AliITSOnlineSPDscanInfo::SetTriggers(UInt_t nsi, UInt_t val) {
      64             :   // set the nr of triggers for step nsi
      65           0 :   if (nsi<fNSteps) {
      66           0 :     fTriggers.AddAt(val,nsi);
      67           0 :   }
      68           0 : }
      69             : UInt_t AliITSOnlineSPDscanInfo::GetTriggers(UInt_t nsi) const {
      70             :   // get the nr of triggers for step nsi
      71           0 :   if (nsi<fNSteps) return fTriggers.At(nsi);
      72           0 :   else return 0;
      73           0 : }
      74             : void AliITSOnlineSPDscanInfo::SetHalfStaveScanned(UInt_t val, Bool_t b) {
      75             :   // set half stave scanned
      76           0 :   if (val<6) {
      77           0 :     fHalfStaveScanned[val]=b;
      78           0 :   }
      79           0 : }
      80             : Bool_t AliITSOnlineSPDscanInfo::GetHalfStaveScanned(UInt_t val) {
      81             :   // set half stave scanned
      82           0 :   if (val<6) {
      83           0 :     return fHalfStaveScanned[val];
      84             :   }
      85             :   else {
      86           0 :     printf("hs requested is out of range (hs=%d)\n",val);
      87           0 :     return kFALSE;
      88             :   }
      89           0 : }

Generated by: LCOV version 1.11