fesa-core  4.2.0
fesa::CycleDescriptor Class Reference

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.

Public Member Functions

virtual ~CycleDescriptor ()
 Destructor.
 
virtual const std::vector
< int32_t > & 
getCycleIdsCol ()
 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 ()
 Returns the collection of cycle selectors Implementation can be done per lab, if default method is not sufficient. More...
 
virtual int32_t getCycleSelectorId (const std::string &cycleSelectorName)
 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 bool isValidCycleSelector (const std::string &cycleSelectorName)
 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)
 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 std::string & getTimingCriterion ()
 
const std::string & getName ()
 

Static Public Member Functions

static const std::string buildCycleDescriptorName (const std::string &timingDomain, const std::string &timingCriterion)
 

Protected Member Functions

 CycleDescriptor (const std::string &timingDomain, const std::string &multiplexingCriterion)
 Constructor. More...
 
virtual void addSelector (const std::string &cycleSelectorName)
 method to safely add Selectors (only possible at startup!!!) More...
 
virtual void renameSelector (const std::string &oldCycleSelectorName, const std::string &newCycleSelectorName)
 method to rename an existing selector More...
 

Protected Attributes

std::string timingDomain_
 timing domain
 
std::string timingCriterion_
 multiplexing criterion
 
std::string name_
 internal name of the timing descriptor
 

Detailed Description

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.

Constructor & Destructor Documentation

fesa::CycleDescriptor::CycleDescriptor ( const std::string &  timingDomain,
const std::string &  multiplexingCriterion 
)
protected

Constructor.

Parameters
timingDomaintiming domain of the timing descriptor
multiplexingCriterionof the timing descriptor

Member Function Documentation

void fesa::CycleDescriptor::addSelector ( const std::string &  cycleSelectorName)
protectedvirtual

method to safely add Selectors (only possible at startup!!!)

Parameters
cycleSelectorNameThe name of the new selector
const std::string fesa::CycleDescriptor::buildCycleDescriptorName ( const std::string &  timingDomain,
const std::string &  timingCriterion 
)
static

Returns the name of the CycleDescriptor based on the given argument

Returns
name of the CycleDescriptor
const std::vector< int32_t > & fesa::CycleDescriptor::getCycleIdsCol ( )
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 std::map< std::string, int32_t > & fesa::CycleDescriptor::getCycleSelectorCol ( )
virtual

Returns the collection of cycle selectors Implementation can be done per lab, if default method is not sufficient.

Returns
map of cycleSelectorName and slot numbers (artificial cycleID) of this cycle descriptor
int32_t fesa::CycleDescriptor::getCycleSelectorId ( const std::string &  cycleSelectorName)
virtual

returns the SelectorID of the corresponding cycleSelector. Implementation can be done per lab, if default method is not sufficient.

Parameters
cycleSelectorNamethe name of the requested cycleSelector
Returns
cycleSelector ID
Exceptions
FesaExceptionis 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
cycleSelectorIDthe ID of the requested cycleSelector
Returns
cycleSelectorName
Exceptions
FesaExceptionis thrown when no cycleSelector ID was found for this cycleSelector
const std::string & fesa::CycleDescriptor::getName ( )
Returns
name of the timing descriptor
const std::string & fesa::CycleDescriptor::getTimingCriterion ( )
Returns
multiplexing criterion of the timing descriptor
const std::string & fesa::CycleDescriptor::getTimingDomain ( )
Returns
timing domain of the timing descriptor
bool fesa::CycleDescriptor::isRealCycleSelector ( const std::string &  cycleSelectorName)
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
cycleSelectorNamethe 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)
virtual

Checks, if the passed timing selector is valid. Implementation can be done per lab, if the default is not sufficient.

Parameters
cycleSelectorNameThe name of the selector to check
Returns
true, if valid
void fesa::CycleDescriptor::renameSelector ( const std::string &  oldCycleSelectorName,
const std::string &  newCycleSelectorName 
)
protectedvirtual

method to rename an existing selector

Parameters
oldCycleSelectorNameThe cycleSelector to rename
newCycleSelectorNameThe new name of the cycleSelector

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