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.

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

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 }
void goingToLoad(const std::filesystem::path &)
edm::signalslot::Signal< void(const std::filesystem::path &)> goingToLoad_
edm::signalslot::Signal< void(const std::string &, const std::string &)> askedToLoadCategoryWithPlugin_
void askedToLoad(const std::string &, const std::string &)
#define get
void connect(U iFunc)
Definition: Signal.h:74

◆ 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.

References validateAlignments::category, edmplugin::PluginManager::categoryToInfos(), edmplugin::PluginManager::get(), mps_fire::i, EnsembleCalibrationLA_cfg::path, isotrackApplyRegressor::range, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PrintLoadingPlugins().

113  {
115 
116  const PluginManager::CategoryToInfos& category = pm->categoryToInfos();
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 }
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:82
Log< level::System, true > LogAbsolute
#define get

◆ fillDescriptions()

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

Definition at line 85 of file PrintLoadingPlugins.cc.

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

85  {
87  descriptions.add("PrintLoadingPlugins", desc);
88  descriptions.setComment("This service logs each request to load a plugin.");
89 }
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ goingToLoad()

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

Definition at line 142 of file PrintLoadingPlugins.cc.

Referenced by PrintLoadingPlugins().

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

◆ operator=()

const PrintLoadingPlugins& PrintLoadingPlugins::operator= ( const PrintLoadingPlugins )
delete