Belle II Software  release-08-01-10
DefaultColorCycleStyling< AObject > Class Template Reference

Class template for coloring objects with stroke colors prepared to be the default color cycle. More...

#include <Styling.h>

Inheritance diagram for DefaultColorCycleStyling< AObject >:
Collaboration diagram for DefaultColorCycleStyling< AObject >:

Public Types

using ObjectMapping = Mapping< AObject >
 Mapping for the object type.
 

Public Member Functions

 DefaultColorCycleStyling ()
 Constructor. Sets the stroke mapping the the default color cycle.
 
AttributeMap map (int index, AObject &object) override
 Create a map of attributes from the stored attribute maps.
 
std::string info () override
 Returns informal string about the currently set mappings.
 
virtual std::unique_ptr< ObjectMappingcreateMapping (const std::string &mappingName)
 Create a mapping for the object from a name. More...
 
void set (const std::string &key, std::unique_ptr< ObjectMapping > mapping)
 Sets the given attribute to the attribute mapping.
 
void set (const std::string &key, const std::string &mappingName)
 Sets the given attribute to the fixed value.
 
void setStroke (const std::string &mappingName)
 Legacy method to set the mapping on how to match a object to the stroke color. More...
 
void setStrokeWidth (const std::string &mappingName)
 Legacy method to set the mapping on how to match a object to the stroke width. More...
 

Protected Attributes

std::map< std::string, std::unique_ptr< ObjectMapping > > m_mappingsByKey
 Map of attribute keys to mappings to be used.
 

Detailed Description

template<class AObject>
class Belle2::TrackFindingCDC::DefaultColorCycleStyling< AObject >

Class template for coloring objects with stroke colors prepared to be the default color cycle.

Definition at line 185 of file Styling.h.

Member Function Documentation

◆ createMapping()

virtual std::unique_ptr<ObjectMapping> createMapping ( const std::string &  mappingName)
inlinevirtualinherited

Create a mapping for the object from a name.

Can be overriden by the subclass to introduce names with specific meanings. The default is to use the name as a fixed attribute value.

Reimplemented in ChooseableHitStyling, ChooseableSegmentStyling, and ChooseableRecoTrackStyling.

Definition at line 136 of file Styling.h.

◆ setStroke()

void setStroke ( const std::string &  mappingName)
inlineinherited

Legacy method to set the mapping on how to match a object to the stroke color.

Parameters
mappingNameThe Name of the Mapping to be used. The translation from name to Mapping class must be defined in createMapping.

Definition at line 163 of file Styling.h.

◆ setStrokeWidth()

void setStrokeWidth ( const std::string &  mappingName)
inlineinherited

Legacy method to set the mapping on how to match a object to the stroke width.

Parameters
mappingNameThe Name of the Mapping to be used. The translation from name to Mapping class must be defined in createMapping.

Definition at line 173 of file Styling.h.


The documentation for this class was generated from the following file: