1 #ifndef HLTrigger_Timer_interface_ProcessCallGraph_h 2 #define HLTrigger_Timer_interface_ProcessCallGraph_h 12 #include <type_traits> 15 #pragma GCC diagnostic push 16 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" 17 #include <boost/graph/adjacency_list.hpp> 18 #include <boost/graph/lookup_edge.hpp> 19 #include <boost/graph/subgraph.hpp> 20 #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>>>;
54 std::vector<unsigned int>
60 std::vector<unsigned int> mop,
61 std::vector<unsigned int> mad,
62 std::vector<unsigned int> ldom)
90 std::vector<unsigned int>
modules,
91 std::vector<PathType>
paths,
92 std::vector<PathType> endPaths,
93 std::vector<unsigned int> subprocesses = {})
103 std::vector<unsigned int> &&
modules,
104 std::vector<PathType> &&
paths,
105 std::vector<PathType> &&endPaths,
106 std::vector<unsigned int> &&subprocesses = {})
132 unsigned int size()
const;
144 std::vector<unsigned int>
depends(
unsigned int module)
const;
147 std::pair<std::vector<unsigned int>, std::vector<unsigned int>>
dependencies(std::vector<unsigned int>
const &
path);
156 std::vector<ProcessType>
const &
processes()
const;
184 #endif // not defined HLTrigger_Timer_interface_ProcessCallGraph_h
std::vector< unsigned int > modules_on_path_
unsigned int registerProcess(edm::ProcessContext const &)
std::vector< unsigned int > modules_and_dependencies_
edm::ModuleDescription const & source() const
std::unordered_map< std::string, unsigned int > process_id_
PathType & operator=(PathType const &other)=default
edm::ModuleDescription const & module(unsigned int module) 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={})
std::vector< ProcessType > const & processes() const
void preBeginJob(edm::PathsAndConsumesOfModulesBase const &, edm::ProcessContext const &)
std::vector< PathType > paths_
edm::ModuleDescription module_
unsigned int processId(edm::ProcessContext const &) const
void preSourceConstruction(edm::ModuleDescription const &)
static constexpr unsigned int invalidID()
Returns a value identifying an invalid id (the max unsigned int value)
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_
unsigned int size() const
std::vector< unsigned int > depends(unsigned int module) const
ProcessType & operator=(ProcessType const &other)=delete
std::vector< unsigned int > subprocesses_
NodeType const & operator[](unsigned int module) const
std::vector< PathType > endPaths_
std::pair< std::vector< unsigned int >, std::vector< unsigned int > > dependencies(std::vector< unsigned int > const &path)
ProcessCallGraph()=default
ProcessType const & processDescription(unsigned int) const
std::vector< unsigned int > last_dependency_of_module_
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={})
PathType(std::string name, std::vector< unsigned int > mop, std::vector< unsigned int > mad, std::vector< unsigned int > ldom)
std::vector< unsigned int > modules_