Skip to content

Commit f922340

Browse files
committed
[CardFinder] Publish CardFinder API
1 parent 03ea630 commit f922340

File tree

9 files changed

+72
-9
lines changed

9 files changed

+72
-9
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ if(PDA_FOUND)
122122
src/DmaChannelPdaBase.cxx
123123
src/BarInterfaceBase.cxx
124124
src/CardConfigurator.cxx
125+
src/CardFinder.cxx
125126
src/Crorc/Crorc.cxx
126127
src/Crorc/CrorcDmaChannel.cxx
127128
src/Crorc/CrorcBar.cxx

include/ReadoutCard/CardConfigurator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
///
1414
/// \author Kostas Alexopoulos ([email protected])
1515

16-
#ifndef ALICEO2_SRC_READOUTCARD_CARDCONFIGURATOR_H_
17-
#define ALICEO2_SRC_READOUTCARD_CARDCONFIGURATOR_H_
16+
#ifndef ALICEO2_INCLUDE_READOUTCARD_CARDCONFIGURATOR_H_
17+
#define ALICEO2_INCLUDE_READOUTCARD_CARDCONFIGURATOR_H_
1818

1919
#include "ReadoutCard/Parameters.h"
2020

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
///
1414
/// \author Pascal Boeschoten ([email protected])
1515

16-
#ifndef ALICEO2_SRC_READOUTCARD_CARDDESCRIPTOR_H_
17-
#define ALICEO2_SRC_READOUTCARD_CARDDESCRIPTOR_H_
16+
#ifndef ALICEO2_INCLUDE_READOUTCARD_CARDDESCRIPTOR_H_
17+
#define ALICEO2_INCLUDE_READOUTCARD_CARDDESCRIPTOR_H_
1818

1919
#include <boost/optional.hpp>
2020
#include "ReadoutCard/CardType.h"
@@ -38,4 +38,4 @@ struct CardDescriptor {
3838
} // namespace roc
3939
} // namespace AliceO2
4040

41-
#endif // ALICEO2_SRC_READOUTCARD_CARDDESCRIPTOR_H_
41+
#endif // ALICEO2_INCLUDE_READOUTCARD_CARDDESCRIPTOR_H_

include/ReadoutCard/CardFinder.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
/// \file CardFinder.h
12+
/// \brief Definitions for the CardFinder methods.
13+
///
14+
/// \author Kostas Alexopoulos ([email protected])
15+
16+
#ifndef ALICEO2_INCLUDE_READOUTCARD_CARDFINDER_H_
17+
#define ALICEO2_INCLUDE_READOUTCARD_CARDFINDER_H_
18+
19+
#include "ReadoutCard/CardDescriptor.h"
20+
21+
namespace AliceO2
22+
{
23+
namespace roc
24+
{
25+
26+
std::vector<CardDescriptor> findCards(); //Possibly extend with card types (crorc, cru)
27+
28+
} // namespace roc
29+
} // namespace AliceO2
30+
31+
#endif // ALICEO2_INCLUDE_READOUTCARD_CARDFINDER_H_

src/CardFinder.cxx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
/// \file CardFinder.cxx
12+
/// \brief Implementation of the CardFinder collection of functions.
13+
///
14+
/// \author Kostas Alexopoulos ([email protected])
15+
16+
#include "ReadoutCard/CardFinder.h"
17+
#include "RocPciDevice.h"
18+
19+
namespace AliceO2
20+
{
21+
namespace roc
22+
{
23+
24+
std::vector<CardDescriptor> findCards()
25+
{
26+
std::vector<CardDescriptor> cards = RocPciDevice::findSystemDevices();
27+
return cards;
28+
}
29+
30+
} // namespace roc
31+
} // namespace AliceO2

src/DmaChannelBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
#include <mutex>
2323
#include <boost/optional.hpp>
2424
#include <InfoLogger/InfoLogger.hxx>
25-
#include "CardDescriptor.h"
2625
#include "ChannelPaths.h"
2726
#include "ExceptionInternal.h"
2827
#include "Pda/PdaLock.h"
28+
#include "ReadoutCard/CardDescriptor.h"
2929
#include "ReadoutCard/DmaChannelInterface.h"
3030
#include "ReadoutCard/Exception.h"
3131
#include "ReadoutCard/InterprocessLock.h"

src/Factory/ChannelFactoryUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
#include <map>
1717
#include <algorithm>
18-
#include "CardDescriptor.h"
1918
#include "ExceptionInternal.h"
19+
#include "ReadoutCard/CardDescriptor.h"
2020
#include "ReadoutCard/CardType.h"
2121
#include "ReadoutCard/Parameters.h"
2222
#ifdef ALICEO2_READOUTCARD_PDA_ENABLED

src/RocPciDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
#include <memory>
2020
#include <string>
21-
#include "CardDescriptor.h"
2221
#include "Pda/PdaDevice.h"
2322
#include "ReadoutCard/CardType.h"
23+
#include "ReadoutCard/CardDescriptor.h"
2424
#include "ReadoutCard/Parameters.h"
2525
#include "ReadoutCard/ParameterTypes/PciAddress.h"
2626
#include "ReadoutCard/PciId.h"

test/TestChannelPaths.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define BOOST_TEST_DYN_LINK
1111
#include <boost/test/unit_test.hpp>
1212
#include <assert.h>
13-
#include "CardDescriptor.h"
13+
#include "ReadoutCard/CardDescriptor.h"
1414

1515
BOOST_AUTO_TEST_CASE(ChannelPathsTest)
1616
{

0 commit comments

Comments
 (0)