68 for (
UInt_t ivar=0; ivar<
e->GetNVariables(); ivar++)
fEventV.push_back(
e->GetValue(ivar));
69 for (std::vector<Float_t>::const_iterator it =
e->GetTargets().begin(); it < e->
GetTargets().end(); ++it ) {
102 if (
n.GetLeft() == 0 ) this->
SetLeft(NULL);
105 if (
n.GetRight() == 0 ) this->
SetRight(NULL);
153 os <<
"< *** " << std::endl <<
" node.Data: ";
154 std::vector<Float_t>::const_iterator it=
fEventV.begin();
155 os <<
fEventV.size() <<
" vars: ";
156 for (;it!=
fEventV.end(); ++it) os <<
" " << std::setw(10) << *it;
157 os <<
" EvtWeight " << std::setw(10) <<
fWeight;
158 os << std::setw(10) <<
"Class: " <<
GetClass() << std::endl;
160 os <<
"Selector: " << this->
GetSelector() <<std::endl;
161 os <<
"My address is " << (
Longptr_t)
this <<
", ";
166 os <<
" **** > "<< std::endl;
175 <<
" data: " << std::endl;
176 std::vector<Float_t>::const_iterator it=
fEventV.begin();
177 os <<
fEventV.size() <<
" vars: ";
178 for (;it!=
fEventV.end(); ++it) os <<
" " << std::setw(10) << *it;
179 os <<
" EvtWeight " << std::setw(10) <<
fWeight;
180 os << std::setw(10) <<
"Class: " <<
GetClass() << std::endl;
193 UInt_t depth, selIdx, nvar;
200 if ( itmp==-1 ) {
return kFALSE; }
212 for (
UInt_t ivar=0; ivar<nvar; ivar++) {
213 is >> evtValFloat;
fEventV.push_back(evtValFloat);
217 fClass = (sigbkgd==
"S" || sigbkgd==
"Signal")?0:1;
231 if (sb==
"Signal" || sb==
"0")
259 std::ios_base::fmtflags ff = s.flags();
275 while (s >> temp)
fTargets.push_back(temp);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Node for the BinarySearch or Decision Trees.
virtual Bool_t ReadDataRecord(std::istream &is, UInt_t tmva_Version_Code=262657)
Read the data block.
std::vector< Float_t > fTargets
virtual void PrintRec(std::ostream &os) const
recursively print the node and its daughters (--> print the 'tree')
std::vector< Float_t > fEventV
virtual void ReadContent(std::stringstream &s)
read events from node
virtual Bool_t GoesLeft(const Event &) const
check if the event fed into the node goes/descends to the left daughter
virtual ~BinarySearchTreeNode()
node destructor
virtual Bool_t EqualsMe(const Event &) const
check if the event fed into the node actually equals the event that forms the node (in case of a sear...
virtual void Print(std::ostream &os) const
print the node
virtual void AddAttributesToNode(void *node) const
adding attributes to tree node
BinarySearchTreeNode(const Event *e=nullptr, UInt_t signalClass=0)
constructor of a node for the search tree
Short_t fSelector
index of variable used in node selection (decision tree)
virtual void ReadAttributes(void *node, UInt_t tmva_Version_Code=262657)
read attributes from XML
const std::vector< Float_t > & GetTargets() const
void SetSelector(Short_t i)
set index of variable used for discrimination at this node
Float_t GetWeight() const
const std::vector< Float_t > & GetEventV() const
virtual Bool_t GoesRight(const Event &) const
check if the event fed into the node goes/descends to the right daughter
Short_t GetSelector() const
return index of variable used for discrimination at this node
virtual void AddContentToNode(std::stringstream &s) const
adding attributes to tree node
virtual Node * GetLeft() const
virtual Node * GetParent() const
virtual void SetRight(Node *r)
virtual void SetLeft(Node *l)
virtual void SetParent(Node *p)
virtual Node * GetRight() const
create variable transformations