CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
PrintLoadingPlugins Class Reference

#include <FWCore/Services/interface/PrintLoadingPlugins.h>

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 &)
 
 PrintLoadingPlugins (const PrintLoadingPlugins &)
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 34 of file PrintLoadingPlugins.h.

Constructor & Destructor Documentation

PrintLoadingPlugins::PrintLoadingPlugins ( )

Definition at line 45 of file PrintLoadingPlugins.cc.

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

46 {
48 
49  pm->askedToLoadCategoryWithPlugin_.connect(boost::bind(boost::mem_fn(&PrintLoadingPlugins::askedToLoad),this, _1,_2));
50 
51  pm->goingToLoad_.connect(boost::bind(boost::mem_fn(&PrintLoadingPlugins::goingToLoad),this, _1));
52 
53 
54 
55 }
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:63
T get(const Candidate &c)
Definition: component.h:55
PrintLoadingPlugins::~PrintLoadingPlugins ( )
virtual

Definition at line 62 of file PrintLoadingPlugins.cc.

63 {
64 }
PrintLoadingPlugins::PrintLoadingPlugins ( const PrintLoadingPlugins )
private

Member Function Documentation

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

Definition at line 97 of file PrintLoadingPlugins.cc.

References python.rootplot.argparse::category, edmplugin::PluginManager::categoryToInfos(), edmplugin::PluginManager::get(), i, edmplugin::PluginInfo::name_, cmsHarvester::path, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PrintLoadingPlugins().

99 {
101 
102  const PluginManager::CategoryToInfos& category = pm->categoryToInfos();
103 
104  PluginManager::CategoryToInfos::const_iterator itFound = category.find(iCategory);
105 
106  std::string libname("Not found");
107 
108  if(itFound != category.end()) {
109 
110  PluginInfo i;
111 
112  i.name_ = iPlugin;
113 
114  typedef std::vector<PluginInfo>::const_iterator PIItr;
115 
116  std::pair<PIItr,PIItr> range = std::equal_range(itFound->second.begin(),itFound->second.end(),i,PICompare());
117 
118  if(range.second - range.first > 1){
119 
120  const boost::filesystem::path& loadable = range.first->loadable_;
121 
122  libname = loadable.string();
123 
124  }
125 
126  edm::LogAbsolute("GetPlugin")<<"Getting> '"<<iCategory<< "' "<<iPlugin
127  <<"\n from "<<libname <<std::endl;
128  }
129 
130 }
const CategoryToInfos & categoryToInfos() const
Definition: PluginManager.h:82
int i
Definition: DBlmapReader.cc:9
tuple path
else: Piece not in the list, fine.
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 66 of file PrintLoadingPlugins.cc.

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

66  {
68  descriptions.add("PrintLoadingPlugins", desc);
69  descriptions.setComment("This service logs each request to load a plugin.");
70 }
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 132 of file PrintLoadingPlugins.cc.

Referenced by PrintLoadingPlugins().

134 {
135  edm::LogAbsolute("LoadLib")<<"Loading> "<<Loadable_.string()<< std::endl;
136 }
const PrintLoadingPlugins& PrintLoadingPlugins::operator= ( const PrintLoadingPlugins )
private