def listFiles(self, dataset="", block_name="", logical_file_name="",
                  release_version="", pset_hash="", app_name="",
                  output_module_label="",  run_num=-1,
                  origin_site_name="", lumi_list=[], detail=False, validFileOnly=0, sumOverLumi=0, input_body=-1):
        """
        One of below parameter groups must be present:
        non-patterned dataset, non-patterned block, non-patterned dataset with lfn,  non-patterned block with lfn,
        non-patterned lfn
	non-patterned lfn list
        """
        if input_body != -1 :
	    try:
                logical_file_name = input_body.get("logical_file_name", "")
                run_num = input_body.get("run_num", -1)
                validFileOnly = input_body.get("validFileOnly", 0)
                sumOverLumi = input_body.get("sumOverLumi", 0)  
		detail = input_body.get("detail", False)
                block_name = input_body.get("block_name", "")
		dataset = input_body.get("dataset", "") 
		release_version = input_body.get("release_version", "")
		pset_hash = input_body.get("pset_hash", "")
	        app_name = input_body.get("app_name", "")
		output_module_label = input_body.get("output_module_label", "")
		origin_site_name = input_body.get("origin_site_name", "")
		lumi_list = input_body.get("lumi_list", [])	
            except cjson.DecodeError as de:
                msg = "business/listFilss POST call requires at least dataset, block_name, or a list of logical_file_name %s" % de
                dbsExceptionHandler('dbsException-invalid-input', "Invalid input", self.logger.exception, msg)

        if ('%' in block_name):
            dbsExceptionHandler('dbsException-invalid-input', "You must specify exact block name not a pattern", self.logger.exception)
        elif ('%' in dataset):
	    print("***** in dataset name")
            dbsExceptionHandler('dbsException-invalid-input', " You must specify exact dataset name not a pattern", self.logger.exception)
        elif (not dataset  and not block_name and (not logical_file_name or '%'in logical_file_name) ):
            dbsExceptionHandler('dbsException-invalid-input', """You must specify one of the parameter groups:  \
                    non-pattern dataset, \
                    non-pattern block , non-pattern dataset with lfn ,\
                    non-pattern block with lfn or no-pattern lfn, \
		    non-patterned lfn list .""", self.logger.exception)
        elif (lumi_list and len(lumi_list) != 0):
            if run_num==-1:
                dbsExceptionHandler('dbsException-invalid-input', "Lumi list must accompany A single run number, \
                        use run_num=123", self.logger.exception)
            elif isinstance(run_num, basestring):
                try:
                    run_num = int(run_num)
                except:
                    dbsExceptionHandler('dbsException-invalid-input', "Lumi list must accompany A single run number,\
                        use run_num=123", self.logger.exception)
            elif isinstance(run_num, list):
                if len(run_num) == 1:
                    try:
                        run_num = int(run_num[0])
                    except:
                        dbsExceptionHandler('dbsException-invalid-input', "Lumi list must accompany A single run number,\
                            use run_num=123", self.logger.exception)
                else:
                    dbsExceptionHandler('dbsException-invalid-input', "Lumi list must accompany A single run number,\
                        use run_num=123", self.logger.exception)
	else:
            pass
        with self.dbi.connection() as conn:
            dao = (self.filebrieflist, self.filelist)[detail]
            for item in dao.execute(conn, dataset, block_name, logical_file_name, release_version, pset_hash, app_name,
                            output_module_label, run_num, origin_site_name, lumi_list, validFileOnly, sumOverLumi):

                yield item      # we need to yield while connection is open
One of below parameter groups must be present:
        non-patterned dataset, non-patterned block, non-patterned dataset with lfn,  non-patterned block with lfn,
        non-patterned lfn
	non-patterned lfn list