Beispiel #1
0
 def doPreRunActions(self):
     """ Cleans the run directory from old BS file """
     outputbsfilearg = self.getArgument("outputBSFile").value()
     os.path.walk(os.curdir, BSutils.match_deleteOld_BS_datafile,
                  '(data_test|' + outputbsfilearg + ').*\.data')
     # default prerun actions
     JobTransform.doPreRunActions(self)
Beispiel #2
0
    def __init__(self,
                 inputDic,
                 ProdSysKeys,
                 name,
                 authors,
                 help,
                 lastInChain=True):
        JobTransform.__init__(self,
                              name=name,
                              authors=authors,
                              help=help,
                              lastInChain=lastInChain)

        if not isinstance(inputDic, dict):
            raise TypeError("inputDic has %s but should be a dictionary." %
                            type(inputDic))

        #Help?
        if '-h' in inputDic or '--help' in inputDic:
            print "\nThousands of parameter combinations can be generated dynamically by this transform."
            print "See: https://twiki.cern.ch/twiki/bin/view/Atlas/RecoTrf"
            print "\nThis design has one exception: ProdSys (Tier1), which can only use keys:"
            print ProdSysKeys
            print "\nTo bypass an argument in positional mode, give value: 'NONE'."
            print "Please use CmdToPositional.py to translate a key=val command into a positional one.\n\n"

        #Default configuration?
        if inputDic.has_key('defaultFromPositionalValues'):
            inputDic = DefaultConfigFromSysArgv(ProdSysKeys, inputDic)

        self.inDic = inputDic
        self.ValidSubStepsDic = {}
        self.ValidSubStepsRunFcts = {}
        return
Beispiel #3
0
 def doPostRunActions(self):
     """ Renames the BS ouput file to the name requested in the transform """
     outputbsfilearg = self.getArgument("outputBSFile").value()
     print "RAWtoRAWHLT_trf.py: Try to rename outputBSFile"
     os.path.walk(
         os.curdir, BSutils.match_rename_BS_datafile,
         ['(data_test|' + outputbsfilearg + ').*\.data', outputbsfilearg])
     # finish with default post-run actions
     JobTransform.doPostRunActions(self)
    def __init__(self,inDic,authors,skeleton,help,name="default",lastInChain=True):
        JobTransform.__init__(self, name=name, authors=authors, skeleton=skeleton, help=help,lastInChain=lastInChain)

        if not isinstance(inDic,dict):
            raise TypeError("inDic has type '%s' but should be a dictionary." %type(inDic))

        from PATJobTransforms.ConfigDicUtils import AutoConfigureFromDic
        self.inDic=inDic
        AutoConfigureFromDic(self,inDic)
Beispiel #5
0
    def __init__(self,inDic):
        JobTransform.__init__(self,                              
                              authors = [ Author('David Cote', '*****@*****.**')],
                              skeleton='PATJobTransforms/skeleton.MergeBS.py',
                              help = __doc__ )

        if not isinstance(inDic,dict):
            raise TypeError("inDic has %s but should be a dictionary." %type(inDic))

        #Default configuration?
        if inDic.has_key('defaultFromPositionalValues'):
            inDic=DefaultConfigFromSysArgv(ListOfDefaultPositionalKeys,inDic)

        from PATJobTransforms.ConfigDicUtils import AutoConfigureFromDic
        self.inDic=inDic
        AutoConfigureFromDic(self,inDic)
        return
Beispiel #6
0
    def __init__(self, inDic, lastInChain=True):
        JobTransform.__init__(
            self,
            authors=[Author('Simon George', '*****@*****.**')],
            skeleton='PATJobTransforms/skeleton.runHLT.py',
            help=__doc__,
            lastInChain=lastInChain)

        if not isinstance(inDic, dict):
            raise TypeError("inDic has %s but should be a dictionary." %
                            type(inDic))

        from PATJobTransforms.ConfigDicUtils import AutoConfigureFromDic
        self.inDic = inDic
        AutoConfigureFromDic(self, inDic)

        #add other options and features
        self.add(SQLiteSupport())
Beispiel #7
0
    def __init__(self, inDic):
        JobTransform.__init__(
            self,
            authors=[Author('Michiru Kaneda', '*****@*****.**')],
            skeleton='NTUPtoNTUPCore/skeleton.NTUPtoNTUP_trf.py',
            help=__doc__)

        if not isinstance(inDic, dict):
            raise TypeError("inDic has type '%s' but should be a dictionary." %
                            type(inDic))
        # Add tree_name to ConfigDic
        from PyJobTransformsCore.full_trfarg import BasicStringArg
        from PATJobTransforms.Configuration import AddToConfigDic

        def AddTreeName(trf, inDic):
            trf.add(BasicStringArg(name='tree_name'))

        AddToConfigDic('tree_name', AddTreeName)

        # Set tree_name if it is in arguments
        self.tree_name = ''
        if inDic.has_key('tree_name'):
            self.tree_name = inDic['tree_name']
        else:
            self.tree_name = ''
            inDic['tree_name'] = ''

        # Add NTUPtoNTUP types to input files of ConfigDic
        self.AddNTUPToInputFilesOfConfigDic()

        # Check tree name from input file
        if self.tree_name == '': self.CheckTreeName(inDic)

        # Add NTUPtoNTUP types to output files of ConfigDic
        self.AddNTUPToOutputFilesOfConfigDic()

        # set tree_name in arguments
        inDic['tree_name'] = self.tree_name

        # Auto Configure From Dictionary
        from PATJobTransforms.ConfigDicUtils import AutoConfigureFromDic
        self.inDic = inDic
        AutoConfigureFromDic(self, inDic)
    def __init__(self,
                 inDic,
                 authors,
                 skeleton,
                 help,
                 name="default",
                 lastInChain=True):
        JobTransform.__init__(self,
                              name=name,
                              authors=authors,
                              skeleton=skeleton,
                              help=help,
                              lastInChain=lastInChain)

        if not isinstance(inDic, dict):
            raise TypeError("inDic has type '%s' but should be a dictionary." %
                            type(inDic))

        from PATJobTransforms.ConfigDicUtils import AutoConfigureFromDic
        self.inDic = inDic
        AutoConfigureFromDic(self, inDic)
    def __init__(self,inputDic,ProdSysKeys,name,authors,help,lastInChain=True):
        JobTransform.__init__(self, name=name, authors=authors, help=help, lastInChain=lastInChain)

        if not isinstance(inputDic,dict):
            raise TypeError("inputDic has %s but should be a dictionary." %type(inputDic))

        #Help?
        if '-h' in inputDic or '--help' in inputDic:
            print "\nThousands of parameter combinations can be generated dynamically by this transform."
            print "See: https://twiki.cern.ch/twiki/bin/view/Atlas/RecoTrf"
            print "\nThis design has one exception: ProdSys (Tier1), which can only use keys:"
            print ProdSysKeys
            print "\nTo bypass an argument in positional mode, give value: 'NONE'."
            print "Please use CmdToPositional.py to translate a key=val command into a positional one.\n\n"

        #Default configuration?
        if inputDic.has_key('defaultFromPositionalValues'):
            inputDic=DefaultConfigFromSysArgv(ProdSysKeys,inputDic)

        self.inDic=inputDic
        self.ValidSubStepsDic={}
        self.ValidSubStepsRunFcts={}
        return