CMS 3D CMS Logo

Classes | Enumerations | Functions
DDPartSelection.h File Reference
#include <vector>
#include <string>
#include <iostream>
#include "DetectorDescription/Core/interface/DDLogicalPart.h"

Go to the source code of this file.

Classes

class  DDPartSelection
 
struct  DDPartSelectionLevel
 
struct  DDPartSelRegExpLevel
 

Enumerations

enum  ddselection_type {
  ddunknown, ddanynode, ddanychild, ddanylogp,
  ddanyposp, ddchildlogp, ddchildposp
}
 

Functions

void DDTokenize2 (const std::string &selectionString, std::vector< DDPartSelRegExpLevel > &result)
 
std::ostream & operator<< (std::ostream &, const DDPartSelection &)
 
std::ostream & operator<< (std::ostream &, const std::vector< DDPartSelection > &)
 

Enumeration Type Documentation

◆ ddselection_type

Enumerator
ddunknown 
ddanynode 
ddanychild 
ddanylogp 
ddanyposp 
ddchildlogp 
ddchildposp 

Definition at line 11 of file DDPartSelection.h.

11  {
12  ddunknown, // -> (should never appear!)
13  ddanynode, // -> //*
14  ddanychild, // -> /*
15  ddanylogp, // -> //NameOfLogicalPart
16  ddanyposp, // -> //NameOfLogicalPart[copyno]
17  ddchildlogp, // -> /NameOfLogicalPart
18  ddchildposp // -> /NameOfLogicalPart[copyno]
19 };

Function Documentation

◆ DDTokenize2()

void DDTokenize2 ( const std::string &  selectionString,
std::vector< DDPartSelRegExpLevel > &  result 
)

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().

◆ operator<<() [1/2]

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

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 &  ,
const std::vector< DDPartSelection > &   
)

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.

ddanychild
Definition: DDPartSelection.h:14
ddanyposp
Definition: DDPartSelection.h:16
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
writedatasetfile.parser
parser
Definition: writedatasetfile.py:7
ddunknown
Definition: DDPartSelection.h:12
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
DDBase::ddname
const N & ddname() const
Definition: DDBase.h:61
DDI::Singleton::instance
static value_type & instance()
ddanynode
Definition: DDPartSelection.h:13
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