844{
845
847
848 ObjectKind kind = ObjectKind::kSession;
849
850 if (class_name.find("Session") != std::string::npos) {
851 kind = ObjectKind::kSession;
852 } else if (class_name.find("Segment") != std::string::npos) {
853 kind = ObjectKind::kSegment;
854 } else if (class_name.find("Application") != std::string::npos) {
855 kind = ObjectKind::kApplication;
856 } else if (class_name.find("Module") != std::string::npos) {
857 kind = ObjectKind::kModule;
858 } else {
859 throw daqconf::GeneralGraphToolError(
860 ERS_HERE,
"Unsupported class type \"" + std::string(class_name) +
"\"passed to get_object_kind");
861 }
862
863 return kind;
864}