#include <State.h>
Collaboration diagram for State:
Public Member Functions | |
State () | |
State (string n) | |
State (const State &s) | |
State & | operator= (const State &s) |
~State () | |
void | setName (string n) |
void | setComment (string c) |
void | setLdaVersion (Version *v) |
void | setDccVersion (Version *v) |
void | setDifVersion (Version *v) |
void | setAsicVersion (Version *v) |
string | getName () |
Version * | getLdaVersion () |
Version * | getDccVersion () |
Version * | getDifVersion () |
Version * | getAsicVersion () |
bool | isLocked () |
void | upload () throw (ILCException::Exception) |
vector< int > | getDifIDs () |
vector< int > | getAsicIDs () |
vector< int > | getDccIDs () |
vector< string > | getLdaIDs () |
vector< int > | getUsedDifIDs () |
vector< int > | getUsedDccIDs () |
vector< string > | getUsedLdaIDs () |
vector< string > | getUsedLdaByDccIDs () |
vector< string > | getUsedLdaChannelByDif () |
vector< string > | getUsedLdaChannelByDcc () |
LdaConfiguration * | getLdaConfiguration () throw (ILCException::Exception) |
DccConfiguration * | getDccConfiguration () throw (ILCException::Exception) |
DifConfiguration * | getDifConfiguration () throw (ILCException::Exception) |
AsicConfiguration * | getAsicConfiguration () throw (ILCException::Exception) |
void | lock () |
vector< State * > | getStates () |
State * | clone () |
void | recursiveUpload () |
bool | stateExist (string n) |
bool | toBeUpdated () |
void | saveToXML (string fileName) |
string | checkLdaParams (string params) throw (ILCException::Exception) |
string | checkDccParams (string params) throw (ILCException::Exception) |
string | checkDifParams (string difType, string params) throw (ILCException::Exception) |
string | checkAsicParams (string asicType, string params) throw (ILCException::Exception) |
Static Public Member Functions | |
static State * | download (string n) throw (ILCException::Exception) |
static vector< string > | getUnusedStateNames () throw (ILCException::Exception) |
static void | deleteState (string n) throw (ILCException::Exception) |
static State * | createStateFromXML (string stateName, string fileName) |
State::State | ( | ) |
Constructor
State::State | ( | string | n | ) |
Constructor
n | The name of the state |
State::State | ( | const State & | s | ) |
Copy Constructor
State::~State | ( | ) |
Destructor
string State::checkAsicParams | ( | string | asicType, | |
string | params | |||
) | throw (ILCException::Exception) |
Get the values of the given parameters in the current state
asicType | The type of ASIC | |
params | A String containing the list of parameters separated with a coma (ex : 'FIRMWARE, HARDWARE') |
string State::checkDccParams | ( | string | params | ) | throw (ILCException::Exception) |
Get the values of the given parameters in the current state
params | A String containing the list of parameters separated with a coma (ex : 'FIRMWARE, HARDWARE') |
string State::checkDifParams | ( | string | difType, | |
string | params | |||
) | throw (ILCException::Exception) |
Get the values of the given parameters in the current state
difType | The type of DIF | |
params | A String containing the list of parameters separated with a coma (ex : 'FIRMWARE, HARDWARE') |
string State::checkLdaParams | ( | string | params | ) | throw (ILCException::Exception) |
Get the values of the given parameters in the current state
params | A String containing the list of parameters separated with a coma (ex : 'FIRMWARE, HARDWARE') |
State * State::createStateFromXML | ( | string | stateName, | |
string | fileName | |||
) | [static] |
Create a State from a XML file. Configurations contained in the file will be uploaded to the database. If an object is not concerned (ex: no LDA in the XML file) then nothing is done for this object (no LDA configuration defined for the State). This method does not upload the State to the database.
stateName | The name of the created State | |
fileName | The name of the XML file containing the configuration |
void State::deleteState | ( | string | n | ) | throw (ILCException::Exception) [static] |
Delete a state from the database. Throws an Exception if the state does not exist or is used in a setup.
n | The name of the state |
State * State::download | ( | string | n | ) | throw (ILCException::Exception) [static] |
Download a state from the database. May throw Exception.
n | The name of the state to download |
AsicConfiguration * State::getAsicConfiguration | ( | ) | throw (ILCException::Exception) |
Download the ASIC Configuration associated with the current state from the database. May throw Exception
Version * State::getAsicVersion | ( | ) |
Get the ASIC version of the state
DccConfiguration * State::getDccConfiguration | ( | ) | throw (ILCException::Exception) |
Download the DCC Configuration associated with the current state from the database. May throw Exception
Version * State::getDccVersion | ( | ) |
Get the DCC version of the state
DifConfiguration * State::getDifConfiguration | ( | ) | throw (ILCException::Exception) |
Download the DIF Configuration associated with the current state from the database. May throw Exception
Version * State::getDifVersion | ( | ) |
Get the DIF version of the state
LdaConfiguration * State::getLdaConfiguration | ( | ) | throw (ILCException::Exception) |
Download the LDA Configuration associated with the current state from the database. May throw Exception
Version * State::getLdaVersion | ( | ) |
Get the LDA version of the state
vector< State * > State::getStates | ( | ) |
Retrieve all the existing states in the database
vector< string > State::getUnusedStateNames | ( | ) | throw (ILCException::Exception) [static] |
Retrieve the names of the states not used in a setup
void State::lock | ( | ) |
Lock the state so that no further modification can be made.
void State::recursiveUpload | ( | ) |
Check if the 4 objects Configurations have been modified (modified flag), upload a new version for each modified configuration and creates a new State with the new versions. The name of the state is incremented (TOTO->TOTO_1, TOTO_1->TOTO_2).
void State::saveToXML | ( | string | fileName | ) |
Export the configuration to a XML file
fileName | The name of the file to write the configuration (should not exist before the call). |
void State::setAsicVersion | ( | Version * | v | ) |
Change the ASIC version of the state (the parameter is cloned!) Previously downloaded AsicConfigurations are set to NULL!
v | The new version |
void State::setComment | ( | string | c | ) |
Change the comment of the state
n | The new comment |
void State::setDccVersion | ( | Version * | v | ) |
Change the DCC version of the state (the parameter is cloned!) Previously downloaded DccConfigurations are set to NULL!
v | The new version |
void State::setDifVersion | ( | Version * | v | ) |
Change the DIF version of the state (the parameter is cloned!) Previously downloaded DifConfigurations are set to NULL!
v | The new version |
void State::setLdaVersion | ( | Version * | v | ) |
Change the LDA version of the state (the parameter is cloned!) Previously downloaded LdaConfigurations are set to NULL!
v | The new version |
void State::setName | ( | string | n | ) |
Change the name of the state
n | The new name |
bool State::stateExist | ( | string | n | ) |
Check if the state does exist
n | The name of the state |
bool State::toBeUpdated | ( | ) |
Check if the state has been modified
void State::upload | ( | ) | throw (ILCException::Exception) |
Check the validity of the state and upload it to the database. May throw Exception.