objectclasses::DeviceType Class Reference

Inheritance diagram for objectclasses::DeviceType:

objectclasses::DBInfo cdbVisCore::dbUpdate

List of all members.


Detailed Description

There are several device types, and each device is of only one device type. A device type contains information that is common for devices of the same type. It is not a physical object itself.

Definition at line 760 of file objectclasses.py.


Public Member Functions

def __init__
def GetOldName
def GetDeviceTypeID
def GetDeviceTable
def GetSaveStatus
def GetName
def GetPortsIn
def GetPortsOut
def GetDescription
def GetSystem
def GetColour
def GetErrorMessage
def SetOldName
def SetDeviceTypeID
def SetErrorMessage
def SetName
def SetPortsIn
def SetPortsOut
def SetDescription
def SetColour
def SetSystem
def SetDict
def SetSaveStatus
def SetDictInfo
def GetObjectInfo
def Update
def GetMuonDevicesByLocation
def GetDevicesByLocation
def GetDevices
def GetSpareDevices
def PrintSaveFunction
def Save
def Delete
def Modify
def Create

Private Attributes

 __errormessage
 _deviceTypeInfo
 __devices
 __cfg

Member Function Documentation

def objectclasses::DeviceType::__init__ (   self,
  systemname,
  deviceType = "",
  new = True 
)

Constructor.

Parameters: - name of the subsystem(s) the device type is available in - device type name set by the user; which identifies a device type - if True, this device type is newly created, not stored in ConfDB yet if False, this is a device type that is already created, and hence we can retrieve information for the object from ConfDB or dirty objects list. That is done by calling the Update(...) function in the constructor.

Definition at line 773 of file objectclasses.py.

def objectclasses::DeviceType::GetOldName (   self  ) 

Definition at line 797 of file objectclasses.py.

def objectclasses::DeviceType::GetDeviceTypeID (   self  ) 

Definition at line 799 of file objectclasses.py.

def objectclasses::DeviceType::GetDeviceTable (   self  ) 

Definition at line 801 of file objectclasses.py.

def objectclasses::DeviceType::GetSaveStatus (   self  ) 

Definition at line 803 of file objectclasses.py.

def objectclasses::DeviceType::GetName (   self  ) 

Definition at line 805 of file objectclasses.py.

def objectclasses::DeviceType::GetPortsIn (   self  ) 

Definition at line 807 of file objectclasses.py.

def objectclasses::DeviceType::GetPortsOut (   self  ) 

Definition at line 809 of file objectclasses.py.

def objectclasses::DeviceType::GetDescription (   self  ) 

Definition at line 811 of file objectclasses.py.

def objectclasses::DeviceType::GetSystem (   self  ) 

Definition at line 813 of file objectclasses.py.

def objectclasses::DeviceType::GetColour (   self  ) 

Definition at line 815 of file objectclasses.py.

def objectclasses::DeviceType::GetErrorMessage (   self  ) 

Get the error message that was set most recently.

!return - the error message string

Reimplemented from objectclasses::DBInfo.

Definition at line 817 of file objectclasses.py.

def objectclasses::DeviceType::SetOldName (   self,
  oldname 
)

Definition at line 821 of file objectclasses.py.

def objectclasses::DeviceType::SetDeviceTypeID (   self,
  id 
)

Definition at line 823 of file objectclasses.py.

def objectclasses::DeviceType::SetErrorMessage (   self,
  msg 
)

Set the error message so that it can be looked up. - the message string

Reimplemented from objectclasses::DBInfo.

Definition at line 826 of file objectclasses.py.

def objectclasses::DeviceType::SetName (   self,
  name 
)

Definition at line 828 of file objectclasses.py.

def objectclasses::DeviceType::SetPortsIn (   self,
  nbr 
)

Definition at line 831 of file objectclasses.py.

def objectclasses::DeviceType::SetPortsOut (   self,
  nbr 
)

Definition at line 834 of file objectclasses.py.

def objectclasses::DeviceType::SetDescription (   self,
  descr 
)

Definition at line 837 of file objectclasses.py.

def objectclasses::DeviceType::SetColour (   self,
  colour 
)

Definition at line 840 of file objectclasses.py.

def objectclasses::DeviceType::SetSystem (   self,
  name 
)

Definition at line 843 of file objectclasses.py.

def objectclasses::DeviceType::SetDict (   self,
  newdict 
)

Definition at line 846 of file objectclasses.py.

def objectclasses::DeviceType::SetSaveStatus (   self,
  status 
)

Definition at line 852 of file objectclasses.py.

def objectclasses::DeviceType::SetDictInfo (   self,
  dict 
)

Definition at line 854 of file objectclasses.py.

def objectclasses::DeviceType::GetObjectInfo (   self,
  doNotLookUp = True 
)

