Ejemplo n.º 1
0
            mode = "dirwatch"
        elif i.lower().find("-all") in [0, 1]:
            mode = "all"
            newerOnly = False
        elif i.lower().find("-debug") in [0, 1]:
            debug = True
        elif i.lower().find("-ncpu") in [0, 1]:
            iNbCPU = int(i.split("=", 1)[1])
        elif i.lower().find("-h") in [0, 1]:
            print "This is the DiffractionCTv1 application of EDNA %s, \nplease give a path to process offline or the option:\n\
            --online to process online incoming data in the given directory.\n\
            --all to process all existing files (unless they will be excluded)\n\
            --debug to turn on debugging mode in EDNA\n\
            --nCPU=xxx to specify the number of CPUs to use. Usually EDNA autodetects the number of processors." % EDNAPluginName
            sys.exit()
        elif os.path.exists(i):
            paths.append(os.path.abspath(i))

    dct = DiffractionCT()
    dct.setup(_listInput=paths, _mode=mode)

    edna = EDParallelExecute(EDNAPluginName,
                             dct.makeXML,
                             _functXMLerr=dct.error,
                             _bVerbose=True,
                             _bDebug=debug,
                             _iNbThreads=iNbCPU)
    edna.runEDNA(dct.listInput, dct.strMode, dct.bNewerOnly)

    EDPluginSPDCakev1_5.killAllWorkers()
 def postProcess(self):
     EDPluginSPDCakev1_5.killAllWorkers()
Ejemplo n.º 3
0
    iNbCPU = None
    for i in sys.argv[1:]:
        if i.lower().find("-online") in [0, 1]:
            mode = "dirwatch"
        elif i.lower().find("-all") in [0, 1]:
            mode = "all"
            newerOnly = False
        elif i.lower().find("-debug") in [0, 1]:
            debug = True
        elif i.lower().find("-ncpu") in [0, 1]:
            iNbCPU = int(i.split("=", 1)[1])
        elif i.lower().find("-h") in [0, 1]:
            print "This is the DiffractionCTv1 application of EDNA %s, \nplease give a path to process offline or the option:\n\
            --online to process online incoming data in the given directory.\n\
            --all to process all existing files (unless they will be excluded)\n\
            --debug to turn on debugging mode in EDNA\n\
            --nCPU=xxx to specify the number of CPUs to use. Usually EDNA autodetects the number of processors." % EDNAPluginName
            sys.exit()
        elif os.path.exists(i):
            paths.append(os.path.abspath(i))


    dct = DiffractionCT()
    dct.setup(_listInput=paths, _mode=mode)

    edna = EDParallelExecute(EDNAPluginName, dct.makeXML, _functXMLerr=dct.error, _bVerbose=True, _bDebug=debug, _iNbThreads=iNbCPU)
    edna.runEDNA(dct.listInput, dct.strMode , dct.bNewerOnly)

    EDPluginSPDCakev1_5.killAllWorkers()

 def postProcess(self):
     EDPluginSPDCakev1_5.killAllWorkers()