CMS 3D CMS Logo

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

#include <DDFilter.h>

Inheritance diagram for DDSpecificsMatchesValueFilter:
DDFilter

Public Member Functions

bool accept (const DDExpandedView &) const final
 true, if the DDExpandedNode fulfills the filter criteria More...
 
 DDSpecificsMatchesValueFilter (const DDValue &iValue)
 
- Public Member Functions inherited from DDFilter
 DDFilter ()
 
virtual ~DDFilter ()
 

Private Attributes

DDValue value_
 

Detailed Description

Definition at line 83 of file DDFilter.h.

Constructor & Destructor Documentation

DDSpecificsMatchesValueFilter::DDSpecificsMatchesValueFilter ( const DDValue iValue)
inlineexplicit

Definition at line 85 of file DDFilter.h.

References accept().

85  :
86  value_(iValue)
87  {}

Member Function Documentation

bool DDSpecificsMatchesValueFilter::accept ( const DDExpandedView ) const
finalvirtual

true, if the DDExpandedNode fulfills the filter criteria

Implements DDFilter.

Definition at line 133 of file DDFilter.cc.

References DDLogicalPart::attachedSpecifics(), DDExpandedView::geoHistory(), DDLogicalPart::hasDDValue(), create_public_lumi_plots::hist, DDExpandedView::logicalPart(), SiPixelPhase1DigisV_cfi::specs, and findQualityFiles::v.

Referenced by Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::apply(), and esMonitoring.FDJsonServer::handle_accept().

133  {
134  const DDLogicalPart & logp = node.logicalPart();
135 
136  if (logp.hasDDValue(value_)) {
137 
138  const auto& specs = logp.attachedSpecifics();
139 
140  const auto& hist = node.geoHistory();
141  for(auto const& spec: specs) {
142  for(auto const& v: *(spec.second) ) {
143  if(value_.id() == v.first) {
144  if(DDCompareEqual(hist,*spec.first)()) {
145  return (value_.strings() == v.second.strings());
146  } else {
147  //since we know this isn't in the correct
148  // geometry path we do not have to check
149  // anymore attributes
150  break;
151  }
152  }
153  }
154  }
155  }
156  return false;
157 
158 }
bool hasDDValue(const DDValue &) const
compares a given geometrical-history whether it corresponds to the given part-selector ...
Definition: DDComparator.h:16
unsigned int id(void) const
returns the ID of the DDValue
Definition: DDValue.h:48
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
const std::vector< std::string > & strings() const
a reference to the std::string-valued values stored in the given instance of DDValue ...
Definition: DDValue.h:61
const std::vector< std::pair< const DDPartSelection *, const DDsvalues_type * > > & attachedSpecifics(void) const

Member Data Documentation

DDValue DDSpecificsMatchesValueFilter::value_
private

Definition at line 92 of file DDFilter.h.