QGUIDataCollector Class Reference
[Apollo GuiApollo]

List of all members.


Detailed Description

data-collection class used by Apollo GUI to describe selections status

Author:
Andrea Giachero

Public Member Functions

 QGUIDataCollector ()
 default ctor
 QGUIDataCollector (Int_t shifterSet)
 ctor with shifter set id
virtual ~QGUIDataCollector ()
 dtor
Int_t GetRunNumber () const
 get run number
Int_t GetSettingBasketId () const
 get settings basket
Int_t GetShifterSet () const
 get shifter set
QDbDetector::RunType GetRunType () const
 get run type
const std::string & GetComments () const
 get user comments
Int_t GetCalibSet () const
 get calibration set
Int_t GetStopStatusId () const
 get stop status id
const std::string & GetMasterShifter () const
 get master shifter user name
const std::string & GetNormalShifter1 () const
 get normal shifter 1 user name
const std::string & GetNormalShifter2 () const
 get normal shifter 2 user name
const std::set< std::string > & GetListOfUsers () const
 get list of valid daq users
Bool_t GetIsValid () const
 get whether the configuration stored in this object is valid for a run to be started or stopped
const std::string & GetSettingBasketName () const
 get settings basket name
Int_t GetLastPerformedRun ()
 get last performed run
Int_t GetMinRunNumber () const
 get the lowest run number not already present in the database
Int_t GetMinRunAllowed () const
 get minimum run number allowed for THIS_DETECTOR
Int_t GetMaxRunNumber () const
 get the biggest run number that is present in the database, incremented by 1
Int_t GetMaxRunAllowed () const
 get the maximum value of run number allowed for THIS_DETECTOR
Int_t GetNextRunNumber () const
 get first free run number after the one used in the last run
bool IsValidRun (Int_t newRun) const
 check whether a run number is valid, i.e. it is not already present in the database
bool IsValidSettingBasket (Int_t newBasket) const
 check whether a settings basket is valid
bool IsValidShifterSet (Int_t newSet) const
 check whether a shifter set is valid
bool SetRunNumber (Int_t newRunNumber)
 set run number for the next run
bool SetSettingBasketId (Int_t newBasket)
 set the SettingsBasket for the next run
bool SetShifterSet (Int_t newSet)
 set the shifter set for the next operation
void SetRunType (QDbDetector::RunType runType)
 set run type
void SetComments (const std::string &comments)
 set user comments
void SetCalibSet (Int_t calibSet)
 set calibration set
void SetStopStatusId (Int_t id)
 set stop status id (see stopstatus table in the db)
Bool_t SetMasterShifter (const std::string &name)
 set master shifter user name
Bool_t SetNormalShifter1 (const std::string &name)
 set standard shifter 1 user name
Bool_t SetNormalShifter2 (const std::string &name)
 set standard shifter 2 user name
void SetIsValid (Bool_t isValid)
 set whether the configuration stored in this object is valid for a run to be started or stopped
void Reset ()
 reset the status of the data collector

Private Attributes

Int_t fBasket
Int_t fRunNumber
Int_t fShifterSet
std::string fBasketName
std::string fComments
Int_t fCalibSet
Int_t fStopStatusId
QDbDetector::RunType fRunType
std::string fMasterShifter
std::string fNormalShifter1
std::string fNormalShifter2
std::set< std::string > fUsers
Bool_t fIsValid
const Int_t fLowerAllowedRun
const Int_t fUpperAllowedRun
Int_t fLastRun
Int_t fMinRun
Int_t fMaxRun
Int_t fNextRun
std::vector< Int_t > fRunsVector
std::vector< Int_t > fSettingsVector

Member Function Documentation

Int_t QGUIDataCollector::GetMaxRunNumber (  )  const [inline]

get the biggest run number that is present in the database, incremented by 1

Returns:
the requested value, or the biggest valid run number if there are no run numbers left that are bigger than the biggest.

References fMaxRun.

Int_t QGUIDataCollector::GetNextRunNumber (  )  const [inline]

get first free run number after the one used in the last run

Returns:
requested value or the biggest available run number if there are no run numbers left to satisfy the request

References fNextRun.

bool QGUIDataCollector::IsValidShifterSet ( Int_t  newSet  )  const

check whether a shifter set is valid

SDD FIXME currently this method always returns true

Referenced by SetShifterSet().

bool QGUIDataCollector::SetRunNumber ( Int_t  newRunNumber  ) 

set run number for the next run

Returns:
true on success or false if the requested run number is already present in the database

References fRunNumber, and IsValidRun().

bool QGUIDataCollector::SetSettingBasketId ( Int_t  newBasket  ) 

set the SettingsBasket for the next run

