CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
Splitter Class Referenceabstract

#include <CachingVariable.h>

Inheritance diagram for Splitter:
CachingVariable VarSplitter

Public Member Functions

CachingVariable::evalType eval (const edm::Event &iEvent) const override=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, valueTypeevalType
 
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 182 of file CachingVariable.h.

Constructor & Destructor Documentation

◆ Splitter()

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

Definition at line 184 of file CachingVariable.h.

185  : CachingVariable(method, n, iConfig, iC) {}

Member Function Documentation

◆ eval()

CachingVariable::evalType Splitter::eval ( const edm::Event iEvent) const
overridepure virtual

Reimplemented from CachingVariable.

Implemented in VarSplitter.

◆ label()

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

Definition at line 205 of file CachingVariable.h.

205  {
206  if (i >= labels_.size()) {
207  edm::LogError("Splitter") << "trying to access slots label at index: " << i << "while of size: " << labels_.size()
208  << "\n"
209  << conf_.dump();
210  return labels_.back();
211  } else
212  return labels_[i];
213  }

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

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

◆ maxIndex()

unsigned int Splitter::maxIndex ( ) const
inline

Definition at line 190 of file CachingVariable.h.

190 { return maxSlots() - 1; }

References maxSlots().

Referenced by VarSplitter::eval().

◆ maxSlots()

virtual unsigned int Splitter::maxSlots ( ) const
inlinevirtual

Reimplemented in VarSplitter.

Definition at line 193 of file CachingVariable.h.

193 { return labels_.size(); }

References labels_.

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

◆ shortLabel()

const std::string Splitter::shortLabel ( unsigned int  i) const
inline

Definition at line 195 of file CachingVariable.h.

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

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

Referenced by SplittingConfigurableHisto::SplittingConfigurableHisto().

Member Data Documentation

◆ labels_

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

Definition at line 216 of file CachingVariable.h.

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

◆ short_labels_

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

Definition at line 217 of file CachingVariable.h.

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

mps_fire.i
i
Definition: mps_fire.py:355
CachingVariable::conf_
edm::ParameterSet conf_
Definition: CachingVariable.h:110
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
Splitter::labels_
std::vector< std::string > labels_
Definition: CachingVariable.h:216
edm::ParameterSet::dump
std::string dump(unsigned int indent=0) const
Definition: ParameterSet.cc:825
edm::LogError
Definition: MessageLogger.h:183
CachingVariable::CachingVariable
CachingVariable(std::string m, std::string n, const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
Definition: CachingVariable.h:55
CachingVariable::method
const std::string & method() const
Definition: CachingVariable.h:67
Splitter::short_labels_
std::vector< std::string > short_labels_
Definition: CachingVariable.h:217
Splitter::maxSlots
virtual unsigned int maxSlots() const
Definition: CachingVariable.h:193