public final class ClustererFactory extends Object
This is a convenience class for creating specific clustering algorithms via their name
in the package org.hps.recon.ecal.cluster
. They must implement the Clusterer
interface.
If the name does not match one in the clustering package, the factory will attempt to create
a new class instance, assuming that the string is a canonical class name. It then checks if
this class implements the Clusterer
interface and will throw an error if it does not.
Clusterer
,
CTPClusterer
,
DualThresholdCosmicClusterer
,
GTPClusterer
,
GTPOnlineClusterer
,
LegacyClusterer
,
NearestNeighborClusterer
,
ReconClusterer
,
SimpleReconClusterer
,
SimpleCosmicClusterer
Modifier | Constructor and Description |
---|---|
private |
ClustererFactory()
We don't want this class to be instantiated.
|
Modifier and Type | Method and Description |
---|---|
static Clusterer |
create(String name)
Create a clustering algorithm with default cut values.
|
static Clusterer |
create(String name,
double[] cuts)
Create a clustering algorithm with a set of cuts.
|
private static Clusterer |
fromCanonicalClassName(String canonicalName)
Attempt to create a Clusterer object from the canonical class name.
|
private ClustererFactory()
public static Clusterer create(String name, double[] cuts)
name
- The name of the clustering algorithm.cuts
- The set of cuts (can be null).IllegalArgumentException
- if there is no Clusterer found with name.public static Clusterer create(String name)
create(String, double[])
.name
- The name of the clustering algorithm.Copyright © 2019. All rights reserved.