LCOV - code coverage report
Current view: top level - STEER/STEERBase - AliDetectorTag.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 13 53 24.5 %
Date: 2016-06-14 17:26:59 Functions: 5 11 45.5 %

          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             : /* $Id$ */
      17             : 
      18             : //-----------------------------------------------------------------
      19             : //           Implementation of the DetectorTag class
      20             : //   This is the class to deal with the tags in the detector level
      21             : //   Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
      22             : //-----------------------------------------------------------------
      23             : 
      24             : #include "TMath.h"
      25             : 
      26             : #include "AliDetectorTag.h"
      27             : #include "AliLog.h"
      28             : #include "TObjString.h"
      29             : 
      30         176 : ClassImp(AliDetectorTag)
      31             : 
      32             : //___________________________________________________________________________
      33             : AliDetectorTag::AliDetectorTag() :
      34           6 :   TObject(),
      35           6 :   fMaskDAQ(0),
      36           6 :   fMaskReco(0),
      37           6 :   fDetectorValidityRange(),
      38         366 :   fDetectorStatus()
      39          30 : {
      40             :   // Default constructor
      41         372 :   for (int iter=0; iter<AliDAQ::kHLTId; iter++) {
      42         180 :     fDetectorValidityRange[iter] = 0;
      43         180 :     fDetectorStatus[iter] = "";
      44             :   }
      45          12 : }
      46             : 
      47             : //___________________________________________________________________________
      48             : AliDetectorTag::AliDetectorTag(const AliDetectorTag & detTag) :
      49           0 :   TObject(detTag),
      50           0 :   fMaskDAQ(detTag.fMaskDAQ),
      51           0 :   fMaskReco(detTag.fMaskReco),
      52           0 :   fDetectorValidityRange(),
      53           0 :   fDetectorStatus() 
      54           0 : {
      55             :   // DetectorTag copy constructor
      56             :   
      57           0 :   for (int iter=0; iter<AliDAQ::kHLTId; iter++) {
      58           0 :     fDetectorValidityRange[iter] = detTag.GetDetectorValidityRange(iter);
      59           0 :     fDetectorStatus[iter] = detTag.GetDetectorStatus(iter);
      60             :   }
      61           0 : }
      62             : 
      63             : //___________________________________________________________________________
      64             : AliDetectorTag & AliDetectorTag::operator=(const AliDetectorTag &detTag) {
      65             :   //DetectorTag assignment operator
      66           0 :   if (this != &detTag) {
      67           0 :     TObject::operator=(detTag);
      68             :     
      69           0 :     fMaskDAQ = detTag.fMaskDAQ;   
      70           0 :     fMaskReco = detTag.fMaskReco;   
      71           0 :     for (int iter=0; iter<AliDAQ::kHLTId; iter++) {
      72           0 :       fDetectorValidityRange[iter] = detTag.GetDetectorValidityRange(iter);
      73           0 :       fDetectorStatus[iter] = detTag.GetDetectorStatus(iter);
      74             :     }
      75           0 :   }
      76           0 :   return *this;
      77           0 : }
      78             : 
      79             : //___________________________________________________________________________
      80           8 : AliDetectorTag::~AliDetectorTag() {
      81             :   // Destructor
      82          66 : }
      83             : 
      84             : void AliDetectorTag::UpdateFromRunTable(AliDetectorTag &detTag)
      85             : {
      86           0 :   for (int iter=0; iter<AliDAQ::kHLTId; iter++) {
      87           0 :     fDetectorValidityRange[iter] = detTag.GetDetectorValidityRange(iter);
      88           0 :     fDetectorStatus[iter] = detTag.GetDetectorStatus(iter);
      89             :   }
      90           0 : }
      91             : 
      92             : 
      93             : //___________________________________________________________________________
      94             : // void AliDetectorTag::SetDetectorConfiguration() {
      95             : //   //sets the detector configuration
      96             : //   if(fDetectors[0] == 1) {
      97             : //     SetITSSPD(); fDetectorArray->Add(new TObjString("SPD"));}
      98             : //   if(fDetectors[1] == 1) {
      99             : //     SetITSSDD(); fDetectorArray->Add(new TObjString("SDD"));}
     100             : //   if(fDetectors[2] == 1) {
     101             : //     SetITSSSD(); fDetectorArray->Add(new TObjString("SSD"));}
     102             : //   if(fDetectors[3] == 1) {
     103             : //     SetTPC(); fDetectorArray->Add(new TObjString("TPC"));}
     104             : //   if(fDetectors[4] == 1) {
     105             : //     SetTRD(); fDetectorArray->Add(new TObjString("TRD"));}
     106             : //   if(fDetectors[5] == 1) {
     107             : //     SetTOF(); fDetectorArray->Add(new TObjString("TOF"));}
     108             : //   if(fDetectors[6] == 1) {
     109             : //     SetHMPID();fDetectorArray->Add(new TObjString("HMPID"));}
     110             : //   if(fDetectors[7] == 1) {
     111             : //     SetPHOS(); fDetectorArray->Add(new TObjString("PHOS"));}
     112             : //   if(fDetectors[9] == 1) {
     113             : //     SetPMD(); fDetectorArray->Add(new TObjString("PMD"));}
     114             : //   if(fDetectors[10] == 1) {
     115             : //     SetMUON(); fDetectorArray->Add(new TObjString("MUON"));}
     116             : //   if(fDetectors[12] == 1) {
     117             : //     SetFMD(); fDetectorArray->Add(new TObjString("FMD"));}
     118             : //   if(fDetectors[13] == 1) {
     119             : //     SetTZERO(); fDetectorArray->Add(new TObjString("T0"));}
     120             : //   if(fDetectors[14] == 1) {
     121             : //     SetVZERO(); fDetectorArray->Add(new TObjString("VZERO"));}
     122             : //   if(fDetectors[15] == 1) {
     123             : //     SetZDC(); fDetectorArray->Add(new TObjString("ZDC"));}
     124             : //   if(fDetectors[18] == 1) {
     125             : //     SetEMCAL(); fDetectorArray->Add(new TObjString("EMCAL"));}
     126             : // }
     127             : 
     128             : //___________________________________________________________________________
     129             : void AliDetectorTag::PrintDetectorMask() {
     130             :   //prints the detector mask
     131           0 :   AliInfo( Form( "ITS-SPD: %d", GetITSSPD()) );
     132           0 :   AliInfo( Form( "ITS-SDD: %d", GetITSSDD()) );
     133           0 :   AliInfo( Form( "ITS-SSD: %d", GetITSSSD()) );
     134           0 :   AliInfo( Form( "TPC: %d", GetTPC()) );
     135           0 :   AliInfo( Form( "TRD: %d", GetTRD()) );
     136           0 :   AliInfo( Form( "TOF: %d", GetTOF()) );
     137           0 :   AliInfo( Form( "HMPID: %d", GetHMPID()) );
     138           0 :   AliInfo( Form( "PHOS: %d", GetPHOS()) );
     139           0 :   AliInfo( Form( "PMD: %d", GetPMD()) );
     140           0 :   AliInfo( Form( "MUON: %d", GetMUON()) );
     141           0 :   AliInfo( Form( "FMD: %d", GetFMD()) );
     142           0 :   AliInfo( Form( "TZERO: %d", GetTZERO()) );
     143           0 :   AliInfo( Form( "VZERO: %d", GetVZERO()) );
     144           0 :   AliInfo( Form( "ZDC: %d", GetZDC()) );
     145           0 :   AliInfo( Form( "EMCAL: %d", GetEMCAL()) );
     146           0 : }

Generated by: LCOV version 1.11