First implementation of EMCAL trigger QA from Nicola Arbor
[u/mrichter/AliRoot.git] / TOF / AliTOFTDCHitBuffer.h
CommitLineData
5b4ed716 1#ifndef ALITOFTDCHITBUFFER_H
2#define ALITOFTDCHITBUFFER_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 hits. //
14// //
15///////////////////////////////////////////////////////////////
16
17#include "TObject.h"
18#include "AliTOFTDCHit.h"
19#include "TClonesArray.h"
20
21class AliTOFTDCHitBuffer :
22public TObject
23{
24 public:
25 AliTOFTDCHitBuffer(); //default constructor
26 AliTOFTDCHitBuffer(const AliTOFTDCHitBuffer &source) : TObject(source), fBuffer(source.fBuffer) {}; //copy constructor
27 AliTOFTDCHitBuffer &operator = (const AliTOFTDCHitBuffer &source) {
28 if (&source != this) {
29 TObject::operator=(source);
30 fBuffer = source.fBuffer;
31 }
32 return *this;
33 }; //operator =
34 virtual ~AliTOFTDCHitBuffer(); //destructor
35
36 void Reset() {fBuffer.Clear();}; // reset
37 void Add(const AliTOFTDCHit &Hit); //add hit
38 TClonesArray *GetBuffer() {return &fBuffer;}; //get buffer
39 Int_t GetEntries() const {return fBuffer.GetEntries();}; //get entries
40 AliTOFTDCHit *GetHit(Int_t Hit) const {return (Hit < GetEntries() ? (AliTOFTDCHit *)fBuffer.At(Hit) : 0x0);}; //get hit
41
42 private:
43
44 TClonesArray fBuffer; // buffer
45
46 ClassDef(AliTOFTDCHitBuffer, 1);
47};
48
49#endif /* ALITOFTDCHITBUFFER_H */