#ifndef TMVA_ROOT_Event
#define TMVA_ROOT_Event
#include <vector>
#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
#ifndef ROOT_TMVA_VariableInfo
#include "TMVA/VariableInfo.h"
#endif
class TTree;
class TBranch;
namespace TMVA {
class Event;
ostream& operator<<( ostream& os, const Event& event );
ostream& operator<<( ostream& os, const Event* event );
class Event {
friend ostream& operator<<( ostream& os, const Event& event );
friend ostream& operator<<( ostream& os, const Event* event );
public:
Event( const std::vector<TMVA::VariableInfo>& );
Event( const Event& );
~Event() { fgCount--; }
void SetBranchAddresses(TTree* tr);
std::vector<TBranch*>& Branches() { return fBranches; }
Bool_t IsSignal() const { return (fType==1); }
Float_t GetWeight() const { return fWeight*fBoostWeight; }
Float_t GetBoostWeight() const { return fBoostWeight; }
Int_t Type() const { return fType; }
void SetWeight(Float_t w) { fWeight=w; }
void SetBoostWeight(Float_t w) { fBoostWeight=w; }
void SetType(Int_t t) { fType=t; }
void SetVal(UInt_t ivar, Float_t val);
void CopyVarValues( const Event& other );
Char_t VarType(Int_t ivar) const { return fVariables[ivar].VarType(); }
Bool_t IsInt(Int_t ivar) const { return (fVariables[ivar].VarType()=='I'); }
Bool_t IsFloat(Int_t ivar) const { return (fVariables[ivar].VarType()=='F'); }
Float_t GetVal(Int_t ivar) const { return *((Float_t*)fVarPtr[ivar]); }
Float_t GetValFloat(Int_t ivar) const { return *((Float_t*)fVarPtr[ivar]); }
Int_t GetValInt(Int_t ivar) const { return *((Int_t*)fVarPtr[ivar]); }
UInt_t GetNVars() const { return fVariables.size(); }
Float_t GetValueNormalized(Int_t ivar) const;
void Print(std::ostream & o) const;
private:
void InitPointers(bool AllowExternalLink = kTRUE);
const std::vector<TMVA::VariableInfo>& fVariables;
void ** fVarPtr;
Int_t * fVarPtrI;
Float_t* fVarPtrF;
Int_t fType;
Float_t fWeight;
Float_t fBoostWeight;
UInt_t fCountI;
UInt_t fCountF;
std::vector<TBranch*> fBranches;
mutable MsgLogger fLogger;
static Int_t fgCount;
};
}
#endif
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.