File indexing completed on 2025-01-30 10:12:06
0001
0002
0003
0004
0005 #pragma once
0006
0007 #include <JANA/Utils/JCallGraphRecorder.h>
0008 #include <JANA/JFactory.h>
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 class JCallGraphEntryMaker{
0020 public:
0021 JCallGraphEntryMaker(JCallGraphRecorder &callgraphrecorder, JFactory *factory) : m_call_graph(callgraphrecorder), m_factory(factory){
0022 m_call_graph.StartFactoryCall(m_factory->GetObjectName(), m_factory->GetTag());
0023 }
0024 JCallGraphEntryMaker(JCallGraphRecorder &callgraphrecorder, std::string name) : m_call_graph(callgraphrecorder) {
0025
0026 m_call_graph.StartFactoryCall(name, "");
0027 }
0028
0029 ~JCallGraphEntryMaker(){
0030 m_call_graph.FinishFactoryCall( m_factory ? m_factory->GetDataSource():JCallGraphRecorder::DATA_NOT_AVAILABLE );
0031 }
0032
0033 protected:
0034 JCallGraphRecorder &m_call_graph;
0035 JFactory *m_factory=nullptr;
0036 };
0037
0038