Skip to content

Commit

Permalink
Merge pull request #28 from UMN-CMS/BryanTemp
Browse files Browse the repository at this point in the history
Fixing association of trig elinks to RX for east vs west wagons
  • Loading branch information
cros0400 authored Oct 24, 2024
2 parents f97a7bd + a0dd88e commit 5a7b287
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 1 deletion.
9 changes: 8 additions & 1 deletion run_bert.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,14 @@ def get_links(self, board_sn="3205WEDBG100001", cfg_path = Path(__file__).parent

link_names = {}

with open(Path(__file__).parent / 'static' /'txrx.json') as link_file:
orientation = ""

if self.subtype[:2] == "WE":
orientation = "_east"
elif self.subtype[:2] == "WW":
orrientation = "_west"

with open(Path(__file__).parent / 'static' /'txrx{}.json'.format(orientation)) as link_file:

txrx = json.load(link_file)

Expand Down
27 changes: 27 additions & 0 deletions static/txrx_east.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"__description__": "This file is used to determine which TXs and RXs correspond to a given wagon elink. This is dependent on firmware version and may need to be updated if the firmware is updated.",
"TX": [
{"num": 0, "link": "CLK1"},
{"num": 1, "link": "CLK2"},
{"num": 2, "link": "CLK3"},
{"num": 4, "link": "DAQ0"},
{"num": 5, "link": "DAQ1"},
{"num": 6, "link": "DAQ2"},
{"num": 7, "link": "X_DAQ"}
],
"RX": [
{"num": 0, "link": "TRIG6"},
{"num": 1, "link": "TRIG5"},
{"num": 2, "link": "TRIG4"},
{"num": 3, "link": "TRIG3"},
{"num": 4, "link": "TRIG2"},
{"num": 5, "link": "TRIG1"},
{"num": 6, "link": "TRIG0"},
{"num": 7, "link": "CTL1"},
{"num": 8, "link": "CTL2"},
{"num": 9, "link": "CTL3"},
{"num": 10, "link": ""},
{"num": 11, "link": ""},
{"num": 12, "link": ""}
]
}
27 changes: 27 additions & 0 deletions static/txrx_west.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"__description__": "This file is used to determine which TXs and RXs correspond to a given wagon elink. This is dependent on firmware version and may need to be updated if the firmware is updated.",
"TX": [
{"num": 0, "link": "CLK1"},
{"num": 1, "link": "CLK2"},
{"num": 2, "link": "CLK3"},
{"num": 4, "link": "DAQ0"},
{"num": 5, "link": "DAQ1"},
{"num": 6, "link": "DAQ2"},
{"num": 7, "link": "X_DAQ"}
],
"RX": [
{"num": 0, "link": "TRIG0"},
{"num": 1, "link": "TRIG1"},
{"num": 2, "link": "TRIG2"},
{"num": 3, "link": "TRIG3"},
{"num": 4, "link": "TRIG4"},
{"num": 5, "link": "TRIG5"},
{"num": 6, "link": "TRIG6"},
{"num": 7, "link": "CTL1"},
{"num": 8, "link": "CTL2"},
{"num": 9, "link": "CTL3"},
{"num": 10, "link": ""},
{"num": 11, "link": ""},
{"num": 12, "link": ""}
]
}

0 comments on commit 5a7b287

Please sign in to comment.