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 37 using GraphType = boost::subgraph<boost::adjacency_list<
46 boost::property<boost::edge_index_t, int>,
48 boost::property<boost::graph_name_t, std::string>
60 PathType(
std::string name, std::vector<unsigned int> mop, std::vector<unsigned int> mad, std::vector<unsigned int> ldom) :
62 modules_on_path_(
std::
move(mop)),
63 modules_and_dependencies_(
std::
move(mad)),
64 last_dependency_of_module_(
std::
move(ldom))
91 std::vector<unsigned int>
modules,
92 std::vector<PathType> paths,
93 std::vector<PathType> endPaths,
94 std::vector<unsigned int> subprocesses = {}
107 std::vector<unsigned int> && modules,
108 std::vector<PathType> && paths,
109 std::vector<PathType> && endPaths,
110 std::vector<unsigned int> && subprocesses = {}
138 unsigned int size()
const;
147 NodeType
const &
operator[](
unsigned int module)
const;
150 std::vector<unsigned int>
depends(
unsigned int module)
const;
153 std::pair<std::vector<unsigned int>, std::vector<unsigned int>>
dependencies(std::vector<unsigned int>
const &
path);
162 std::vector<ProcessType>
const &
processes()
const;
193 #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_
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_
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_
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_
NodeType const & operator[](unsigned int module) const