LCOV - code coverage report
Current view: top level - MUON/MUONmapping - AliMpSubZone.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 11 29 37.9 %
Date: 2016-06-14 17:26:59 Functions: 8 13 61.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             : // $MpId: AliMpSubZone.cxx,v 1.8 2006/05/24 13:58:46 ivana Exp $
      18             : // Category: sector
      19             : 
      20             : //-----------------------------------------------------------------------------
      21             : // Class AliMpSubZone
      22             : // ------------------
      23             : // Class describing a zone segment composed of the 
      24             : // line segments with the same motif type.
      25             : // Included in AliRoot: 2003/05/02
      26             : // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
      27             : //-----------------------------------------------------------------------------
      28             : 
      29             : #include "AliMpSubZone.h"
      30             : #include "AliMpVRowSegment.h"
      31             : #include "AliMpVMotif.h"
      32             : 
      33             : #include "AliLog.h"
      34             : 
      35             : #include <Riostream.h>
      36             : 
      37             : using std::cout;
      38             : using std::endl;
      39             : /// \cond CLASSIMP
      40          18 : ClassImp(AliMpSubZone)
      41             : /// \endcond
      42             : 
      43             : //_____________________________________________________________________________
      44             : AliMpSubZone::AliMpSubZone(AliMpVMotif* motif) 
      45         372 :   : TObject(),
      46         372 :     fMotif(motif),
      47         372 :     fSegments()
      48        1860 : {
      49             : /// Standard constructor
      50         744 : }
      51             : 
      52             : //_____________________________________________________________________________
      53             : AliMpSubZone::AliMpSubZone() 
      54           0 :   : TObject(),
      55           0 :     fMotif(0),
      56           0 :     fSegments()
      57           0 : {
      58             : /// Default constructor
      59           0 : }
      60             : 
      61             : //_____________________________________________________________________________
      62             : AliMpSubZone::~AliMpSubZone() 
      63        1488 : {
      64             : /// Destructor 
      65         744 : }
      66             : 
      67             : //
      68             : // public methods
      69             : //
      70             : 
      71             : //_____________________________________________________________________________
      72             : void AliMpSubZone::AddRowSegment(AliMpVRowSegment* rowSegment)
      73             : {
      74             : /// Add row segment.
      75             : 
      76        1416 :   fSegments.Add(rowSegment);
      77         708 : } 
      78             : 
      79             : 
      80             : //_____________________________________________________________________________
      81             : void AliMpSubZone::Print(const char* /*option*/) const
      82             : {
      83             : /// Print motif position Ids for all row segments.
      84             :  
      85           0 :   for (Int_t i=0; i<GetNofRowSegments(); i++) {
      86           0 :     AliMpVRowSegment* rowSegment = GetRowSegment(i);
      87             :     
      88           0 :     cout << rowSegment->GetNofMotifs() << " ";
      89             : 
      90           0 :     for (Int_t j=0; j<rowSegment->GetNofMotifs(); j++)
      91           0 :       cout << rowSegment->GetMotifPositionId(j) << " ";
      92             :     
      93           0 :     cout << endl;    
      94             :   }    
      95           0 : }
      96             :   
      97             : //_____________________________________________________________________________
      98             : Int_t AliMpSubZone::GetNofRowSegments() const 
      99             : {
     100             : /// Return number of row segments.
     101             : 
     102           0 :   return fSegments.GetSize();
     103             : }  
     104             : 
     105             : //_____________________________________________________________________________
     106             : AliMpVRowSegment* AliMpSubZone::GetRowSegment(Int_t i) const 
     107             : {
     108             : /// Return i-th row segment.
     109             : 
     110           0 :   if (i<0 || i>=GetNofRowSegments()) {
     111           0 :     AliErrorStream() << "Index outside range" << endl;
     112           0 :     return 0;
     113             :   }
     114             :   
     115           0 :   return (AliMpVRowSegment*)fSegments.At(i);  
     116           0 : }
     117             : 
     118             : //_____________________________________________________________________________
     119             : AliMpVMotif*  AliMpSubZone:: GetMotif() const
     120             : {
     121             : /// Return the motif.
     122             : 
     123        8676 :   return fMotif;
     124             : }  

Generated by: LCOV version 1.11