Returns:
true on success or false if the settings basket is invalid

References fBasketName, QApolloDb::GetSettingsBasket(), and IsValidSettingBasket().

Referenced by QGuiRunStartWindow::HandleBasket().

bool QGUIDataCollector::SetShifterSet ( Int_t  newSet  ) 

set the shifter set for the next operation

Returns:
true on success or false if the shifter set is invalid

References fShifterSet, and IsValidShifterSet().

Bool_t QGUIDataCollector::SetMasterShifter ( const std::string &  name  ) 

set master shifter user name

Returns:
true on success, false if name is not empty and is not contained in the list of valid users that is read from the database

References fMasterShifter, and fUsers.

Referenced by QGuiControlWindow::Authenticate().

Bool_t QGUIDataCollector::SetNormalShifter1 ( const std::string &  name  ) 

set standard shifter 1 user name

Returns:
true on success, false if name is not empty and is not contained in the list of valid users that is read from the database

References fNormalShifter1, and fUsers.

Referenced by QGuiRunStartWindow::HandleStart(), QGuiRunStopWindow::HandleStop(), QGuiRunStartWindow::QGuiRunStartWindow(), and QGuiRunStopWindow::QGuiRunStopWindow().

Bool_t QGUIDataCollector::SetNormalShifter2 ( const std::string &  name  ) 

set standard shifter 2 user name

Returns:
true on success, false if name is not empty and is not contained in the list of valid users that is read from the database

References fNormalShifter2, and fUsers.

Referenced by QGuiRunStartWindow::HandleStart(), QGuiRunStopWindow::HandleStop(), QGuiRunStartWindow::QGuiRunStartWindow(), and QGuiRunStopWindow::QGuiRunStopWindow().

void QGUIDataCollector::Reset (  ) 


Member Data Documentation

<Setting Basket for the New Run Run Number for the New Run

Referenced by GetRunNumber(), Reset(), and SetRunNumber().

Shifeter Set for the New Run

Referenced by GetShifterSet(), and SetShifterSet().

std::string QGUIDataCollector::fBasketName [private]

Setting Basket description

Referenced by GetSettingBasketName(), Reset(), and SetSettingBasketId().

std::string QGUIDataCollector::fComments [private]

start/stop comments

Referenced by GetComments(), and SetComments().

calibration set -- aka dataset

Referenced by GetCalibSet(), and SetCalibSet().

stop status id

Referenced by GetStopStatusId(), and SetStopStatusId().

run type

Referenced by GetRunType(), Reset(), and SetRunType().

std::string QGUIDataCollector::fMasterShifter [private]

master shifter user name

Referenced by GetMasterShifter(), and SetMasterShifter().

std::string QGUIDataCollector::fNormalShifter1 [private]

normal shifter 1 user name

Referenced by GetNormalShifter1(), and SetNormalShifter1().

std::string QGUIDataCollector::fNormalShifter2 [private]

normal shifter 2 user name

Referenced by GetNormalShifter2(), and SetNormalShifter2().

std::set<std::string> QGUIDataCollector::fUsers [private]

Bool_t QGUIDataCollector::fIsValid [private]

whether the configuration stored in this object is valid for a run to be started or stopped

Referenced by GetIsValid(), and SetIsValid().

const Int_t QGUIDataCollector::fLowerAllowedRun [private]

min run allowed for THIS_DETECTOR

Referenced by GetMinRunAllowed(), IsValidRun(), and Reset().

const Int_t QGUIDataCollector::fUpperAllowedRun [private]

max run allowed for THIS_DETECTOR

Referenced by GetMaxRunAllowed(), IsValidRun(), and Reset().

Int_t QGUIDataCollector::fLastRun [private]

last performed run

Referenced by GetLastPerformedRun(), and Reset().

Int_t QGUIDataCollector::fMinRun [private]

lowest allowed run not yet present in the db

Referenced by GetMinRunNumber(), and Reset().

Int_t QGUIDataCollector::fMaxRun [private]

first free run number after the biggest run number already present in the database

Referenced by GetMaxRunNumber(), and Reset().

Int_t QGUIDataCollector::fNextRun [private]

first free run number bigger than the last run

Referenced by GetNextRunNumber(), and Reset().

std::vector<Int_t> QGUIDataCollector::fRunsVector [private]

run numbers for THIS_DETECTOR that are already present in the db

Referenced by IsValidRun(), and Reset().

std::vector<Int_t> QGUIDataCollector::fSettingsVector [private]

Filled wth all Setting Basket id

Referenced by IsValidSettingBasket(), and Reset().


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

Generated on Tue Nov 16 10:50:06 2010 for CUORE Software by  doxygen 1.5.6