1 #ifndef CategoryClasses_h 2 #define CategoryClasses_h 75 _types.push_back(type);
90 return _typesOK[index];
95 void SetCode(
int code,
int defaultcode = -999) {
98 for (std::vector<TrackTypeDefinition>::iterator it = _types.begin(); it != _types.end(); it++) {
99 if (it->_code == code) {
114 _typesOK[index] = ok;
117 void Reset(){_types.clear(); _isMultiType=
false;}
121 std::string* GetNames(std::string names[]);
124 Int_t* GetColors(Int_t colors[]);
127 Int_t* GetCodes(Int_t codes[]);
bool _enabled
Is this type enabled?
bool _isMultiType
Whether this is this a multi-type category (can several types coexist?).
void SetCategoryType(int index, bool ok)
Set the type for the actual track.
bool IsMultiType()
Is this a multi-type category ? (Can several types coexist?)
int _code
The unique code for this type ("muon==13", ...).
void AddType(TrackTypeDefinition &type)
Add a new type to this category.
int _order
The order in which it should appear when plotting.
TrackCategoryDefinition(bool multi=false)
int _color
The color to be displayed for tracks of this type.
std::vector< TrackTypeDefinition > _types
The types defined for this category.
int GetCode()
Get the code for the actual track in this category.
std::string _name
The name of this type ("muon", "electron", ...). It will be displayed in the legend.
void SetCode(int code, int defaultcode=-999)
unsigned int GetNTypes()
Number of types defined for this category.
std::vector< TrackTypeDefinition > & GetCategoryTypes()
Get the types defined for this category.
int _code
The code for the actual track.
std::vector< bool > _typesOK
The types for the actual track.
std::string _name
The name of this category (e.g. "particle").
bool CheckCategoryType(int index)
Check if the actual track is of this type.