CMS 3D CMS Logo

IgNTupleRep Class Reference

#include <Iguana/Models/interface/IgNTupleRep.h>

Inheritance diagram for IgNTupleRep:

IgRep

List of all members.

Public Types

typedef std::string ColumnName
typedef std::vector< ColumnNameColumnNames
typedef std::vector< double > Row

Public Member Functions

virtual void addRow (const Row &values)
virtual void clear (void)
virtual const ColumnNamescolumnNames (void) const
virtual void columnNames (const ColumnNames &names)
virtual IgRepContextcontext (void) const
virtual void copy (const IgNTupleRep &source)
virtual bool empty (void) const
virtual const RowgetRow (unsigned int row) const
 IgNTupleRep (IgNTupleModel *model)
virtual IgModelmodel (void) const
virtual int rows (void) const
virtual double valueAt (unsigned int column, unsigned int row) const

Protected Member Functions

virtual void context (IgRepContext *context)

Private Types

typedef std::map< ColumnName,
unsigned int
ColumnNamesMap
typedef std::deque< RowRows

Private Attributes

ColumnNames m_columnNames
ColumnNamesMap m_columnNamesMap
IgRepContextm_context
IgNTupleModelm_model
Rows m_rows


Detailed Description

Definition at line 25 of file IgNTupleRep.h.


Member Typedef Documentation

typedef std::string IgNTupleRep::ColumnName

Definition at line 28 of file IgNTupleRep.h.

typedef std::vector<ColumnName> IgNTupleRep::ColumnNames

Definition at line 29 of file IgNTupleRep.h.

typedef std::map<ColumnName, unsigned int> IgNTupleRep::ColumnNamesMap [private]

Definition at line 57 of file IgNTupleRep.h.

typedef std::vector<double> IgNTupleRep::Row

Definition at line 30 of file IgNTupleRep.h.

typedef std::deque<Row> IgNTupleRep::Rows [private]

Definition at line 58 of file IgNTupleRep.h.


Constructor & Destructor Documentation

IgNTupleRep::IgNTupleRep ( IgNTupleModel model  ) 

Definition at line 18 of file IgNTupleRep.cc.

00019     : IgRep (),
00020       m_model (model),
00021       m_context (0)
00022 {
00023 }


Member Function Documentation

void IgNTupleRep::addRow ( const Row values  )  [virtual]

Definition at line 33 of file IgNTupleRep.cc.

References m_rows.

00034 {    
00035     m_rows.push_back (row);
00036 }

void IgNTupleRep::clear ( void   )  [virtual]

Definition at line 39 of file IgNTupleRep.cc.

References m_rows.

00040 {
00041     m_rows.resize (0);
00042 }

const IgNTupleRep::ColumnNames & IgNTupleRep::columnNames ( void   )  const [virtual]

Definition at line 100 of file IgNTupleRep.cc.

References m_columnNames.

00101 {
00102     return m_columnNames;    
00103 }

void IgNTupleRep::columnNames ( const ColumnNames names  )  [virtual]

Definition at line 84 of file IgNTupleRep.cc.

References i, j, m_columnNames, and m_columnNamesMap.

00085 {
00086     int j = 0;
00087     m_columnNames.resize (names.size ());
00088     
00089     for (ColumnNames::const_iterator i = names.begin ();
00090          i != names.end ();     
00091          i++)
00092     {
00093         m_columnNames[j] = *i;  
00094         m_columnNamesMap[*i] = j;
00095         j++;    
00096     }
00097 }

void IgNTupleRep::context ( IgRepContext context  )  [protected, virtual]

Implements IgRep.

Definition at line 72 of file IgNTupleRep.cc.

References m_context.

00073 {
00074     m_context = context;    
00075 }

IgRepContext * IgNTupleRep::context ( void   )  const [virtual]

Implements IgRep.

Definition at line 66 of file IgNTupleRep.cc.

References m_context.

00067 {
00068     return m_context;    
00069 }

void IgNTupleRep::copy ( const IgNTupleRep source  )  [virtual]

Definition at line 26 of file IgNTupleRep.cc.

References m_rows.

00027 {
00028     m_rows = source.m_rows;    
00029 }

bool IgNTupleRep::empty ( void   )  const [virtual]

Definition at line 58 of file IgNTupleRep.cc.

References m_rows.

00059 {
00060     if (m_rows.size () > 0)
00061         return false;
00062     return true;    
00063 }

const IgNTupleRep::Row & IgNTupleRep::getRow ( unsigned int  row  )  const [virtual]

Definition at line 45 of file IgNTupleRep.cc.

References m_rows.

00046 {
00047     return m_rows[row];
00048 }

IgModel * IgNTupleRep::model ( void   )  const [virtual]

Implements IgRep.

Definition at line 78 of file IgNTupleRep.cc.

References m_model.

00079 {
00080     return m_model;
00081 }

int IgNTupleRep::rows ( void   )  const [virtual]

Definition at line 106 of file IgNTupleRep.cc.

References m_rows.

00107 {
00108     return m_rows.size ();    
00109 }

double IgNTupleRep::valueAt ( unsigned int  column,
unsigned int  row 
) const [virtual]

Definition at line 51 of file IgNTupleRep.cc.

References m_rows.

00053 {
00054     return m_rows[row][column];    
00055 }


Member Data Documentation

ColumnNames IgNTupleRep::m_columnNames [private]

Definition at line 59 of file IgNTupleRep.h.

Referenced by columnNames().

ColumnNamesMap IgNTupleRep::m_columnNamesMap [private]

Definition at line 60 of file IgNTupleRep.h.

Referenced by columnNames().

IgRepContext* IgNTupleRep::m_context [private]

Definition at line 63 of file IgNTupleRep.h.

Referenced by context().

IgNTupleModel* IgNTupleRep::m_model [private]

Definition at line 62 of file IgNTupleRep.h.

Referenced by model().

Rows IgNTupleRep::m_rows [private]

Definition at line 61 of file IgNTupleRep.h.

Referenced by addRow(), clear(), copy(), empty(), getRow(), rows(), and valueAt().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:18 2009 for CMSSW by  doxygen 1.5.4