CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LoadAllDictionaries.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Services
4 // Class : LoadAllDictionaries
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Thu Sep 15 09:47:48 EDT 2005
11 //
12 
13 // system include files
14 
15 // user include files
22 
23 //
24 // constants, enums and typedefs
25 //
26 
27 //
28 // static data member definitions
29 //
30 
31 //
32 // constructors and destructor
33 //
35 {
36  bool doLoad(iConfig.getUntrackedParameter<bool>("doLoad"));
37  if(doLoad) {
39 
41 
42  CatToInfos::const_iterator itFound = db->categoryToInfos().find("Capability");
43 
44  if(itFound == db->categoryToInfos().end()) {
45  return;
46  }
47  std::string lastClass;
48  const std::string mystring("edm::Wrapper");
49 
50  for (edmplugin::PluginManager::Infos::const_iterator itInfo = itFound->second.begin(),
51  itInfoEnd = itFound->second.end();
52  itInfo != itInfoEnd; ++itInfo)
53  {
54  if (lastClass == itInfo->name_) {
55  continue;
56  }
57 
58  lastClass = itInfo->name_;
59  if (lastClass.find(mystring) != std::string::npos) {
61  }
62  //NOTE: since we have the library already, we could be more efficient if we just load it ourselves
63  }
64  }
65 }
66 
69  desc.addUntracked<bool>("doLoad", true)->setComment("Only if 'true' do we load all dictionaries");
70  descriptions.add("LoadAllDictionaries", desc);
71  descriptions.setComment("This service allows you to force all known dictionaries to be loaded at the beginning of the job");
72 }
73 
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:82
T getUntrackedParameter(std::string const &, T const &) const
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
tuple db
Definition: EcalCondDB.py:151
std::map< std::string, Infos > CategoryToInfos
Definition: PluginManager.h:54
static PluginCapabilities * get()
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void load(const std::string &iName)
LoadAllDictionaries(const edm::ParameterSet &)
static PluginManager * get()