BmnRoot
Loading...
Searching...
No Matches
sim_crawler.py File Reference

Go to the source code of this file.

Namespaces

namespace  sim_crawler
 

Functions

 sim_crawler.getConfigFilePath ()
 
 sim_crawler.printProgress (iteration, total, prefix='Progress:', suffix='Complete', percent_view=1)
 
 sim_crawler.parse_name_and_write (filepath, file_type, file_name, separator, generator_type_dir, conn)
 
 sim_crawler.recurse_path (dir_path, generator_type_dir, file_type, conn, existing_files, exist_validity)
 

Variables

str sim_crawler.simulation_directory = "/eos/nica/bmn/sim/gen"
 
str sim_crawler.dst_directory = "/eos/nica/bmn/sim/dst"
 
dict sim_crawler.name_to_generator
 
 sim_crawler.generator_list = list(name_to_generator.values())
 
dict sim_crawler.beam_to_particle
 
dict sim_crawler.target_to_particle
 
dict sim_crawler.exclude_extensions
 
 sim_crawler.log_level = logging.INFO
 
 sim_crawler.format
 
 sim_crawler.datefmt
 
 sim_crawler.filename
 
 sim_crawler.filemode
 
 sim_crawler.level
 
 sim_crawler.config = json.load(open("sim_crawler.json"))
 
 sim_crawler.conn = psycopg2.connect(("dbname=%s user=%s host=%s password=%s") % (config["db_name"], config["db_user"], config["db_host"], config["db_pass"]))
 
 sim_crawler.cursor = conn.cursor()
 
 sim_crawler.existing_files_full = cursor.fetchall()
 
list sim_crawler.existing_files = [x[0] for x in existing_files_full]
 
list sim_crawler.exist_validity = [0] * len(existing_files)
 
 sim_crawler.val = len(exist_validity)