Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Warning

Introduced changes should work in parallel with existing API (unless it proves impossible)

'Old' methods and classes will be marked as deprecated  

...


 DB_ENTRY

Class structure:

Class keeps information about one, particular  database entry (eg. pulse-file, HDC container, SQL-database, etc etc)

Gliffy Diagram

Class structure:

macroId7cda32ff-7be2-4e5f-95c5-271e0f75b931
nameClass structure siagram
pagePin3


  • db_entry class represents data accessible through Access Layer 
  • hdc_entry , sql_entry  are examples of classes that represents IMAS data entry accessible via other mechanisms than AL (if they will be implemented in future)
  • imas_entry a parent class for all ??_entry classes. It will be implemented in future if any other mechanism of accessing data than AL will be used. Could be empty...  

THIS PAGE FOCUSES ON DESIGN OF DB_ENTRY AND IDS CLASSES ONLY!DB_ENTRY - any better names?

Definition (constructor)

DB Entry  is defined by:

  • backend
  • user name (eg. g2bpalak )
  • db name (eg. test )
  • data version - do we need it (see Open Points)?
  • shot
  • run
  • _id - MDSPLUS_BACKEND, MEMORY_BACKEND, ASCII_BACKEND - mandatory -   
  • db name - eg. test   - mandatory 
  • shot - mandatory
  • run - mandatory
  • user name - eg. g2bpalak  -  optional - if None → $USER
  • data version - e.g. 3 - optional - currently not used,  we should keep it as it will point us to a proper dir in imasdb structure, when we develop versions 4,5, etc  - if None → 3
Code Block
languagepy
titleal_entry constructor
def __init__(self, backendIDbackend_id, db_name, shot, run, user_name userName= None, data_version = 3)
	if userName is None:
		user = $USER

...

Additional "URI-based" constructor will be added in future...

...

iconfalse
title Open points

...

.

...

Create/open/close

All parameters that defines db_entry  are set in constructor, so create, open, close will have no arguments

Code Block
languagepy
titleal_entry create/open/close
def create(self, options = None)
def open(self, options = None)
def close(self)
Info
iconfalse
title Open points
  • "silent" - a parameter to make LL quiet
    • An additional method setVerbosity will be added
, options = None)

options - additional options (possibly backend specific)


Put/Get IDS


Code Block
languagepy
titleIDS GET
def get(self, idsName, occurrence = 0) # idsName (e.g. 'equilibrium')
	return ids

...