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 44 of file PrintLoadingPlugins.cc.

References askedToLoad(), edmplugin::PluginManager::askedToLoadCategoryWithPlugin_, edm::signalslot::Signal< T >::connect(), edmplugin::PluginManager::get(), goingToLoad(), and edmplugin::PluginManager::goingToLoad_.

45 {
46  using std::placeholders::_1;
47  using std::placeholders::_2;
49 
50  pm->askedToLoadCategoryWithPlugin_.connect(std::bind(std::mem_fn(&PrintLoadingPlugins::askedToLoad),this, _1,_2));
51 
52  pm->goingToLoad_.connect(std::bind(std::mem_fn(&PrintLoadingPlugins::goingToLoad),this, _1));
53 
54 
55 
56 }
void askedToLoad(const std::string &, const std::string &)
void goingToLoad(const boost::filesystem::path &)
edm::signalslot::Signal< void(const std::string &, const std::string &)> askedToLoadCategoryWithPlugin_
edm::signalslot::Signal< void(const boost::filesystem::path &)> goingToLoad_
void connect(U iFunc)
Definition: Signal.h:63
T get(const Candidate &c)
Definition: component.h:55
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_, fed_dqm_sourceclient-live_cfg::path, and AlCaHLTBitMon_QueryRunRegistry::string.

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:82
int i
Definition: DBlmapReader.cc:9
std::string name_
Definition: PluginInfo.h:29
T get(const Candidate &c)
Definition: component.h:55
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