]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliMultiAODInputHandler.h
Re-organization of vertex constraints in the primary vertex determination:
[u/mrichter/AliRoot.git] / STEER / AliMultiAODInputHandler.h
CommitLineData
4338f373 1#ifndef ALIMULTIAODINPUTHANDLER_H
2#define ALIMULTIAODINPUTHANDLER_H
3/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//-------------------------------------------------------------------------
9// AOD Input Handler realisation of the AliVEventHandler interface.
10// This class handles multiple events for mixing.
11// Author: Andreas Morsch, CERN
12//-------------------------------------------------------------------------
13
14#include "AliInputEventHandler.h"
7de026d8 15class AliVEventPool;
4338f373 16class AliAODEvent;
17
18class AliMultiAODInputHandler : public AliInputEventHandler {
19
20 public:
27bdfda6 21 AliMultiAODInputHandler();
4338f373 22 AliMultiAODInputHandler(Int_t size);
23 AliMultiAODInputHandler(const char* name, const char* title, Int_t size);
24 virtual ~AliMultiAODInputHandler();
25 void SetBufferSize(Int_t size) {fBufferSize = size;}
7de026d8 26 void SetEventPool(AliVEventPool* pool) {fEventPool = pool;}
4338f373 27 Int_t GetBufferSize() const {return fBufferSize;}
28 Int_t GetNBuffered() const {return fNBuffered;}
29 Bool_t IsBufferReady() const {return (fNBuffered >= fBufferSize);}
30 Bool_t IsFreshBuffer() const {return (fIndex == (fBufferSize - 1));}
7de026d8 31 AliVEventPool *GetEventPool() const {return fEventPool;}
c9f05157 32 virtual AliVEvent *GetEvent() const {return 0;}
33 virtual AliAODEvent *GetEvent(Int_t iev) const;
27bdfda6 34 AliAODEvent *GetLatestEvent() const {return GetEvent(fIndex);}
4338f373 35 // From the interface
c9f05157 36 virtual Bool_t Init(Option_t* /*opt*/) {return kTRUE;}
4338f373 37 virtual Bool_t Init(TTree* tree, Option_t* /*opt*/);
38 virtual Bool_t FinishEvent();
7de026d8 39 virtual Bool_t BeginEvent(Long64_t /*entry*/);
40
4338f373 41 private:
42 AliMultiAODInputHandler(const AliMultiAODInputHandler& handler);
43 AliMultiAODInputHandler& operator=(const AliMultiAODInputHandler& handler);
44 private:
45 Int_t fBufferSize; // Size of the buffer
46 Int_t fNBuffered; // Number of events actually buffered
47 Int_t fIndex; // Pointer to most recent event
7de026d8 48 Int_t fCurrentBin; // Current bin from the pool
4338f373 49 TTree* fTree; // Pointer to the tree
7de026d8 50 AliVEventPool* fEventPool; // Pointer to the pool
4338f373 51 AliAODEvent** fEventBuffer; // The event buffer
52 ClassDef(AliMultiAODInputHandler, 1);
53};
54
55#endif