|
@@ -66,10 +66,10 @@ class KernelInfo
|
|
|
{
|
|
|
public:
|
|
|
const std::string& var() const {return _var;}
|
|
|
- std::string value() const {return _value;}
|
|
|
- std::string tgt_model() const {return _tgt_model;}
|
|
|
- std::string tgt_internal_var() const {return _tgt_internal_var;}
|
|
|
- bool internal_var() const {return _internal_var;}
|
|
|
+ const std::string& value() const {return _value;}
|
|
|
+ const std::string& tgt_model() const {return _tgt_model;}
|
|
|
+ const std::string& tgt_internal_var() const {return _tgt_internal_var;}
|
|
|
+ bool is_internal_var() const {return _internal_var;}
|
|
|
bool empty() const {return _empty;}
|
|
|
|
|
|
KernelInfo() :
|
|
@@ -221,7 +221,11 @@ public:
|
|
|
std::copy_if(TraceElements < Time >::begin(),
|
|
|
TraceElements < Time >::end(), std::back_inserter(result),
|
|
|
[model_name](TraceElement < Time > const & x)
|
|
|
- { return x.get_model_name() == model_name; });
|
|
|
+ { if(not x.get_kernel_info().empty())
|
|
|
+ if( x.get_kernel_info().tgt_model() == model_name)
|
|
|
+ return true;
|
|
|
+ return x.get_model_name() == model_name;
|
|
|
+ });
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -247,6 +251,22 @@ public:
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ TraceElements filter_variable(const std::string& var_name) const
|
|
|
+ {
|
|
|
+ TraceElements result;
|
|
|
+
|
|
|
+ std::copy_if(TraceElements < Time >::begin(),
|
|
|
+ TraceElements < Time >::end(), std::back_inserter(result),
|
|
|
+ [var_name](TraceElement < Time > const & x)
|
|
|
+ { if(x.get_kernel_info().empty())
|
|
|
+ return false;
|
|
|
+ return ((x.get_kernel_info().var() == var_name)
|
|
|
+ or (x.get_kernel_info().tgt_internal_var() == var_name));
|
|
|
+ });
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
std::string to_string(artis::utils::DateFormat date_format = artis::utils::DATE_FORMAT_EXTENDED) const
|
|
|
{
|
|
|
std::ostringstream ss;
|