File indexing completed on 2025-01-18 10:17:36
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
0022 JCallGraphEntryMaker(JCallGraphRecorder &callgraphrecorder, JFactory *factory) : m_call_graph(callgraphrecorder), m_factory(factory){
0023 m_call_graph.StartFactoryCall(m_factory->GetObjectName(), m_factory->GetTag());
0024 }
0025
0026 JCallGraphEntryMaker(JCallGraphRecorder &callgraphrecorder, std::string name) : m_call_graph(callgraphrecorder) {
0027
0028 m_call_graph.StartFactoryCall(name, "");
0029 }
0030
0031 ~JCallGraphEntryMaker(){
0032 m_call_graph.FinishFactoryCall( m_factory ? m_factory->GetDataSource():JCallGraphRecorder::DATA_NOT_AVAILABLE );
0033 }
0034
0035 protected:
0036 JCallGraphRecorder &m_call_graph;
0037 JFactory *m_factory=nullptr;
0038 };
0039
0040