ATLAS Offline Software
Loading...
Searching...
No Matches
validateBDTTau Namespace Reference

Functions

 get_vector (lines, startswith)

Variables

 test_status = int(os.environ["ATLAS_CTEST_TESTSTATUS"])
str test_output_file = os.environ["ATLAS_CTEST_TESTNAME"]+".log"
 bdt_config_file = os.environ["TAU_EFEX_BDT_CONFIG_PATH"]
 out_log_content = open(test_output_file, "r").read()
list bdt_algo_lines = [l for l in out_log_content.split('\n') if re.findall(r"eFEXDriver\..+eFEXtauBDTAlgo", l)]
 rgx_vartitle = re.compile(r"DEBUG\s+([0-9]+) is (l[0-4]_d[0-9_pld]*), sum of supercells$")
 rgx_coretitle = re.compile(r"DEBUG\s+([0-9]+) is CORE, sum of supercells$")
 rgx_etaphilayer = re.compile(r"DEBUG\s+eta=([0-9]+)\s+phi=([0-9]+)\s+layer=([0-9]+)$")
 variables = OrderedDict()
list last_var_line = [i for i,x in enumerate(bdt_algo_lines) if "Will use sum of supercells" in x][0]
 vartitle = rgx_vartitle.findall(l)
 coretitle = rgx_coretitle.findall(l)
 etaphilayer = rgx_etaphilayer.findall(l)
 vt = vartitle[0][1]
 bdt_config = json.load(open(bdt_config_file, "r"))
 bdt_scores = get_vector(bdt_algo_lines, 'DEBUG BDT Score: ').reshape(-1)

Function Documentation

◆ get_vector()

validateBDTTau.get_vector ( lines,
startswith )
Extract a vector of numbers from a line that starts with a string from a list of Athena log file lines

Definition at line 18 of file validateBDTTau.py.

18def get_vector(lines, startswith):
19 """
20 Extract a vector of numbers from a line that starts with a string from a list of Athena log file lines
21 """
22 vals = [x[x.rfind(':')+1:].split() for x in lines if startswith in x]
23 vals = np.array(vals).astype(int)
24 return vals
25
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177

Variable Documentation

◆ bdt_algo_lines

list validateBDTTau.bdt_algo_lines = [l for l in out_log_content.split('\n') if re.findall(r"eFEXDriver\..+eFEXtauBDTAlgo", l)]

Definition at line 29 of file validateBDTTau.py.

◆ bdt_config

validateBDTTau.bdt_config = json.load(open(bdt_config_file, "r"))

Definition at line 50 of file validateBDTTau.py.

◆ bdt_config_file

validateBDTTau.bdt_config_file = os.environ["TAU_EFEX_BDT_CONFIG_PATH"]

Definition at line 16 of file validateBDTTau.py.

◆ bdt_scores

validateBDTTau.bdt_scores = get_vector(bdt_algo_lines, 'DEBUG BDT Score: ').reshape(-1)

Definition at line 58 of file validateBDTTau.py.

◆ coretitle

validateBDTTau.coretitle = rgx_coretitle.findall(l)

Definition at line 39 of file validateBDTTau.py.

◆ etaphilayer

validateBDTTau.etaphilayer = rgx_etaphilayer.findall(l)

Definition at line 40 of file validateBDTTau.py.

◆ last_var_line

list validateBDTTau.last_var_line = [i for i,x in enumerate(bdt_algo_lines) if "Will use sum of supercells" in x][0]

Definition at line 36 of file validateBDTTau.py.

◆ out_log_content

validateBDTTau.out_log_content = open(test_output_file, "r").read()

Definition at line 26 of file validateBDTTau.py.

◆ rgx_coretitle

validateBDTTau.rgx_coretitle = re.compile(r"DEBUG\s+([0-9]+) is CORE, sum of supercells$")

Definition at line 33 of file validateBDTTau.py.

◆ rgx_etaphilayer

validateBDTTau.rgx_etaphilayer = re.compile(r"DEBUG\s+eta=([0-9]+)\s+phi=([0-9]+)\s+layer=([0-9]+)$")

Definition at line 34 of file validateBDTTau.py.

◆ rgx_vartitle

validateBDTTau.rgx_vartitle = re.compile(r"DEBUG\s+([0-9]+) is (l[0-4]_d[0-9_pld]*), sum of supercells$")

Definition at line 32 of file validateBDTTau.py.

◆ test_output_file

str validateBDTTau.test_output_file = os.environ["ATLAS_CTEST_TESTNAME"]+".log"

Definition at line 15 of file validateBDTTau.py.

◆ test_status

validateBDTTau.test_status = int(os.environ["ATLAS_CTEST_TESTSTATUS"])

Definition at line 10 of file validateBDTTau.py.

◆ variables

validateBDTTau.variables = OrderedDict()

Definition at line 35 of file validateBDTTau.py.

◆ vartitle

validateBDTTau.vartitle = rgx_vartitle.findall(l)

Definition at line 38 of file validateBDTTau.py.

◆ vt

str validateBDTTau.vt = vartitle[0][1]

Definition at line 43 of file validateBDTTau.py.