CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
FWExpressionValidator Class Reference

#include <Fireworks/Core/interface/FWExpressionValidator.h>

Inheritance diagram for FWExpressionValidator:
FWValidatorBase

Public Member Functions

void fillOptions (const char *iBegin, const char *iEnd, std::vector< std::pair< std::shared_ptr< std::string >, std::string > > &oOptions) const override
 
 FWExpressionValidator ()
 
void setType (const edm::TypeWithDict &)
 
 ~FWExpressionValidator () override
 
- Public Member Functions inherited from FWValidatorBase
 FWValidatorBase ()
 
virtual ~FWValidatorBase ()
 

Private Member Functions

 FWExpressionValidator (const FWExpressionValidator &)=delete
 
const FWExpressionValidatoroperator= (const FWExpressionValidator &)=delete
 

Private Attributes

std::vector< std::shared_ptr< fireworks::OptionNode > > m_builtins
 
std::vector< std::shared_ptr< fireworks::OptionNode > > m_options
 
edm::TypeWithDict m_type
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 34 of file FWExpressionValidator.h.

Constructor & Destructor Documentation

◆ FWExpressionValidator() [1/2]

FWExpressionValidator::FWExpressionValidator ( )

Definition at line 144 of file FWExpressionValidator.cc.

144  {
145  using fireworks::OptionNode;
146  static const edm::TypeWithDict s_float(typeid(float));
147  FUN1(abs);
148  FUN1(acos);
149  FUN1(asin);
150  FUN1(atan);
151  FUN1(cos);
152  FUN1(cosh);
153  FUN1(exp);
154  FUN1(log);
155  FUN1(log10);
156  FUN1(sin);
157  FUN1(sinh);
158  FUN1(sqrt);
159  FUN1(tan);
160  FUN1(tanh);
161  FUN2(atan2);
162  FUN2(chi2prob);
163  FUN2(pow);
164  FUN2(min);
165  FUN2(max);
167 }

References funct::abs(), funct::cos(), JetChargeProducer_cfi::exp, FUN1, FUN2, dqm-mbProfile::log, m_builtins, SiStripPI::max, min(), funct::pow(), funct::sin(), jetUpdater_cfi::sort, mathSSE::sqrt(), and funct::tan().

◆ ~FWExpressionValidator()

FWExpressionValidator::~FWExpressionValidator ( )
override

Definition at line 174 of file FWExpressionValidator.cc.

174 {}

◆ FWExpressionValidator() [2/2]

FWExpressionValidator::FWExpressionValidator ( const FWExpressionValidator )
privatedelete

Member Function Documentation

◆ fillOptions()

void FWExpressionValidator::fillOptions ( const char *  iBegin,
const char *  iEnd,
std::vector< std::pair< std::shared_ptr< std::string >, std::string > > &  oOptions 
) const
overridevirtual

Implements FWValidatorBase.

Definition at line 239 of file FWExpressionValidator.cc.

242  {
243  using fireworks::OptionNode;
244  oOptions.clear();
245  std::vector<const char*> delimeters;
246  findTypeDelimiters(iBegin, iEnd, delimeters);
247  //must find correct OptionNode
248  const Options* nodes = &m_options;
249  const char* begin = iBegin;
250  for (std::vector<const char*>::iterator it = delimeters.begin(), itEnd = delimeters.end(); it != itEnd; ++it) {
251  OptionNode temp(std::string(begin, *it), *it - begin, edm::TypeWithDict());
252 
253  std::shared_ptr<OptionNode> comp(&temp, dummyDelete);
254  Options::const_iterator itFind = std::lower_bound(
256 
257  if (itFind == nodes->end() || *comp < *(*itFind)) {
258  //no match so we have an error
259  return;
260  }
261  nodes = &((*itFind)->options());
262  begin = (*it) + 1;
263  }
264 
265  //only use add items which begin with the part of the member we are trying to match
266  std::string part(begin, iEnd);
267  unsigned int part_size = part.size();
268  for (Options::const_iterator it = nodes->begin(), itEnd = nodes->end(); it != itEnd; ++it) {
269  if (part == (*it)->description().substr(0, part_size)) {
270  oOptions.push_back(
271  std::make_pair(std::shared_ptr<std::string>(const_cast<std::string*>(&((*it)->description())), dummyDelete),
272  (*it)->description().substr(part_size, (*it)->substitutionEnd() - part_size)));
273  }
274  }
275 }

References AlCaHLTBitMon_QueryRunRegistry::comp, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, m_options, class-composition::nodes, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

◆ operator=()

const FWExpressionValidator& FWExpressionValidator::operator= ( const FWExpressionValidator )
privatedelete

◆ setType()

void FWExpressionValidator::setType ( const edm::TypeWithDict iType)

Definition at line 191 of file FWExpressionValidator.cc.

191  {
192  using fireworks::OptionNode;
193  m_type = iType;
194  m_options.clear();
196  OptionNode::fillOptionForType(iType, m_options);
198  std::vector<std::shared_ptr<OptionNode> >::iterator it =
200  m_options.erase(it, m_options.end());
201 }

References m_builtins, m_options, m_type, jetUpdater_cfi::sort, and tier0::unique().

Referenced by CmsShowEDI::fillEDIFrame(), and FWTableView::selectCollection().

Member Data Documentation

◆ m_builtins

std::vector<std::shared_ptr<fireworks::OptionNode> > FWExpressionValidator::m_builtins
private

Definition at line 57 of file FWExpressionValidator.h.

Referenced by FWExpressionValidator(), and setType().

◆ m_options

std::vector<std::shared_ptr<fireworks::OptionNode> > FWExpressionValidator::m_options
private

Definition at line 56 of file FWExpressionValidator.h.

Referenced by fillOptions(), and setType().

◆ m_type

edm::TypeWithDict FWExpressionValidator::m_type
private

Definition at line 55 of file FWExpressionValidator.h.

Referenced by setType().

AlCaHLTBitMon_QueryRunRegistry.comp
string comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
min
T min(T a, T b)
Definition: MathUtil.h:58
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
FWExpressionValidator::m_options
std::vector< std::shared_ptr< fireworks::OptionNode > > m_options
Definition: FWExpressionValidator.h:56
part
part
Definition: HCALResponse.h:20
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
FUN2
#define FUN2(_fun_)
Definition: FWExpressionValidator.cc:141
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Options
Definition: Options.py:1
class-composition.nodes
nodes
Definition: class-composition.py:84
FUN1
#define FUN1(_fun_)
Definition: FWExpressionValidator.cc:138
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
edm::TypeWithDict
Definition: TypeWithDict.h:38
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
FWExpressionValidator::m_builtins
std::vector< std::shared_ptr< fireworks::OptionNode > > m_builtins
Definition: FWExpressionValidator.h:57
fireworks::OptionNodePtrCompare
Definition: FWExpressionValidator.cc:32
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
fireworks::OptionNodePtrEqual
Definition: FWExpressionValidator.cc:37
fireworks::OptionNode
Definition: FWExpressionValidator.cc:41
tier0.unique
def unique(seq, keepstr=True)
Definition: tier0.py:24
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
FWExpressionValidator::m_type
edm::TypeWithDict m_type
Definition: FWExpressionValidator.h:55