CMS 3D CMS Logo

Public Member Functions | Private Attributes

validateAlignments::OfflineValidation Class Reference

Inheritance diagram for validateAlignments::OfflineValidation:
validateAlignments::GenericValidation validateAlignments::OfflineValidationDQM

List of all members.

Public Member Functions

def __init__
def appendToExtendedValidation
def createConfiguration
def createScript
def getRepMap

Private Attributes

 __DMRMethod
 __DMRMinimum
 __OfflineTreeBaseDir

Detailed Description

Definition at line 371 of file validateAlignments.py.


Constructor & Destructor Documentation

def validateAlignments::OfflineValidation::__init__ (   self,
  alignment,
  config 
)

Reimplemented from validateAlignments::GenericValidation.

Reimplemented in validateAlignments::OfflineValidationDQM.

Definition at line 372 of file validateAlignments.py.

00373                                         :
00374         GenericValidation.__init__(self, alignment, config)
00375         general = readGeneral( config )
00376         self.__DMRMethod = general["DMRMethod"]
00377         self.__DMRMinimum = general["DMRMinimum"]
00378         self.__OfflineTreeBaseDir = general["OfflineTreeBaseDir"]
    

Member Function Documentation

def validateAlignments::OfflineValidation::appendToExtendedValidation (   self,
  validationsSoFar = "" 
)
if no argument or "" is passed a string with an instantiation is returned, 
else the validation is appended to the list

Definition at line 420 of file validateAlignments.py.

00421                                                                  :
00422         """
00423         if no argument or "" is passed a string with an instantiation is returned, 
00424         else the validation is appended to the list
00425         """
00426         repMap = self.getRepMap()
00427         if validationsSoFar == "":
00428             validationsSoFar = 'PlotAlignmentValidation p("%(resultFile)s", "%(name)s", %(color)s, %(style)s);\n'%repMap
00429         else:
00430             validationsSoFar +='p.loadFileList("%(resultFile)s", "%(name)s", %(color)s, %(style)s);\n'%repMap
00431 
00432 #          PlotAlignmentValidation p(".oO[firstFile]Oo.",".oO[firstLegendEntry]Oo.");
00433 #  p.loadFileList("rfio:/castor/cern.ch/user/j/jdraeger/Validation/MCfromCRAFT/new/Validation_MC_Adun1_CosmicTF.root","Brot ist lecker2");
00434         return validationsSoFar

def validateAlignments::OfflineValidation::createConfiguration (   self,
  path,
  configBaseName = "TkAlOfflineValidation" 
)

Definition at line 379 of file validateAlignments.py.

00380                                                                                   :
00381         cfgName = "%s.%s_cfg.py"%( configBaseName, self.alignmentToValidate.name )
00382         repMap = self.getRepMap()
00383           
00384         cfgs = {cfgName:replaceByMap( configTemplates.offlineTemplate, repMap)}
00385         self.filesToCompare[ GenericValidation.defaultReferenceName ] = repMap["resultFile"] 
00386         GenericValidation.createConfiguration(self, cfgs, path)
        
def validateAlignments::OfflineValidation::createScript (   self,
  path,
  scriptBaseName = "TkAlOfflineValidation" 
)

Definition at line 387 of file validateAlignments.py.

00388                                                                           :
00389         scriptName = "%s.%s.sh"%(scriptBaseName, self.alignmentToValidate.name )
00390         repMap = GenericValidation.getRepMap(self)
00391         repMap["CommandLine"]=""
00392         for cfg in self.configFiles:
00393             repMap["CommandLine"]+= repMap["CommandLineTemplate"]%{"cfgFile":cfg,
00394                                                   "postProcess":""
00395                                                   }
00396         scripts = {scriptName: replaceByMap( configTemplates.scriptTemplate, repMap ) }
00397         return GenericValidation.createScript(self, scripts, path)

def validateAlignments::OfflineValidation::getRepMap (   self,
  alignment = None 
)

Reimplemented from validateAlignments::GenericValidation.

Reimplemented in validateAlignments::OfflineValidationDQM.

Definition at line 398 of file validateAlignments.py.

00399                                          :
00400         repMap = GenericValidation.getRepMap(self, alignment) 
00401         repMap.update({
00402                 "OfflineTreeBaseDir": self.__OfflineTreeBaseDir,
00403                 "DMRMethod":self.__DMRMethod,
00404                 "DMRMinimum":self.__DMRMinimum,
00405                 "APE": configTemplates.APETemplate,
00406                 "outputFile": replaceByMap( ".oO[workdir]Oo./AlignmentValidation_.oO[name]Oo..root", repMap ),
00407                 "resultFile": replaceByMap( ".oO[datadir]Oo./AlignmentValidation_.oO[name]Oo..root", repMap ),
00408                 "TrackSelectionTemplate": configTemplates.TrackSelectionTemplate,
00409                 "LorentzAngleTemplate": configTemplates.LorentzAngleTemplate,
00410                 "offlineValidationMode": "Standalone",
00411                 "offlineValidationFileOutput": configTemplates.offlineStandaloneFileOutputTemplate
00412                 })
00413         repMap["outputFile"] = os.path.expandvars( repMap["outputFile"] )
00414         repMap["outputFile"] = os.path.abspath( repMap["outputFile"] )
00415         repMap["resultFile"] = os.path.expandvars( repMap["resultFile"] )
00416         repMap["resultFile"] = os.path.abspath( repMap["resultFile"] )
00417         
00418         return repMap
00419 
    

Member Data Documentation

Definition at line 372 of file validateAlignments.py.

Definition at line 372 of file validateAlignments.py.

Definition at line 372 of file validateAlignments.py.