CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Attributes

Var Class Reference

List of all members.

Public Member Functions

void fill (TaggingVariableList &list)
 Var (char type, TTree *tree, const char *name)

Static Public Member Functions

static bool order (const boost::shared_ptr< Var > &a, const boost::shared_ptr< Var > &b)

Private Attributes

double D
std::vector< double > d
int I
std::vector< int > i
void * indirect
char type
TaggingVariableName var

Detailed Description

Definition at line 107 of file JetTagMVATreeTrainer.cc.


Constructor & Destructor Documentation

Var::Var ( char  type,
TTree *  tree,
const char *  name 
) [inline]

Definition at line 109 of file JetTagMVATreeTrainer.cc.

References funct::D, Exhume::I, and i.

                                                      :
                type(type), var(getTaggingVariableName(name))
        {
                switch(type) {
                    case 'D':
                        tree->SetBranchAddress(name, &D);
                        break;
                    case 'I':
                        tree->SetBranchAddress(name, &I);
                        break;
                    case 'd':
                        indirect = &d;
                        tree->SetBranchAddress(name, &indirect);
                        break;
                    case 'i':
                        indirect = &i;
                        tree->SetBranchAddress(name, &indirect);
                        break;
                }
        }

Member Function Documentation

void Var::fill ( TaggingVariableList list) [inline]

Definition at line 130 of file JetTagMVATreeTrainer.cc.

References funct::D, Exhume::I, i, reco::TaggingVariableList::insert(), and L1TEmulatorMonitor_cff::p.

        {
                switch(type) {
                    case 'D':
                        list.insert(var, D, true);
                        break;
                    case 'I':
                        list.insert(var, I, true);
                        break;
                    case 'd':
                        for(std::vector<double>::const_iterator p = d.begin();
                            p != d.end(); p++)
                                list.insert(var, *p, true);
                        break;
                    case 'i':
                        for(std::vector<int>::const_iterator p = i.begin();
                            p != i.end(); p++)
                                list.insert(var, *p, true);
                        break;
                }
        }       
static bool Var::order ( const boost::shared_ptr< Var > &  a,
const boost::shared_ptr< Var > &  b 
) [inline, static]

Definition at line 152 of file JetTagMVATreeTrainer.cc.

Referenced by JetTagMVATreeTrainer::analyze().

        { return a->var < b->var; }

Member Data Documentation

double Var::D [private]

Definition at line 159 of file JetTagMVATreeTrainer.cc.

std::vector<double> Var::d [private]

Definition at line 161 of file JetTagMVATreeTrainer.cc.

int Var::I [private]

Definition at line 160 of file JetTagMVATreeTrainer.cc.

std::vector<int> Var::i [private]

Definition at line 162 of file JetTagMVATreeTrainer.cc.

void* Var::indirect [private]

Definition at line 163 of file JetTagMVATreeTrainer.cc.

char Var::type [private]

Definition at line 157 of file JetTagMVATreeTrainer.cc.

Definition at line 158 of file JetTagMVATreeTrainer.cc.