AliRoot Core  3dc7879 (3dc7879)
AliMultiEventInputHandler.h
Go to the documentation of this file.
1 #ifndef ALIMULTIEVENTINPUTHANDLER_H
2 #define ALIMULTIEVENTINPUTHANDLER_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
12 
13 #include "AliInputEventHandler.h"
14 class AliVEventPool;
15 class AliVEvent;
16 
18 
19  public:
21  AliMultiEventInputHandler(Int_t size, Int_t format = 1);
22  AliMultiEventInputHandler(const char* name, const char* title, Int_t size, Int_t format = 1);
24  void SetBufferSize(Int_t size) {fBufferSize = size;}
25  void SetEventPool(AliVEventPool* pool) {fEventPool = pool;}
26  Int_t GetBufferSize() const {return fBufferSize;}
27  Int_t GetNBuffered() const {return fNBuffered;}
28  Bool_t IsBufferReady() const {return (fNBuffered >= (fBufferSize -1));}
29  Bool_t IsFreshBuffer() const {return (fIndex == (fBufferSize - 1));}
31  virtual AliVEvent *GetEvent() const {return GetLatestEvent();}
32  virtual AliVEvent *GetEvent(Int_t iev) const;
34  Int_t GetFormat() { return fFormat ;}
35  void EventSkipped() {fEventSkipped = kTRUE;}
36  // From the interface
37  virtual Bool_t Init(Option_t* /*opt*/) {return kTRUE;}
38  virtual Bool_t Init(TTree* tree, Option_t* /*opt*/);
39  virtual Bool_t FinishEvent();
40  virtual Bool_t BeginEvent(Long64_t /*entry*/);
41  virtual Bool_t Notify() { return AliInputEventHandler::Notify();}
42  virtual Bool_t Notify(const char */*path*/);
43  private:
46  private:
47  Int_t fBufferSize;
48  Int_t fFormat;
49  Int_t fNBuffered;
50  Int_t fIndex;
51  Int_t fCurrentBin;
52  Int_t fCurrentEvt;
53  Bool_t fInit;
56  Bool_t fEventSkipped;
57  ClassDef(AliMultiEventInputHandler, 1);
58 };
59 
60 #endif
Bool_t fEventSkipped
User requires event to be skip.
Multi VEvent Input Handler realisation of the AliVEventHandler interface.
AliVEventPool * fEventPool
Pointer to the pool.
virtual Bool_t BeginEvent(Long64_t)
void SetEventPool(AliVEventPool *pool)
AliVEventPool * GetEventPool() const
AliVEvent ** fEventBuffer
! The event buffer
TTree * tree
virtual Bool_t Init(Option_t *)
virtual AliVEvent * GetEvent() const
Int_t fCurrentBin
Current bin from the pool.
AliMultiEventInputHandler & operator=(const AliMultiEventInputHandler &handler)
Int_t fBufferSize
Size of the buffer.
Int_t fIndex
Pointer to most recent event.
Int_t fNBuffered
Number of events actually buffered.