CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
popcon2dropbox.CondMetaData Class Reference
Inheritance diagram for popcon2dropbox.CondMetaData:

Public Member Functions

def __init__
 
def authPath
 
def authSys
 
def destinationDatabase
 
def dumpMetadataForUpload
 
def logDbFileName
 
def records
 
def synchronizeTo
 

Public Attributes

 md
 

Detailed Description

Definition at line 15 of file popcon2dropbox.py.

Constructor & Destructor Documentation

def popcon2dropbox.CondMetaData.__init__ (   self)

Definition at line 16 of file popcon2dropbox.py.

16 
17  def __init__( self ):
18  self.md = {}
19  with open(confFileName) as jf:
20  self.md = json.load(jf)

Member Function Documentation

def popcon2dropbox.CondMetaData.authPath (   self)

Definition at line 21 of file popcon2dropbox.py.

21 
22  def authPath( self ):
23  return self.md.get('authenticationPath')
def popcon2dropbox.CondMetaData.authSys (   self)

Definition at line 24 of file popcon2dropbox.py.

24 
25  def authSys( self ):
26  return self.md.get('authenticationSystem')
def popcon2dropbox.CondMetaData.destinationDatabase (   self)

Definition at line 27 of file popcon2dropbox.py.

Referenced by popcon2dropbox.CondMetaData.dumpMetadataForUpload().

27 
28  def destinationDatabase( self ):
29  return self.md.get('destinationDatabase')
def popcon2dropbox.CondMetaData.dumpMetadataForUpload (   self,
  inputtag,
  desttag,
  comment 
)

Definition at line 39 of file popcon2dropbox.py.

References popcon2dropbox.CondMetaData.destinationDatabase(), and popcon2dropbox.CondMetaData.synchronizeTo().

39 
40  def dumpMetadataForUpload( self, inputtag, desttag, comment ):
41  uploadMd = {}
42  uploadMd['destinationDatabase'] = self.destinationDatabase()
43  tags = {}
44  tagInfo = {}
45  tagInfo['dependencies'] = {}
46  tagInfo['synchronizeTo'] = self.synchronizeTo()
47  tags[ desttag ] = tagInfo
48  print tags
49  uploadMd['destinationTags'] = tags
50  uploadMd['inputTag'] = inputtag
51  uploadMd['since'] = None
52  uploadMd['userText'] = comment
53  with open( '%s.txt' %fileNameForDropBox, 'wb') as jf:
54  jf.write( json.dumps( uploadMd, sort_keys=True, indent = 2 ) )
55  jf.write('\n')
def popcon2dropbox.CondMetaData.logDbFileName (   self)

Definition at line 30 of file popcon2dropbox.py.

30 
31  def logDbFileName( self ):
32  return self.md.get('logDbFileName')
def popcon2dropbox.CondMetaData.records (   self)

Definition at line 36 of file popcon2dropbox.py.

36 
37  def records( self ):
38  return self.md.get('records')
def popcon2dropbox.CondMetaData.synchronizeTo (   self)

Definition at line 33 of file popcon2dropbox.py.

Referenced by popcon2dropbox.CondMetaData.dumpMetadataForUpload().

33 
34  def synchronizeTo( self ):
35  return self.md.get('synchronizeTo')

Member Data Documentation

popcon2dropbox.CondMetaData.md

Definition at line 17 of file popcon2dropbox.py.