JANA2
C++ framework for multi-threaded data processing
JCallGraphRecorder Class Reference

Classes

struct  JCallGraphNode
 
struct  JCallStackFrame
 
struct  JErrorCallStack
 

Public Types

enum  JDataSource {
  DATA_NOT_AVAILABLE = 1 ,
  DATA_FROM_CACHE ,
  DATA_FROM_SOURCE ,
  DATA_FROM_FACTORY
}
 
enum  JDataOrigin {
  ORIGIN_NOT_AVAILABLE = 1 ,
  ORIGIN_FROM_FACTORY ,
  ORIGIN_FROM_SOURCE
}
 

Public Member Functions

bool IsEnabled () const
 
void SetEnabled (bool recordingEnabled=true)
 
void StartFactoryCall (const std::string &callee_name, const std::string &callee_tag)
 
JDataOrigin SetInsertDataOrigin (JDataOrigin origin)
 
JDataOrigin GetInsertDataOrigin ()
 
void FinishFactoryCall (JDataSource data_source=JDataSource::DATA_FROM_FACTORY)
 
std::vector< JCallGraphNodeGetCallGraph ()
 Get the current factory call stack.
 
void AddToCallGraph (const JCallGraphNode &cs)
 Add specified item to call stack record but only if record_call_stack is true.
 
void AddToErrorCallStack (const JErrorCallStack &cs)
 Add layer to the factory call stack.
 
std::vector< JErrorCallStackGetErrorCallStack ()
 Get the current factory error call stack.
 
void PrintErrorCallStack () const
 Print the current factory call stack.
 
void Reset ()
 
std::vector< std::pair< std::string, std::string > > TopologicalSort () const
 

Member Function Documentation

◆ FinishFactoryCall()

void JCallGraphRecorder::FinishFactoryCall ( JCallGraphRecorder::JDataSource  data_source = JDataSource::DATA_FROM_FACTORY)
inline

Complete a call stack entry. This should be matched with a previous call to CallStackStart which was used to fill the cs structure.

◆ StartFactoryCall()

void JCallGraphRecorder::StartFactoryCall ( const std::string &  callee_name,
const std::string &  callee_tag 
)
inline

This is used to fill initial info into a call_stack_t stucture for recording the call stack. It should be matched with a call to CallStackEnd. It is normally called from the Get() method above, but may also be used by external actors to manipulate the call stack (presumably for good and not evil).


The documentation for this class was generated from the following files: