|
|
Go to the documentation of this file.
13 #pragma GCC diagnostic push
14 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
15 #include <boost/graph/depth_first_search.hpp>
16 #pragma GCC diagnostic pop
39 using std::pair<I, I>::pair;
73 boost::get_property(graph, boost::graph_name) = context.
processName();
76 unsigned int size = 0;
78 size = std::accumulate(
83 for (
size_t i = 0;
i <
size; ++
i)
84 boost::add_vertex(graph);
87 std::vector<unsigned int>
modules;
108 std::vector<PathType>
paths;
110 for (
unsigned int i = 0;
i <
size; ++
i) {
111 std::vector<unsigned int>
modules;
121 std::vector<PathType> endPaths;
122 endPaths.reserve(
size);
123 for (
unsigned int i = 0;
i <
size; ++
i) {
124 std::vector<unsigned int>
modules;
163 std::vector<unsigned int>
colors(boost::num_vertices(
graph_));
164 auto colormap = boost::make_container_vertex_map(
colors);
167 boost::default_dfs_visitor visitor;
168 boost::depth_first_visit(
graph_,
module, visitor, colormap);
172 unsigned int size = 0;
173 for (
unsigned int color :
colors)
174 if (boost::black_color == color)
178 for (
unsigned int i = 0;
i <
colors.size(); ++
i)
179 if (boost::black_color ==
colors[
i])
192 std::vector<unsigned int>
const&
path) {
193 std::vector<unsigned int>
colors(boost::num_vertices(
graph_));
194 auto colormap = boost::make_container_vertex_map(
colors);
197 boost::default_dfs_visitor visitor;
199 boost::depth_first_visit(
graph_,
module, visitor, colormap);
201 unsigned int size = 0;
202 for (
unsigned int color :
colors)
213 for (
unsigned int& color :
colors)
217 struct record_vertices : boost::default_dfs_visitor {
218 record_vertices(std::vector<unsigned int>&
vertices) : vertices_(
vertices) {}
222 std::vector<unsigned int>& vertices_;
229 boost::depth_first_visit(
graph_,
module, recorder, colormap);
239 static unsigned int s_id = 0;
244 <<
"ProcessCallGraph::preBeginJob(): called for subprocess \"" << context.
processName() <<
"\""
252 <<
"ProcessCallGraph::preBeginJob(): called twice for the same "
266 <<
"ProcessCallGraph::processId(): unexpected " << (context.
isSubProcess() ?
"subprocess" :
"process") <<
" "
277 <<
"ProcessCallGraph::processId(): unexpected (sub)process " <<
processName;
ProcessContext const & parentProcessContext() const
iterator_pair_as_a_range< I > make_range(std::pair< I, I > p)
const std::vector< ProcessType > & processes() const
bool isSubProcess() const
std::vector< ProcessType > process_description_
U second(std::pair< T, U > const &p)
const ProcessType & processDescription(unsigned int) const
std::vector< unsigned int > depends(unsigned int module) const
boost::subgraph< boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS, NodeType, boost::property< boost::edge_index_t, int >, boost::property< boost::graph_name_t, std::string > >> GraphType
unsigned int size() const
const std::complex< double > I
const NodeType & operator[](unsigned int module) const
std::pair< std::vector< unsigned int >, std::vector< unsigned int > > dependencies(std::vector< unsigned int > const &path)
std::vector< std::string > const & endPaths() const
std::string const & getTrigPath(size_type const i) const
std::vector< ModuleDescription const * > const & modulesWhoseProductsAreConsumedBy(unsigned int moduleID) const
std::vector< ModuleDescription const * > const & modulesOnPath(unsigned int pathIndex) const
std::string const & processName() const
unsigned int registerProcess(edm::ProcessContext const &)
const edm::ModuleDescription & source() const
EDMModuleType edmModuleTypeEnum(edm::ModuleDescription const &module)
std::vector< std::string > const & paths() const
Strings const & getTrigPaths() const
std::string const & getEndPath(size_type const i) const
std::vector< ModuleDescription const * > const & modulesOnEndPath(unsigned int endPathIndex) const
std::unordered_map< std::string, unsigned int > process_id_
unsigned int processId(edm::ProcessContext const &) const
const edm::ModuleDescription & module(unsigned int module) const
std::vector< ModuleDescription const * > const & allModules() const
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
void preSourceConstruction(edm::ModuleDescription const &)