CMS 3D CMS Logo

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

PrintLoadingPlugins Class Reference

#include <FWCore/Services/interface/PrintLoadingPlugins.h>

List of all members.

Public Member Functions

void askedToLoad (const std::string &, const std::string &)
void goingToLoad (const boost::filesystem::path &)
 PrintLoadingPlugins ()
virtual ~PrintLoadingPlugins ()

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)

Private Member Functions

const PrintLoadingPluginsoperator= (const PrintLoadingPlugins &)
 PrintLoadingPlugins (const PrintLoadingPlugins &)

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 34 of file PrintLoadingPlugins.h.


Constructor & Destructor Documentation

PrintLoadingPlugins::PrintLoadingPlugins ( )
PrintLoadingPlugins::~PrintLoadingPlugins ( ) [virtual]

Definition at line 63 of file PrintLoadingPlugins.cc.

{
}
PrintLoadingPlugins::PrintLoadingPlugins ( const PrintLoadingPlugins ) [private]

Member Function Documentation

void PrintLoadingPlugins::askedToLoad ( const std::string &  iCategory,
const std::string &  iPlugin 
)

Definition at line 98 of file PrintLoadingPlugins.cc.

References python::rootplot::argparse::category, edmplugin::PluginManager::categoryToInfos(), edmplugin::PluginManager::get(), i, edmplugin::PluginInfo::name_, and scaleCards::path.

Referenced by PrintLoadingPlugins().

{ 
   PluginManager *pm = PluginManager::get();

   const PluginManager::CategoryToInfos& category = pm->categoryToInfos();

   PluginManager::CategoryToInfos::const_iterator itFound = category.find(iCategory);

   std::string libname("Not found");
   
   if(itFound != category.end()) {
      
      PluginInfo i;
      
      i.name_ = iPlugin;
      
      typedef std::vector<PluginInfo>::const_iterator PIItr;
      
      std::pair<PIItr,PIItr> range = std::equal_range(itFound->second.begin(),itFound->second.end(),i,PICompare());
      
      if(range.second - range.first > 1){
         
         const boost::filesystem::path& loadable = range.first->loadable_;
         
         libname = loadable.string();
         
      }
      
      edm::LogAbsolute("GetPlugin")<<"Getting> '"<<iCategory<< "' "<<iPlugin 
                                   <<"\n         from "<<libname <<std::endl;
   }
   
}
void PrintLoadingPlugins::fillDescriptions ( edm::ConfigurationDescriptions descriptions) [static]

Definition at line 67 of file PrintLoadingPlugins.cc.

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

                                                                                      {
  edm::ParameterSetDescription desc;
  descriptions.add("PrintLoadingPlugins", desc);
  descriptions.setComment("This service logs each request to load a plugin.");
}
void PrintLoadingPlugins::goingToLoad ( const boost::filesystem::path &  Loadable_)

Definition at line 133 of file PrintLoadingPlugins.cc.

Referenced by PrintLoadingPlugins().

{
  edm::LogAbsolute("LoadLib")<<"Loading> "<<Loadable_.string()<< std::endl;
}
const PrintLoadingPlugins& PrintLoadingPlugins::operator= ( const PrintLoadingPlugins ) [private]