CMS 3D CMS Logo

Classes | Namespaces | Functions
DDPartSelection.cc File Reference
#include "DetectorDescription/Core/interface/Singleton.h"
#include "DetectorDescription/Core/interface/DDLogicalPart.h"
#include "DetectorDescription/Core/interface/DDName.h"
#include "DetectorDescription/Core/interface/DDPartSelection.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "boost/spirit/include/classic.hpp"
#include <DetectorDescription/Core/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 222 of file DDPartSelection.cc.

References full, DDI::Singleton< I >::instance(), dumpparser::parse(), createfilelist::parser, and mps_fire::result.

Referenced by DDI::Specific::createPartSelections(), and DDPartSelection::DDPartSelection().

223 {
224  static SpecParParser parser;
226  bool result = parse(sel.c_str(), parser).full;
227  if (!result) {
228  edm::LogError("DDPartSelection") << "DDTokenize2() error in parsing of " << sel << std::endl;
229  }
230 }
static value_type & instance()
Definition: GenABIO.cc:180
def parse(path, config)
Definition: dumpparser.py:13
void noNameSpace ( char const *  ,
char const *   
)

Definition at line 32 of file DDPartSelection.cc.

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

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

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

Definition at line 232 of file DDPartSelection.cc.

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

Referenced by DDPartSelection::DDPartSelection().

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

Definition at line 257 of file DDPartSelection.cc.

References findQualityFiles::v.

258 {
259  std::vector<DDPartSelection>::const_iterator it(v.begin()), ed(v.end());
260  for (; it != (ed-1); ++it) {
261  os << *it << std::endl;
262  }
263  if ( it != ed ) {
264  ++it;
265  os << *it;
266  }
267  return os;
268 }