61 fTargets (
std::vector<Float_t>() ),
62 fWeight ( e==0?0:e->GetWeight() ),
67 for (
UInt_t ivar=0; ivar<e->GetNVariables(); ivar++) fEventV.push_back(e->GetValue(ivar));
68 for (std::vector<Float_t>::const_iterator it = e->GetTargets().begin(); it < e->GetTargets().end(); it++ ) {
69 fTargets.push_back( (*it) );
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 " << long(
this) <<
", ";
162 if (this->
GetLeft() !=
NULL) os <<
" left daughter at addr: " << long(this->
GetLeft());
165 os <<
" **** > "<< std::endl;
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;
192 UInt_t depth, selIdx, nvar;
199 if ( itmp==-1 ) {
return kFALSE; }
211 for (
UInt_t ivar=0; ivar<nvar; ivar++) {
212 is >> evtValFloat;
fEventV.push_back(evtValFloat);
216 fClass = (sigbkgd==
"S" || sigbkgd==
"Signal")?0:1;
230 if (sb==
"Signal" || sb==
"0")
258 std::ios_base::fmtflags ff = s.flags();
274 while (s >> temp)
fTargets.push_back(temp);
virtual void PrintRec(std::ostream &os) const
recursively print the node and its daughters (–> print the 'tree')
virtual Bool_t GoesRight(const Event &) const
check if the event fed into the node goes/decends to the right daughter
virtual void PrintRec(std::ostream &os) const =0
virtual Bool_t GoesLeft(const Event &) const
check if the event fed into the node goes/decends to the left daughter
std::vector< Float_t > fTargets
virtual void SetRight(Node *r)
virtual void SetLeft(Node *l)
virtual Bool_t ReadDataRecord(std::istream &is, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)
Read the data block.
virtual Node * GetRight() const
std::vector< Float_t > fEventV
virtual Node * GetLeft() const
void SetSelector(Short_t i)
virtual void AddContentToNode(std::stringstream &s) const
adding attributes to tree node
virtual ~BinarySearchTreeNode()
node destructor
virtual Node * GetParent() const
virtual void ReadAttributes(void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)
read attributes from XML
virtual void SetParent(Node *p)
Float_t GetValue(UInt_t ivar) const
return value of i'th variable
virtual void AddAttributesToNode(void *node) const
adding attributes to tree node
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...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
BinarySearchTreeNode(const Event *e=NULL, UInt_t signalClass=0)
constructor of a node for the search tree
const std::vector< Float_t > & GetEventV() const
Abstract ClassifierFactory template that handles arbitrary types.
virtual void Print(std::ostream &os) const
print the node
Short_t GetSelector() const
virtual void ReadContent(std::stringstream &s)
read events from node