Beispiel #1
0
    def find_analyses(self, analysis_class, detector=None):
        """
        Finds all analyses matching the specified class.
        If *detector* is not ``None``, the analysis detector must also be
        equal to the specified detector.

        :return: :class:`list` of analysis objects
        """
        analyses = find_by_type(self.analyses, analysis_class)

        if detector is None:
            return analyses

        return [
            analysis for analysis in analyses if analysis.detector == detector
        ]
Beispiel #2
0
 def find_result(self, result_class):
     return find_by_type(self.results, result_class)
Beispiel #3
0
 def find_detectors(self, detector_class):
     return find_by_type(self.detectors, detector_class)
Beispiel #4
0
 def find_models(self, model_class):
     return find_by_type(self.models, model_class)
Beispiel #5
0
 def find_limits(self, limit_class):
     return find_by_type(self.limits, limit_class)
Beispiel #6
0
 def find_analyses(self, analysis_class):
     return find_by_type(self.analyses, analysis_class)