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

◆ DDTokenize2()

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

Definition at line 174 of file DDPartSelection.cc.

References full, DDI::Singleton< I >::instance(), parse(), writedatasetfile::parser, castor_dqm_sourceclient_file_cfg::path, mps_fire::result, and EgammaValidation_Wenu_cff::sel.

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

174  {
175  static SpecParParser parser;
177  bool result = parse(sel.c_str(), parser).full;
178  if (!result) {
179  edm::LogError("DDPartSelection") << "DDTokenize2() error in parsing of " << sel << std::endl;
180  }
181 }
vector< string > parse(string line, const string &delimiter)
Log< level::Error, false > LogError
static value_type & instance()
Definition: GenABIO.cc:168

◆ noNameSpace()

void noNameSpace ( char const *  ,
char const *   
)

Definition at line 36 of file DDPartSelection.cc.

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

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

36  {
38 }
static value_type & instance()

◆ operator<<() [1/2]

std::ostream& operator<< ( std::ostream &  o,
const DDPartSelection p 
)

Definition at line 183 of file DDPartSelection.cc.

References DDPartSelectionLevel::copyno_, ddanylogp, ddanyposp, ddchildlogp, ddchildposp, DDBase< N, C >::ddname(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, DDPartSelectionLevel::lp_, EcalTangentSkim_cfg::o, AlCaHLTBitMon_ParallelJobs::p, and DDPartSelectionLevel::selectionType_.

183  {
184  DDPartSelection::const_iterator it(p.begin()), ed(p.end());
185  for (; it != ed; ++it) {
186  const DDPartSelectionLevel& lv = *it;
187  switch (lv.selectionType_) {
188  case ddanylogp:
189  o << "//" << lv.lp_.ddname();
190  break;
191  case ddanyposp:
192  o << "//" << lv.lp_.ddname() << '[' << lv.copyno_ << ']';
193  break;
194  case ddchildlogp:
195  o << "/" << lv.lp_.ddname();
196  break;
197  case ddchildposp:
198  o << "/" << lv.lp_.ddname() << '[' << lv.copyno_ << ']';
199  break;
200  default:
201  o << "{Syntax ERROR}";
202  }
203  }
204  return o;
205 }
ddselection_type selectionType_
const N & ddname() const
Definition: DDBase.h:61

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  os,
const std::vector< DDPartSelection > &  v 
)

Definition at line 207 of file DDPartSelection.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, l1tGTMenu_BTagSeeds_cff::os, and findQualityFiles::v.

207  {
208  std::vector<DDPartSelection>::const_iterator it(v.begin()), ed(v.end());
209  for (; it != (ed - 1); ++it) {
210  os << *it << std::endl;
211  }
212  if (it != ed) {
213  ++it;
214  os << *it;
215  }
216  return os;
217 }