15 useCrest: bool = False, crestServer: str = ""):
16 """
17 accessor needs to be initialized with either a filename or the dbalias and smkey
18 """
19 super().__init__(ConfigType.HLTMENU, mainkey = "chains",
20 filename = filename, jsonString = jsonString, dbalias = dbalias, dbkey = smkey,
21 useCrest=useCrest, crestServer=crestServer)
22 self.loader.setQuery({
23 2: "SELECT HMT.HTM_DATA FROM {schema}.SUPER_MASTER_TABLE SMT, {schema}.HLT_MENU HMT WHERE HMT.HTM_ID=SMT.SMT_HLT_MENU_ID AND SMT.SMT_ID=:dbkey",
24 1: "SELECT HMT.HMT_MENU FROM {schema}.SUPER_MASTER_TABLE SMT, {schema}.HLT_MASTER_TABLE HMT WHERE HMT.HMT_ID=SMT.SMT_HLT_MASTER_TABLE_ID AND SMT.SMT_ID=:dbkey"
25 })
26 self.load()
27 if smkey is not None:
28 log.info(f"Loaded HLT menu {self.name()} with {len(self)} chains from {dbalias} with smk {smkey}{' using CREST' if useCrest else ''}")
29 elif filename is not None:
30 log.info(f"Loaded HLT menu {self.name()} with {len(self)} chains from file {filename}")
31