/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes
FileDescription::FileDescription Class Reference

List of all members.

Public Member Functions

def __init__
def clear
def setByFileName
def set

Public Attributes

 dirSep
 fileSep
 seqStrip
 path
 process
 tag
 runNumber
 streamType
 streamName
 appName
 sequence
 fileType
 isValid

Detailed Description

Class to handle filename parsing

Definition at line 8 of file FileDescription.py.


Constructor & Destructor Documentation

def FileDescription::FileDescription::__init__ (   self,
  fileName = None 
)
Construct using filename string

Definition at line 10 of file FileDescription.py.

00011                                      :
00012         """Construct using filename string"""
00013         self.dirSep = '/'
00014         self.fileSep = '.'
00015         self.seqStrip = '_'
00016         self.clear()
00017         if fileName!=None:
00018             self.setByFileName( fileName )
00019         return


Member Function Documentation

def FileDescription::FileDescription::clear (   self)
Clear/initialize file descriptor

Definition at line 20 of file FileDescription.py.

00021                    :
00022         """Clear/initialize file descriptor""" 
00023         self.path = None
00024         self.process = None
00025         self.tag = None
00026         self.runNumber = None
00027         self.streamType = None
00028         self.streamName = None
00029         self.appName = None
00030         self.sequence = None
00031         self.fileType = None
00032         self.isValid = False
00033         return

def FileDescription::FileDescription::setByFileName (   self,
  fileName 
)
Parse filename to initialise file descriptor

Definition at line 34 of file FileDescription.py.

00035                                      :
00036         """Parse filename to initialise file descriptor"""
00037         self.clear()
00038         fname = fileName.strip()
00039         sepLocation = fname.rfind(self.dirSep)
00040         path = None
00041         if sepLocation >= 0:
00042             path = fname[:sepLocation]
00043             fname = fname[sepLocation+1:]
00044         fileParts = fname.split(self.fileSep)
00045         if len(fileParts) != 8:
00046             print "Error: Incorrect filename structure: '%s'" % fname
00047             return
00048         runString = fileParts[2]
00049         if not runString.isdigit():
00050             print "Error: Incorrect run number: '%s'" % runString
00051             return
00052         seqString = fileParts[6].strip(self.seqStrip)
00053         if not seqString.isdigit():
00054             print "Error: Incorrect sequence number: '%s'" % seqString
00055             return
00056         self.set(path, fileParts[0], fileParts[1], int(runString),
00057                  fileParts[3], fileParts[4], fileParts[5], int(seqString),
00058                  fileParts[7])

def FileDescription::FileDescription::set (   self,
  path,
  process,
  tag,
  runNumber,
  streamType,
  streamName,
  appName,
  sequence,
  fileType 
)
Set file descriptor

Definition at line 59 of file FileDescription.py.

00061                                         :
00062         """Set file descriptor"""
00063         self.path = path
00064         self.process = process
00065         self.tag = tag
00066         self.runNumber = runNumber
00067         self.streamType = streamType
00068         self.streamName = streamName
00069         self.appName = appName
00070         self.sequence = sequence
00071         self.fileType = fileType
00072         self.isValid = True
00073         if self.streamType=="AllStreams":
00074             self.isValid = False
00075         return
00076 

Member Data Documentation

Definition at line 10 of file FileDescription.py.

Definition at line 10 of file FileDescription.py.

Definition at line 10 of file FileDescription.py.

Definition at line 20 of file FileDescription.py.

Definition at line 20 of file FileDescription.py.

Definition at line 20 of file FileDescription.py.

Definition at line 20 of file FileDescription.py.

Definition at line 20 of file FileDescription.py.

Definition at line 20 of file FileDescription.py.

Definition at line 20 of file FileDescription.py.

Definition at line 20 of file FileDescription.py.

Definition at line 20 of file FileDescription.py.

Definition at line 20 of file FileDescription.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:54:04 for ProcessManager by doxygen 1.7.4