Hi,
I’m trying to put together some instructions for detector teams which are starting testing their electronics.
The “User story” is something like:
I have my CC7 freshly installed FLP with a CRU inside and I connect my electronics to it. I want to write my own test suite to run a bunch of tests and I want to use the ReadoutCard library.
I took the following snippet from Pascal presented here as an example:
// 1. We include the library
#include <ReadoutCard/ChannelFactory.h>
void foo() {
using namespace AliceO2::roc;
std::shared_ptr<BarInterface> bar0;
// 2. To open a BAR, we can use the card's PCI address or
// serial number. Here we open BAR number 0
bar0 = ChannelFactory().getBar(PciAddress("42:0.0"), 0);
bar0 = ChannelFactory().getBar(12345, 0);
bar0 = ChannelFactory().getBar(-1, 0);
// 3. Read register at index 0
bar0->readRegister(0);
// 4. Write 123 to register at index 0
bar0->writeRegister(0, 123);
// 5. No doc strings in C++, refer to Doxygen
}
I’ve installed the alisw-ReadoutCard+v0.8.8-2.x86_64
RPM and loaded the package environment aliswmod enter ReadoutCard/v0.8.8-2
.
But I get the following error:
In file included from /opt/alisw/el7/GCC-Toolchain/v6.2.0-alice1-4/include/c++/6.2.0/x86_64-unknown-linux-gnu/bits/c++config.h:495:0,
from /opt/alisw/el7/GCC-Toolchain/v6.2.0-alice1-4/include/c++/6.2.0/bits/stl_algobase.h:59,
from /opt/alisw/el7/GCC-Toolchain/v6.2.0-alice1-4/include/c++/6.2.0/bits/stl_tree.h:63,
from /opt/alisw/el7/GCC-Toolchain/v6.2.0-alice1-4/include/c++/6.2.0/map:60,
from /opt/alisw/el7/ReadoutCard/v0.8.8-2/include/ReadoutCard/Parameters.h:9,
from /opt/alisw/el7/ReadoutCard/v0.8.8-2/include/ReadoutCard/ChannelFactory.h:10,
from roc-my-test.cxx:1:
/opt/alisw/el7/GCC-Toolchain/v6.2.0-alice1-4/include/c++/6.2.0/x86_64-unknown-linux-gnu/bits/os_defines.h:39:22: fatal error: features.h: No such file or directory
#include <features.h>
^
Is there a way of doing this without going via aliBuild ?
Thanks,
Vasco