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
 

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 36 of file popcon2dropbox.py.

References popcon2dropbox.CondMetaData.destinationDatabase().

36 
37  def dumpMetadataForUpload( self, inputtag, desttag, comment ):
38  uploadMd = {}
39  uploadMd['destinationDatabase'] = self.destinationDatabase()
40  tags = {}
41  tagInfo = {}
42  tagInfo['dependencies'] = {}
43  tagInfo['synchronizeTo'] = 'offline'
44  tags[ desttag ] = tagInfo
45  print tags
46  uploadMd['destinationTags'] = tags
47  uploadMd['inputTag'] = inputtag
48  uploadMd['since'] = None
49  uploadMd['userText'] = comment
50  with open( '%s.txt' %fileNameForDropBox, 'wb') as jf:
51  jf.write( json.dumps( uploadMd, sort_keys=True, indent = 2 ) )
52  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 33 of file popcon2dropbox.py.

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

Member Data Documentation

popcon2dropbox.CondMetaData.md

Definition at line 17 of file popcon2dropbox.py.