| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

SiteConfig::SiteConfig Class Reference

Inheritance diagram for SiteConfig::SiteConfig:
[legend]
List of all members.

Public Member Functions

def __init__
def jobId
def batchCommand
def runSepDir
def runSubDir
def statsRelativeDir
def statsDirectory
def statsSeqFile
def statsInstallPath
def statsSumFile
def statsLockFile
def runLockFile
def figuresDirectory
def figuresPathReplace
def xmlRelativeDir
def xmlDirectory
def xmlIndexFile
def runIndexDir
def runIndexFile
def runIndexLockFile
def logDirectory
def logOutFile
def logErrFile
def batchLogDirectory
def batchLogOutFile
def batchLogErrFile
def stateFile

Detailed Description

Configuration information for a given computer site 

Definition at line 9 of file SiteConfig.py.


Member Function Documentation

def SiteConfig::SiteConfig::__init__ (   self  ) 

Constructor

Reimplemented in SiteConfig::SiteConfigLocal, SiteConfig::SiteConfigPdsf, SiteConfig::SiteConfigPdsfTest, and SiteConfig::SiteConfigPdsfSim.

Definition at line 11 of file SiteConfig.py.

00011                       :
00012         """Constructor"""
00013         import os
00014         self.nuwaDir=None
00015         self.cmtConfig=None
00016         self.outputDir=None
00017         self.jobLogDir=None
00018         self.statsOffsetDir=None
00019         self.figuresOffsetDir=None
00020         self.xmlOffsetDir=None
00021         self.statsRootDir=None
00022         self.figuresRootDir=None
00023         self.xmlRootDir=None
00024         self.runsXmlDir=None
00025         self.batchExec=None
00026         self.batchWrapper="$PROCESSMANAGERROOT/scripts/batchNuWa.sh"
00027         self.batchLogDir=self.jobLogDir
00028         self.batchLogDir=None
00029         self.stateRootDir=None
00030         return
00031 
    def jobId(self, jobName=None, runNumber=None, seqNumber=None):

def SiteConfig::SiteConfig::jobId (   self,
  jobName = None,
  runNumber = None,
  seqNumber = None 
)

Return a string to identify the job 

Definition at line 32 of file SiteConfig.py.

00032                                                                  :
00033         """ Return a string to identify the job """
00034         jobId = ""
00035         if jobName:
00036             jobId += jobName
00037         else:
00038             jobId += "noname"
00039         if runNumber:
00040             jobId += "_run%07d" % runNumber
00041         if seqNumber:
00042             jobId += "_seq%04d" % seqNumber
00043         return jobId
00044         
    def batchCommand(self, batchArgs, jobName, runNumber, seqNumber):

def SiteConfig::SiteConfig::batchCommand (   self,
  batchArgs,
  jobName,
  runNumber,
  seqNumber 
)

Construct a batch command

Reimplemented in SiteConfig::SiteConfigLocal, SiteConfig::SiteConfigPdsf, SiteConfig::SiteConfigPdsfTest, and SiteConfig::SiteConfigPdsfSim.

Definition at line 45 of file SiteConfig.py.

00045                                                                     :
00046         """Construct a batch command"""
00047         print "SiteConfig: batchCommand is undefined for this site"
00048         return ""
00049 
    def runSepDir(self, runNumber):

def SiteConfig::SiteConfig::runSepDir (   self,
  runNumber 
)

Make an appropriate structure for run subdirectories

Definition at line 50 of file SiteConfig.py.

00050                                   :
00051         """Make an appropriate structure for run subdirectories"""
00052         # group runs into subdirectories of 1000/100
00053         runK = runNumber / 1000
00054         runH = runNumber / 100
00055         return "runs_%04d000/runs_%05d00" % (runK, runH)
00056 
    def runSubDir(self, runNumber):

def SiteConfig::SiteConfig::runSubDir (   self,
  runNumber 
)

Return run subpath + directory

Definition at line 57 of file SiteConfig.py.

00057                                   :
00058         """Return run subpath + directory"""
00059         return self.runSepDir(runNumber)+"/run_%07d" % runNumber
00060 
    def statsRelativeDir(self, runNumber):

def SiteConfig::SiteConfig::statsRelativeDir (   self,
  runNumber 
)

Construct the relative path of the root files from the index

Definition at line 61 of file SiteConfig.py.

00061                                          :
00062         """Construct the relative path of the root files from the index"""
00063         return self.runSubDir(runNumber)+"/root"
00064 
    def statsDirectory(self, runNumber):

def SiteConfig::SiteConfig::statsDirectory (   self,
  runNumber 
)

Construct the absolute path of the root files from the index

Definition at line 65 of file SiteConfig.py.

