CMS 3D CMS Logo

Public Member Functions | Protected Attributes

Splitter Class Reference

#include <CachingVariable.h>

Inheritance diagram for Splitter:
CachingVariable VarSplitter

List of all members.

Public Member Functions

virtual CachingVariable::evalType eval (const edm::Event &iEvent) const =0
const std::string & label (unsigned int i) const
unsigned int maxIndex () const
virtual unsigned int maxSlots () const
const std::string shortLabel (unsigned int i) const
 Splitter (std::string method, std::string n, const edm::ParameterSet &iConfig)

Protected Attributes

std::vector< std::string > labels_
std::vector< std::string > short_labels_

Detailed Description

Definition at line 157 of file CachingVariable.h.


Constructor & Destructor Documentation

Splitter::Splitter ( std::string  method,
std::string  n,
const edm::ParameterSet iConfig 
) [inline]

Definition at line 159 of file CachingVariable.h.

                                                                           :
    CachingVariable(method,n,iConfig) {}

Member Function Documentation

virtual CachingVariable::evalType Splitter::eval ( const edm::Event iEvent) const [pure virtual]

Reimplemented from CachingVariable.

Implemented in VarSplitter.

const std::string& Splitter::label ( unsigned int  i) const [inline]

Definition at line 176 of file CachingVariable.h.

References CachingVariable::conf_, edm::ParameterSet::dump(), i, and labels_.

Referenced by SplittingConfigurableHisto::complete(), and SplittingConfigurableHisto::SplittingConfigurableHisto().

                                               { 
    if (i>=labels_.size()){
      edm::LogError("Splitter")<<"trying to access slots label at index: "<<i<<"while of size: "<<labels_.size()<<"\n"<<conf_.dump();
      return labels_.back(); }
    else return labels_[i];}
unsigned int Splitter::maxIndex ( ) const [inline]

Definition at line 165 of file CachingVariable.h.

References maxSlots().

Referenced by VarSplitter::eval().

{ return maxSlots()-1;}
virtual unsigned int Splitter::maxSlots ( ) const [inline, virtual]

Reimplemented in VarSplitter.

Definition at line 168 of file CachingVariable.h.

References labels_.

Referenced by maxIndex(), and SplittingConfigurableHisto::SplittingConfigurableHisto().

{ return labels_.size();}
const std::string Splitter::shortLabel ( unsigned int  i) const [inline]

Definition at line 170 of file CachingVariable.h.

References CachingVariable::conf_, edm::ParameterSet::dump(), i, and short_labels_.

Referenced by SplittingConfigurableHisto::SplittingConfigurableHisto().

                                                  { 
    if (i>=short_labels_.size()){
      edm::LogError("Splitter")<<"trying to access slots short_label at index: "<<i<<"while of size: "<<short_labels_.size()<<"\n"<<conf_.dump();
      return short_labels_.back(); }
    else  return short_labels_[i];}

Member Data Documentation

std::vector<std::string> Splitter::labels_ [protected]

Definition at line 183 of file CachingVariable.h.

Referenced by label(), maxSlots(), and VarSplitter::VarSplitter().

std::vector<std::string> Splitter::short_labels_ [protected]

Definition at line 184 of file CachingVariable.h.

Referenced by shortLabel(), and VarSplitter::VarSplitter().