test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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__
 
def appendToExtendedValidation
 
def appendToMerge
 
def createConfiguration
 
def createCrabCfg
 
def createScript
 
def getRepMap
 
- Public Member Functions inherited from genericValidation.GenericValidationData
def __init__
 
def createCrabCfg
 
def createScript
 
def getRepMap
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__
 
def createConfiguration
 
def createCrabCfg
 
def createFiles
 
def createScript
 
def getCompareStrings
 
def getRepMap
 

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

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 80 of file primaryVertexValidation.py.

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

80 
81  def appendToExtendedValidation( self, validationsSoFar = "" ):
82  """
83  if no argument or "" is passed a string with an instantiation is
84  returned, else the validation is appended to the list
85  """
86  repMap = self.getRepMap()
87 
88  if validationsSoFar != "":
89  validationsSoFar += ','
90  validationsSoFar += "root://eoscms//eos/cms%(finalResultFile)s=%(title)s"%repMap
91  else:
92  validationsSoFar += "root://eoscms//eos/cms%(finalResultFile)s=%(title)s"%repMap
93  return validationsSoFar
94 
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 67 of file primaryVertexValidation.py.

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

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

Definition at line 36 of file primaryVertexValidation.py.

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

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

Definition at line 48 of file primaryVertexValidation.py.

References monteCarloValidation.MonteCarloValidation.crabCfgBaseName, primaryVertexValidation.PrimaryVertexValidation.crabCfgBaseName, and offlineValidation.OfflineValidation.crabCfgBaseName.

48 
49  def createCrabCfg(self, path):
50  return GenericValidationData.createCrabCfg(self, path, self.crabCfgBaseName)
def primaryVertexValidation.PrimaryVertexValidation.createScript (   self,
  path 
)

Definition at line 45 of file primaryVertexValidation.py.

45 
46  def createScript(self, path):
47  return GenericValidationData.createScript(self, path, template = configTemplates.PVValidationScriptTemplate)
def primaryVertexValidation.PrimaryVertexValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 51 of file primaryVertexValidation.py.

References genericValidation.GenericValidation.alignmentToValidate, genericValidation.GenericValidation.general, entry.name, geometrydata.GeometryData.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.

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

Member Data Documentation

primaryVertexValidation.PrimaryVertexValidation.configBaseName

Definition at line 20 of file primaryVertexValidation.py.

Referenced by trackSplittingValidation.TrackSplittingValidation.createConfiguration(), primaryVertexValidation.PrimaryVertexValidation.createConfiguration(), and zMuMuValidation.ZMuMuValidation.createConfiguration().

primaryVertexValidation.PrimaryVertexValidation.crabCfgBaseName

Definition at line 22 of file primaryVertexValidation.py.

Referenced by trackSplittingValidation.TrackSplittingValidation.createCrabCfg(), primaryVertexValidation.PrimaryVertexValidation.createCrabCfg(), and zMuMuValidation.ZMuMuValidation.createCrabCfg().

primaryVertexValidation.PrimaryVertexValidation.needParentFiles

Definition at line 25 of file primaryVertexValidation.py.

primaryVertexValidation.PrimaryVertexValidation.outputBaseName

Definition at line 24 of file primaryVertexValidation.py.

Referenced by primaryVertexValidation.PrimaryVertexValidation.getRepMap(), zMuMuValidation.ZMuMuValidation.getRepMap(), and genericValidation.GenericValidationData.getRepMap().

primaryVertexValidation.PrimaryVertexValidation.resultBaseName

Definition at line 23 of file primaryVertexValidation.py.

Referenced by genericValidation.GenericValidationData.getRepMap().

primaryVertexValidation.PrimaryVertexValidation.scriptBaseName

Definition at line 21 of file primaryVertexValidation.py.

Referenced by genericValidation.GenericValidationData.createScript().