ATLAS Offline Software
Loading...
Searching...
No Matches
python.ConfigurationShelve.ConfigurationShelve Class Reference

representation of job databases ========================================== More...

Inheritance diagram for python.ConfigurationShelve.ConfigurationShelve:
Collaboration diagram for python.ConfigurationShelve.ConfigurationShelve:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

 __init__ (self, name)
 __getitem__ (self, key, refresh=True)
 __setitem__ (self, key, value)
 store (self, jar)
 retrieve (self, jarname, refresh=True)

Protected Attributes

dict _shelve = self.__openShelves[ name ]

Static Private Attributes

dict __openShelves = {}

Detailed Description

representation of job databases ==========================================

Definition at line 37 of file ConfigurationShelve.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

python.ConfigurationShelve.ConfigurationShelve.__init__ ( self,
name )

Definition at line 40 of file ConfigurationShelve.py.

40 def __init__( self, name ):
41 try:
42 self._shelve = self.__openShelves[ name ]
43 except KeyError:
44 self._shelve = shelve.open( name, protocol = pickle.HIGHEST_PROTOCOL )
45

Member Function Documentation

◆ __getitem__()

python.ConfigurationShelve.ConfigurationShelve.__getitem__ ( self,
key,
refresh = True )

Definition at line 46 of file ConfigurationShelve.py.

46 def __getitem__( self, key, refresh = True ):
47 if refresh:
48 # remove current configuration first, as much as possible, to prevent
49 # hysteresis; note that if the user keeps configurables around in the
50 # main (or any other) space, a merge will occur
51 from AthenaCommon.AlgSequence import AlgSequence
52
53 topSeq = AlgSequence()
54 topSeq.removeAll()
55
56 from AthenaCommon.AppMgr import theApp, ServiceMgr, ToolSvc, theAuditorSvc
57
58 theApp._streams.removeAll()
59 ServiceMgr.removeAll()
60 ToolSvc.removeAll()
61 theAuditorSvc.removeAll()
62
63 del topSeq, theApp, ServiceMgr, ToolSvc, theAuditorSvc
64
65 return self._shelve[ key ]
66

◆ __setitem__()

python.ConfigurationShelve.ConfigurationShelve.__setitem__ ( self,
key,
value )

Definition at line 67 of file ConfigurationShelve.py.

67 def __setitem__( self, key, value ):
68 self._shelve[ key ] = value
69

◆ retrieve()

python.ConfigurationShelve.ConfigurationShelve.retrieve ( self,
jarname,
refresh = True )

Definition at line 73 of file ConfigurationShelve.py.

73 def retrieve( self, jarname, refresh = True ):
74 return self.__getitem__( jarname, refresh )
75
76

◆ store()

python.ConfigurationShelve.ConfigurationShelve.store ( self,
jar )

Definition at line 70 of file ConfigurationShelve.py.

70 def store( self, jar ):
71 return self.__setitem__( jar.getName(), jar )
72

Member Data Documentation

◆ __openShelves

dict python.ConfigurationShelve.ConfigurationShelve.__openShelves = {}
staticprivate

Definition at line 38 of file ConfigurationShelve.py.

◆ _shelve

dict python.ConfigurationShelve.ConfigurationShelve._shelve = self.__openShelves[ name ]
protected

Definition at line 42 of file ConfigurationShelve.py.


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