00065                                        :
00066         """Construct the absolute path of the root files from the index"""
00067         return self.statsRootDir+"/"+self.statsRelativeDir(runNumber)
00068 
    def statsSeqFile(self, jobName, runNumber, seqNumber):

def SiteConfig::SiteConfig::statsSeqFile (   self,
  jobName,
  runNumber,
  seqNumber 
)

Construct the stats ROOT file path and name

Definition at line 69 of file SiteConfig.py.

00069                                                          :
00070         """Construct the stats ROOT file path and name"""
00071         filename = "%s.root" % self.jobId(jobName, runNumber, seqNumber)
00072         return self.statsDirectory(runNumber)+"/"+filename
00073 
    def statsInstallPath(self, jobName, runNumber):

def SiteConfig::SiteConfig::statsInstallPath (   self,
  jobName,
  runNumber 
)

Construct the relative summed stats ROOT file path and name for index lookup

Definition at line 74 of file SiteConfig.py.

00074                                                   :
00075         """Construct the relative summed stats ROOT file path and name for index lookup"""
00076         filename = "%s_total.root" % self.jobId(jobName, runNumber)
00077         return self.statsOffsetDir+'/'+self.statsRelativeDir(runNumber)+"/"+filename
00078 
    def statsSumFile(self, jobName, runNumber):

def SiteConfig::SiteConfig::statsSumFile (   self,
  jobName,
  runNumber 
)

Construct the summed stats ROOT file path and name

Definition at line 79 of file SiteConfig.py.

00079                                               :
00080         """Construct the summed stats ROOT file path and name"""
00081         filename = "%s_total.root" % self.jobId(jobName, runNumber)
00082         return self.statsDirectory(runNumber)+"/"+filename
00083 
    def statsLockFile(self, jobName, runNumber):

def SiteConfig::SiteConfig::statsLockFile (   self,
  jobName,
  runNumber 
)

Construct the stats lock file path and name

Definition at line 84 of file SiteConfig.py.

00084                                                :
00085         """Construct the stats lock file path and name"""
00086         filename = "%s_total.lock" % self.jobId(jobName, runNumber)
00087         return self.statsDirectory(runNumber)+"/"+filename
00088 
    def runLockFile(self, runNumber):

def SiteConfig::SiteConfig::runLockFile (   self,
  runNumber 
)

Construct the run summary lock file path and name

Definition at line 89 of file SiteConfig.py.

00089                                     :
00090         """Construct the run summary lock file path and name"""
00091         filename = "run_%07d.lock" % runNumber
00092         return self.xmlRootDir+"/"+self.runSubDir(runNumber)+"/"+filename
00093 
    def figuresDirectory(self, runNumber):

def SiteConfig::SiteConfig::figuresDirectory (   self,
  runNumber 
)

Construct the figures directory for the given run

Definition at line 94 of file SiteConfig.py.

00094                                          :
00095         """Construct the figures directory for the given run"""
00096         return self.figuresRootDir+"/"+self.runSubDir(runNumber)
00097 
    def figuresPathReplace(self, runNumber):

def SiteConfig::SiteConfig::figuresPathReplace (   self,
  runNumber 
)

Construct the figures directory for the given run

Definition at line 98 of file SiteConfig.py.

00098                                            :
00099         """Construct the figures directory for the given run"""
00100         runPath = "run_%07d" % runNumber
00101         return runPath+","+self.runSubDir(runNumber)
00102 
    def xmlRelativeDir(self, runNumber):

def SiteConfig::SiteConfig::xmlRelativeDir (   self,
  runNumber 
)

Construct the xml directory for the given run

Definition at line 103 of file SiteConfig.py.

00103                                        :
00104         """Construct the xml directory for the given run"""
00105         return self.xmlOffsetDir+"/"+self.runSubDir(runNumber)
00106 
    def xmlDirectory(self, runNumber):

def SiteConfig::SiteConfig::xmlDirectory (   self,
  runNumber 
)

Construct the xml directory for the given run

Definition at line 107 of file SiteConfig.py.

00107                                      :
00108         """Construct the xml directory for the given run"""
00109         return self.outputDir+'/'+self.xmlRelativeDir(runNumber)
00110 
    def xmlIndexFile(self, runNumber):

def SiteConfig::SiteConfig::xmlIndexFile (   self,
  runNumber 
)

Construct the run index file path and name

Definition at line 111 of file SiteConfig.py.

00111                                      :
00112         """Construct the run index file path and name"""
00113         filename = "run_%07d.xml" % runNumber
00114         return self.xmlDirectory(runNumber)+"/"+filename
00115 
    def runIndexDir(self):

def SiteConfig::SiteConfig::runIndexDir (   self  ) 

Construct the index of all runs file path

Definition at line 116 of file SiteConfig.py.