Get all info about a device type in a subsystem, when given the name of a device type in the constructor. Here we can set up to check different statuses (TODO), f.ex. if it is the most recent version of an object; then just return the contents; else look in dl and db.

- whether we should look for more recent information in dirty objects list or ConfDB.

!return - a dictionary with all the parameters set.

Definition at line 869 of file objectclasses.py.

def objectclasses::DeviceType::Update (   self,
  doNotCheckInDirtyList = False 
)

Check first in dirty objects list for most recent version of this object; if in creation mode. If in navigation mode or alredy looked in dirty objects list and not found; check in ConfDB.

- if True, we skip the check in the dirty list, else we check. But only in creation mode

!return - a dictionary with all the parameters set.

Definition at line 885 of file objectclasses.py.

def objectclasses::DeviceType::GetMuonDevicesByLocation (   self,
  quadrant,
  chamber_x,
  chamber_y,
  fee_x = "",
  fee_y = "" 
)

_MUON Specific_, may be changed to fit for other systems later. TODO: Move this to SubSystem class

Given a location of a _chamber or an FEE board_, return object at given location with all parameters set.

Parameters: - quadrant number, 1-4, where the device is located - the x position of the chamber or FE board - the y position of the chamber or FE board - the fee X position of a fee board on a chamber - the fee Y position of a fee board on a chamber

Definition at line 964 of file objectclasses.py.

def objectclasses::DeviceType::GetDevicesByLocation (   self,
  location_string 
)

General get a device at a given location. TODO: should also be moved to SubSystem class. NB! This function does not look for devices that are not yet stored in the ConfDB.

- the location string which looks for devices with the same location string set.

Definition at line 982 of file objectclasses.py.

def objectclasses::DeviceType::GetDevices (   self  ) 

Get all _device_names_ for a given device type; each device name is unique. Looks both in dirty objects list and ConfDB. !Return - list of device names; both in db and in dirtylist

Definition at line 1009 of file objectclasses.py.

def objectclasses::DeviceType::GetSpareDevices (   self  ) 

Get all _sparedevice_names_ for a given device type; each device name is unique. Looks both in dirty objects list and ConfDB.

!Return - list of device names; both in db and in dirtylist

Definition at line 1096 of file objectclasses.py.

def objectclasses::DeviceType::PrintSaveFunction (   self,
  first = False,
  insertmany = False,
  commit = True 
)

A function that returns the string to the function that will be called in the ConfDBLibrary for the given save and modify status of this data object, as well as use of single or multiple insert.

Parameters: Same as for Save(...)

!return - returns a String with the function name as well as all set parameters

Definition at line 1189 of file objectclasses.py.

def objectclasses::DeviceType::Save (   self,
  first = False,
  insertmany = False,
  commit = True 
)

Save the changes made on this object in the ConfDB; deletion, modification/update or insertion of the object in the database. The methods Delete, Modify and Create only set/change the variables in this object, this method makes things happen in the db (committed)

Parameters: - if first is True; it is the first kind of this db update; prepare and initialize cache, if first is False, add it to the already existing cache. cache is only used if insertmany = True. - If insertmany is set to false, the single insert function will be used, which is optimized for single inserts. If insertmany is set to true, the multiple insert function will be used, which is optimized for multiple inserts (use of cache) - if commit is set to false, no data will be commited, put are put on hold in the cache, if commit is set to true, all data that are put on hold in the cache will be commited.

Definition at line 1242 of file objectclasses.py.

def objectclasses::DeviceType::Delete (   self  ) 

Delete this object. This object is put in the dirty list and set for deletion. Sets the save status to deletion.

Reimplemented from objectclasses::DBInfo.

Definition at line 1300 of file objectclasses.py.

def objectclasses::DeviceType::Modify (   self  ) 

Modifies a device type with new values set by the user through the set functions. The modify status is set through SetModifyStatus(...) if needed. Sets the save status to modify, and adds the object to the dirty objects list.

Reimplemented from objectclasses::DBInfo.

Definition at line 1310 of file objectclasses.py.

def objectclasses::DeviceType::Create (   self  ) 

Create a device type. Set save status to creation, and adds the object to the dirty objects list.

Reimplemented from objectclasses::DBInfo.

Definition at line 1318 of file objectclasses.py.


Member Data Documentation

objectclasses::DeviceType::__errormessage [private]

Reimplemented from objectclasses::DBInfo.

Definition at line 774 of file objectclasses.py.

objectclasses::DeviceType::_deviceTypeInfo [private]

Definition at line 775 of file objectclasses.py.

objectclasses::DeviceType::__devices [private]

Definition at line 786 of file objectclasses.py.

objectclasses::DeviceType::__cfg [private]

Definition at line 791 of file objectclasses.py.


The documentation for this class was generated from the following file:
Generated on Fri Aug 31 11:11:20 2007 for CDBVis by  doxygen 1.5.3