28 #ifndef ROOT_TMVA_Node
29 #define ROOT_TMVA_Node
50 std::ostream& operator<<( std::ostream& os,
const Node& node );
51 std::ostream& operator<<( std::ostream& os,
const Node* node );
59 friend std::ostream& operator << (std::ostream& os,
const Node& node);
61 friend std::ostream& operator << (std::ostream& os,
const Node* node);
69 Node( Node* p,
char pos );
72 Node(
const Node &n );
77 virtual Node* CreateNode()
const = 0;
80 virtual Bool_t GoesRight(
const Event& )
const = 0;
83 virtual Bool_t GoesLeft (
const Event& )
const = 0;
87 inline virtual Node* GetLeft ()
const {
return fLeft; }
88 inline virtual Node* GetRight ()
const {
return fRight; }
89 inline virtual Node* GetParent()
const {
return fParent; }
92 inline virtual void SetLeft (Node* l) { fLeft = l;}
93 inline virtual void SetRight (Node* r) { fRight = r;}
94 inline virtual void SetParent(Node* p) { fParent = p;}
97 Int_t CountMeAndAllDaughters()
const;
100 virtual void Print( std::ostream& os )
const = 0;
103 virtual void PrintRec ( std::ostream& os )
const = 0;
105 void* AddXMLTo(
void* parent)
const;
106 void ReadXML(
void* node, UInt_t tmva_Version_Code = TMVA_VERSION_CODE );
107 virtual void AddAttributesToNode(
void* node)
const = 0;
108 virtual void AddContentToNode(std::stringstream& s)
const = 0;
111 void SetDepth(UInt_t d){fDepth=d;}
114 UInt_t GetDepth()
const {
return fDepth;}
117 void SetPos(
char s) {fPos=s;}
120 char GetPos()
const {
return fPos;}
123 virtual TMVA::BinaryTree* GetParentTree()
const {
return fParentTree;}
126 virtual void SetParentTree(TMVA::BinaryTree* t) {fParentTree = t;}
130 virtual Bool_t ReadDataRecord( std::istream&, UInt_t tmva_Version_Code = TMVA_VERSION_CODE ) = 0;
131 virtual void ReadAttributes(
void* node, UInt_t tmva_Version_Code = TMVA_VERSION_CODE ) = 0;
132 virtual void ReadContent(std::stringstream& s) =0;
143 BinaryTree* fParentTree;
146 static Int_t fgCount;