The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::pevents::NestedPeventCollector< DataT > Class Template Reference

a class that is capable of recording pevents as key value pairs, where a PairDefinition has been defined with the key values, and function pointers to where to get the data for the pairs. More...

#include <NestedPeventCollector.hpp>

Inheritance diagram for sparta::pevents::NestedPeventCollector< DataT >:
Collaboration diagram for sparta::pevents::NestedPeventCollector< DataT >:

Public Member Functions

 NestedPeventCollector (const std::string &event_name, sparta::TreeNode *parent, const Clock *clk, const bool verbosity=false)
 
template<typename... Targs>
void collect (const Data_t &obj, const Targs &... pos_args)
 Actually collect the object, and write out a pevent. We ovverride the collect method to ensure the the generateCollectionString is always called, even when there is not a change.
 
virtual const std::string & eventName () override
 Return the ev name.
 
void adjustSkew (const int32_t &skew_amount)
 
virtual bool addTap (const std::string &type, const std::string &file, const bool verbose) override final
 Mark this pevent with a tap to output the pevent's data to a file.
 
virtual void turnOff (const std::string &type) override final
 
virtual void go () override final
 This method should be called on all pevent collectors when the trigger either manually fires to start or the trigger is reached.
 
- Public Member Functions inherited from sparta::pevents::PeventCollectorTreeNode
 PeventCollectorTreeNode (sparta::TreeNode *parent, const std::string &name)
 

Protected Member Functions

virtual void generateCollectionString_ () override final
 Override the generateCollectionString_() of the bases PairCollector, In this method, we use the pair_cache owned by PairCache.
 

Detailed Description

template<typename DataT>
class sparta::pevents::NestedPeventCollector< DataT >

a class that is capable of recording pevents as key value pairs, where a PairDefinition has been defined with the key values, and function pointers to where to get the data for the pairs.

Template Parameters
theType of Actual Collectable class that we want to capture a pevent from.

Definition at line 32 of file NestedPeventCollector.hpp.

Constructor & Destructor Documentation

◆ NestedPeventCollector()

template<typename DataT >
sparta::pevents::NestedPeventCollector< DataT >::NestedPeventCollector ( const std::string &  event_name,
sparta::TreeNode parent,
const Clock clk,
const bool  verbosity = false 
)
inline

Definition at line 50 of file NestedPeventCollector.hpp.

◆ ~NestedPeventCollector()

template<typename DataT >
virtual sparta::pevents::NestedPeventCollector< DataT >::~NestedPeventCollector ( )
inlinevirtual

Definition at line 70 of file NestedPeventCollector.hpp.

Member Function Documentation

◆ addTap()

template<typename DataT >
virtual bool sparta::pevents::NestedPeventCollector< DataT >::addTap ( const std::string &  type,
const std::string &  file,
const bool  verbose 
)
inlinefinaloverridevirtual

Mark this pevent with a tap to output the pevent's data to a file.

Parameters
typethe type of pevent being tapped. This is necessary since pevent's are tapped via a traversal of the tree, we would like to only create the tap if this pevent is of the same type.
filethe output file path we'd like the tap to write too
verboseare we trying to tap a verbose pevent or normal pevent.

Implements sparta::pevents::PeventCollectorTreeNode.

Definition at line 109 of file NestedPeventCollector.hpp.

◆ adjustSkew()

template<typename DataT >
void sparta::pevents::NestedPeventCollector< DataT >::adjustSkew ( const int32_t &  skew_amount)
inline

Definition at line 91 of file NestedPeventCollector.hpp.

◆ collect()

template<typename DataT >
template<typename... Targs>
void sparta::pevents::NestedPeventCollector< DataT >::collect ( const Data_t &  obj,
const Targs &...  pos_args 
)
inline

Actually collect the object, and write out a pevent. We ovverride the collect method to ensure the the generateCollectionString is always called, even when there is not a change.

Definition at line 78 of file NestedPeventCollector.hpp.

Here is the call graph for this function:

◆ eventName()

template<typename DataT >
virtual const std::string & sparta::pevents::NestedPeventCollector< DataT >::eventName ( )
inlineoverridevirtual

Return the ev name.

Implements sparta::pevents::PeventCollectorTreeNode.

Definition at line 87 of file NestedPeventCollector.hpp.

◆ generateCollectionString_()

template<typename DataT >
virtual void sparta::pevents::NestedPeventCollector< DataT >::generateCollectionString_ ( )
inlinefinaloverrideprotectedvirtual

Override the generateCollectionString_() of the bases PairCollector, In this method, we use the pair_cache owned by PairCache.

Definition at line 185 of file NestedPeventCollector.hpp.

Here is the call graph for this function:

◆ go()

template<typename DataT >
virtual void sparta::pevents::NestedPeventCollector< DataT >::go ( )
inlinefinaloverridevirtual

This method should be called on all pevent collectors when the trigger either manually fires to start or the trigger is reached.

Implements sparta::pevents::PeventCollectorTreeNode.

Definition at line 166 of file NestedPeventCollector.hpp.

◆ turnOff()

template<typename DataT >
virtual void sparta::pevents::NestedPeventCollector< DataT >::turnOff ( const std::string &  type)
inlinefinaloverridevirtual

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