]>
Commit | Line | Data |
---|---|---|
67427ff7 | 1 | //////////////////////////////////////////////////////////////////////////////// |
2 | /// AliFemtoEventReader - the pure virtual base class for the event reader /// | |
3 | /// All event readers must inherit from this one /// | |
4 | //////////////////////////////////////////////////////////////////////////////// | |
ea77036b | 5 | #ifndef ALIFEMTOEVENTREADER_H |
6 | #define ALIFEMTOEVENTREADER_H | |
7 | ||
67427ff7 | 8 | class AliFemtoEvent; |
9 | class AliFemtoEventCut; | |
10 | class AliFemtoTrackCut; | |
11 | class AliFemtoV0Cut; | |
12 | class AliFemtoXiCut; | |
13 | class AliFemtoKinkCut; | |
14 | ||
ea77036b | 15 | #include "AliFemtoString.h" |
67427ff7 | 16 | #include <iostream> |
17 | #include <fstream> | |
18 | #include <stdio.h> | |
67427ff7 | 19 | |
ea77036b | 20 | using namespace std; |
67427ff7 | 21 | |
22 | class AliFemtoEventReader { | |
0215f606 | 23 | |
24 | public: | |
67427ff7 | 25 | // even tho it's only a base class and never constructed, if you don't have an implementation, |
26 | // you get "AliFemtoEventReader type_info node" upon dynamical loading | |
0215f606 | 27 | AliFemtoEventReader() : fEventCut(0), fTrackCut(0), fV0Cut(0), fXiCut(0), fKinkCut(0), fReaderStatus(0), fDebug(1) { /* no-op */ }; |
28 | AliFemtoEventReader(const AliFemtoEventReader& aReader); | |
67427ff7 | 29 | virtual ~AliFemtoEventReader(){/* no-op */} |
30 | ||
0215f606 | 31 | AliFemtoEventReader& operator=(const AliFemtoEventReader& aReader); |
32 | ||
67427ff7 | 33 | virtual AliFemtoEvent* ReturnHbtEvent() =0; |
34 | ||
35 | virtual AliFemtoString Report(); // user-written method to return string describing reader | |
36 | // Including whatever "early" cuts are being done | |
37 | ||
38 | // this next method does NOT need to be implemented, in which case the | |
39 | // "default" method below is executed | |
40 | virtual int WriteHbtEvent(AliFemtoEvent*){cout << "No WriteHbtEvent implemented\n"; return (0);} | |
41 | ||
42 | // these next two are optional but would make sense for, e.g., opening and closing a file | |
fcda1d4e | 43 | virtual int Init(const char* ReadWrite, AliFemtoString& Message); |
67427ff7 | 44 | virtual void Finish(){/*no-op*/}; |
fcda1d4e | 45 | |
ea77036b | 46 | int Status() const {return fReaderStatus;} // AliFemtoManager looks at this for guidance if it gets null pointer from ReturnHbtEvent |
67427ff7 | 47 | |
48 | virtual void SetEventCut(AliFemtoEventCut* ecut); | |
49 | virtual void SetTrackCut(AliFemtoTrackCut* pcut); | |
50 | virtual void SetV0Cut(AliFemtoV0Cut* pcut); | |
51 | virtual void SetXiCut(AliFemtoXiCut* pcut); | |
52 | virtual void SetKinkCut(AliFemtoKinkCut* pcut); | |
53 | virtual AliFemtoEventCut* EventCut(); | |
54 | virtual AliFemtoTrackCut* TrackCut(); | |
55 | virtual AliFemtoV0Cut* V0Cut(); | |
56 | virtual AliFemtoXiCut* XiCut(); | |
57 | virtual AliFemtoKinkCut* KinkCut(); | |
58 | ||
59 | /* control of debug informations print out, my rule is: */ | |
60 | /* 0: no output at all */ | |
61 | /* 1: once (e.g. in constructor, finsh */ | |
62 | /* 2: once per event */ | |
63 | /* 3: once per track */ | |
64 | /* 4: once per pair */ | |
ea77036b | 65 | int Debug() const {return fDebug;} |
67427ff7 | 66 | void SetDebug(int d){fDebug=d;} |
67 | ||
68 | protected: | |
69 | AliFemtoEventCut* fEventCut; //! link to the front-loaded event cut | |
70 | AliFemtoTrackCut* fTrackCut; //! link to the front-loaded track cut | |
71 | AliFemtoV0Cut* fV0Cut; //! link to the front-loaded V0 cut | |
72 | AliFemtoXiCut* fXiCut; //! link to the front-loaded Xi cut | |
73 | AliFemtoKinkCut* fKinkCut; //! link to the front-loaded Kink cut | |
74 | int fReaderStatus; // 0="good" | |
75 | int fDebug; // Debug information level | |
76 | #ifdef __ROOT__ | |
77 | ClassDef(AliFemtoEventReader,0) | |
78 | #endif | |
79 | }; | |
80 | ||
67427ff7 | 81 | #endif |
82 |