CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
PrintLoadingPlugins Class Reference

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 &)=delete
 
 PrintLoadingPlugins (const PrintLoadingPlugins &)=delete
 

Detailed Description

Definition at line 32 of file PrintLoadingPlugins.cc.

Constructor & Destructor Documentation

PrintLoadingPlugins::PrintLoadingPlugins ( )

Definition at line 69 of file PrintLoadingPlugins.cc.

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

69  {
70  using std::placeholders::_1;
71  using std::placeholders::_2;
73 
74  pm->askedToLoadCategoryWithPlugin_.connect(std::bind(std::mem_fn(&PrintLoadingPlugins::askedToLoad), this, _1, _2));
75 
76  pm->goingToLoad_.connect(std::bind(std::mem_fn(&PrintLoadingPlugins::goingToLoad), this, _1));
77 }
edm::signalslot::Signal< void(const std::string &, const std::string &)> askedToLoadCategoryWithPlugin_
void askedToLoad(const std::string &, const std::string &)
void goingToLoad(const boost::filesystem::path &)
edm::signalslot::Signal< void(const boost::filesystem::path &)> goingToLoad_
void connect(U iFunc)
Definition: Signal.h:62
T get(const Candidate &c)
Definition: component.h:55
PrintLoadingPlugins::~PrintLoadingPlugins ( )
virtual

Definition at line 84 of file PrintLoadingPlugins.cc.

84 {}
PrintLoadingPlugins::PrintLoadingPlugins ( const PrintLoadingPlugins )
privatedelete

Member Function Documentation

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

Definition at line 114 of file PrintLoadingPlugins.cc.

References taus_updatedMVAIds_cff::category, edmplugin::PluginManager::categoryToInfos(), reco::get(), mps_fire::i, edmplugin::PluginInfo::name_, callgraph::path, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PrintLoadingPlugins().

114  {
116 
117  const PluginManager::CategoryToInfos& category = pm->categoryToInfos();
118 
119  PluginManager::CategoryToInfos::const_iterator itFound = category.find(iCategory);
120 
121  std::string libname("Not found");
122 
123  if (itFound != category.end()) {
124  PluginInfo i;
125 
126  i.name_ = iPlugin;
127 
128  typedef std::vector<PluginInfo>::const_iterator PIItr;
129 
130  std::pair<PIItr, PIItr> range = std::equal_range(itFound->second.begin(), itFound->second.end(), i, PICompare());
131 
132  if (range.second - range.first > 1) {
133  const boost::filesystem::path& loadable = range.first->loadable_;
134 
135  libname = loadable.string();
136  }
137 
138  edm::LogAbsolute("GetPlugin") << "Getting> '" << iCategory << "' " << iPlugin << "\n from " << libname
139  << std::endl;
140  }
141 }
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:83
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 86 of file PrintLoadingPlugins.cc.

References edm::ConfigurationDescriptions::add(), edmplugin::PluginInfo::name_, and edm::ConfigurationDescriptions::setComment().

86  {
88  descriptions.add("PrintLoadingPlugins", desc);
89  descriptions.setComment("This service logs each request to load a plugin.");
90 }
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 143 of file PrintLoadingPlugins.cc.

Referenced by PrintLoadingPlugins().

145 {
146  edm::LogAbsolute("LoadLib") << "Loading> " << Loadable_.string() << std::endl;
147 }
const PrintLoadingPlugins& PrintLoadingPlugins::operator= ( const PrintLoadingPlugins )
privatedelete