CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
primaryVertexValidation.PrimaryVertexValidation Class Reference
Inheritance diagram for primaryVertexValidation.PrimaryVertexValidation:
genericValidation.GenericValidationData genericValidation.GenericValidation

Public Member Functions

def __init__ (self, valName, alignment, config, configBaseName="TkAlPrimaryVertexValidation", scriptBaseName="TkAlPrimaryVertexValidation", crabCfgBaseName="TkAlPrimaryVertexValidation", resultBaseName="PrimaryVertexValidation", outputBaseName="PrimaryVertexValidation")
 
def appendToExtendedValidation (self, validationsSoFar="")
 
def appendToMerge (self, validationsSoFar="")
 
def createConfiguration (self, path)
 
def createCrabCfg (self, path)
 
def createScript (self, path)
 
def getRepMap (self, alignment=None)
 
- Public Member Functions inherited from genericValidation.GenericValidationData
def __init__ (self, valName, alignment, config, valType, addDefaults={}, addMandatories=[], addneedpackages=[])
 
def createCrabCfg (self, path, crabCfgBaseName)
 
def createScript (self, path, template=configTemplates.scriptTemplate, downloadFiles=[], repMap=None, repMaps=None)
 
def getRepMap (self, alignment=None)
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__ (self, valName, alignment, config, valType, addDefaults={}, addMandatories=[], addneedpackages=[])
 
def createConfiguration (self, fileContents, path, schedule=None, repMap=None, repMaps=None)
 
def createCrabCfg (self, fileContents, path)
 
def createFiles (self, fileContents, path, repMap=None, repMaps=None)
 
def createScript (self, fileContents, path, downloadFiles=[], repMap=None, repMaps=None)
 
def getCompareStrings (self, requestId=None, plain=False)
 
def getRepMap (self, alignment=None)
 

Public Attributes

 configBaseName
 
 crabCfgBaseName
 
 needParentFiles
 
 outputBaseName
 
 resultBaseName
 
 scriptBaseName
 
- Public Attributes inherited from genericValidation.GenericValidationData
 crabWorkingDir
 
 dataset
 
- Public Attributes inherited from genericValidation.GenericValidation
 alignmentToValidate
 
 AutoAlternates
 
 cmssw
 
 cmsswreleasebase
 
 config
 
 configFiles
 
 crabConfigFiles
 
 filesToCompare
 
 general
 
 jobid
 
 jobmode
 
 name
 
 NJobs
 
 packages
 
 randomWorkdirPart
 
 scramarch
 
 scriptFiles
 
 valType
 

Additional Inherited Members

- Static Public Attributes inherited from genericValidation.GenericValidation
string defaultReferenceName = "DEFAULT"
 

Detailed Description

Definition at line 8 of file primaryVertexValidation.py.

Constructor & Destructor Documentation

def primaryVertexValidation.PrimaryVertexValidation.__init__ (   self,
  valName,
  alignment,
  config,
  configBaseName = "TkAlPrimaryVertexValidation",
  scriptBaseName = "TkAlPrimaryVertexValidation",
  crabCfgBaseName = "TkAlPrimaryVertexValidation",
  resultBaseName = "PrimaryVertexValidation",
  outputBaseName = "PrimaryVertexValidation" 
)

Definition at line 14 of file primaryVertexValidation.py.

14  outputBaseName = "PrimaryVertexValidation"):
15  defaults = {
16  "pvvalidationreference": ("/store/caf/user/musich/Alignment/TkAlPrimaryVertexValidation/Reference/PrimaryVertexValidation_test_pvvalidation_mc_design_mc_48bins.root"),
17  "ttrhbuilder":"WithAngleAndTemplate",
18  "doBPix":"True",
19  "doFPix":"True"
20  }
21 
22  mandatories = ["isda","ismc","runboundary","trackcollection","vertexcollection","lumilist","ptCut","etaCut","runControl","numberOfBins"]
23  self.configBaseName = configBaseName
24  self.scriptBaseName = scriptBaseName
25  self.crabCfgBaseName = crabCfgBaseName
26  self.resultBaseName = resultBaseName
27  self.outputBaseName = outputBaseName
28  self.needParentFiles = False
29  GenericValidationData.__init__(self, valName, alignment, config,
30  "primaryvertex", addDefaults=defaults,
31  addMandatories=mandatories)
32 
33  if self.general["pvvalidationreference"].startswith("/store"):
34  self.general["pvvalidationreference"] = "root://eoscms//eos/cms" + self.general["pvvalidationreference"]
35  if self.NJobs > 1:
36  raise AllInOneError("Parallel jobs not implemented for the PrimaryVertex validation!\n"
37  "Please set parallelJobs = 1.")
38 

Member Function Documentation

def primaryVertexValidation.PrimaryVertexValidation.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 84 of file primaryVertexValidation.py.

References genericValidation.GenericValidation.getRepMap(), and alignment.Alignment.getRepMap().

