This class provides an interface to retrieve the cycles ids and names depending on the timing domain. Since the timing Domain is lab specific, a child class inside the lab package implements most of the methods.
More...
#include <CycleDescriptor.h>
Inherited by fesa::NoneContextCycleDescriptor.
|
virtual | ~CycleDescriptor () |
| Destructor.
|
|
virtual const std::vector
< int32_t > & | getCycleIdsCol () const |
| Returns the ID-Collection of this cycle descriptor. Implementation can be done per lab, if default method is not sufficient. More...
|
|
virtual const std::map
< std::string, int32_t > & | getCycleSelectorCol () const |
| Returns the collection of cycle selectors Implementation can be done per lab, if default method is not sufficient. More...
|
|
virtual const std::map
< std::string, Selector > & | getCycleSelectors () const |
|
virtual int32_t | getCycleSelectorId (const std::string &cycleSelectorName) const |
| returns the SelectorID of the corresponding cycleSelector. Implementation can be done per lab, if default method is not sufficient. More...
|
|
virtual const std::string | getCycleSelectorName (int32_t cycleSelectorID) |
| returns the SelectorName of the corresponding cycleSelectorID. Implementation can be done per lab, if default method is not sufficient. More...
|
|
virtual const Selector & | getCycleSelector (const std::string &selectorName) const |
|
virtual bool | isValidCycleSelector (const std::string &cycleSelectorName) const |
| Checks, if the passed timing selector is valid. Implementation can be done per lab, if the default is not sufficient. More...
|
|
virtual bool | isRealCycleSelector (const std::string &cycleSelectorName) const |
| Checks if the given cycle selector represents a real cycle selector A real cycle selector represents a real cycle (e.g. "PSB.USER.TOF"), as opposed to a cycle selector which represents something else (e.g. an empty name meaning any cycle). This method must be called with a cycle selector name known to this CycleDescriptor, that is, returned by getCycleSelectorName() or one of the keys of the map returned by getCycleSelectorCol(). The default implementation returns false for an empty cycleSelectorName, true otherwise. More...
|
|
virtual bool | isSingleSlot () const |
|
const std::string & | getTimingDomain () const |
|
const std::string & | getTimingCriterion () const |
|
const std::string & | getName () const |
|
|
| CycleDescriptor (const std::string &timingDomain, const std::string &multiplexingCriterion) |
| Constructor. More...
|
|
virtual int32_t | addSelector (const std::string &value, int32_t timingId) |
| method to safely add Selectors (only possible at startup!!!) The selector that will be added is DOMAIN.CRITERION.VALUE, with DOMAIN and CRITERION fixed by this object's values of timingDomain_ and timingCriterion_. More...
|
|
This class provides an interface to retrieve the cycles ids and names depending on the timing domain. Since the timing Domain is lab specific, a child class inside the lab package implements most of the methods.
fesa::CycleDescriptor::CycleDescriptor |
( |
const std::string & |
timingDomain, |
|
|
const std::string & |
multiplexingCriterion |
|
) |
| |
|
protected |
Constructor.
- Parameters
-
timingDomain | timing domain of the timing descriptor |
multiplexingCriterion | of the timing descriptor |
int32_t fesa::CycleDescriptor::addSelector |
( |
const std::string & |
value, |
|
|
int32_t |
timingId |
|
) |
| |
|
protectedvirtual |
method to safely add Selectors (only possible at startup!!!) The selector that will be added is DOMAIN.CRITERION.VALUE, with DOMAIN and CRITERION fixed by this object's values of timingDomain_ and timingCriterion_.
- Parameters
-
value | The value part of the new selector, e.g. SFTPRO for PSB.USER.SFTPRO |
timingId | The timing ID of the selector (independent of FESA). If unavailable, use NOT_A_SELECTOR. |
- Returns
- the ID of the selector
const std::string fesa::CycleDescriptor::buildCycleDescriptorName |
( |
const std::string & |
timingDomain, |
|
|
const std::string & |
timingCriterion |
|
) |
| |
|
static |
const std::vector< int32_t > & fesa::CycleDescriptor::getCycleIdsCol |
( |
| ) |
const |
|
virtual |
Returns the ID-Collection of this cycle descriptor. Implementation can be done per lab, if default method is not sufficient.
- Returns
- map of IDs of this cycle descriptor
const Selector & fesa::CycleDescriptor::getCycleSelector |
( |
const std::string & |
selectorName | ) |
const |
|
virtual |
Returns the Selector object of this descriptor that corresponds to selectorName.
- Exceptions
-
FesaException | if no such cycle selector exists within this descriptor. |
const std::map< std::string, int32_t > & fesa::CycleDescriptor::getCycleSelectorCol |
( |
| ) |
const |
|
virtual |
Returns the collection of cycle selectors Implementation can be done per lab, if default method is not sufficient.
- Deprecated:
- Use getCycleSelectors() instead.
- Returns
- map of cycleSelectorName and slot numbers (artificial cycleID) of this cycle descriptor
int32_t fesa::CycleDescriptor::getCycleSelectorId |
( |
const std::string & |
cycleSelectorName | ) |
const |
|
virtual |
returns the SelectorID of the corresponding cycleSelector. Implementation can be done per lab, if default method is not sufficient.
- Parameters
-
cycleSelectorName | the name of the requested cycleSelector |
- Returns
- cycleSelector ID
- Exceptions
-
FesaException | is thrown when no cycleSelector Name was found for this cycleSelector |
const std::string fesa::CycleDescriptor::getCycleSelectorName |
( |
int32_t |
cycleSelectorID | ) |
|
|
virtual |
returns the SelectorName of the corresponding cycleSelectorID. Implementation can be done per lab, if default method is not sufficient.
- Parameters
-
cycleSelectorID | the ID of the requested cycleSelector |
- Returns
- cycleSelectorName
- Exceptions
-
FesaException | is thrown when no cycleSelector ID was found for this cycleSelector |
const std::map< std::string, Selector > & fesa::CycleDescriptor::getCycleSelectors |
( |
| ) |
const |
|
virtual |
Returns the collection of cycle selectors of this descriptor. The returned object is a const reference to a map of selector names (string) to Selector objects. May be overridden for lab-specific implementations.
const std::string & fesa::CycleDescriptor::getName |
( |
| ) |
const |
- Returns
- name of the timing descriptor
const std::string & fesa::CycleDescriptor::getTimingCriterion |
( |
| ) |
const |
- Returns
- multiplexing criterion of the timing descriptor
const std::string & fesa::CycleDescriptor::getTimingDomain |
( |
| ) |
const |
- Returns
- timing domain of the timing descriptor
bool fesa::CycleDescriptor::isRealCycleSelector |
( |
const std::string & |
cycleSelectorName | ) |
const |
|
virtual |
Checks if the given cycle selector represents a real cycle selector A real cycle selector represents a real cycle (e.g. "PSB.USER.TOF"), as opposed to a cycle selector which represents something else (e.g. an empty name meaning any cycle). This method must be called with a cycle selector name known to this CycleDescriptor, that is, returned by getCycleSelectorName() or one of the keys of the map returned by getCycleSelectorCol(). The default implementation returns false for an empty cycleSelectorName, true otherwise.
- Parameters
-
cycleSelectorName | the name of the cycle selector to check |
- Returns
- true if the cycle selector represents a real cycle, false otherwise
bool fesa::CycleDescriptor::isSingleSlot |
( |
| ) |
const |
|
virtual |
Returns true if this CycleDescriptor contains only one user which is not a real cycle selector. If it is the case, it means that there is no real user in this CycleDescriptor, and it cannot be used for multiplexing.
bool fesa::CycleDescriptor::isValidCycleSelector |
( |
const std::string & |
cycleSelectorName | ) |
const |
|
virtual |
Checks, if the passed timing selector is valid. Implementation can be done per lab, if the default is not sufficient.
- Parameters
-
cycleSelectorName | The name of the selector to check |
- Returns
- true, if valid
std::map<std::string, int32_t> fesa::CycleDescriptor::cycleSelectorCol_ |
|
protected |
Map of cycle-selector-names to their generated cycle ids.
std::map<std::string, Selector> fesa::CycleDescriptor::cycleSelectors_ |
|
protected |
Map of cycle selector names to Selector objects.
The documentation for this class was generated from the following files:
- CycleDescriptor.h
- CycleDescriptor.cpp