760{
761
763
764 ObjectKind kind = ObjectKind::kSession;
765
766 if (class_name.find("Session") != std::string::npos) {
767 kind = ObjectKind::kSession;
768 } else if (class_name.find("Segment") != std::string::npos) {
769 kind = ObjectKind::kSegment;
770 } else if (class_name.find("Application") != std::string::npos) {
771 kind = ObjectKind::kApplication;
772 } else if (class_name.find("Module") != std::string::npos) {
773 kind = ObjectKind::kModule;
774 } else {
775 throw daqconf::GeneralGraphToolError(
776 ERS_HERE,
"Unsupported class type \"" + std::string(class_name) +
"\"passed to get_object_kind");
777 }
778
779 return kind;
780}