本文整理汇总了Python中Configuration.Configuration.add方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.add方法的具体用法?Python Configuration.add怎么用?Python Configuration.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configuration.Configuration
的用法示例。
在下文中一共展示了Configuration.add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getConfiguration
# 需要导入模块: from Configuration import Configuration [as 别名]
# 或者: from Configuration.Configuration import add [as 别名]
def getConfiguration(self):
"""Note that this needs the xdaq launchers running since it has to query the remote hosts
to get numa information based on the output of numactl --hardware"""
resetInstanceNumbers()
evmConfig = [
('inputSource','string','Local'),
('allocateBlockSize','unsignedInt','0x20000'),
('maxAllocateTime','unsignedInt','250'),
('socketBufferFIFOCapacity','unsignedInt','1024'),
('grantFIFOCapacity','unsignedInt','16384'),
('fragmentFIFOCapacity','unsignedInt','256'),
('fragmentRequestFIFOCapacity','unsignedInt','80')
]
if self.args['canonicalEVM']:
evmConfig.append( ('fedSourceIds','unsignedInt',range(1000,1008)) )
evmConfig.append( ('blockSize','unsignedInt','0x3fff0') )
evmConfig.append( ('numberOfResponders','unsignedInt','6') )
else:
evmConfig.append( ('fedSourceIds','unsignedInt',(1000,)) )
evmConfig.append( ('blockSize','unsignedInt','0x4000') )
evmConfig.append( ('numberOfResponders','unsignedInt','2') )
ruConfig = [
('inputSource','string','Local'),
('blockSize','unsignedInt','0x3fff0'),
('numberOfResponders','unsignedInt','6'),
('socketBufferFIFOCapacity','unsignedInt','1024'),
('grantFIFOCapacity','unsignedInt','16384'),
('fragmentFIFOCapacity','unsignedInt','256'),
('fragmentRequestFIFOCapacity','unsignedInt','6000')
]
buConfig = [
('lumiSectionTimeout','unsignedInt','0'),
('maxEvtsUnderConstruction','unsignedInt','320'),
('eventsPerRequest','unsignedInt','8'),
('superFragmentFIFOCapacity','unsignedInt','12800'),
('numberOfBuilders','unsignedInt','5')
]
if self.args['outputDisk']:
buConfig.append( ('dropEventData','boolean','false') )
buConfig.append( ('rawDataDir','string',self.args['outputDisk']) )
buConfig.append( ('metaDataDir','string',self.args['outputDisk']) )
buConfig.append( ('deleteRawDataFiles','boolean','true') )
buConfig.append( ('ignoreResourceSummary','boolean','true') )
buConfig.append( ('maxEventsPerFile','unsignedInt','100') )
else:
buConfig.append( ('dropEventData','boolean','true') )
config = Configuration(self._symbolMap,self.args['numa'])
# EVM
if self.args['foldedEVM']:
config.add( RUBU(self._symbolMap,evmConfig,buConfig) )
else:
config.add( RU(self._symbolMap,evmConfig) )
# RUs with 8 FEDs each
for ru in range(self.args['nRUs']):
config.add( RU(self._symbolMap,
ruConfig +
[('fedSourceIds','unsignedInt',range(8*ru,8*ru+8)),]
) )
# BUs
for bu in range(self.args['nBUs']):
config.add( BU(self._symbolMap,buConfig) )
# RUBUs with 8 FEDs each
for rubu in range(self.args['nRUBUs']):
config.add( RUBU(self._symbolMap,
ruConfig +
[('fedSourceIds','unsignedInt',range(8*rubu+1100,8*rubu+1108)),] #avoid softFED
, buConfig
) )
return config