CMS 3D CMS Logo

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

Public Member Functions

void askedToLoad (const std::string &, const std::string &)
 
void goingToLoad (const std::filesystem::path &)
 
const PrintLoadingPluginsoperator= (const PrintLoadingPlugins &)=delete
 
 PrintLoadingPlugins ()
 
 PrintLoadingPlugins (const PrintLoadingPlugins &)=delete
 
virtual ~PrintLoadingPlugins ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 32 of file PrintLoadingPlugins.cc.

Constructor & Destructor Documentation

◆ PrintLoadingPlugins() [1/2]

PrintLoadingPlugins::PrintLoadingPlugins ( )

Definition at line 68 of file PrintLoadingPlugins.cc.

68  {
69  using std::placeholders::_1;
70  using std::placeholders::_2;
72 
73  pm->askedToLoadCategoryWithPlugin_.connect(std::bind(std::mem_fn(&PrintLoadingPlugins::askedToLoad), this, _1, _2));
74 
75  pm->goingToLoad_.connect(std::bind(std::mem_fn(&PrintLoadingPlugins::goingToLoad), this, _1));
76 }

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

◆ PrintLoadingPlugins() [2/2]

PrintLoadingPlugins::PrintLoadingPlugins ( const PrintLoadingPlugins )
delete

◆ ~PrintLoadingPlugins()

PrintLoadingPlugins::~PrintLoadingPlugins ( )
virtual

Definition at line 83 of file PrintLoadingPlugins.cc.

83 {}

Member Function Documentation

◆ askedToLoad()

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

Definition at line 113 of file PrintLoadingPlugins.cc.

113  {
115 
117 
118  PluginManager::CategoryToInfos::const_iterator itFound = category.find(iCategory);
119 
120  std::string libname("Not found");
121 
122  if (itFound != category.end()) {
123  PluginInfo i;
124 
125  i.name_ = iPlugin;
126 
127  typedef std::vector<PluginInfo>::const_iterator PIItr;
128 
129  std::pair<PIItr, PIItr> range = std::equal_range(itFound->second.begin(), itFound->second.end(), i, PICompare());
130 
131  if (range.second - range.first > 1) {
132  const std::filesystem::path& loadable = range.first->loadable_;
133 
134  libname = loadable.string();
135  }
136 
137  edm::LogAbsolute("GetPlugin") << "Getting> '" << iCategory << "' " << iPlugin << "\n from " << libname
138  << std::endl;
139  }
140 }

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

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

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

◆ goingToLoad()

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

Definition at line 142 of file PrintLoadingPlugins.cc.

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

Referenced by PrintLoadingPlugins().

◆ operator=()

const PrintLoadingPlugins& PrintLoadingPlugins::operator= ( const PrintLoadingPlugins )
delete
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
taus_updatedMVAIds_cff.category
category
Definition: taus_updatedMVAIds_cff.py:31
mps_fire.i
i
Definition: mps_fire.py:428
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edmplugin::PluginManager::categoryToInfos
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:82
edmplugin::PluginManager
Definition: PluginManager.h:45
edmplugin::PluginManager::goingToLoad_
edm::signalslot::Signal< void(const std::filesystem::path &)> goingToLoad_
Definition: PluginManager.h:100
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
PrintLoadingPlugins::goingToLoad
void goingToLoad(const std::filesystem::path &)
Definition: PrintLoadingPlugins.cc:142
edm::ConfigurationDescriptions::setComment
void setComment(std::string const &value)
Definition: ConfigurationDescriptions.cc:48
edm::LogAbsolute
Log< level::System, true > LogAbsolute
Definition: MessageLogger.h:134
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edmplugin::PluginManager::askedToLoadCategoryWithPlugin_
edm::signalslot::Signal< void(const std::string &, const std::string &)> askedToLoadCategoryWithPlugin_
Definition: PluginManager.h:102
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::signalslot::Signal::connect
void connect(U iFunc)
Definition: Signal.h:64
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:113
edmplugin::PluginInfo
Definition: PluginInfo.h:28