CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
cond2xml.CondXmlProcessor Class Reference
Inheritance diagram for cond2xml.CondXmlProcessor:

Public Member Functions

def __del__ (self)
 
def __init__ (self, condDBIn)
 
def discover (self, payloadType)
 
def payload2xml (self, session, payload)
 
def prepPayload2xml (self, session, payload)
 

Public Attributes

 conddb
 

Private Attributes

 _pl2xml_isPrepared
 

Detailed Description

Definition at line 86 of file cond2xml.py.

Constructor & Destructor Documentation

def cond2xml.CondXmlProcessor.__init__ (   self,
  condDBIn 
)

Definition at line 88 of file cond2xml.py.

88  def __init__(self, condDBIn):
89  self.conddb = condDBIn
90  self._pl2xml_isPrepared = False
91 
def __init__(self, condDBIn)
Definition: cond2xml.py:88
def cond2xml.CondXmlProcessor.__del__ (   self)

Definition at line 100 of file cond2xml.py.

References PhysicsTools::MVATrainer.doCleanup, and join().

100  def __del__(self):
101 
102  if self.doCleanup:
103  shutil.rmtree( '/'.join( self._pl2xml_tmpDir.split('/')[:-1] ) )
104  os.unlink( os.path.join( os.environ['CMSSW_BASE'], 'src', './pl2xmlComp.so') )
105  return
106 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18

Member Function Documentation

def cond2xml.CondXmlProcessor.discover (   self,
  payloadType 
)

Definition at line 107 of file cond2xml.py.

Referenced by cond2xml.CondXmlProcessor.prepPayload2xml().

107  def discover(self, payloadType):
108 
109  # print "discover> checking for plugin of type %s" % payloadType
110 
111  # first search in developer area:
def discover(self, payloadType)
Definition: cond2xml.py:107
def cond2xml.CondXmlProcessor.payload2xml (   self,
  session,
  payload 
)

Definition at line 188 of file cond2xml.py.

References cond2xml.CondXmlProcessor._pl2xml_isPrepared, ALCARECOTkAlBeamHalo_cff.filter, RecoEcal_EventContent_cff.func, cond2xml.CondXmlProcessor.prepPayload2xml(), cond2xml.sanitize(), and harvestTrackValidationPlots.str.

188  def payload2xml(self, session, payload):
189 
190  if not self._pl2xml_isPrepared:
191  xmlConverter = self.prepPayload2xml(session, payload)
192  if not xmlConverter:
193  msg = "Error preparing code for "+payload
194  raise Exception(msg)
195  self._pl2xml_isPrepared = True
196 
197 
198  Payload = session.get_dbtype(self.conddb.Payload)
199  # get payload from DB:
200  result = session.query(Payload.data, Payload.object_type).filter(Payload.hash == payload).one()
201  data, plType = result
202 
203  convFuncName = sanitize(plType)+'2xml'
204  sys.path.append('.')
def sanitize(typeName)
Definition: cond2xml.py:83
def prepPayload2xml(self, session, payload)
Definition: cond2xml.py:136
def payload2xml(self, session, payload)
Definition: cond2xml.py:188
def cond2xml.CondXmlProcessor.prepPayload2xml (   self,
  session,
  payload 
)

Definition at line 136 of file cond2xml.py.

References cond2xml.CondXmlProcessor.discover(), PhysicsTools::MVATrainer.doCleanup, ALCARECOTkAlBeamHalo_cff.filter, and cond2xml.sanitize().

Referenced by cond2xml.CondXmlProcessor.payload2xml().

136  def prepPayload2xml(self, session, payload):
137 
138  startTime = time.time()
139 
140  Payload = session.get_dbtype(self.conddb.Payload)
141  # get payload from DB:
142  result = session.query(Payload.data, Payload.object_type).filter(Payload.hash == payload).one()
143  data, plType = result
144 
145  info = { "mdName" : "pl2xmlComp",
146  'plType' : plType,
147  'plTypeSan' : sanitize(plType),
148  }
149 
150  converter = self.discover(plType)
def sanitize(typeName)
Definition: cond2xml.py:83
def discover(self, payloadType)
Definition: cond2xml.py:107
def prepPayload2xml(self, session, payload)
Definition: cond2xml.py:136

Member Data Documentation

cond2xml.CondXmlProcessor._pl2xml_isPrepared
private

Definition at line 90 of file cond2xml.py.

Referenced by cond2xml.CondXmlProcessor.payload2xml().

cond2xml.CondXmlProcessor.conddb

Definition at line 89 of file cond2xml.py.