10 #ifndef LOFAR_LMWCOMMON_CLUSTERDESC_H
11 #define LOFAR_LMWCOMMON_CLUSTERDESC_H
50 void setName(
const std::string& name) { itsName = name; }
58 void write(std::ostream& os)
const;
61 const std::string&
getName()
const {
return itsName; }
67 const std::vector<NodeDesc>&
getNodes()
const {
return itsNodes; }
70 const std::map<std::string, std::vector<int>>&
getMap()
const {
76 void init(
const std::string& parsetName);
89 void getSubClusters(
const std::vector<std::string>& parsetNames,
90 const std::string& defaultDir);
93 void add2Map(
int nodeIndex);
96 std::vector<NodeDesc> itsNodes;
97 std::map<std::string, int> itsNodeMap;
98 std::map<std::string, std::vector<int>> itsFS2Nodes;
Description of a node in a cluster.
Description of a cluster and the nodes in it.
Definition: ClusterDesc.h:41
const std::string & getName() const
Get the cluster name.
Definition: ClusterDesc.h:61
const std::vector< NodeDesc > & getNodes() const
Get all nodes.
Definition: ClusterDesc.h:67
const std::map< std::string, std::vector< int > > & getMap() const
Get the map of file system to node index.
Definition: ClusterDesc.h:70
const NodeDesc & getNode(const std::string &nodeName) const
Get a specific node. An exception is thrown if not found.
void setName(const std::string &name)
Set cluster name.
Definition: ClusterDesc.h:50
ClusterDesc(const std::string &parsetName)
Construct from the given parameterset.
void addNode(const NodeDesc &node, bool canExist=false)
void write(std::ostream &os) const
Write it in parset format.
ClusterDesc()
Construct an empty object.
Definition: ClusterDesc.h:44
Description of a node in a cluster.
Definition: NodeDesc.h:31
NodeType
Define the node types.
Definition: NodeDesc.h:34
Implements a map of Key-Value pairs.
Definition: ParameterSet.h:31
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53