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