Skip to content
Snippets Groups Projects
Commit 64eb6185 authored by Martin Killenberg's avatar Martin Killenberg
Browse files

TriggerFanOut: don't drop out of testable mode when waiting for device initialisation

parent 3018fc82
No related branches found
No related tags found
No related merge requests found
......@@ -161,7 +161,7 @@ namespace ChimeraTK {
pthread_setname_np(pthread_self(), name.substr(0, std::min<std::string::size_type>(name.length(), 15)).c_str());
}
void debugMakeConnections(){ enableDebugMakeConnections = true; };
void debugMakeConnections() { enableDebugMakeConnections = true; };
ModuleType getModuleType() const override { return ModuleType::ModuleGroup; }
......@@ -429,8 +429,10 @@ namespace ChimeraTK {
// testableMode_counter and the
// idMap
friend class TestFacility; // needs access to testableMode_variables
friend class DeviceModule; // needs access to testableMode_variables
friend class TestFacility; // needs access to testableMode_variables
friend class DeviceModule; // needs access to testableMode_variables
friend class DeviceModule; // needs access to testableMode_variables
friend class TriggerFanOut; // needs access to testableMode_variables
template<typename UserType>
friend class DebugPrintAccessorDecorator; // needs access to the idMap
......
......@@ -93,9 +93,12 @@ namespace ChimeraTK {
// Wait until the device has been initialised for the first time. This means it
// has been opened, and the check in TransferGroup::read() will not throw a logic_error
// We don't have to store the lock. Just need it as a synchronisation point.
// But we have to increase the testable mode counter because we don't want to fall out of testable mode at this point already.
++Application::getInstance().testableMode_deviceInitialisationCounter;
Application::testableModeUnlock("WaitInitialValueLock");
(void)_deviceModule.getInitialValueSharedLock();
Application::testableModeLock("Enter while loop");
--Application::getInstance().testableMode_deviceInitialisationCounter;
while(true) {
transferGroup.read();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment