CMS 3D CMS Logo

LoadAllDictionaries.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Services
4 // Class : LoadAllDictionaries
5 //
14 //
15 // Original Author: Chris Jones
16 // Created: Thu Sep 15 09:47:48 EDT 2005
17 //
18 
19 // system include files
20 
21 // user include files
23 
29 
30 namespace edm {
31  namespace service {
33  {
34 
35  public:
37  //virtual ~LoadAllDictionaries();
38 
39  // ---------- const member functions ---------------------
40 
41  // ---------- static member functions --------------------
42  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
43 
44  // ---------- member functions ---------------------------
45 
46  private:
47  LoadAllDictionaries(const LoadAllDictionaries&) = delete; // stop default
48 
49  const LoadAllDictionaries& operator=(const LoadAllDictionaries&) = delete; // stop default
50 
51  // ---------- member data --------------------------------
52 
53  };
54  }
55 }
56 
57 //
58 // constants, enums and typedefs
59 //
60 
61 //
62 // static data member definitions
63 //
64 
65 //
66 // constructors and destructor
67 //
69 {
70  bool doLoad(iConfig.getUntrackedParameter<bool>("doLoad"));
71  if(doLoad) {
73 
75 
76  CatToInfos::const_iterator itFound = db->categoryToInfos().find("Capability");
77 
78  if(itFound == db->categoryToInfos().end()) {
79  return;
80  }
81  std::string lastClass;
82  const std::string mystring("edm::Wrapper");
83 
84  for (edmplugin::PluginManager::Infos::const_iterator itInfo = itFound->second.begin(),
85  itInfoEnd = itFound->second.end();
86  itInfo != itInfoEnd; ++itInfo)
87  {
88  if (lastClass == itInfo->name_) {
89  continue;
90  }
91 
92  lastClass = itInfo->name_;
93  if (lastClass.find(mystring) != std::string::npos) {
95  }
96  //NOTE: since we have the library already, we could be more efficient if we just load it ourselves
97  }
98  }
99 }
100 
103  desc.addUntracked<bool>("doLoad", true)->setComment("Only if 'true' do we load all dictionaries");
104  descriptions.add("LoadAllDictionaries", desc);
105  descriptions.setComment("This service allows you to force all known dictionaries to be loaded at the beginning of the job");
106 }
107 
110 
111 
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:90
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_FWK_SERVICE_MAKER(concrete, maker)
Definition: ServiceMaker.h:117
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::map< std::string, Infos > CategoryToInfos
Definition: PluginManager.h:54
static PluginCapabilities * get()
const LoadAllDictionaries & operator=(const LoadAllDictionaries &)=delete
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HLT enums.
void load(const std::string &iName)
LoadAllDictionaries(const edm::ParameterSet &)
static PluginManager * get()