LCOV - code coverage report
Current view: top level - TOF/TOFbase - AliTOFTDCErrorBuffer.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 3 11 27.3 %
Date: 2016-06-14 17:26:59 Functions: 3 12 25.0 %

          Line data    Source code
       1             : #ifndef ALITOFTDCERRORBUFFER_H
       2             : #define ALITOFTDCERRORBUFFER_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             :  * See cxx source for full Copyright notice                               */
       6             : 
       7             : /*
       8             :   author: Roberto Preghenella (R+), preghenella@bo.infn.it
       9             : */
      10             : 
      11             : ///////////////////////////////////////////////////////////////
      12             : //                                                           //
      13             : //   This class provides a buffer for TDC errors.            //
      14             : //                                                           //
      15             : ///////////////////////////////////////////////////////////////
      16             : 
      17             : #include "TObject.h"
      18             : #include "AliTOFTDCError.h"
      19             : #include "TClonesArray.h"
      20             : 
      21             : class AliTOFTDCErrorBuffer : 
      22             : public TObject
      23             : {
      24             :  public:
      25             :   AliTOFTDCErrorBuffer(); //default constructor
      26           0 :   AliTOFTDCErrorBuffer(const AliTOFTDCErrorBuffer &source) : TObject(source), fBuffer(source.fBuffer) {}; //copy contructor
      27             :   AliTOFTDCErrorBuffer &operator = (const AliTOFTDCErrorBuffer &source) {
      28           0 :     if (&source != this) {
      29           0 :       TObject::operator=(source);
      30           0 :       fBuffer = source.fBuffer;
      31           0 :     }
      32           0 :     return *this;
      33             :   }; //operator =
      34             :   virtual ~AliTOFTDCErrorBuffer(); //destructor
      35             : 
      36      111744 :   void Reset() {fBuffer.Clear();}; // reset
      37             :   void Add(const AliTOFTDCError &err); //add hit
      38           0 :   TClonesArray *GetBuffer() {return &fBuffer;}; //get buffer
      39       21888 :   Int_t GetEntries() const {return fBuffer.GetEntries();}; //get entries
      40           0 :   AliTOFTDCError *GetError(Int_t ierr) const {return (ierr < GetEntries() ? (AliTOFTDCError *)fBuffer.At(ierr) : 0x0);}; //get error
      41             : 
      42             :  private:
      43             : 
      44             :   TClonesArray fBuffer; // buffer
      45             : 
      46          26 :   ClassDef(AliTOFTDCErrorBuffer, 1);
      47             : };
      48             : 
      49             : #endif /* ALITOFTDCERRORBUFFER_H */

Generated by: LCOV version 1.11