60 fEventV ( std::vector<
Float_t>() ),
61 fTargets ( std::vector<
Float_t>() ),
62 fWeight (
e==0?0:
e->GetWeight() ),
68 for (std::vector<Float_t>::const_iterator it =
e->GetTargets().begin(); it <
e->GetTargets().end(); ++it ) {
79 fEventV ( std::vector<
Float_t>() ),
80 fTargets ( std::vector<
Float_t>() ),
94 fEventV (
n.fEventV ),
95 fTargets (
n.fTargets ),
96 fWeight (
n.fWeight ),
98 fSelector(
n.fSelector )
121 if (
e.GetValue(fSelector) > GetEventV()[fSelector])
return true;
130 if (
e.GetValue(fSelector) <= GetEventV()[fSelector])
return true;
141 for (
UInt_t i=0; i<GetEventV().size(); i++) {
142 result&= (
e.GetValue(i) == GetEventV()[i]);
152 os <<
"< *** " << std::endl <<
" node.Data: ";
153 std::vector<Float_t>::const_iterator it=fEventV.begin();
154 os << fEventV.size() <<
" vars: ";
155 for (;it!=fEventV.end(); ++it) os <<
" " << std::setw(10) << *it;
156 os <<
" EvtWeight " << std::setw(10) << fWeight;
157 os << std::setw(10) <<
"Class: " << GetClass() << std::endl;
159 os <<
"Selector: " << this->GetSelector() <<std::endl;
160 os <<
"My address is " << (
Longptr_t)
this <<
", ";
161 if (this->GetParent() !=
NULL) os <<
" parent at addr: " << (
Longptr_t)this->GetParent();
162 if (this->GetLeft() !=
NULL) os <<
" left daughter at addr: " << (
Longptr_t)this->GetLeft();
163 if (this->GetRight() !=
NULL) os <<
" right daughter at addr: " << (
Longptr_t)this->GetRight();
165 os <<
" **** > "<< std::endl;
173 os << this->GetDepth() <<
" " << this->GetPos() <<
" " << this->GetSelector()
174 <<
" data: " << std::endl;
175 std::vector<Float_t>::const_iterator it=fEventV.begin();
176 os << fEventV.size() <<
" vars: ";
177 for (;it!=fEventV.end(); ++it) os <<
" " << std::setw(10) << *it;
178 os <<
" EvtWeight " << std::setw(10) << fWeight;
179 os << std::setw(10) <<
"Class: " << GetClass() << std::endl;
181 if (this->GetLeft() !=
NULL)this->GetLeft()->PrintRec(os) ;
182 if (this->GetRight() !=
NULL)this->GetRight()->PrintRec(os);
203 this->SetDepth(
depth);
205 this->SetSelector(
selIdx);
214 is >> tmp >> fWeight;
230 if (
sb==
"Signal" ||
sb==
"0")
237 fEventV.resize(nvars);
258 std::ios_base::fmtflags
ff = s.flags();
260 for (
UInt_t i=0; i<fEventV.size(); i++) s << std::scientific <<
" " << fEventV[i];
261 for (
UInt_t i=0; i<fTargets.size(); i++) s << std::scientific <<
" " << fTargets[i];
270 for (
UInt_t i=0; i<fEventV.size(); i++){
274 while (s >> temp) fTargets.push_back(temp);
long Longptr_t
Integer large enough to hold a pointer (platform-dependent)
char Char_t
Character 1 byte (char)
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
float Float_t
Float 4 bytes (float)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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.
std::vector< Float_t > fTargets
void PrintRec(std::ostream &os) const override
recursively print the node and its daughters (--> print the 'tree')
std::vector< Float_t > fEventV
virtual ~BinarySearchTreeNode()
node destructor
Bool_t GoesLeft(const Event &) const override
check if the event fed into the node goes/descends to the left daughter
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...
void ReadAttributes(void *node, UInt_t tmva_Version_Code=262657) override
read attributes from XML
BinarySearchTreeNode(const Event *e=nullptr, UInt_t signalClass=0)
constructor of a node for the search tree
Bool_t ReadDataRecord(std::istream &is, UInt_t tmva_Version_Code=262657) override
Read the data block.
Bool_t GoesRight(const Event &) const override
check if the event fed into the node goes/descends to the right daughter
void AddContentToNode(std::stringstream &s) const override
adding attributes to tree node
void AddAttributesToNode(void *node) const override
adding attributes to tree node
void Print(std::ostream &os) const override
print the node
void ReadContent(std::stringstream &s) override
read events from node
Node for the BinarySearch or Decision Trees.
virtual void SetRight(Node *r)
virtual void SetLeft(Node *l)
virtual void SetParent(Node *p)
create variable transformations