LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSRecPointContainer.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 10 13 76.9 %
Date: 2016-06-14 17:26:59 Functions: 10 16 62.5 %

          Line data    Source code
       1             : #ifndef ALIITSRECPOINTCONTAINER_H
       2             : #define ALIITSRECPOINTCONTAINER_H
       3             : /* Copyright(c) 2009-2011, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /* $Id$ */
       7             : 
       8             : ////////////////////////////////////////////////////////////////////////
       9             : //           Container class for ITS rec points                       //
      10             : ////////////////////////////////////////////////////////////////////////
      11             : 
      12             : #include <TClonesArray.h>
      13             : #include <TString.h>
      14             : 
      15             : class AliITSRecoParam;
      16             : 
      17             : class AliITSRecPointContainer : public TObject {
      18             : 
      19             :  public:
      20             : 
      21             :   virtual ~AliITSRecPointContainer();  //Destructor
      22             : 
      23         328 :   Bool_t IsSPDActive() const {return fDet.Contains("SPD");}
      24          32 :   Bool_t IsSDDActive() const {return fDet.Contains("SDD");}
      25          16 :   Bool_t IsSSDActive() const {return fDet.Contains("SSD");}
      26           0 :   Bool_t IsITSComplete() const {return fDet.Contains("ALL");}
      27          24 :   Bool_t GetStatusOK() const {return fStatusOK;}
      28           0 :   Int_t GetNumberOfModules() const {return fActualSize; }
      29             : 
      30             :   static AliITSRecPointContainer* Instance(const AliITSRecoParam *ptr=NULL);
      31             :   static void Destroy();
      32           0 :   void PrepareToRead(){if(fNextEvent<0){fNextEvent=0;} else {++fNextEvent;}}
      33             :   TClonesArray* FetchClusters(Int_t mod, TTree* tR);
      34             :   TClonesArray* FetchClusters(Int_t mod, TTree* tR,Int_t cureve);
      35      121960 :   TClonesArray* UncheckedGetClusters(Int_t mod) const {return fArray[mod];}
      36             : 
      37             :   // In the following two methods: 1<=lay<=6  (i.e. layers numbered from 1) 
      38             :   UInt_t GetNClustersInLayer(Int_t lay, TTree* tR, Int_t eventN=-1);
      39             :   UInt_t GetNClustersInLayerFast(Int_t lay) const;
      40          16 :   void FullReset(){fCurrentEve=-1000; Reset();}
      41             :   void ResetSPD(); // clears only SPD parts - see implementation for usage
      42             :   void ResetSDD(); // clears only SPD parts - see implementation for usage
      43             :   void ResetSSD(); // clears only SPD parts - see implementation for usage
      44             : 
      45             :  private:
      46             :   // methods
      47             :   AliITSRecPointContainer(const AliITSRecoParam* krp=NULL);   // Default constructor
      48             :   AliITSRecPointContainer(const AliITSRecPointContainer& rec);
      49             :   AliITSRecPointContainer& operator=(const AliITSRecPointContainer &source);
      50         312 :   Bool_t CheckBoundaries(Int_t i)const { return (i>=0 && i<fgkNModules);}
      51             :   void CookEntries();
      52             :   void Reset();
      53             :   void ClearClus(Int_t first, Int_t lastpp){ // clears clusters for modules 
      54             :     // ranging from first to lastpp-1 included
      55       70384 :     for(Int_t i=first;i<lastpp;i++)(fArray[i])->Clear();
      56          16 :   }
      57             :   //Data members
      58             :   static AliITSRecPointContainer* fgInstance; //! AliITSRecPointContainer 
      59             :                                               //  singleton
      60             :   static const Int_t fgkNModules=2198;  //! total number of ITS modules
      61             : 
      62             :   Int_t fSPDNModules; //! number of SPD modules
      63             :   Int_t fSDDNModules; //! number of SDD modules
      64             :   Int_t fSSDNModules; //! number of SDD modules
      65             :   TClonesArray* fArray[fgkNModules];  //! container - 1 TClonesArray per module
      66             :   Int_t fCurrentEve; //! event number
      67             :   Int_t fNextEvent; //! number of the next event to be read; used only when
      68             :                     //! the run loader is not available. It is just a counter.
      69             :   Int_t fActualSize; //! actual number of ITS modules in TTree R 
      70             :   TString fDet; //! ITS subdetectors active for the current run 
      71             :   Bool_t fStatusOK; //! kFALSE is RP branch is absent or if there are anomalies
      72             :                     //! in the number of active modules
      73             :   UInt_t fNClusters[6]; //! Number of clusters per layer
      74             : 
      75         122 :   ClassDef(AliITSRecPointContainer,0)
      76             : };
      77             : 
      78             : #endif

Generated by: LCOV version 1.11