CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Member Functions

edm::service::LoadAllDictionaries Class Reference

#include <LoadAllDictionaries.h>

List of all members.

Public Member Functions

 LoadAllDictionaries (const edm::ParameterSet &)

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)

Private Member Functions

 LoadAllDictionaries (const LoadAllDictionaries &)
const LoadAllDictionariesoperator= (const LoadAllDictionaries &)

Detailed Description

Definition at line 31 of file LoadAllDictionaries.h.


Constructor & Destructor Documentation

LoadAllDictionaries::LoadAllDictionaries ( const edm::ParameterSet iConfig)

Definition at line 36 of file LoadAllDictionaries.cc.

References edmplugin::PluginManager::categoryToInfos(), EcalCondDB::db, reco::get(), and edm::ParameterSet::getUntrackedParameter().

{
   bool doLoad(iConfig.getUntrackedParameter<bool>("doLoad"));
   if(doLoad) {
     ROOT::Cintex::Cintex::Enable();

     edmplugin::PluginManager*db =  edmplugin::PluginManager::get();
     
     typedef edmplugin::PluginManager::CategoryToInfos CatToInfos;
     
     CatToInfos::const_iterator itFound = db->categoryToInfos().find("Capability");
     
     if(itFound == db->categoryToInfos().end()) {
       return;
     }
     std::string lastClass;
     const std::string cPrefix("LCGReflex/");
     const std::string mystring("edm::Wrapper");

     for (edmplugin::PluginManager::Infos::const_iterator itInfo = itFound->second.begin(),
          itInfoEnd = itFound->second.end(); 
          itInfo != itInfoEnd; ++itInfo)
     {
       if (lastClass == itInfo->name_) {
         continue;
       }
       
       lastClass = itInfo->name_;
       if (lastClass.find(mystring) != std::string::npos) { 
         edmplugin::PluginCapabilities::get()->load(lastClass);
       }
       //NOTE: since we have the library already, we could be more efficient if we just load it ourselves
     }
   }
}
edm::service::LoadAllDictionaries::LoadAllDictionaries ( const LoadAllDictionaries ) [private]

Member Function Documentation

void LoadAllDictionaries::fillDescriptions ( edm::ConfigurationDescriptions descriptions) [static]

Definition at line 72 of file LoadAllDictionaries.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), and edm::ConfigurationDescriptions::setComment().

                                                                                                {
  edm::ParameterSetDescription desc;
  desc.addUntracked<bool>("doLoad", true)->setComment("Only if 'true' do we load all dictionaries");
  descriptions.add("LoadAllDictionaries", desc);
  descriptions.setComment("This service allows you to force all known Reflex dictionaries to be loaded at the beginning of the job");
}
const LoadAllDictionaries& edm::service::LoadAllDictionaries::operator= ( const LoadAllDictionaries ) [private]