Skip to content

Commit 86a002d

Browse files
authored
Reduce compilation time of the QC project (#219)
* Framework - delete unnecessary headers, add needed, correct inclusion type * Forward declarations and moving stuff inside .cxx files * more forward declarations and Framework tests clean up * cleanups in Modules * use default ctors and dtors wherever possible * some additional (hopefully) improvements * Formatting
1 parent d051de2 commit 86a002d

File tree

93 files changed

+389
-380
lines changed

Some content is hidden

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

93 files changed

+389
-380
lines changed

Framework/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ add_library(QualityControl
4343
src/CcdbDatabase.cxx
4444
src/InformationService.cxx
4545
src/InformationServiceDump.cxx
46+
src/TaskFactory.cxx
4647
src/TaskRunner.cxx
4748
src/TaskRunnerFactory.cxx
4849
src/TaskInterface.cxx

Framework/include/QualityControl/CcdbDatabase.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
#ifndef QC_REPOSITORY_CCDBDATABASE_H
1717
#define QC_REPOSITORY_CCDBDATABASE_H
1818

19-
#include "CCDB/CcdbApi.h"
19+
#include <CCDB/CcdbApi.h>
20+
2021
#include "QualityControl/DatabaseInterface.h"
2122

2223
namespace o2::quality_control::repository
@@ -49,7 +50,7 @@ namespace o2::quality_control::repository
4950
class CcdbDatabase : public DatabaseInterface
5051
{
5152
public:
52-
CcdbDatabase();
53+
CcdbDatabase() = default;
5354
virtual ~CcdbDatabase();
5455

5556
void connect(std::string host, std::string database, std::string username, std::string password) override;
@@ -84,7 +85,7 @@ class CcdbDatabase : public DatabaseInterface
8485
*/
8586
std::string getListing(std::string subpath = "", std::string accept = "text/plain");
8687
o2::ccdb::CcdbApi ccdbApi;
87-
std::string mUrl;
88+
std::string mUrl = "";
8889
};
8990

9091
} // namespace o2::quality_control::repository

Framework/include/QualityControl/CheckInterface.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
#ifndef QC_CHECKER_CHECKINTERFACE_H
1717
#define QC_CHECKER_CHECKINTERFACE_H
1818

19+
#include <string>
20+
21+
#include <Rtypes.h>
22+
1923
#include "QualityControl/MonitorObject.h"
2024
#include "QualityControl/Quality.h"
2125

Framework/include/QualityControl/Checker.h

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,33 @@
2020
// std & boost
2121
#include <chrono>
2222
#include <memory>
23+
#include <string>
24+
#include <map>
25+
#include <vector>
2326
// O2
2427
#include <Common/Timer.h>
25-
#include <Configuration/ConfigurationInterface.h>
2628
#include <Framework/Task.h>
27-
#include <Monitoring/MonitoringFactory.h>
29+
#include <Headers/DataHeader.h>
2830
// QC
2931
#include "QualityControl/CheckInterface.h"
3032
#include "QualityControl/DatabaseInterface.h"
3133
#include "QualityControl/MonitorObject.h"
3234
#include "QualityControl/QcInfoLogger.h"
3335

36+
namespace o2::framework
37+
{
38+
struct InputSpec;
39+
struct OutputSpec;
40+
class DataAllocator;
41+
} // namespace o2::framework
42+
43+
namespace o2::monitoring
44+
{
45+
class Monitoring;
46+
}
47+
48+
class TClass;
49+
3450
namespace o2::quality_control::checker
3551
{
3652

Framework/include/QualityControl/CheckerFactory.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616
#ifndef QC_CHECKERFACTORY_H
1717
#define QC_CHECKERFACTORY_H
1818

19-
#include "Framework/DataProcessorSpec.h"
19+
#include <string>
20+
21+
namespace o2::framework
22+
{
23+
struct DataProcessorSpec;
24+
}
2025

2126
namespace o2::quality_control::checker
2227
{

Framework/include/QualityControl/DataDumpGui.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
#ifndef QC_CORE_DATADUMP_H
1818
#define QC_CORE_DATADUMP_H
1919

20-
#include "FairMQDevice.h"
20+
#include <string>
21+
22+
#include <fairmq/FairMQDevice.h>
2123

2224
namespace o2::quality_control::core
2325
{

Framework/include/QualityControl/DatabaseFactory.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#define QC_REPOSITORY_DATABASEFACTORY_H
1818

1919
#include <memory>
20-
// O2
21-
#include "Common/Exceptions.h"
2220
// QC
2321
#include "QualityControl/DatabaseInterface.h"
2422

Framework/include/QualityControl/DatabaseInterface.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
#ifndef QC_REPOSITORY_DATABASEINTERFACE_H
1717
#define QC_REPOSITORY_DATABASEINTERFACE_H
1818

19-
#include "QualityControl/MonitorObject.h"
19+
#include <string>
2020
#include <memory>
21+
#include <vector>
2122
#include <unordered_map>
22-
//#include <bits/unique_ptr.h>
23+
24+
#include "QualityControl/MonitorObject.h"
2325

2426
namespace o2::quality_control::repository
2527
{
@@ -31,9 +33,9 @@ class DatabaseInterface
3133
{
3234
public:
3335
/// Default constructor
34-
DatabaseInterface() {}
36+
DatabaseInterface() = default;
3537
/// Destructor
36-
virtual ~DatabaseInterface() {}
38+
virtual ~DatabaseInterface() = default;
3739

3840
/**
3941
* Connects to the database.

Framework/include/QualityControl/ExamplePrinterSpec.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@
1616
#ifndef QUALITYCONTROL_EXAMPLEPRINTERSPEC_H
1717
#define QUALITYCONTROL_EXAMPLEPRINTERSPEC_H
1818

19+
#include <string>
20+
#include <memory>
21+
22+
#include <TH1F.h>
23+
#include <TObjArray.h>
24+
25+
#include <Framework/Task.h>
26+
#include <Framework/DataRefUtils.h>
27+
28+
#include "QualityControl/MonitorObject.h"
29+
1930
namespace o2::quality_control::example
2031
{
2132

Framework/include/QualityControl/HistoMerger.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,21 @@
1616
#ifndef QC_CORE_HISTOMERGER_H
1717
#define QC_CORE_HISTOMERGER_H
1818

19-
#include <memory>
19+
#include <string>
2020
#include <vector>
2121

22-
#include "Common/Timer.h"
22+
#include <Common/Timer.h>
2323
#include <Framework/Task.h>
2424
#include <Headers/DataHeader.h>
25-
#include <TH1.h>
25+
26+
namespace o2::framework
27+
{
28+
struct InputSpec;
29+
struct OutputSpec;
30+
} // namespace o2::framework
31+
32+
class TH1;
33+
class TObjArray;
2634

2735
#include "QualityControl/MonitorObject.h"
2836

0 commit comments

Comments
 (0)