LCOV - code coverage report
Current view: top level - TPC/TPCbase - AliTPCClustersRow.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 7 20 35.0 %
Date: 2016-06-14 17:26:59 Functions: 3 7 42.9 %

          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             : /// \class AliTPCClustersRow
      19             : /// \brief Time Projection Chamber AliTPCClusterRow  objects
      20             : ///
      21             : /// -   clusters for given segment of TPC
      22             : ///
      23             : /// \author Marian Ivanov , GSI Darmstadt
      24             : 
      25             : #include <TClass.h>
      26             : #include "AliClusters.h"
      27             : #include "AliTPCclusterMI.h"
      28             : #include "AliTPCClustersRow.h"
      29             : #include "AliLog.h"
      30             : #include <TDirectory.h>
      31             : #include <TClonesArray.h>
      32             : 
      33             : 
      34             : const Int_t kDefSize = 1;  ///< defalut size
      35             : 
      36             : 
      37             : /// \cond CLASSIMP
      38          24 : ClassImp(AliTPCClustersRow)
      39             : /// \endcond
      40             : 
      41             : 
      42             : // code audit 2015-11-06 the class is in its current imlementation bound to
      43             : // AliTPCclusterMI as element class, corresponding code and checks have been
      44             : // added
      45             : 
      46             : //*****************************************************************************
      47             : //
      48             : //_____________________________________________________________________________
      49           0 : AliTPCClustersRow::AliTPCClustersRow() : AliClusters("AliTPCclusterMI")
      50           0 : {
      51             :   //
      52             :   //default constructor
      53           0 :   fNclusters=0;
      54           0 : }
      55             : 
      56             : //____________________________________________________________________________
      57          12 : AliTPCClustersRow::AliTPCClustersRow(const char *classname) : AliClusters("AliTPCclusterMI")
      58          60 : {
      59             :  /// special constructor
      60          12 :   TString cmpstr(classname);
      61          24 :   if (cmpstr.CompareTo("AliTPCclusterMI")) {
      62           0 :     AliFatal("Class AliTPCClustersRow is specifically bound to AliTPCclusterMI as element class");
      63             :   }
      64             : 
      65          12 :  fNclusters=0;
      66          24 : }
      67             : 
      68             : //_____________________________________________________________________________
      69             : TObject *AliTPCClustersRow::InsertCluster(const TObject *c)
      70             : {
      71             :   /// Add a simulated cluster copy to the list
      72             : 
      73             :   // code audit 2015-11-06 usage of name of fClass to create the TClonesArray
      74             :   // does not make sense, because the rest of the function is hardwired
      75           0 :   if (fClass==0) {
      76           0 :     Error("AliClusters", "class type not specified");
      77           0 :     return 0;
      78             :   }
      79           0 :   if(!fClusters) fClusters=new TClonesArray("AliTPCclusterMI",1000);
      80           0 :   TClonesArray &lclusters = *fClusters;
      81           0 :   return new(lclusters[fNclusters++]) AliTPCclusterMI(*((AliTPCclusterMI*)c));
      82           0 : }
      83             : //__________________________________________________________________________
      84             : 
      85             : 
      86             : TObject *AliTPCClustersRow::Append(){
      87             :  /// create new object return pointer to this object
      88             : 
      89           0 :  return fClusters->operator[](fClusters->GetEntriesFast());
      90             : }
      91             : 

Generated by: LCOV version 1.11