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.

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 }

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

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

◆ noNameSpace()

void noNameSpace ( char const *  ,
char const *   
)

Definition at line 36 of file DDPartSelection.cc.

36  {
38 }

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

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

◆ operator<<() [1/2]

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

Definition at line 183 of file DDPartSelection.cc.

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 }

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

◆ operator<<() [2/2]

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

Definition at line 207 of file DDPartSelection.cc.

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 }

References findQualityFiles::v.

ddanyposp
Definition: DDPartSelection.h:16
writedatasetfile.parser
parser
Definition: writedatasetfile.py:7
full
Definition: GenABIO.cc:168
findQualityFiles.v
v
Definition: findQualityFiles.py:179
SpecParParser
Definition: DDPartSelection.cc:111
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:42
ddchildposp
Definition: DDPartSelection.h:18
DDPartSelectionLevel::lp_
DDLogicalPart lp_
Definition: DDPartSelection.h:32
DDPartSelectionLevel::selectionType_
ddselection_type selectionType_
Definition: DDPartSelection.h:34
DDPartSelectionLevel::copyno_
int copyno_
Definition: DDPartSelection.h:33
DDPartSelectionLevel
Definition: DDPartSelection.h:30
dumpparser.parse
def parse(path, config)
Definition: dumpparser.py:13
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DDBase::ddname
const N & ddname() const
Definition: DDBase.h:61
DDI::Singleton::instance
static value_type & instance()
ddanylogp
Definition: DDPartSelection.h:15
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
ddchildlogp
Definition: DDPartSelection.h:17
mps_fire.result
result
Definition: mps_fire.py:311
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
EgammaValidation_Wenu_cff.sel
sel
Definition: EgammaValidation_Wenu_cff.py:33