> Dear MIDAS experts,
>
> when I attempted to increase the max number of hotlinks in ODB , defined as
>
> #define MAX_OPEN_RECORDS 256 /**< number of open DB records */
>
> I started running into an assertion in midas/src/odb.cxx
>
> https://bitbucket.org/tmidas/midas/src/fa5457b5274a6b42c5ed8b6dea5e3cdd43de38fe/src/odb.cxx#lines-1525 :
>
> assert(sizeof(DATABASE_CLIENT) == 2112);
>
> is it possible that the size of the DATABASE_CLIENT structure should be checked against 64+sizeof(OPEN_RECORD)*MAX_OPEN_RECORDS ?
> - 64 clearly can be expressed in a better maintainable form
Yes, this assert needs to be updated if you increase MAX_OPEN_RECORDS. See
https://daq00.triumf.ca/MidasWiki/index.php/FAQ#Increasing_Number_of_Hot-links
> UPDATE: similar consideration holds for the size of the DATABLE_HEADER structure, which is also checked against a constant
>
> https://bitbucket.org/tmidas/midas/src/fa5457b5274a6b42c5ed8b6dea5e3cdd43de38fe/src/odb.cxx#lines-1526
Yes DATABASE_HEADER can also be updated, but the associated assert()s need to be updated too.
FYI I have done both of these things and have attached patches.
Cheers,
Nick. |