Skip to content

Commit b2673e9

Browse files
committed
namespace compliant with O2 coding guidelines
1 parent c45829c commit b2673e9

77 files changed

Lines changed: 451 additions & 444 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Framework/CMakeLists.txt

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,33 @@ set(SRCS
6969
src/CheckInterface.cxx
7070
src/DatabaseFactory.cxx
7171
src/ClientDataProvider.cxx
72+
src/AlfaReceiverForTests.cxx
73+
src/TaskDevice.cxx
74+
src/SpyDevice.cxx
75+
src/SpyMainFrame.cxx
7276
)
7377

7478
set(HEADERS # needed for the dictionary generation
7579
include/QualityControl/MonitorObject.h
7680
include/QualityControl/Quality.h
7781
include/QualityControl/CheckInterface.h
7882
include/QualityControl/SpyMainFrame.h
79-
)
8083

81-
if (FAIRROOT_FOUND)
82-
list(APPEND SRCS
83-
src/AlfaReceiverForTests.cxx
84-
src/TaskDevice.cxx
85-
src/SpyDevice.cxx
86-
src/SpyMainFrame.cxx
87-
)
88-
endif (FAIRROOT_FOUND)
84+
include/QualityControl/TaskInterface.h
85+
include/QualityControl/ObjectsManager.h
86+
include/QualityControl/TaskFactory.h
87+
include/QualityControl/Checker.h
88+
include/QualityControl/DatabaseFactory.h
89+
include/QualityControl/ClientDataProvider.h
90+
include/QualityControl/AlfaReceiverForTests.h
91+
include/QualityControl/TaskDevice.h
92+
include/QualityControl/SpyDevice.h
93+
include/QualityControl/CheckerConfig.h
94+
include/QualityControl/Consumer.h
95+
include/QualityControl/DatabaseInterface.h
96+
include/QualityControl/QcInfoLogger.h
97+
include/QualityControl/TaskConfig.h
98+
)
8999

90100
if(MYSQL_FOUND)
91101
list(APPEND SRCS src/MySqlDatabase.cxx)

Framework/example-default.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ taskDefinition=taskDefinition_1
2727
taskDefinition=taskDefinition_1
2828

2929
[taskDefinition_1] # Actual definition of the dummy tasks
30-
;className=AliceO2::QualityControlModules::Skeleton::SkeletonTask
31-
className=AliceO2::QualityControlModules::Example::ExampleTask
30+
;className=o2::quality_control_modules::skeleton::SkeletonTask
31+
className=o2::quality_control_modules::example::ExampleTask
3232
moduleName=QcExample
3333
cycleDurationSeconds=10
3434
; set to -1 for no maximum or remove the line
@@ -39,7 +39,7 @@ maxNumberCycles=-1
3939
taskDefinition=daqTaskDefinition
4040

4141
[daqTaskDefinition]
42-
className=AliceO2::QualityControlModules::Daq::DaqTask
42+
className=o2::quality_control_modules::daq::DaqTask
4343
moduleName=QcDaq
4444
moduleOfChecks=QcExample
4545

@@ -50,11 +50,11 @@ taskDefinition=benchmark
5050
;address=tcp://*:5556
5151

5252
[benchmark] # Benchmark tasks definition
53-
className=AliceO2::QualityControlModules::Example::BenchmarkTask
53+
className=o2::quality_control_modules::example::BenchmarkTask
5454
moduleName=QcExample
5555
numberHistos=1
5656
numberChecks=1
57-
typeOfChecks=AliceO2::QualityControlModules::Example::FakeCheck
57+
typeOfChecks=o2::quality_control_modules::example::FakeCheck
5858
moduleOfChecks=QcExample
5959
cycleDurationSeconds=1
6060

Framework/include/QualityControl/AlfaReceiverForTests.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#include <FairMQDevice.h>
1010
#include <TMessage.h>
1111

