JANA2
C++ framework for multi-threaded data processing
|
Public Member Functions | |
void | GetObjectSummaries (std::map< std::string, JObjectSummary > &objects, std::shared_ptr< const JEvent > &jevent, const std::string &object_name, const std::string factory_tag="") const |
Get objects for the specified factory in the form of strings organized inside JObjectSummary objects. | |
void | GetObjectSummariesAsJSON (std::vector< std::string > &json_vec, std::shared_ptr< const JEvent > &jevent, const std::string &object_name, const std::string factory_tag="") const |
Get objects for the specified factory in the form of JSON formatted strings. | |
std::string | ObjectToJSON (const std::string &hexaddr, const JObjectSummary &summary) const |
Convert a given JObjectSummary into a JSON formatted string. | |
template<typename T > | |
void | ConvertInt (std::stringstream &ss, T val, std::true_type) const |
template<typename T > | |
void | ConvertInt (std::stringstream &ss, T, std::false_type) const |
template<typename T > | |
void | ConvertUInt (std::stringstream &ss, T val, std::true_type) const |
template<typename T > | |
void | ConvertUInt (std::stringstream &ss, T, std::false_type) const |
template<typename T > | |
std::string | GetAddrAsString (void *addr) const |
The GetAddrAsString template is used to convert an untyped addr into a std::string. | |
std::string JStringification::GetAddrAsString | ( | void * | addr | ) | const |
The GetAddrAsString template is used to convert an untyped addr into a std::string.
It interprets the address as pointing to a primitive object of the same type as the template argument.
void JStringification::GetObjectSummaries | ( | std::map< std::string, JObjectSummary > & | objects, |
std::shared_ptr< const JEvent > & | jevent, | ||
const std::string & | object_name, | ||
const std::string | factory_tag = "" |
||
) | const |
Get objects for the specified factory in the form of strings organized inside JObjectSummary objects.
Get objects for the specified factory in the form of strings.
References JObjectSummary::add(), and JObjectMember::name.
Referenced by GetObjectSummariesAsJSON().
std::string JStringification::ObjectToJSON | ( | const std::string & | hexaddr, |
const JObjectSummary & | summary | ||
) | const |
Convert a given JObjectSummary into a JSON formatted string.
An additiona "hexaddr" member will be added with the value passed in to this method. This is meant to contain the address of the actual object the JObjectSummary represents.
References JObjectSummary::get_fields().
Referenced by GetObjectSummariesAsJSON().