CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
Splitter Class Referenceabstract

#include <CachingVariable.h>

Inheritance diagram for Splitter:
CachingVariable VarSplitter

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, edm::ConsumesCollector &iC)
 
- Public Member Functions inherited from CachingVariable
void addDescriptionLine (const std::string &s)
 
 CachingVariable (std::string m, std::string n, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
 
bool compute (const edm::Event &iEvent) const
 
const Descriptiondescription () const
 
const std::string & holderName () const
 
const std::string & method () const
 
const std::string & name () const
 
valueType operator() (const edm::Event &iEvent) const
 
void print () const
 
void setHolder (std::string hn) const
 
virtual ~CachingVariable ()
 

Protected Attributes

std::vector< std::string > labels_
 
std::vector< std::string > short_labels_
 
- Protected Attributes inherited from CachingVariable
evalType cache_
 
edm::ParameterSet conf_
 
Description d_
 
edm::Event::CacheIdentifier_t eventCacheID_ =0
 
std::string holderName_
 
std::string method_
 
std::string name_
 

Additional Inherited Members

- Public Types inherited from CachingVariable
typedef std::pair< bool,
valueType
evalType
 
typedef double valueType
 
typedef std::map< std::string,
const CachingVariable * > 
vMap
 
- Protected Member Functions inherited from CachingVariable
evalTypebaseEval (const edm::Event &iEvent) const
 
bool notSeenThisEventAlready (const edm::Event &iEvent) const
 
void setCache (valueType &v) const
 
void setNotCompute () const
 

Detailed Description

Definition at line 177 of file CachingVariable.h.

Constructor & Destructor Documentation

Splitter::Splitter ( std::string  method,
std::string  n,
const edm::ParameterSet iConfig,
edm::ConsumesCollector iC 
)
inline

Definition at line 179 of file CachingVariable.h.

179  :
180  CachingVariable(method,n,iConfig,iC) {}
CachingVariable(std::string m, std::string n, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
const std::string & method() const

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 196 of file CachingVariable.h.

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

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

196  {
197  if (i>=labels_.size()){
198  edm::LogError("Splitter")<<"trying to access slots label at index: "<<i<<"while of size: "<<labels_.size()<<"\n"<<conf_.dump();
199  return labels_.back(); }
200  else return labels_[i];}
int i
Definition: DBlmapReader.cc:9
std::string dump(unsigned int indent=0) const
edm::ParameterSet conf_
std::vector< std::string > labels_
unsigned int Splitter::maxIndex ( ) const
inline

Definition at line 185 of file CachingVariable.h.

References maxSlots().

Referenced by VarSplitter::eval().

185 { return maxSlots()-1;}
virtual unsigned int maxSlots() const
virtual unsigned int Splitter::maxSlots ( ) const
inlinevirtual

Reimplemented in VarSplitter.

Definition at line 188 of file CachingVariable.h.

References labels_.

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

188 { return labels_.size();}
std::vector< std::string > labels_
const std::string Splitter::shortLabel ( unsigned int  i) const
inline

Definition at line 190 of file CachingVariable.h.

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

Referenced by SplittingConfigurableHisto::SplittingConfigurableHisto().

190  {
191  if (i>=short_labels_.size()){
192  edm::LogError("Splitter")<<"trying to access slots short_label at index: "<<i<<"while of size: "<<short_labels_.size()<<"\n"<<conf_.dump();
193  return short_labels_.back(); }
194  else return short_labels_[i];}
int i
Definition: DBlmapReader.cc:9
std::string dump(unsigned int indent=0) const
std::vector< std::string > short_labels_
edm::ParameterSet conf_

Member Data Documentation

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

Definition at line 203 of file CachingVariable.h.

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

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

Definition at line 204 of file CachingVariable.h.

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