LCOV - code coverage report
Current view: top level - HLT/ITS - AliHLTITSclusterer.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 33 3.0 %
Date: 2016-06-14 17:26:59 Functions: 1 4 25.0 %

          Line data    Source code
       1             : // $Id$
       2             : 
       3             : /**************************************************************************
       4             :  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             :  *                                                                        *
       6             :  * Author: The ALICE Off-line Project.                                    *
       7             :  * Contributors are mentioned in the code where appropriate.              *
       8             :  *                                                                        *
       9             :  * Permission to use, copy, modify and distribute this software and its   *
      10             :  * documentation strictly for non-commercial purposes is hereby granted   *
      11             :  * without fee, provided that the above copyright notice appears in all   *
      12             :  * copies and that both the copyright notice and this permission notice   *
      13             :  * appear in the supporting documentation. The authors make no claims     *
      14             :  * about the suitability of this software for any purpose. It is          *
      15             :  * provided "as is" without express or implied warranty.                  *
      16             :  **************************************************************************/
      17             : 
      18             : //-------------------------------------------------------------------------
      19             : //               Implementation of the HLT ITS clusterer class
      20             : //    The class derives from AliITSclustererV2.
      21             : //    There is one new method added which allows to read ITS raw data
      22             : //    and store the clusters in a tree without using runloaders.
      23             : //    In this case, the labels filling is skipped.
      24             : //          Origin: Cvetan Cheshkov, CERN, Cvetan.Cheshkov@cern.ch
      25             : //-------------------------------------------------------------------------
      26             : 
      27             : #include "AliHLTITSclusterer.h"
      28             : #include "AliITSgeomTGeo.h"
      29             : #include "AliRawReader.h"
      30             : #include "AliITSRawStreamSPD.h"
      31             : #include "AliITSRawStreamSDD.h"
      32             : #include "AliITSRawStreamSSD.h"
      33             : #include <TTree.h>
      34             : #include <TClonesArray.h>
      35             : 
      36           6 : ClassImp(AliHLTITSclusterer)
      37             : 
      38             : AliHLTITSclusterer::AliHLTITSclusterer(const Char_t *geom)
      39             :   :
      40           0 :   AliITSclustererV2(geom),
      41           0 :   fNModule(AliITSgeomTGeo::GetNModules())  
      42           0 : {
      43           0 : }
      44             : 
      45             : void AliHLTITSclusterer::Digits2Clusters(AliRawReader* rawReader,TTree *cTree)
      46             : {
      47             : 
      48           0 :   TClonesArray *array=new TClonesArray("AliITSclusterV2",1000);
      49           0 :   cTree->Branch("Clusters",&array);
      50           0 :   delete array;
      51             : 
      52           0 :   TClonesArray** clusters = new TClonesArray*[fNModule]; 
      53           0 :   for (Int_t iModule = 0; iModule < fNModule; iModule++) {
      54           0 :     clusters[iModule] = NULL;
      55             :   }
      56             : 
      57           0 :   rawReader->Reset();
      58           0 :   AliITSRawStreamSPD inputSPD(rawReader);
      59           0 :   FindClustersSPD(&inputSPD, clusters);
      60             : 
      61           0 :   rawReader->Reset();
      62           0 :   AliITSRawStreamSDD inputSDD(rawReader);
      63           0 :   FindClustersSDD(&inputSDD, clusters);
      64             : 
      65           0 :   rawReader->Reset();
      66           0 :   AliITSRawStreamSSD inputSSD(rawReader);
      67           0 :   FindClustersSSD(&inputSSD, clusters);
      68             : 
      69             :   // write all clusters to the tree
      70             :   Int_t nClusters = 0;
      71           0 :   for (Int_t iModule = 0; iModule < fNModule; iModule++) {
      72           0 :     array = clusters[iModule];
      73           0 :     if (!array) {
      74           0 :       Error("Digits2Clusters", "data for module %d missing!", iModule);
      75           0 :       array = new TClonesArray("AliITSclusterV2");
      76           0 :     }
      77           0 :     cTree->SetBranchAddress("Clusters", &array);
      78           0 :     cTree->Fill();
      79           0 :     nClusters += array->GetEntriesFast();
      80           0 :     delete array;
      81             :   }
      82             : 
      83           0 :   delete[] clusters;
      84             : 
      85           0 :   Info("Digits2Clusters", "total number of found clusters in ITS: %d\n", 
      86             :        nClusters);
      87           0 : }

Generated by: LCOV version 1.11