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

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

74 {
75  using std::placeholders::_1;
76  using std::placeholders::_2;
78 
79  pm->askedToLoadCategoryWithPlugin_.connect(std::bind(std::mem_fn(&PrintLoadingPlugins::askedToLoad),this, _1,_2));
80 
81  pm->goingToLoad_.connect(std::bind(std::mem_fn(&PrintLoadingPlugins::goingToLoad),this, _1));
82 
83 
84 
85 }
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:64
T get(const Candidate &c)
Definition: component.h:55
PrintLoadingPlugins::~PrintLoadingPlugins ( )
virtual

Definition at line 92 of file PrintLoadingPlugins.cc.

93 {
94 }
PrintLoadingPlugins::PrintLoadingPlugins ( const PrintLoadingPlugins )
privatedelete

Member Function Documentation

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

Definition at line 127 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().

129 {
131 
132  const PluginManager::CategoryToInfos& category = pm->categoryToInfos();
133 
134  PluginManager::CategoryToInfos::const_iterator itFound = category.find(iCategory);
135 
136  std::string libname("Not found");
137 
138  if(itFound != category.end()) {
139 
140  PluginInfo i;
141 
142  i.name_ = iPlugin;
143 
144  typedef std::vector<PluginInfo>::const_iterator PIItr;
145 
146  std::pair<PIItr,PIItr> range = std::equal_range(itFound->second.begin(),itFound->second.end(),i,PICompare());
147 
148  if(range.second - range.first > 1){
149 
150  const boost::filesystem::path& loadable = range.first->loadable_;
151 
152  libname = loadable.string();
153 
154  }
155 
156  edm::LogAbsolute("GetPlugin")<<"Getting> '"<<iCategory<< "' "<<iPlugin
157  <<"\n from "<<libname <<std::endl;
158  }
159 
160 }
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:82
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 96 of file PrintLoadingPlugins.cc.

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

96  {
98  descriptions.add("PrintLoadingPlugins", desc);
99  descriptions.setComment("This service logs each request to load a plugin.");
100 }
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 162 of file PrintLoadingPlugins.cc.

Referenced by PrintLoadingPlugins().

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