Inheritance diagram for QApolloDb:

This class only provide an interface to core class QApolloDbBase. Look at that class for member functions documentation.
Public Member Functions | |
| bool | Reset () |
| Close connection to data base and reset singleton. | |
|
const std::map< unsigned short, std::string > & | CrateMap () const |
| get map of active crates and corresponding host name | |
| short | GetListOfChannels (std::vector< unsigned short > &chList, unsigned short profileId=0) |
| get list of active channels corresponding to given profile | |
| unsigned short | GetMapping (std::map< unsigned short, QDaqChannel > &cMap) |
| fill map with lg channel and corresponding hardware mapping | |
| unsigned short | GetActiveChannels (std::map< unsigned short, QDaqChannel > &cMap, QDaqChannel::SettingsType_t what) |
| fill map with lg channel and corresponding QDaqChannel | |
| int | GetBoards (unsigned short crateId, std::map< unsigned short, std::string > &boards) |
| fill boards map with slot and board name | |
| int | GetActiveChannels (unsigned short crateId, unsigned short slot, QDaqChannel::SettingsType_t what, std::vector< QDaqChannel > &v) |
| Fill map containing given settins for active lg chnannels belonging to the given DAQ slot and DAQ crate. | |
| void | GetListOfTriggers (unsigned short lg, std::vector< std::string > &trgList) |
| fill list of trigger names for the given channel | |
| const QVdt & | GetTrgParameter (unsigned short trgIndex, const std::string &par_name, unsigned short lg=0) |
| Get parameter for given trigger index and given channel. | |
| const std::map< std::string, QVdt > & | GetTrgParameters (unsigned short trgIndex, unsigned short lg) |
| Get map of parameters for given trigger and logical channel. | |
| bool | Dump (unsigned short crateId, bool dump) |
| dump settings and mapping for the given lg channel | |
| virtual unsigned int | GetCurrentRunNumber () const |
| return current run number | |
| unsigned short | GetCurrentProfile () const |
| return profile associated to current run | |
| RunType | GetCurrentRunType () const |
| return run type id to current run | |
| void | GetSettingsBaskets (unsigned short howMany, std::map< std::string, std::vector< QVdt > > &basketsMap) |
| get a subset of fields from settings_basket table | |
| unsigned short | GetSettingsBasketIds (std::vector< unsigned short > &baskets) |
| get vector conaining existing settings basket ids | |
| unsigned short | GetSettingsBasket (unsigned short id, std::string &comment) |
| get comment associated to given settings basket id | |
| void | GetRunTypes (std::map< unsigned short, std::string > &runTypes) |
| get a subset of fields from runtypes table | |
| unsigned int | GetPulserPeriod () |
| get pulser period | |
| void | GetRuns (std::vector< unsigned int > &runs) |
| get all run numbers present in runs table | |
| unsigned int | GetLastRun () |
| get from db the run number with the most recent start date | |
Protected Member Functions | |
| QApolloDb () | |
| constructor | |
| short QApolloDb::GetListOfChannels | ( | std::vector< unsigned short > & | chList, | |
| unsigned short | profileId = 0 | |||
| ) | [inline] |
get list of active channels corresponding to given profile
| chList | vector of active channels | |
| profileId | requested profileId. If it is zero, current profile Id is assumed or an error is returned in case DAQ is not running. |
| unsigned short QApolloDb::GetMapping | ( | std::map< unsigned short, QDaqChannel > & | cMap | ) | [inline] |
fill map with lg channel and corresponding hardware mapping
| cMap | map to be filled |
| unsigned short QApolloDb::GetActiveChannels | ( | std::map< unsigned short, QDaqChannel > & | cMap, | |
| QDaqChannel::SettingsType_t | what | |||
| ) | [inline] |
fill map with lg channel and corresponding QDaqChannel
| what | settings to be loaded | |
| cMap | map to be filled |
| int QApolloDb::GetBoards | ( | unsigned short | crateId, | |
| std::map< unsigned short, std::string > & | boards | |||
| ) | [inline] |
fill boards map with slot and board name
| crateId | identifier of DAQ crate for which board map is filled | |
| boards | map to be filled |
| int QApolloDb::GetActiveChannels | ( | unsigned short | crateId, | |
| unsigned short | slot, | |||
| QDaqChannel::SettingsType_t | what, | |||
| std::vector< QDaqChannel > & | v | |||
| ) | [inline] |
Fill map containing given settins for active lg chnannels belonging to the given DAQ slot and DAQ crate.
| crateId | identifier of DAQ crate for which channel map is filled | |
| slot | identifier of the DAQ slot for which channel map is filled (all slots belonging to crateId are filled if slot = 0) | |
| what | type of settings to be loaded. Multiple types can be loaded using the format Type1|Type2 | |
| v | map to be filled |
| void QApolloDb::GetListOfTriggers | ( | unsigned short | lg, | |
| std::vector< std::string > & | trgList | |||
| ) | [inline] |
fill list of trigger names for the given channel
If no entry corresponding to the given lg channel is found in the db then the default trigger names (i.e. lg=0) are returned.
| lg | lg channel for which trigger names are returned. Default trigger names can be obtained asking for lg=0. | |
| trgList | vector containing trigger names. trigger name "NULL" means that no trigger is associated with that trigger tag for that lg |
| const QVdt& QApolloDb::GetTrgParameter | ( | unsigned short | trgIndex, | |
| const std::string & | par_name, | |||
| unsigned short | lg = 0 | |||
| ) | [inline] |
Get parameter for given trigger index and given channel.
| par_name | name of parameter to be returned | |
| trgIndex | trigger tag for which parameter is returned. Can be 1,2,3 or 4. | |
| lg | logical channel for which parameter is returned |
| const std::map<std::string,QVdt>& QApolloDb::GetTrgParameters | ( | unsigned short | trgIndex, | |
| unsigned short | lg | |||
| ) | [inline] |
Get map of parameters for given trigger and logical channel.
| trgIndex | trigger tag for which parameter is returned. | |
| lg | logical channel for which parameter is returned |
| bool QApolloDb::Dump | ( | unsigned short | crateId, | |
| bool | dump | |||
| ) | [inline] |
dump settings and mapping for the given lg channel
| void QApolloDb::GetSettingsBaskets | ( | unsigned short | howMany, | |
| std::map< std::string, std::vector< QVdt > > & | basketsMap | |||
| ) | [inline] |
get a subset of fields from settings_basket table
Filled fields:
| howMany | max number of returned rows | |
| basketMap | map to be filled. Inside basketMap, keys identify fields in settings_basket table and values are arrays of QVdt containing content of each field. |
| unsigned short QApolloDb::GetSettingsBasketIds | ( | std::vector< unsigned short > & | baskets | ) | [inline] |
get vector conaining existing settings basket ids
| baskets | reference to the vector that will be filled with existing settings basket ids |
| unsigned short QApolloDb::GetSettingsBasket | ( | unsigned short | id, | |
| std::string & | comment | |||
| ) | [inline] |
get comment associated to given settings basket id
| id | settings basket id for which the comment is requested. If id is zero default settings basket is assumed | |
| comment | reference to a string that will be filled with the comment associated to the default settings basket |
| void QApolloDb::GetRunTypes | ( | std::map< unsigned short, std::string > & | runTypes | ) | [inline] |
get a subset of fields from runtypes table
Filled fields:
| runTypes | reference to map to be filled. Inside runTypes, keys are run_type_id and values are run_type. |
| unsigned int QApolloDb::GetPulserPeriod | ( | ) | [inline] |
get pulser period
| void QApolloDb::GetRuns | ( | std::vector< unsigned int > & | runs | ) | [inline] |
get all run numbers present in runs table
| runs | reference to vector to be filled. Runs are sorted. |
| unsigned int QApolloDb::GetLastRun | ( | ) | [inline] |
get from db the run number with the most recent start date
1.5.1