CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Namespaces | Functions
DDPartSelection.cc File Reference
#include "DetectorDescription/Base/interface/Singleton.h"
#include "DetectorDescription/Core/interface/DDPartSelection.h"
#include "DetectorDescription/Base/interface/DDdebug.h"
#include "DetectorDescription/Core/interface/DDSplit.h"
#include "boost/spirit/include/classic.hpp"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <map>
#include <DetectorDescription/Base/interface/Singleton.icc>

Go to the source code of this file.

Classes

struct  DDCopyNoFtor
 
struct  DDIsChildFtor
 
struct  DDNameFtor
 
struct  DDNameSpaceFtor
 
struct  DDSelLevelCollector
 
struct  DDSelLevelFtor
 
struct  SpecParParser::definition< ScannerT >
 
struct  SpecParParser
 

Namespaces

 boost
 
 boost::spirit
 
 boost::spirit::classic
 

Functions

void DDTokenize2 (const std::string &sel, std::vector< DDPartSelRegExpLevel > &path)
 
void noNameSpace (char const *, char const *)
 
std::ostream & operator<< (std::ostream &o, const DDPartSelection &p)
 
std::ostream & operator<< (std::ostream &os, const std::vector< DDPartSelection > &v)
 

Function Documentation

void DDTokenize2 ( const std::string &  sel,
std::vector< DDPartSelRegExpLevel > &  path 
)

Definition at line 227 of file DDPartSelection.cc.

References full, DDI::Singleton< I >::instance(), triggerExpression::parse(), geometryXMLtoCSV::parser, and query::result.

Referenced by DDI::Specific::createPartSelections().

228 {
229  static SpecParParser parser;
231  bool result = parse(sel.c_str(), parser).full;
232  if (!result) {
233  edm::LogError("DDPartSelection") << "DDTokenize2() error in parsing of " << sel << std::endl;
234  }
235 }
Evaluator * parse(const T &text)
static value_type & instance()
tuple path
else: Piece not in the list, fine.
tuple result
Definition: query.py:137
Definition: GenABIO.cc:180
void noNameSpace ( char const *  ,
char const *   
)

Definition at line 38 of file DDPartSelection.cc.

References DDI::Singleton< I >::instance().

Referenced by SpecParParser::definition< ScannerT >::definition().

38  {
40 }
static value_type & instance()
std::ostream& operator<< ( std::ostream &  o,
const DDPartSelection p 
)

Definition at line 237 of file DDPartSelection.cc.

References DDPartSelectionLevel::copyno_, ddanylogp, ddanyposp, ddchildlogp, ddchildposp, DDBase< N, C >::ddname(), DDPartSelectionLevel::lp_, python.connectstrParser::o, and DDPartSelectionLevel::selectionType_.

238 {
239  DDPartSelection::const_iterator it(p.begin()), ed(p.end());
240  for (; it != ed; ++it) {
241  const DDPartSelectionLevel lv =*it;
242  switch (lv.selectionType_) {
243  case ddanylogp:
244  o << "//" << lv.lp_.ddname();
245  break;
246  case ddanyposp:
247  o << "//" << lv.lp_.ddname() << '[' << lv.copyno_ << ']';
248  break;
249  case ddchildlogp:
250  o << "/" << lv.lp_.ddname();
251  break;
252  case ddchildposp:
253  o << "/" << lv.lp_.ddname() << '[' << lv.copyno_ << ']';
254  break;
255  default:
256  o << "{Syntax ERROR}";
257  }
258  }
259  return o;
260 }
ddselection_type selectionType_
const N & ddname() const
Definition: DDBase.h:84
std::ostream& operator<< ( std::ostream &  os,
const std::vector< DDPartSelection > &  v 
)

Definition at line 262 of file DDPartSelection.cc.

References findQualityFiles::v.

263 {
264  std::vector<DDPartSelection>::const_iterator it(v.begin()), ed(v.end());
265  for (; it != (ed-1); ++it) {
266  os << *it << std::endl;
267  }
268  if ( it != ed ) {
269  ++it;
270  os << *it;
271  }
272  return os;
273 }