73 fDepth( p->GetDepth() + 1),
74 fParentTree(p->GetParentTree())
119 if (this->GetLeft() !=
NULL)
120 n+= this->GetLeft()->CountMeAndAllDaughters();
121 if (this->GetRight() !=
NULL)
122 n+= this->GetRight()->CountMeAndAllDaughters();
151 std::stringstream s(
"");
156 this->AddAttributesToNode(node);
157 if (this->GetLeft()) this->GetLeft()->AddXMLTo(node);
158 if (this->GetRight()) this->GetRight()->AddXMLTo(node);
167 ReadAttributes(node, tmva_Version_Code);
170 std::stringstream s(content);
178 Node*
n = CreateNode();
179 n->
ReadXML(ch, tmva_Version_Code);
180 if (n->
GetPos()==
'l') { this->SetLeft(n); }
181 else if(n->
GetPos()==
'r') { this->SetRight(n); }
183 std::cout <<
"neither left nor right" << std::endl;
void * AddXMLTo(void *parent) const
add attributes to XML
int GetCount()
retuns the global number of instantiated nodes
virtual void SetRight(Node *r)
virtual ~Node()
node destructor
virtual void SetLeft(Node *l)
void ReadXML(void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)
read attributes from XML
virtual void Print(std::ostream &os) const =0
std::ostream & operator<<(std::ostream &os, const BinaryTree &tree)
print the tree recursinvely using the << operator
Int_t CountMeAndAllDaughters() const
recursively go through the part of the tree below this node and count all daughters ...