CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::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:64
PrintLoadingPlugins::PrintLoadingPlugins ( const PrintLoadingPlugins )
delete
PrintLoadingPlugins::~PrintLoadingPlugins ( )
virtual

Definition at line 83 of file PrintLoadingPlugins.cc.

83 {}

Member Function Documentation

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

Definition at line 113 of file PrintLoadingPlugins.cc.

References category, edmplugin::PluginManager::categoryToInfos(), edmplugin::PluginManager::get(), mps_fire::i, edmplugin::PluginInfo::name_, fed_dqm_sourceclient-live_cfg::path, sistrip::SpyUtilities::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
static const char category[]
const uint16_t range(const Frame &aFrame)
std::string name_
Definition: PluginInfo.h:29
Log< level::System, true > LogAbsolute
#define get
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)
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
const PrintLoadingPlugins& PrintLoadingPlugins::operator= ( const PrintLoadingPlugins )
delete