84  def appendToExtendedValidation( self, validationsSoFar = "" ):
85  """
86  if no argument or "" is passed a string with an instantiation is
87  returned, else the validation is appended to the list
88  """
89  repMap = self.getRepMap()
90 
91  if validationsSoFar == "":
92  validationsSoFar = (' loadFileList("root://eoscms//eos/cms%(finalResultFile)s",'
93  '"PVValidation","%(title)s", %(color)s, %(style)s);\n')%repMap
94  else:
95  validationsSoFar += (' loadFileList("root://eoscms//eos/cms%(finalResultFile)s",'
96  '"PVValidation","%(title)s", %(color)s, %(style)s);\n')%repMap
97 
98  return validationsSoFar
99 
100 
101  # if validationsSoFar != "":
102  # validationsSoFar += ','
103  # validationsSoFar += "root://eoscms//eos/cms%(finalResultFile)s=%(title)s"%repMap
104  # else:
105  # validationsSoFar += "root://eoscms//eos/cms%(finalResultFile)s=%(title)s"%repMap
106  # return validationsSoFar
107 
108 
def appendToExtendedValidation(self, validationsSoFar="")
def getRepMap(self, alignment=None)
def primaryVertexValidation.PrimaryVertexValidation.appendToMerge (   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 71 of file primaryVertexValidation.py.

References genericValidation.GenericValidation.getRepMap(), alignment.Alignment.getRepMap(), and join().

71  def appendToMerge( self, validationsSoFar = "" ):
72  """
73  if no argument or "" is passed a string with an instantiation is returned,
74  else the validation is appended to the list
75  """
76  repMap = self.getRepMap()
77 
78  parameters = " ".join(os.path.join("root://eoscms//eos/cms", file.lstrip("/")) for file in repMap["resultFiles"])
79 
80  mergedoutputfile = os.path.join("root://eoscms//eos/cms", repMap["finalResultFile"].lstrip("/"))
81  validationsSoFar += "hadd -f %s %s\n" % (mergedoutputfile, parameters)
82  return validationsSoFar
83 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def getRepMap(self, alignment=None)
def primaryVertexValidation.PrimaryVertexValidation.createConfiguration (   self,
  path 
)

Definition at line 39 of file primaryVertexValidation.py.

References monteCarloValidation.MonteCarloValidation.configBaseName, primaryVertexValidation.PrimaryVertexValidation.configBaseName, offlineValidation.OfflineValidation.configBaseName, genericValidation.GenericValidation.filesToCompare, genericValidation.GenericValidation.getRepMap(), alignment.Alignment.getRepMap(), AlignableObjectId::entry.name, genericValidation.GenericValidation.name, alignment.Alignment.name, TrackerSectorStruct.name, classes.MonitorData.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, geometry.Structure.name, and plotscripts.SawTeethFunction.name.

39  def createConfiguration(self, path):
40  cfgName = "%s.%s.%s_cfg.py"%( self.configBaseName, self.name,
41  self.alignmentToValidate.name )
42  repMap = self.getRepMap()
43  cfgs = {cfgName: configTemplates.PrimaryVertexValidationTemplate}
44  self.filesToCompare[GenericValidationData.defaultReferenceName] = \
45  repMap["finalResultFile"]
46  GenericValidationData.createConfiguration(self, cfgs, path, repMap = repMap)
47 
def getRepMap(self, alignment=None)
def primaryVertexValidation.PrimaryVertexValidation.createCrabCfg (   self,
  path 
)
def primaryVertexValidation.PrimaryVertexValidation.createScript (   self,
  path 
)

Definition at line 48 of file primaryVertexValidation.py.

48  def createScript(self, path):
49  return GenericValidationData.createScript(self, path, template = configTemplates.PVValidationScriptTemplate)
50 
def primaryVertexValidation.PrimaryVertexValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 54 of file primaryVertexValidation.py.

References genericValidation.GenericValidation.alignmentToValidate, genericValidation.GenericValidation.general, AlignableObjectId::entry.name, genericValidation.GenericValidation.name, alignment.Alignment.name, TrackerSectorStruct.name, classes.MonitorData.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, geometry.Structure.name, plotscripts.SawTeethFunction.name, monteCarloValidation.MonteCarloValidation.outputBaseName, primaryVertexValidation.PrimaryVertexValidation.outputBaseName, and offlineValidation.OfflineValidation.outputBaseName.

54  def getRepMap(self, alignment = None):
55  if alignment == None:
56  alignment = self.alignmentToValidate
57  repMap = GenericValidationData.getRepMap(self, alignment)
58 
59  repMap.update({
60  "nEvents": self.general["maxevents"],
61  "TrackCollection": self.general["trackcollection"],
62  "VertexCollection": self.general["vertexcollection"],
63  "eosdir": os.path.join(self.general["eosdir"]),
64  #"eosdir": os.path.join(self.general["eosdir"], "%s/%s/%s" % (self.outputBaseName, self.name, alignment.name)),
65  "workingdir": ".oO[datadir]Oo./%s/%s/%s" % (self.outputBaseName, self.name, alignment.name),
66  "plotsdir": ".oO[datadir]Oo./%s/%s/%s/plots" % (self.outputBaseName, self.name, alignment.name),
67  })
68 
69  return repMap
70 

Member Data Documentation

primaryVertexValidation.PrimaryVertexValidation.needParentFiles

Definition at line 28 of file primaryVertexValidation.py.

primaryVertexValidation.PrimaryVertexValidation.resultBaseName
primaryVertexValidation.PrimaryVertexValidation.scriptBaseName