CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
MCScenario_CRAFT1_22X.Alignable Class Reference

Public Member Functions

def __init__
 
def writeXML
 

Public Attributes

 alignabletype
 
 location
 

Detailed Description

Definition at line 77 of file MCScenario_CRAFT1_22X.py.

Constructor & Destructor Documentation

def MCScenario_CRAFT1_22X.Alignable.__init__ (   self,
  alignabletype,
  location 
)

Definition at line 78 of file MCScenario_CRAFT1_22X.py.

78 
79  def __init__(self, alignabletype, **location):
80  self.alignabletype = alignabletype
81  self.location = location

Member Function Documentation

def MCScenario_CRAFT1_22X.Alignable.writeXML (   self)

Definition at line 82 of file MCScenario_CRAFT1_22X.py.

References MCScenario_CRAFT1_22X.Alignable.alignabletype, join(), MCScenario_CRAFT1_22X.Alignable.location, and str.

82 
83  def writeXML(self):
84  parameters = self.location.keys()
85  if self.alignabletype[0:2] == "DT":
86  parameters.sort(DTsorter)
87  else:
88  parameters.sort(CSCsorter)
89 
90  output = ["<", self.alignabletype, " "]
91  for parameter in parameters:
92  output.extend([parameter, "=\"", str(self.location[parameter]), "\" "])
93  output.append("/>")
94 
95  return "".join(output)
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
#define str(s)

Member Data Documentation

MCScenario_CRAFT1_22X.Alignable.alignabletype

Definition at line 79 of file MCScenario_CRAFT1_22X.py.

Referenced by MCScenario_CRAFT1_22X.Alignable.writeXML().

MCScenario_CRAFT1_22X.Alignable.location

Definition at line 80 of file MCScenario_CRAFT1_22X.py.

Referenced by MCScenario_CRAFT1_22X.Alignable.writeXML(), and MCScenario_CRAFT1_22X.Position.writeXML().