CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
PrintLoadingPlugins Class Reference

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

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 ( )

Definition at line 46 of file PrintLoadingPlugins.cc.

References askedToLoad(), edmplugin::PluginManager::askedToLoadCategoryWithPlugin_, edmplugin::PluginManager::get(), goingToLoad(), and edmplugin::PluginManager::goingToLoad_.

47 {
49 
50  pm->askedToLoadCategoryWithPlugin_.connect(boost::bind(boost::mem_fn(&PrintLoadingPlugins::askedToLoad),this, _1,_2));
51 
52  pm->goingToLoad_.connect(boost::bind(boost::mem_fn(&PrintLoadingPlugins::goingToLoad),this, _1));
53 
54 
55 
56 }
sigc::signal< void, const boost::filesystem::path & > goingToLoad_
Definition: PluginManager.h:94
sigc::signal< void, const std::string &, const std::string & > askedToLoadCategoryWithPlugin_
Definition: PluginManager.h:96
void askedToLoad(const std::string &, const std::string &)
void goingToLoad(const boost::filesystem::path &)
T get(const Candidate &c)
Definition: component.h:56
PrintLoadingPlugins::~PrintLoadingPlugins ( )
virtual

Definition at line 63 of file PrintLoadingPlugins.cc.

64 {
65 }
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().

100 {
102 
103  const PluginManager::CategoryToInfos& category = pm->categoryToInfos();
104 
105  PluginManager::CategoryToInfos::const_iterator itFound = category.find(iCategory);
106 
107  std::string libname("Not found");
108 
109  if(itFound != category.end()) {
110 
111  PluginInfo i;
112 
113  i.name_ = iPlugin;
114 
115  typedef std::vector<PluginInfo>::const_iterator PIItr;
116 
117  std::pair<PIItr,PIItr> range = std::equal_range(itFound->second.begin(),itFound->second.end(),i,PICompare());
118 
119  if(range.second - range.first > 1){
120 
121  const boost::filesystem::path& loadable = range.first->loadable_;
122 
123  libname = loadable.string();
124 
125  }
126 
127  edm::LogAbsolute("GetPlugin")<<"Getting> '"<<iCategory<< "' "<<iPlugin
128  <<"\n from "<<libname <<std::endl;
129  }
130 
131 }
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:71
int i
Definition: DBlmapReader.cc:9
list path
Definition: scaleCards.py:51
std::string name_
Definition: PluginInfo.h:30
T get(const Candidate &c)
Definition: component.h:56
void PrintLoadingPlugins::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 67 of file PrintLoadingPlugins.cc.

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

67  {
69  descriptions.add("PrintLoadingPlugins", desc);
70  descriptions.setComment("This service logs each request to load a plugin.");
71 }
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void PrintLoadingPlugins::goingToLoad ( const boost::filesystem::path &  Loadable_)

Definition at line 133 of file PrintLoadingPlugins.cc.

Referenced by PrintLoadingPlugins().

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