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