1 #ifndef HLTrigger_Timer_interface_ProcessCallGraph_h 2 #define HLTrigger_Timer_interface_ProcessCallGraph_h 11 #include <type_traits> 14 #pragma GCC diagnostic push 15 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" 16 #include <boost/graph/adjacency_list.hpp> 17 #include <boost/graph/lookup_edge.hpp> 18 #include <boost/graph/subgraph.hpp> 19 #pragma GCC diagnostic pop 36 using GraphType = boost::subgraph<boost::adjacency_list<
45 boost::property<boost::edge_index_t, int>,
47 boost::property<boost::graph_name_t, std::string>
59 PathType(
std::string const &
name, std::vector<unsigned int>
const & mop, std::vector<unsigned int>
const & mad, std::vector<unsigned int>
const & ldom) :
61 modules_on_path_(mop),
62 modules_and_dependencies_(mad),
63 last_dependency_of_module_(ldom)
66 PathType(
std::string &&
name, std::vector<unsigned int> && mop, std::vector<unsigned int> && mad, std::vector<unsigned int> && ldom) :
68 modules_on_path_(
std::
move(mop)),
69 modules_and_dependencies_(
std::
move(mad)),
70 last_dependency_of_module_(
std::
move(ldom))
97 std::vector<unsigned int>
const &
modules,
98 std::vector<PathType>
const & paths,
99 std::vector<PathType>
const & endPaths,
100 std::vector<unsigned int>
const & subprocesses = {}
107 subprocesses_(subprocesses)
113 std::vector<unsigned int> && modules,
114 std::vector<PathType> && paths,
115 std::vector<PathType> && endPaths,
116 std::vector<unsigned int> && subprocesses = {}
144 unsigned int size()
const;
153 NodeType
const &
operator[](
unsigned int module)
const;
156 std::vector<unsigned int>
depends(
unsigned int module)
const;
159 std::pair<std::vector<unsigned int>, std::vector<unsigned int>>
dependencies(std::vector<unsigned int>
const &
path);
168 std::vector<ProcessType>
const &
processes()
const;
199 #endif // not defined HLTrigger_Timer_interface_ProcessCallGraph_h
std::vector< unsigned int > modules_on_path_
unsigned int registerProcess(edm::ProcessContext const &)
PathType(std::string &&name, std::vector< unsigned int > &&mop, std::vector< unsigned int > &&mad, std::vector< unsigned int > &&ldom)
std::vector< unsigned int > modules_and_dependencies_
PathType(std::string const &name, std::vector< unsigned int > const &mop, std::vector< unsigned int > const &mad, std::vector< unsigned int > const &ldom)
unsigned int processId(edm::ProcessContext const &) const
std::unordered_map< std::string, unsigned int > process_id_
edm::ModuleDescription const & source() const
ProcessType(std::string &&name, GraphType const &graph, std::vector< unsigned int > &&modules, std::vector< PathType > &&paths, std::vector< PathType > &&endPaths, std::vector< unsigned int > &&subprocesses={})
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
std::vector< ProcessType > const & processes() const
std::vector< PathType > paths_
ProcessType const & processDescription(unsigned int) const
edm::ModuleDescription module_
void preSourceConstruction(edm::ModuleDescription 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
std::vector< ProcessType > process_description_
ProcessType(std::string const &name, GraphType const &graph, std::vector< unsigned int > const &modules, std::vector< PathType > const &paths, std::vector< PathType > const &endPaths, std::vector< unsigned int > const &subprocesses={})
std::vector< unsigned int > depends(unsigned int module) const
std::vector< unsigned int > subprocesses_
std::vector< PathType > endPaths_
std::pair< std::vector< unsigned int >, std::vector< unsigned int > > dependencies(std::vector< unsigned int > const &path)
unsigned int size() const
edm::ModuleDescription const & module(unsigned int module) const
std::vector< unsigned int > last_dependency_of_module_
std::vector< unsigned int > modules_
NodeType const & operator[](unsigned int module) const