Skip to content

Commit 64c7994

Browse files
committed
Get rid of macOS warnings
1 parent 519bc7e commit 64c7994

File tree

3 files changed

+26
-12
lines changed

3 files changed

+26
-12
lines changed

src/Dummy/DummyDmaChannel.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,25 @@ DummyDmaChannel::DummyDmaChannel(const Parameters& params)
5353

5454
DummyDmaChannel::~DummyDmaChannel()
5555
{
56-
getLogger() << "DummyDmaChannel::~DummyDmaChannel()" << InfoLogger::InfoLogger::endm;
56+
getLogger() << "DummyDmaChannel::~DummyDmaChannel()" << endm;
5757
}
5858

5959
void DummyDmaChannel::startDma()
6060
{
61-
getLogger() << "DummyDmaChannel::startDma()" << InfoLogger::InfoLogger::endm;
61+
getLogger() << "DummyDmaChannel::startDma()" << endm;
6262
mTransferQueue.clear();
6363
mReadyQueue.clear();
6464
}
6565

6666
void DummyDmaChannel::stopDma()
6767
{
68-
getLogger() << "DummyDmaChannel::stopDma()" << InfoLogger::InfoLogger::endm;
68+
getLogger() << "DummyDmaChannel::stopDma()" << endm;
6969
}
7070

7171
void DummyDmaChannel::resetChannel(ResetLevel::type resetLevel)
7272
{
7373
getLogger() << "DummyDmaChannel::resetCard(" << ResetLevel::toString(resetLevel) << ")"
74-
<< InfoLogger::InfoLogger::endm;
74+
<< endm;
7575
}
7676

7777
CardType::type DummyDmaChannel::getCardType()

src/Factory/ChannelFactoryUtils.h

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright CERN and copyright holders of ALICE O2. This software is
1+
// Copyright CERN and copyright holders of ALICE O3. This software is
22
// distributed under the terms of the GNU General Public License v3 (GPL
33
// Version 3), copied verbatim in the file "COPYING".
44
//
@@ -118,7 +118,6 @@ inline CardDescriptor findCard(const Parameters::CardIdType& id)
118118
BOOST_THROW_EXCEPTION(Exception() << ErrorInfo::Message("Invalid Card ID"));
119119
}
120120
}
121-
#endif
122121

123122
/// Helper template method for the channel factories.
124123
/// \param serialNumber Serial number of the card
@@ -143,11 +142,6 @@ std::unique_ptr<Interface> channelFactoryHelper(const Parameters& params, int du
143142
}
144143
};
145144

146-
#ifndef ALICEO2_READOUTCARD_PDA_ENABLED
147-
// If PDA is NOT enabled we only make dummies
148-
return makeDummy();
149-
#else
150-
151145
auto id = params.getCardIdRequired();
152146

153147
// First check if we got a dummy serial number
@@ -168,7 +162,27 @@ std::unique_ptr<Interface> channelFactoryHelper(const Parameters& params, int du
168162
BOOST_THROW_EXCEPTION(Exception() << ErrorInfo::Message("Instantiation function for card type not available")
169163
<< ErrorInfo::CardType(cardDescriptor.cardType) << ErrorInfo::CardId(id));
170164
}
165+
#else
166+
167+
template <typename Interface>
168+
std::unique_ptr<Interface> channelFactoryHelper(const Parameters& /*params*/, int /*dummySerial*/,
169+
const std::map<CardType::type, std::function<std::unique_ptr<Interface>()>>& map)
170+
{
171+
auto makeDummy = [&]() {
172+
auto iter = map.find(CardType::Dummy);
173+
if (iter != map.end()) {
174+
return iter->second();
175+
} else {
176+
BOOST_THROW_EXCEPTION(Exception()
177+
<< ErrorInfo::Message("Instantiation function for Dummy card type not available"));
178+
}
179+
};
180+
181+
// If PDA is NOT enabled we only make dummies
182+
return makeDummy();
183+
171184
#endif
185+
172186
}
173187

174188
} // namespace ChannelFactoryUtils

test/TestParameters.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ using namespace AliceO2::roc;
1616

1717
constexpr auto SERIAL_NUMBER = 1;
1818
constexpr auto CHANNEL_NUMBER = 2;
19-
constexpr auto DMA_BUFFER_SIZE = 3ul;
19+
//constexpr auto DMA_BUFFER_SIZE = 3ul;
2020
constexpr auto DMA_PAGE_SIZE = 4ul;
2121
constexpr auto GENERATOR_DATA_SIZE = 5ul;
2222
constexpr auto GENERATOR_ENABLED = true;

0 commit comments

Comments
 (0)