forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TPySelector.h
71 lines (54 loc) · 1.98 KB
/
TPySelector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Author: Wim Lavrijsen March 2008
#ifndef ROOT_TPySelector
#define ROOT_TPySelector
//////////////////////////////////////////////////////////////////////////////
// //
// TPySelector //
// //
// Python base class equivalent of PROOF TSelector. //
// //
//////////////////////////////////////////////////////////////////////////////
//- ROOT
#ifndef ROOT_TSelector
#include "TSelector.h"
#endif
#ifndef ROOT_TTree
#include "TTree.h"
#endif
// Python
struct _object;
typedef _object PyObject;
class TPySelector : public TSelector {
public:
using TSelector::fStatus;
// using TSelector::fAbort;
using TSelector::fOption;
using TSelector::fObject;
using TSelector::fInput;
using TSelector::fOutput;
public:
TTree* fChain;
public:
// ctor/dtor ... cctor and assignment are private in base class
TPySelector( TTree* /* tree */ = 0, PyObject* self = 0 );
virtual ~TPySelector();
// TSelector set of forwarded (overridden) methods
virtual Int_t Version() const;
virtual Int_t GetEntry( Long64_t entry, Int_t getall = 0 );
virtual Bool_t Notify();
virtual void Init( TTree* tree );
virtual void Begin( TTree* tree = 0 /* not used */ );
virtual void SlaveBegin( TTree* tree );
virtual Bool_t Process( Long64_t entry );
virtual void SlaveTerminate();
virtual void Terminate();
virtual void Abort( const char* why, EAbort what = kAbortProcess );
ClassDef( TPySelector, 1 ); //Python equivalent base class for PROOF
private:
// private helpers for forwarding to python
void SetupPySelf();
PyObject* CallSelf( const char* method, PyObject* pyobject = 0 );
private:
PyObject* fPySelf; //! actual python object
};
#endif