Public Member Functions | |
def | __init__ |
def | createValidations |
def | getLoadTemplate |
def | getRepMap |
def | restrictTo |
Public Attributes | |
color | |
compareTo | |
dbpath | |
errordbpath | |
errortag | |
mode | |
name | |
style | |
tag | |
Private Member Functions | |
def | __testDbExist |
Definition at line 73 of file validateAlignments.py.
def validateAlignments::Alignment::__init__ | ( | self, | |
name, | |||
config | |||
) |
Definition at line 74 of file validateAlignments.py.
00075 : 00076 section = "alignment:%s"%name 00077 self.name = name 00078 if not config.has_section( section ): 00079 raise StandardError, "section %s not found. Please define the alignment!"%section 00080 self.mode = config.get(section, "mode").split() 00081 self.dbpath = config.get(section, "dbpath") 00082 self.__testDbExist( self.dbpath ) 00083 00084 self.errordbpath = "frontier://FrontierProd/CMS_COND_21X_ALIGNMENT" 00085 self.errortag = "TrackerIdealGeometryErrors210_mc" 00086 if config.has_option(section,"errordbpath") and config.has_option(section,"errortag"): 00087 self.errordbpath = config.get(section, "errordbpath") 00088 self.__testDbExist( self.errordbpath ) 00089 self.errortag = config.get(section,"errortag") 00090 else: 00091 if config.has_option(section,"errordbpath") or config.has_option(section,"errortag"): 00092 raise StandardError, "in alignment:%s you have to provide either both errordbpath _and_ errortag or none of both."%name 00093 self.tag = config.get(section,"tag") 00094 00095 self.color = config.get(section,"color") 00096 self.style = config.get(section,"style") 00097 self.compareTo = {} 00098 for option in config.options( section ): 00099 if option.startswith("compare|"): 00100 alignmentName = option.split("compare|")[1] 00101 comparisonList = config.get( section, option ).split() 00102 if len(comparisonList) == 0: 00103 raise StandardError, "empty comaprison list '%s' given for %s"%(config.get( section, option ), alignmentName ) 00104 self.compareTo[ alignmentName ] = comparisonList 00105 if self.compareTo == {}: 00106 self.compareTo = { 00107 "IDEAL":["Tracker","SubDets"] 00108 }
def validateAlignments::Alignment::__testDbExist | ( | self, | |
dbpath | |||
) | [private] |
Definition at line 109 of file validateAlignments.py.
00110 : 00111 #FIXME delete return to end train debuging 00112 return 00113 if not dbpath.startswith("sqlite_file:"): 00114 print "WARNING: could not check existence for",dbpath 00115 else: 00116 if not os.path.exists( dbpath.split("sqlite_file:")[1] ): 00117 raise "could not find file: '%s'"%dbpath.split("sqlite_file:")[1]
def validateAlignments::Alignment::createValidations | ( | self, | |
config, | |||
options, | |||
allAlignments = [] |
|||
) |
config is the overall configuration options are the options as paresed from command line allAlignemts is a list of Alignment objects the is used to generate Alignment_vs_Alignemnt jobs
Definition at line 142 of file validateAlignments.py.
00143 : 00144 """ 00145 config is the overall configuration 00146 options are the options as paresed from command line 00147 allAlignemts is a list of Alignment objects the is used to generate Alignment_vs_Alignemnt jobs 00148 """ 00149 result = [] 00150 for validationName in self.mode: 00151 if validationName == "compare": 00152 randomWorkdirPart = None #use only one ranom numberr for all geom. comparisions for one alignment 00153 #test if all needed alignments are defined 00154 for alignmentName in self.compareTo: 00155 referenceAlignment = 'IDEAL' 00156 if not alignmentName == "IDEAL": 00157 foundAlignment = False 00158 for alignment in allAlignments: 00159 if alignment.name == alignmentName: 00160 referenceAlignment = alignment 00161 foundAlignment = True 00162 if not foundAlignment: 00163 raise StandardError, " could not find alignment called '%s'"%alignmentName 00164 result.append( GeometryComparision( self, referenceAlignment, config, options.getImages, randomWorkdirPart ) ) 00165 if randomWorkdirPart == None: 00166 randomWorkdirPart = result[-1].randomWorkdirPart 00167 elif validationName == "offline": 00168 result.append( OfflineValidation( self, config ) ) 00169 elif validationName == "offlineDQM": 00170 result.append( OfflineValidationDQM( self, config ) ) 00171 elif validationName == "mcValidate": 00172 result.append( MonteCarloValidation( self, config ) ) 00173 elif validationName == "split": 00174 result.append( TrackSplittingValidation( self, config ) ) 00175 else: 00176 raise StandardError, "unknown validation mode '%s'"%validationName 00177 return result
def validateAlignments::Alignment::getLoadTemplate | ( | self | ) |
Definition at line 139 of file validateAlignments.py.
def validateAlignments::Alignment::getRepMap | ( | self | ) |
Definition at line 126 of file validateAlignments.py.
def validateAlignments::Alignment::restrictTo | ( | self, | |
restriction | |||
) |
Definition at line 118 of file validateAlignments.py.
Definition at line 74 of file validateAlignments.py.
Definition at line 74 of file validateAlignments.py.
Definition at line 74 of file validateAlignments.py.
Definition at line 74 of file validateAlignments.py.
Definition at line 74 of file validateAlignments.py.
Definition at line 74 of file validateAlignments.py.
Definition at line 74 of file validateAlignments.py.
Definition at line 74 of file validateAlignments.py.
Definition at line 74 of file validateAlignments.py.