예제 #1
0
# | Unless required by applicable law or agreed to in writing, software
# | distributed under the License is distributed on an "AS IS" BASIS,
# | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# | See the License for the specific language governing permissions and
# | limitations under the License.

import os, logging
from grid_control import utils
from grid_control.backends import WMS
from grid_control.config import ConfigError, noDefault
from grid_control.datasets import PartitionProcessor
from grid_control.tasks.task_data import DataTask
from grid_control.tasks.task_utils import TaskExecutableWrapper
from python_compat import imap, lfilter

BasicPartitionProcessor = PartitionProcessor.getClass('BasicPartitionProcessor')

class CMSPartitionProcessor(BasicPartitionProcessor):
	def __init__(self, config):
		BasicPartitionProcessor.__init__(self, config)
		lfnModifier = config.get('partition lfn modifier', '', onChange = None)
		lfnModifierShortcuts = config.getDict('partition lfn modifier dict', {
			'<xrootd>': 'root://cms-xrd-global.cern.ch//store/',
			'<xrootd:eu>': 'root://xrootd-cms.infn.it//store/',
			'<xrootd:us>': 'root://cmsxrootd.fnal.gov//store/',
		}, onChange = None)[0]
		self._prefix = None
		if lfnModifier == '/':
			self._prefix = '/store/'
		elif lfnModifier.lower() in lfnModifierShortcuts:
			self._prefix = lfnModifierShortcuts[lfnModifier.lower()]
예제 #2
0
class CMSSWPartitionProcessor(PartitionProcessor.getClass('BasicPartitionProcessor')):
	alias = ['cmsswpart']

	def _formatFileList(self, fl):
		return str.join(', ', imap(lambda x: '"%s"' % x, fl))
예제 #3
0
# | Unless required by applicable law or agreed to in writing, software
# | distributed under the License is distributed on an "AS IS" BASIS,
# | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# | See the License for the specific language governing permissions and
# | limitations under the License.

import os, logging
from grid_control import utils
from grid_control.backends import WMS
from grid_control.config import ConfigError, noDefault
from grid_control.datasets import PartitionProcessor
from grid_control.tasks.task_data import DataTask
from grid_control.tasks.task_utils import TaskExecutableWrapper
from python_compat import imap, lfilter

BasicPartitionProcessor = PartitionProcessor.getClass(
    'BasicPartitionProcessor')


class CMSPartitionProcessor(BasicPartitionProcessor):
    def __init__(self, config):
        BasicPartitionProcessor.__init__(self, config)
        lfnModifier = config.get('partition lfn modifier', '', onChange=None)
        lfnModifierShortcuts = config.getDict(
            'partition lfn modifier dict', {
                '<xrootd>': 'root://cms-xrd-global.cern.ch//store/',
                '<xrootd:eu>': 'root://xrootd-cms.infn.it//store/',
                '<xrootd:us>': 'root://cmsxrootd.fnal.gov//store/',
            },
            onChange=None)[0]
        self._prefix = None
        if lfnModifier == '/':