Moved AliRefArray from STEER to STEERBase
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveHLTEventManagerOffline.cxx
CommitLineData
30e7579c 1// Author: 2010 Svein Lindal <slindal@fys.uio.no> *
2// for The ALICE HLT Project. *
3
4#include "AliHLTEveHLT.h"
5#include "AliHLTEvePhos.h"
6#include "AliHLTEveEmcal.h"
7#include "TEveManager.h"
8
9#include "AliESDEvent.h"
10#include "AliEveHLTEventManager.h"
11#include "AliEveEventBufferOffline.h"
12#include "AliEveHLTEventManagerOffline.h"
13
14
15ClassImp(AliEveHLTEventManagerOffline)
16
17AliEveHLTEventManagerOffline::AliEveHLTEventManagerOffline() :
18 AliEveHLTEventManager(),
19 fEvent(NULL),
20 fEventBuffer(NULL)
21{
22 // see header file for class documentation
23 // or
24 // refer to README to build package
25 // or
26 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
27
28}
29
30AliEveHLTEventManagerOffline::AliEveHLTEventManagerOffline(TString filename) :
31 AliEveHLTEventManager(),
32 fEvent(NULL),
33 fEventBuffer(NULL)
34{
35 // see header file for class documentation
36 // or
37 // refer to README to build package
38 // or
39 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
40
41 fEventBuffer = new AliEveEventBufferOffline(filename);
42}
43
44AliEveHLTEventManagerOffline::~AliEveHLTEventManagerOffline() {
45
46 //DestroyElements();
47 //DestroyDetectorElements();
48
49 if(fEvent)
50 delete fEvent;
51 fEvent = NULL;
52
53 if(fEventBuffer)
54 delete fEventBuffer;
55 fEventBuffer = NULL;
56
57}
58
59void AliEveHLTEventManagerOffline::NextEvent() {
60 //See header file for documentation
61 fEvent = dynamic_cast<AliESDEvent*>(fEventBuffer->NextEvent());
62 if(fEvent) {
63 //Int_t eventId = fBuffer->GetEventId();
64 ProcessEvent(fEvent);
65 } else {
66 cout << "couldn't get the event"<<endl;
67 }
68}
69
70void AliEveHLTEventManagerOffline::NavigateFwd() {
71 //See header file for documentation
72 fEvent = dynamic_cast<AliESDEvent*>(fEventBuffer->Fwd());
73 if(fEvent) {
74 ProcessEvent(fEvent);
75 } else {
76 cout << "couldn't get the fwd event"<<endl;
77 }
78}
79
80void AliEveHLTEventManagerOffline::NavigateBack() {
81 //See header file for documentation
82 fEvent = dynamic_cast<AliESDEvent*>(fEventBuffer->Back());
83 if(fEvent) {
84 ProcessEvent(fEvent);
85 } else {
86 cout << "couldn't get the back event"<<endl;
87 }
88}
89