def onInstrumentConfiguration(self, configuration): from InstrumentSimulationAppBuilder import Builder builder = Builder(self.path) builder.computation = self.experiment pyscriptcontents, options, odbs = builder.render(configuration, db = self.db, dds = self.dds) self.pyscriptcontents += pyscriptcontents self.options.update(options) for odb, content in odbs: self._createfile(odb, content) self.filenames += [odb for odb, c in odbs] return
def onInstrumentConfiguration(self, configuration): from InstrumentSimulationAppBuilder import Builder builder = Builder(self.path) builder.computation = self.experiment pyscriptcontents, options, odbs = builder.render(configuration, db=self.db, dds=self.dds) self.pyscriptcontents += pyscriptcontents self.options.update(options) for odb, content in odbs: self._createfile(odb, content) self.filenames += [odb for odb, c in odbs] return
def onSampleAssembly(self, sampleassembly): if sampleassembly.__class__.__name__ == 'SampleAssembly': from McvineSampleAssemblyBuilder import Builder else: from McstasSampleBuilder import Builder pass return Builder(self.path).render( sampleassembly )
def onSampleComponent(self, samplecomponent): from SampleComponentBuilder import Builder builder = Builder(self.path) builder.render(samplecomponent, db=self.db, dds=self.dds) self.dependencies += builder.getDependencies() self.filenames += builder.getFilenames() self.options.update(builder.getOptions()) return
def onScatterer(self, scatterer): from McvineSampleAssemblyBuilder import Builder builder = Builder(self.path) builder.render(scatterer, director=self.director) self.dependencies += builder.getDependencies() self.filenames += builder.getFilenames() self.options.update(builder.getOptions()) return
def onSampleComponent(self, samplecomponent): from SampleComponentBuilder import Builder builder = Builder(self.path) builder.render(samplecomponent, db = self.db, dds = self.dds) self.dependencies += builder.getDependencies() self.filenames += builder.getFilenames() self.options.update(builder.getOptions()) return
def onConfiguredInstrument(self, instrument): from InstrumentSimulationAppBuilder import Builder return Builder( self.path ).render( instrument )
def onInstrument(self, instrument): from InstrumentSimulationAppBuilder import Builder return Builder().render( instrument )