Skip to content
This repository has been archived by the owner on Jan 31, 2022. It is now read-only.

Commit

Permalink
Merge pull request #58 from mexanick/develop
Browse files Browse the repository at this point in the history
Update trigger OH main monitoring regs
  • Loading branch information
mexanick authored Apr 23, 2018
2 parents 77e16f3 + 411ebd0 commit cac5edf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
14 changes: 10 additions & 4 deletions python/daq_suite/daq_suite/helper_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ def getTRIGGEROHmain():
displaystring=[]
namelist=[]
values = []
res = (c_uint32 * (2*NOH))()
res = (c_uint32 * (8*NOH))()
res_code = getRPCTRIGGEROHmain(res, NOH)
if res_code == 0:
values = [c for c in res]
else:
for i in range(2*NOH):
for i in range(8*NOH):
values.append(0)

nextstr = ''
Expand All @@ -96,8 +96,14 @@ def getTRIGGEROHmain():
namelist.append('Register|OH')
displaystring.append(nextstr)
nextstr = ''
namelist+=['LINK0_NOT_VALID_CNT',
'LINK1_NOT_VALID_CNT',]
namelist+=['LINK0_MISSED_COMMA_CNT',
'LINK1_MISSED_COMMA_CNT',
'LINK0_OVERFLOW_CNT',
'LINK1_OVERFLOW_CNT',
'LINK0_UNDERFLOW_CNT',
'LINK1_UNDERFLOW_CNT',
'LINK0_SBIT_OVERFLOW_CNT',
'LINK1_SBIT_OVERFLOW_CNT',]
for i,regname in enumerate(namelist[1:]):
for j in range(NOH):
#reg=getNode('GEM_AMC.TRIGGER.OH%s.%s' %(i,regname))
Expand Down
16 changes: 14 additions & 2 deletions src/common/rpc_manager/daq_monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,22 @@ DLLEXPORT uint32_t getmonTRIGGEROHmain(uint32_t* result, uint32_t noh)
}else {
std::string t;
for (int i = 0; i < noh; i++) {
t = "OH"+std::to_string(i)+".LINK0_NOT_VALID_CNT";
t = "OH"+std::to_string(i)+".LINK0_MISSED_COMMA_CNT";
result[i] = rsp.get_word(t);
t = "OH"+std::to_string(i)+".LINK1_NOT_VALID_CNT";
t = "OH"+std::to_string(i)+".LINK1_MISSED_COMMA_CNT";
result[i+noh] = rsp.get_word(t);
t = "OH"+std::to_string(i)+".LINK0_OVERFLOW_CNT";
result[i+2*noh] = rsp.get_word(t);
t = "OH"+std::to_string(i)+".LINK1_OVERFLOW_CNT";
result[i+3*noh] = rsp.get_word(t);
t = "OH"+std::to_string(i)+".LINK0_UNDERFLOW_CNT";
result[i+4*noh] = rsp.get_word(t);
t = "OH"+std::to_string(i)+".LINK1_UNDERFLOW_CNT";
result[i+5*noh] = rsp.get_word(t);
t = "OH"+std::to_string(i)+".LINK0_SBIT_OVERFLOW_CNT";
result[i+6*noh] = rsp.get_word(t);
t = "OH"+std::to_string(i)+".LINK1_SBIT_OVERFLOW_CNT";
result[i+7*noh] = rsp.get_word(t);
}
}
}
Expand Down

0 comments on commit cac5edf

Please sign in to comment.