00116                          :
00117         """Construct the index of all runs file path"""
00118         return self.runsXmlDir
00119 
    def runIndexFile(self):

def SiteConfig::SiteConfig::runIndexFile (   self  ) 

Construct the index of all runs file path and name

Definition at line 120 of file SiteConfig.py.

00120                           :
00121         """Construct the index of all runs file path and name"""
00122         return self.runIndexDir() + "/runs.xml"
00123 
    def runIndexLockFile(self):

def SiteConfig::SiteConfig::runIndexLockFile (   self  ) 

Construct the index of all runs lock file path and name

Definition at line 124 of file SiteConfig.py.

00124                               :
00125         """Construct the index of all runs lock file path and name"""
00126         return self.runsXmlDir + "/runs.lock"
00127 
    def logDirectory(self, runNumber):

def SiteConfig::SiteConfig::logDirectory (   self,
  runNumber 
)

Construct the path for the nuwa log output directory

Definition at line 128 of file SiteConfig.py.

00128                                      :
00129         """Construct the path for the nuwa log output directory"""
00130         return self.jobLogDir+"/"+self.runSepDir(runNumber)
00131 
    def logOutFile(self, jobName, runNumber, seqNumber=None):

def SiteConfig::SiteConfig::logOutFile (   self,
  jobName,
  runNumber,
  seqNumber = None 
)

Construct the path for the nuwa log output file

Definition at line 132 of file SiteConfig.py.

00132                                                             :
00133         """Construct the path for the nuwa log output file"""
00134         import os
00135         filename = "%s_%d.out" % (self.jobId(jobName, runNumber, seqNumber),
00136                                   os.getpid() )
00137         return self.logDirectory(runNumber)+"/"+filename
00138 
    def logErrFile(self, jobName, runNumber, seqNumber=None):

def SiteConfig::SiteConfig::logErrFile (   self,
  jobName,
  runNumber,
  seqNumber = None 
)

Construct the path for the log error file

Definition at line 139 of file SiteConfig.py.

00139                                                             :
00140         """Construct the path for the log error file"""
00141         import os
00142         filename = "%s_%d.err" % (self.jobId(jobName, runNumber, seqNumber),
00143                                   os.getpid() )
00144         return self.logDirectory(runNumber)+"/"+filename
00145 
    def batchLogDirectory(self, runNumber):

def SiteConfig::SiteConfig::batchLogDirectory (   self,
  runNumber 
)

Construct the directory for batch log files

Definition at line 146 of file SiteConfig.py.

00146                                           :
00147         """Construct the directory for batch log files"""
00148         return self.batchLogDir+"/"+self.runSepDir(runNumber)
00149 
    def batchLogOutFile(self, jobName, runNumber, seqNumber=None):

def SiteConfig::SiteConfig::batchLogOutFile (   self,
  jobName,
  runNumber,
  seqNumber = None 
)

Construct the path for the batch log output file

Definition at line 150 of file SiteConfig.py.

00150                                                                  :
00151         """Construct the path for the batch log output file"""
00152         import os
00153         jobId = self.jobId(jobName, runNumber, seqNumber)
00154         filename = "batch_%s_%d.out" % (self.jobId(jobName, runNumber,
00155                                                    seqNumber),
00156                                         os.getpid() )
00157         return self.batchLogDirectory(runNumber)+"/"+filename
00158 
    def batchLogErrFile(self, jobName, runNumber, seqNumber=None):

def SiteConfig::SiteConfig::batchLogErrFile (   self,
  jobName,
  runNumber,
  seqNumber = None 
)

Construct the path for the batch log error file

Definition at line 159 of file SiteConfig.py.

00159                                                                  :
00160         """Construct the path for the batch log error file"""
00161         import os
00162         filename = "batch_%s_%d.err" % (self.jobId(jobName, runNumber,
00163                                                    seqNumber),
00164                                         os.getpid() )
00165         return self.batchLogDirectory(runNumber)+"/"+filename
00166 
    def stateFile(self, jobType, jobName, runNumber, seqNumber):

def SiteConfig::SiteConfig::stateFile (   self,
  jobType,
  jobName,
  runNumber,
  seqNumber 
)

Construct the path and filename for logging state of this job

Definition at line 167 of file SiteConfig.py.

00167                                                                :
00168         """Construct the path and filename for logging state of this job"""
00169         filename = "%s_%s.state" % (self.jobId(jobName, runNumber,seqNumber),
00170                                     jobType)
00171         return self.stateRootDir+"/"+self.runSubDir(runNumber)+"/"+filename
00172     
class SiteConfigLocal(SiteConfig):


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

Generated on Mon Apr 11 20:10:14 2011 for ProcessManager by doxygen 1.4.7