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() [1/2]

PrintLoadingPlugins::PrintLoadingPlugins ( )

Definition at line 69 of file PrintLoadingPlugins.cc.

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 }

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

◆ ~PrintLoadingPlugins()

PrintLoadingPlugins::~PrintLoadingPlugins ( )
virtual

Definition at line 84 of file PrintLoadingPlugins.cc.

84 {}

◆ PrintLoadingPlugins() [2/2]

PrintLoadingPlugins::PrintLoadingPlugins ( const PrintLoadingPlugins )
privatedelete

Member Function Documentation

◆ askedToLoad()

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

Definition at line 114 of file PrintLoadingPlugins.cc.

114  {
116 
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 }

References taus_updatedMVAIds_cff::category, edmplugin::PluginManager::categoryToInfos(), edmplugin::PluginManager::get(), mps_fire::i, castor_dqm_sourceclient_file_cfg::path, FastTimerService_cff::range, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PrintLoadingPlugins().

◆ fillDescriptions()

void PrintLoadingPlugins::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 86 of file PrintLoadingPlugins.cc.

86  {
88  descriptions.add("PrintLoadingPlugins", desc);
89  descriptions.setComment("This service logs each request to load a plugin.");
90 }

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

◆ goingToLoad()

void PrintLoadingPlugins::goingToLoad ( const boost::filesystem::path &  Loadable_)

Definition at line 143 of file PrintLoadingPlugins.cc.

145 {
146  edm::LogAbsolute("LoadLib") << "Loading> " << Loadable_.string() << std::endl;
147 }

Referenced by PrintLoadingPlugins().

◆ operator=()

const PrintLoadingPlugins& PrintLoadingPlugins::operator= ( const PrintLoadingPlugins )
privatedelete
edm::LogAbsolute
Definition: MessageLogger.h:469
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
taus_updatedMVAIds_cff.category
category
Definition: taus_updatedMVAIds_cff.py:30
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edmplugin::PluginManager::categoryToInfos
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:80
edmplugin::PluginManager
Definition: PluginManager.h:45
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edmplugin::PluginManager::CategoryToInfos
std::map< std::string, Infos > CategoryToInfos
Definition: PluginManager.h:51
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ConfigurationDescriptions::setComment
void setComment(std::string const &value)
Definition: ConfigurationDescriptions.cc:48
get
#define get
edmplugin::PluginManager::askedToLoadCategoryWithPlugin_
edm::signalslot::Signal< void(const std::string &, const std::string &)> askedToLoadCategoryWithPlugin_
Definition: PluginManager.h:100
edm::signalslot::Signal::connect
void connect(U iFunc)
Definition: Signal.h:62
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
PrintLoadingPlugins::askedToLoad
void askedToLoad(const std::string &, const std::string &)
Definition: PrintLoadingPlugins.cc:114
edmplugin::PluginManager::goingToLoad_
edm::signalslot::Signal< void(const boost::filesystem::path &)> goingToLoad_
Definition: PluginManager.h:98
edmplugin::PluginInfo
Definition: PluginInfo.h:28
PrintLoadingPlugins::goingToLoad
void goingToLoad(const boost::filesystem::path &)
Definition: PrintLoadingPlugins.cc:143