10#include <tracking/trackFindingCDC/numerics/Weight.h>
17 namespace TrackFindingCDC {
55 ECellFlag::c_PriorityPath +
59 ECellFlag::c_Background +
60 ECellFlag::c_Reverse +
62 ECellFlag::c_BadADCOrTOT);
67 ECellFlag::c_PriorityPath +
130 setFlags<ECellFlag::c_Assigned>(setTo);
136 setFlags<ECellFlag::c_Assigned>(
false);
148 setFlags<ECellFlag::c_Start>(setTo);
154 setFlags<ECellFlag::c_Start>(
false);
166 setFlags<ECellFlag::c_PriorityPath>(setTo);
172 setFlags<ECellFlag::c_PriorityPath>(
false);
184 setFlags<ECellFlag::c_Cycle>(setTo);
190 setFlags<ECellFlag::c_Cycle>(
false);
202 setFlags<c_TemporaryFlags>(
false);
208 setFlags<ECellFlag::c_Masked>(setTo);
214 setFlags<ECellFlag::c_Masked>(
false);
226 setFlags<ECellFlag::c_Taken>(setTo);
232 setFlags<ECellFlag::c_Taken>(
false);
247 setFlags<ECellFlag::c_Background>(setTo);
253 setFlags<ECellFlag::c_Background>(
false);
267 setFlags<ECellFlag::c_BadADCOrTOT>(setTo);
273 setFlags<ECellFlag::c_BadADCOrTOT>(
false);
285 setFlags<ECellFlag::c_Priority>(setTo);
291 setFlags<ECellFlag::c_Priority>(
false);
303 setFlags<ECellFlag::c_Reverse>(setTo);
309 setFlags<ECellFlag::c_Reverse>(
false);
321 setFlags<ECellFlag::c_Alias>(setTo);
327 setFlags<ECellFlag::c_Alias>(
false);
337 template<ECellFlags cellFlag>
365 {
return m_flags bitand flags; }
Cell used by the cellular automata.
const ECellFlags & getFlags() const
Getter for the ordered combination of the cell flags to mark some status of the cell.
bool hasBadADCOrTOTFlag() const
Gets the current state of the bad ADC or TOT flag.
void unsetPriorityPathFlag()
Resets the priority path marker flag to false.
void setBackgroundFlag(bool setTo=true)
Sets the background flag to the given value. Default value true.
bool hasAssignedFlag() const
Gets the current state of the already assigned marker flag.
void setTakenFlag(bool setTo=true)
Sets the taken flag to the given value. Default value true.
ECellFlag
Type for the status flags of cells in the cellular automata.
bool hasCycleFlag() const
Gets the current state of the cycle marker flag.
void unsetBackgroundFlag()
Resets the background flag to false.
static const ECellFlags c_AllFlags
Constant summing all possible cell flags.
void setCycleFlag(bool setTo=true)
Sets the cycle marker flag to the given value. Default value true.
ECellFlag ECellFlags
Type for an ordered combination of the status flags of cells in the cellular automata.
bool hasReverseFlag() const
Gets the current state of the do not use flag marker flag.
bool hasStartFlag() const
Gets the current state of the start marker flag.
bool hasAliasFlag() const
Gets the current state of the do not use flag marker flag.
AutomatonCell()
Default constructor for ROOT compatibility. Cell weight defaults to 0.
ECellFlags m_flags
Storage for the cell status flags.
void unsetAliasFlag()
Resets the alias flag to false.
void unsetReverseFlag()
Resets the reverse flag to false.
void setAliasFlag(bool setTo=true)
Sets the alias flag to the given value. Default value true.
void setReverseFlag(bool setTo=true)
Sets the reverse flag to the given value. Default value true.
static const ECellFlags c_TemporaryFlags
Flags that are reset at the start of each run of the cellular automaton.
void setMaskedFlag(bool setTo=true)
Sets the masked flag to the given value. Default value true.
Weight m_weight
Storage for the cell weight.
void unsetMaskedFlag()
Resets the masked flag to false.
AutomatonCell(const Weight &cellWeight, const ECellFlags &initialFlags)
Constructor with a certain cell weight and initial flags to be set.
void unsetStartFlag()
Resets the start marker flag to false.
Weight m_state
Storage for the cell state set by the cellular automata.
void setFlags(ECellFlags flags)
Setter for the cell flags.
void unsetTemporaryFlags()
Resets the assigned, start and cycle marker flag.
bool hasAnyFlags(ECellFlags flags) const
Checks if a cell has any of a sum of given flags.
void unsetAssignedFlag()
Resets the already assigned marker flag to false.
void unsetBadADCOrTOTFlag()
Resets the bad ADC or TOT flag to false.
void unsetTakenFlag()
Resets the taken flag to false.
bool hasMaskedFlag() const
Gets the current state of the masked marker flag.
void setFlags(bool setTo)
Setting accessing the flag by tag.
Weight getCellWeight() const
Getter for the cell weight.
Weight getCellState() const
Getter for the cell state.
bool hasBackgroundFlag() const
Gets the current state of the do not use flag marker flag.
bool hasTakenFlag() const
Gets the current state of the taken marker flag.
void clearFlags(ECellFlags flags=c_AllFlags)
Clear all flags.
void setAssignedFlag(bool setTo=true)
Sets the already assigned marker flag to the given value. Default value true.
void unsetCycleFlag()
Resets the cycle marker flag to false.
void setCellState(Weight state)
Setter for the cell state.
bool hasPriorityPathFlag() const
Gets the current state of the priority path marker flag.
void setStartFlag(bool setTo=true)
Sets the start marker flag to the given value. Default value true.
void unsetPriorityFlag()
Resets the priority flag to false.
AutomatonCell(const Weight &cellWeight)
Constructor with a certain cell weight.
bool hasPriorityFlag() const
Gets the current state of the do not use flag marker flag.
void setPriorityPathFlag(bool setTo=true)
Sets the priority path marker flag to the given value. Default value true.
void setPriorityFlag(bool setTo=true)
Sets the priority flag to the given value. Default value true.
void setBadADCOrTOTFlag(bool setTo=true)
Sets the bad ADC or TOT flag to the given value.
void setCellWeight(Weight weight)
Setter for the cell weight.
Abstract base class for different kinds of events.