Chi-Tech
chi::TimingLog Class Reference

#include <TimingLog.h>

Inheritance diagram for chi::TimingLog:
chi::ChiLog

Public Member Functions

TimingBlockCreateTimingBlock (const std::string &name, const std::string &parent_name="")
 
TimingBlockCreateOrGetTimingBlock (const std::string &name, const std::string &parent_name="")
 
TimingBlockGetTimingBlock (const std::string &name)
 

Protected Attributes

std::map< std::string, std::unique_ptr< TimingBlock > > timing_blocks_
 

Detailed Description

Utility class for defining time logs.

Definition at line 16 of file TimingLog.h.

Member Function Documentation

◆ CreateOrGetTimingBlock()

TimingBlock & chi::TimingLog::CreateOrGetTimingBlock ( const std::string &  name,
const std::string &  parent_name = "" 
)

If the timing block with the given exists, this method returns that block, otherwise it creates a time block and returns a reference to it. If the parent name is not found then this method throws std::invalid_argument. The parent name may be empty, i.e. "", which will revert to the main timing block "ChiTech"

Definition at line 53 of file TimingLog.cc.

◆ CreateTimingBlock()

TimingBlock & chi::TimingLog::CreateTimingBlock ( const std::string &  name,
const std::string &  parent_name = "" 
)

Creates a time block and returns a reference to it. If the name is already taken or the parent name is not found then this method throws std::invalid_argument. The parent name may be empty, i.e. "", which will revert to the main timing block "ChiTech"

Definition at line 15 of file TimingLog.cc.

◆ GetTimingBlock()

TimingBlock & chi::TimingLog::GetTimingBlock ( const std::string &  name)

Returns a reference to the timing block with the given name. If a timing block with that name does not exist then this method will throw std::invalid_argument.

Definition at line 63 of file TimingLog.cc.

Field Documentation

◆ timing_blocks_

std::map<std::string, std::unique_ptr<TimingBlock> > chi::TimingLog::timing_blocks_
protected

Definition at line 38 of file TimingLog.h.


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