DAS  3.0
Das Analysis System
generate_html Namespace Reference

Functions

def get_year_from_era (era)
 
def get_run_from_era (era)
 
def generate_json_summary (inPath, outPath)
 

Variables

 template = \
 
 parser = argparse.ArgumentParser()
 
 required
 
 True
 
 help
 
 args = parser.parse_args()
 
 out_dir_p = pl.Path(args.output)
 
string summary_dir_p = out_dir_p / "summaries"
 
 parents
 
 exist_ok
 
 root_dir_p = pl.Path(args.input)
 
list files = []
 
 pog = pog_dir_p.name
 
 era = era_dir_p.name
 
 year
 
 campaign
 
 run
 
 file_name = json_file_p.name.split(".")[0]
 
string summary_file_p = summary_dir_p / f"{pog}_{era}_{file_name}.html"
 
string index_p = out_dir_p / "index.html"
 
string script_dir_p = pl.Path(__file__).parent / "fancyTable"
 
 dirs_exist_ok
 

Function Documentation

◆ generate_json_summary()

def generate_html.generate_json_summary (   inPath,
  outPath 
)
57 def generate_json_summary(inPath, outPath):
58  with open(os.devnull, "w") as devnull:
59  console = Console(width=100, file=devnull, record=True)
60  cset = model_auto(open_auto(str(inPath)))
61  console.print(cset)
62  console.save_html(str(outPath))
63 
64 

◆ get_run_from_era()

def generate_html.get_run_from_era (   era)
49 def get_run_from_era(era):
50  year, camp = era.split("_")
51  if int(get_year_from_era(year)) <= 18:
52  return year, camp, "Run2"
53  else:
54  return year, camp, "Run3"
55 
56 

◆ get_year_from_era()

def generate_html.get_year_from_era (   era)
Go from '2017'/'2018UL'/'2016ULpreVFP' to '17'/'18'/'16' 
44 def get_year_from_era(era):
45  """ Go from '2017'/'2018UL'/'2016ULpreVFP' to '17'/'18'/'16' """
46  return re.search(r"20([0-9]+).*", era).group(1)
47 
48 

Variable Documentation

◆ args

args = parser.parse_args()

◆ campaign

campaign

◆ dirs_exist_ok

dirs_exist_ok

◆ era

era = era_dir_p.name

◆ exist_ok

exist_ok

◆ file_name

file_name = json_file_p.name.split(".")[0]

◆ files

files = []

◆ help

help

◆ index_p

string index_p = out_dir_p / "index.html"

◆ out_dir_p

out_dir_p = pl.Path(args.output)

◆ parents

parents

◆ parser

parser = argparse.ArgumentParser()

◆ pog

pog = pog_dir_p.name

◆ required

required

◆ root_dir_p

root_dir_p = pl.Path(args.input)

◆ run

run

◆ script_dir_p

string script_dir_p = pl.Path(__file__).parent / "fancyTable"

◆ summary_dir_p

string summary_dir_p = out_dir_p / "summaries"

◆ summary_file_p

string summary_file_p = summary_dir_p / f"{pog}_{era}_{file_name}.html"

◆ template

template = \

◆ True

True

◆ year

year
generate_html.get_year_from_era
def get_year_from_era(era)
Definition: generate_html.py:44
generate_html.get_run_from_era
def get_run_from_era(era)
Definition: generate_html.py:49
generate_html.generate_json_summary
def generate_json_summary(inPath, outPath)
Definition: generate_html.py:57