LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSpListItem.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 14 18 77.8 %
Date: 2016-06-14 17:26:59 Functions: 14 22 63.6 %

          Line data    Source code
       1             : #ifndef ALIITSPLISTITEM_H
       2             : #define ALIITSPLISTITEM_H
       3             : /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice     */
       5             : 
       6             : /* $Id$ */
       7             : 
       8             : #include <TObject.h>
       9             : 
      10             : using std::istream;
      11             : 
      12             : class AliITSpListItem: public TObject {
      13             :  public:
      14             :     // Default Constructor
      15             :     AliITSpListItem();
      16             :     // Standard Signal Constructor
      17             :     AliITSpListItem(Int_t track,Int_t hit,Int_t module,Int_t index,
      18             :                    Double_t signal);
      19             :     // Standard Noise Constructor
      20             :     AliITSpListItem(Int_t module,Int_t index,Double_t signal);
      21             :     // Class destrutor
      22             :     virtual ~AliITSpListItem();
      23             :     // Copy Oporator
      24             :     AliITSpListItem(const AliITSpListItem &source);
      25             :     // = Operator
      26             :     virtual AliITSpListItem& operator=(const AliITSpListItem &source);
      27             :     // Building methods: they set completely the status of the object
      28             :     void Build(Int_t module,Int_t index,Double_t noise);
      29             :     void Build(Int_t track,Int_t hit,Int_t module,Int_t index,Double_t signal);
      30             :     void Build(const AliITSpListItem &source);
      31             :     // Returns the signal value in the list of signals
      32             :     virtual Double_t GetSignal(Int_t i) const {
      33    25844572 :                             return ( (i>=0&&i<fgksize) ? fSignal[i] : 0.0);}
      34             :     virtual Double_t GetSignal() const {
      35    78680818 :                             return fTsignal;}
      36             :     virtual Double_t GetSignalAfterElect() const {
      37           0 :                             return fSignalAfterElect;}
      38             :     // Returns the Sum/Total signal
      39    78643792 :     virtual Double_t GetSumSignal() const {return fTsignal+fNoise;}
      40             :     // Returns the Total signal for hits in the FO strobe
      41       10452 :     virtual Double_t GetSumSignalFo() const {Double_t foSig =0; for(Int_t i=0; i<fgksize; i++) if(fInFastOrStrobe[i]) foSig+=GetSignal(i); return foSig; }
      42             :     // Returns the  noise
      43           0 :     virtual Double_t GetNoise() const {return fNoise;}
      44             :     // Returns the number of stored singals.
      45    12901976 :     virtual Int_t GetNsignals() const {return fgksize;}
      46             :     // Addes track number and signal to this existing list.
      47             :     virtual void AddSignal(Int_t track,Int_t hit,Int_t module,
      48             :                            Int_t index,Double_t signal);
      49             :     // Adds signal after electronics to this existing list.
      50             :     virtual void AddSignalAfterElect(Int_t module,Int_t index,Double_t signal);
      51             :     // Addes noise to this existing list.
      52             :     virtual void AddNoise(Int_t module,Int_t index,Double_t noise);
      53             :     // Returns track number.
      54             :     virtual Int_t GetTrack(Int_t i) const {
      55      590580 :                             return ((i>=0&&i<fgksize) ? fTrack[i] : 0);}
      56             :     // Returns hit number.
      57             :     virtual Int_t GetHit(Int_t i) const {
      58      710528 :                             return ((i>=0&&i<fgksize) ? fHits[i] : 0);}
      59             :     // Returns module number.
      60             :     virtual Int_t GetModule() const {
      61    25690112 :                             return fmodule;}
      62             :     // Returns index number.
      63             :     virtual Int_t GetIndex() const {
      64    25702364 :                             return findex;}
      65             :     // Adds the contents of pl to this 
      66             :     virtual void Add(AliITSpListItem *pl);
      67             :     // Adds the contents of pl to this with track number off set given by
      68             :     // fileIndex.
      69             :     virtual void AddTo(Int_t fileIndex,AliITSpListItem *pl);
      70             :     // Shift an index number to occupy the upper four bits.
      71             :     virtual Int_t ShiftIndex(Int_t in,Int_t trk) const;
      72             :     // Standard ascii class print function
      73             :     void Print(ostream *os) const;
      74             :     // Standard ascii class read function
      75             :     void Read(istream *is);
      76           0 :     virtual void Print(Option_t *option="") const {TObject::Print(option);}
      77           0 :     virtual Int_t Read(const char *name) {return TObject::Read(name);}
      78             :     // Check if the item is used or marked as unused
      79   551051724 :     Bool_t IsUsed() const {return fUsed;}
      80             :     // Mark the object as unused
      81   201524874 :     void MarkUnused()  {fUsed = kFALSE;}
      82             :     // Returns max size of array for for Tracks, Hits, and signals.
      83      265120 :     static Int_t GetMaxKept() {return fgksize;};
      84             : 
      85        1620 :     void SetIsInFoStrobe(Int_t i) {(i>=0&&i<fgksize) ? fInFastOrStrobe[i]=kTRUE : printf("index %i out of range \n",i); }
      86             : 
      87             :  private:
      88             :     static const Int_t fgksize = 10; // Array sizes
      89             :     Int_t    fmodule;         // module number
      90             :     Int_t    findex;          // Strip/row,col number linearlized.
      91             :     Int_t    fTrack[fgksize];  //[fgksize] track Number
      92             :     Int_t    fHits[fgksize];   //[fgksize] hit number
      93             :     Double_t fSignal[fgksize]; //[fgksize] Signals
      94             :     Double_t fTsignal;        // Total signal (no noise)
      95             :     Double_t fNoise;          // Total noise, coupling, ...
      96             :     Double_t fSignalAfterElect; // Signal after electronics
      97             :     Bool_t fUsed;              //! kTRUE if the item is built and in use
      98             :     Bool_t fInFastOrStrobe[fgksize];   //[fgksize] bool if the hit (in readout strobe) is also in the Fo strobe
      99             : 
     100         118 :     ClassDef(AliITSpListItem,5) // Item list of signals and track numbers
     101             : };      
     102             : // Input and output functions for standard C++ input/output.
     103             : ostream & operator<<(ostream &os,AliITSpListItem &source);
     104             : istream & operator>>(istream &is,AliITSpListItem &source);
     105             : 
     106             : 
     107             : #endif

Generated by: LCOV version 1.11