CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DDNameFilter Class Reference
Inheritance diagram for DDNameFilter:
DDFilter

Public Member Functions

bool accept (const DDExpandedView &ev) const final
 true, if the DDExpandedNode fulfills the filter criteria More...
 
void add (const std::string &add)
 
void veto (const std::string &veto)
 
- Public Member Functions inherited from DDFilter
 DDFilter ()
 
virtual ~DDFilter ()
 

Private Attributes

std::vector< std::string > allowed_
 
std::vector< std::string > veto_
 

Detailed Description

Definition at line 11 of file DDDCmsMTDConstruction.cc.

Member Function Documentation

bool DDNameFilter::accept ( const DDExpandedView ) const
inlinefinalvirtual

true, if the DDExpandedNode fulfills the filter criteria

Implements DDFilter.

Definition at line 16 of file DDDCmsMTDConstruction.cc.

References allowed_, ev, and veto_.

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

16  {
17  for( const auto& test : veto_ ) {
18  if( ev.logicalPart().name().fullname().find(test) != std::string::npos )
19  return false;
20  }
21  for( const auto& test : allowed_ ) {
22  if( ev.logicalPart().name().fullname().find(test) != std::string::npos )
23  return true;
24  }
25  return false;
26  }
bool ev
std::vector< std::string > veto_
std::vector< std::string > allowed_
void DDNameFilter::add ( const std::string &  add)
inline

Definition at line 13 of file DDDCmsMTDConstruction.cc.

References allowed_.

Referenced by DDDCmsMTDConstruction::construct(), and counter.Counter::register().

13 { allowed_.emplace_back(add); }
void add(const std::string &add)
std::vector< std::string > allowed_
void DDNameFilter::veto ( const std::string &  veto)
inline

Definition at line 14 of file DDDCmsMTDConstruction.cc.

References veto_.

Referenced by DDDCmsMTDConstruction::construct().

14 { veto_.emplace_back(veto); }
std::vector< std::string > veto_
void veto(const std::string &veto)

Member Data Documentation

std::vector<std::string> DDNameFilter::allowed_
private

Definition at line 28 of file DDDCmsMTDConstruction.cc.

Referenced by accept(), and add().

std::vector<std::string> DDNameFilter::veto_
private

Definition at line 29 of file DDDCmsMTDConstruction.cc.

Referenced by accept(), and veto().