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 // $Id: LoadAllDictionaries.cc,v 1.11 2012/07/24 05:01:00 wmtan Exp $
12 //
13 
14 // system include files
15 #include "Cintex/Cintex.h"
16 
17 // user include files
24 
25 //
26 // constants, enums and typedefs
27 //
28 
29 //
30 // static data member definitions
31 //
32 
33 //
34 // constructors and destructor
35 //
37 {
38  bool doLoad(iConfig.getUntrackedParameter<bool>("doLoad"));
39  if(doLoad) {
40  ROOT::Cintex::Cintex::Enable();
41 
43 
45 
46  CatToInfos::const_iterator itFound = db->categoryToInfos().find("Capability");
47 
48  if(itFound == db->categoryToInfos().end()) {
49  return;
50  }
51  std::string lastClass;
52  const std::string mystring("edm::Wrapper");
53 
54  for (edmplugin::PluginManager::Infos::const_iterator itInfo = itFound->second.begin(),
55  itInfoEnd = itFound->second.end();
56  itInfo != itInfoEnd; ++itInfo)
57  {
58  if (lastClass == itInfo->name_) {
59  continue;
60  }
61 
62  lastClass = itInfo->name_;
63  if (lastClass.find(mystring) != std::string::npos) {
65  }
66  //NOTE: since we have the library already, we could be more efficient if we just load it ourselves
67  }
68  }
69 }
70 
73  desc.addUntracked<bool>("doLoad", true)->setComment("Only if 'true' do we load all dictionaries");
74  descriptions.add("LoadAllDictionaries", desc);
75  descriptions.setComment("This service allows you to force all known dictionaries to be loaded at the beginning of the job");
76 }
77 
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:71
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:43
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()