12-
namespace AliceO2 {
13-
namespace QualityControl {
14-
namespace Core {
12+
namespace o2 {
13+
namespace quality_control {
14+
namespace core {
1515

1616
class TestTMessage : public TMessage
1717
{
@@ -34,8 +34,8 @@ class AlfaReceiverForTests : public FairMQDevice
3434

3535
};
3636

37-
} // namespace Core
37+
} // namespace core
3838
} // namespace QualityControl
39-
} // namespace AliceO2
39+
} // namespace o2
4040

4141
#endif // QUALITY_CONTROL_AlfaReceiverForTests_H

Framework/include/QualityControl/CheckInterface.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
#include "QualityControl/MonitorObject.h"
1010
#include "QualityControl/Quality.h"
1111

12-
using namespace AliceO2::QualityControl::Core;
12+
using namespace o2::quality_control::core;
1313

14-
namespace AliceO2 {
15-
namespace QualityControl {
14+
namespace o2 {
15+
namespace quality_control {
1616
namespace Checker {
1717

1818
/// \brief Skeleton of a check.
@@ -76,6 +76,6 @@ class CheckInterface
7676

7777
} /* namespace Checker */
7878
} /* namespace QualityControl */
79-
} /* namespace AliceO2 */
79+
} /* namespace o2 */
8080

8181
#endif /* QUALITYCONTROL_LIBS_CHECKER_CHECKINTERFACE_H_ */

Framework/include/QualityControl/Checker.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929

3030
namespace ba = boost::accumulators;
3131

32-
namespace AliceO2 {
33-
namespace QualityControl {
32+
namespace o2 {
33+
namespace quality_control {
3434
namespace Checker {
3535

3636
/// \brief The class in charge of running the checks on a MonitorObject.
@@ -93,8 +93,8 @@ class Checker : public FairMQDevice
9393
static void CustomCleanupTMessage(void *data, void *object);
9494
void populateConfig( std::unique_ptr<AliceO2::Configuration::ConfigurationInterface>& config, std::string checkerName);
9595

96-
AliceO2::QualityControl::Core::QcInfoLogger &mLogger;
97-
AliceO2::QualityControl::Repository::DatabaseInterface *mDatabase;
96+
o2::quality_control::core::QcInfoLogger &mLogger;
97+
o2::quality_control::repository::DatabaseInterface *mDatabase;
9898
std::vector<std::string> mTasksAlreadyEncountered;
9999
CheckerConfig mCheckerConfig;
100100

@@ -112,6 +112,6 @@ class Checker : public FairMQDevice
112112

113113
} /* namespace Checker */
114114
} /* namespace QualityControl */
115-
} /* namespace AliceO2 */
115+
} /* namespace o2 */
116116

117117
#endif /* QUALITYCONTROL_LIBS_CHECKER_CHECKER_H_ */

Framework/include/QualityControl/CheckerConfig.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
#include <string>
1010

11-
namespace AliceO2 {
12-
namespace QualityControl {
13-
namespace Core {
11+
namespace o2 {
12+
namespace quality_control {
13+
namespace core {
1414

1515
/// \brief Container for the configuration of a Task
1616
///
@@ -28,8 +28,8 @@ struct CheckerConfig
2828
std::string tasksAddresses;
2929
};
3030

31-
} // namespace Core
31+
} // namespace core
3232
} // namespace QualityControl
33-
} // namespace AliceO2
33+
} // namespace o2
3434

3535
#endif // QUALITYCONTROL_CORE_CHECKERCONFIG_H_

Framework/include/QualityControl/ClientDataProvider.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
#include "QualityControl/MonitorObject.h"
1010
#include "QualityControl/DatabaseInterface.h"
1111

12-
using namespace AliceO2::QualityControl;
12+
using namespace o2::quality_control;
1313

14-
namespace AliceO2 {
15-
namespace QualityControl {
16-
namespace Client {
14+
namespace o2 {
15+
namespace quality_control {
16+
namespace client
17+
{
1718

1819
/// \brief Class to access all information a client can need.
1920
/// It is a Facade for the various specialized and specific data providers (eg. DB or IS)
@@ -35,12 +36,12 @@ class ClientDataProvider
3536

3637
private:
3738
// Facaded systems
38-
Repository::DatabaseInterface *database;
39+
repository::DatabaseInterface *database;
3940

4041
};
4142

4243
} /* namespace Client */
4344
} /* namespace QualityControl */
44-
} /* namespace AliceO2 */
45+
} /* namespace o2 */
4546

4647
#endif /* QUALITYCONTROL_CLIENT_CLIENT_DATA_PROVIDER_H_ */

Framework/include/QualityControl/Consumer.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
// QC
1010
#include "QualityControl/ClientDataProvider.h"
1111

12-
using namespace AliceO2::QualityControl;
12+
using namespace o2::quality_control;
1313

14-
namespace AliceO2 {
15-
namespace QualityControl {
16-
namespace Client {
14+
namespace o2 {
15+
namespace quality_control {
16+
namespace client {
1717

1818
/// \brief A special client that polls and consumes all available data.
1919
/// It is used to stress the system for benchmarks.
@@ -37,6 +37,6 @@ class Consumer
3737

3838
} /* namespace Client */
3939
} /* namespace QualityControl */
40-
} /* namespace AliceO2 */
40+
} /* namespace o2 */
4141

4242
#endif /* QUALITYCONTROL_CLIENT_CONSUMER_H_ */

Framework/include/QualityControl/DatabaseFactory.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
// QC
1313
#include "QualityControl/DatabaseInterface.h"
1414

15-
namespace AliceO2 {
16-
namespace QualityControl {
17-
namespace Repository {
15+
namespace o2 {
16+
namespace quality_control {
17+
namespace repository {
1818

1919
/// \brief Factory to get a database accessor
2020
class DatabaseFactory
@@ -30,8 +30,8 @@ class DatabaseFactory
3030
static DatabaseInterface* create(std::string name);
3131
};
3232

33-
} // namespace Core
33+
} // namespace core
3434
} // namespace QualityControl
35-
} // namespace AliceO2
35+
} // namespace o2
3636

3737
#endif // QUALITYCONTROL_LIBS_CORE_DatabaseFactory_H_

Framework/include/QualityControl/DatabaseInterface.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#include "QualityControl/MonitorObject.h"
1010
#include <memory>
1111

12-
namespace AliceO2 {
13-
namespace QualityControl {
14-
namespace Repository {
12+
namespace o2 {
13+
namespace quality_control {
14+
namespace repository {
1515

1616
/// \brief The interface to the MonitorObject's repository.
1717
///
@@ -30,15 +30,15 @@ class DatabaseInterface
3030

3131
virtual void connect(std::string username, std::string password) = 0;
3232
virtual void connect(std::string host, std::string database, std::string username, std::string password) = 0;
33-
virtual void store(AliceO2::QualityControl::Core::MonitorObject* mo) = 0;
33+
virtual void store(o2::quality_control::core::MonitorObject* mo) = 0;
3434

3535
/**
3636
* Look up an object of a task and return it.
3737
* \details It returns the object if found or nullptr if not.
3838
* TODO evaluate whether we should have more methods to retrieve objects of different types (with or without templates)
3939
* TODO evaluate whether we should have a method to retrieve a list of objects (optimization)
4040
*/
41-
virtual AliceO2::QualityControl::Core::MonitorObject* retrieve(std::string taskName, std::string objectName) = 0;
41+
virtual o2::quality_control::core::MonitorObject* retrieve(std::string taskName, std::string objectName) = 0;
4242
virtual void disconnect() = 0;
4343
/**
4444
* \brief Prepare the container, such as a table in a relational database, that will contain the MonitorObject's for the given Task.
@@ -49,8 +49,8 @@ class DatabaseInterface
4949
virtual std::vector<std::string> getPublishedObjectNames(std::string taskName) = 0;
5050
};
5151

52-
} /* namespace Repository */
52+
} /* namespace repository */
5353
} /* namespace QualityControl */
54-
} /* namespace AliceO2 */
54+
} /* namespace o2 */
5555

5656
#endif /* QUALITYCONTROL_REPOSITORY_DATABASE_INTERFACE_H_ */

0 commit comments

Comments
 (0)