Setup Class Reference

#include <Setup.h>

List of all members.

Public Member Functions

 Setup (string n)
 Setup (Setup &s)
void addState (State *s)
vector< State * > getStates ()
string getName ()
void lock ()
bool isLocked ()
void upload () throw (ILCException::Exception)
void recursiveUpload ()

Static Public Member Functions

static SetupgetSetup (string n) throw (ILCException::Exception)
static vector< string > getSetupNames () throw (ILCException::Exception)
static vector< string > getUnusedSetupNames () throw (ILCException::Exception)
static void deleteSetup (string n) throw (ILCException::Exception)
static void registerRun (int runNum, string setupN) throw (ILCException::Exception)
static SetupgetSetupFromRun (int runN) throw (ILCException::Exception)


Detailed Description

A Setup is a set of States. While each state contains the description of a subdetector configuration, the setup sumup the whole detector configuration.


Constructor & Destructor Documentation

Setup::Setup ( string  n  ) 

Constructor


Member Function Documentation

void Setup::addState ( State s  ) 

Add a State to the setup (the State is cloned)

void Setup::deleteSetup ( string  n  )  throw (ILCException::Exception) [static]

Delete a Setup from the database. An exception is thrown if the setup does not exist or is linked to a run.

Parameters:
n The name of the setup

string Setup::getName (  ) 

Get the name of the setup

Returns:
The name of the setup

Setup * Setup::getSetup ( string  n  )  throw (ILCException::Exception) [static]

Retrieve a setups from the database

Parameters:
n The name of the setup
Returns:
A pointer on the setup object (you have to delete it)

Setup * Setup::getSetupFromRun ( int  runN  )  throw (ILCException::Exception) [static]

Get the setup used for a given run

Parameters:
runN The run number
Returns:
A pointer on the setup used for the run

vector< string > Setup::getSetupNames (  )  throw (ILCException::Exception) [static]

Retrieve all the setup names from the database

Returns:
A vector of setup's name

vector< State * > Setup::getStates (  ) 

Get the list of states associated to this setup

Returns:
The vector of states. This is NOT a clone! Any modification on this vector will modify the setup. You should not delete it, this vector will be destroy with the setup object.

vector< string > Setup::getUnusedSetupNames (  )  throw (ILCException::Exception) [static]

Retrieve the names of the setups not used in a run

Returns:
A vector of setup's name

bool Setup::isLocked (  ) 

Check if the setup is locked

Returns:
True if the setup is locked

void Setup::lock (  ) 

Lock the setup so that it can not be modified

void Setup::recursiveUpload (  ) 

For each modified state, upload a new state and finaly creates a new Setup. The name of the state is incremented (TOTO->TOTO_1, TOTO_1->TOTO_2).

void Setup::registerRun ( int  runNum,
string  setupN 
) throw (ILCException::Exception) [static]

Record a run/setup association in the database

Parameters:
runNum The run number
setupN The setup name

void Setup::upload (  )  throw (ILCException::Exception)

Upload the current setup to the database (update it if already exists)


The documentation for this class was generated from the following files:
Generated on Tue Feb 28 15:35:34 2012 for ILCConfigurationDB by  doxygen 1.4.7