Skip to content

Commit d510c45

Browse files
Barthelemysawenzel
authored andcommitted
Bring CCDB more in line with O2 coding guidelines (AliceO2Group#1303)
* namespace name CDB->ccdb * fix namespace in macros * CINT -> CLING * one namespace block for forward declaration * update formatting * update copyright header to be in line with the rest * remove extraneous cxx file * one more namespace name fixed * proper formatting (fixed clion) * formatting : brace on new line after namespace * formatting as provided by clang-format except for the LinkDef * formatting as provided by clang-format except for the LinkDef
1 parent 243c948 commit d510c45

51 files changed

Lines changed: 1336 additions & 1234 deletions

Some content is hidden

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

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ BreakBeforeBinaryOperators: false
1313
BreakBeforeBraces: Linux
1414
BreakBeforeTernaryOperators: true
1515
BreakConstructorInitializersBeforeComma: false
16-
ColumnLimit: 0
16+
ColumnLimit: 0
1717
CommentPragmas: '^ IWYU pragma:'
1818
ConstructorInitializerAllOnOneLineOrOnePerLine: true
1919
ConstructorInitializerIndentWidth: 2

CCDB/example/fill_local_ocdb.C

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
void fill_local_ocdb()
22
{
3-
o2::CDB::Manager* cdb = o2::CDB::Manager::Instance();
3+
o2::ccdb::Manager* cdb = o2::ccdb::Manager::Instance();
44
cdb->setDefaultStorage("local://O2CDB");
55
TH1F* h = 0;
66
for (int run = 2000; run < 2100; run++) {
77
cdb->setRun(run);
88
h = new TH1F(Form("histo for %d run", run), "gauss", 100, -5, 5);
99
h->FillRandom("gaus", 1000);
10-
o2::CDB::ConditionId* id = new o2::CDB::ConditionId("DET/Calib/Histo", run, run, 1, 0);
11-
o2::CDB::ConditionMetaData* md = new o2::CDB::ConditionMetaData();
10+
o2::ccdb::ConditionId* id = new o2::ccdb::ConditionId("DET/Calib/Histo", run, run, 1, 0);
11+
o2::ccdb::ConditionMetaData* md = new o2::ccdb::ConditionMetaData();
1212
cdb->putObject(h, *id, md);
1313
h = 0;
1414
}

CCDB/include/CCDB/Backend.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@
2323
// Google protocol buffers headers
2424
#include <google/protobuf/stubs/common.h>
2525

26-
27-
namespace o2 {
28-
namespace CDB {
26+
namespace o2
27+
{
28+
namespace ccdb
29+
{
2930

3031
class Condition;
3132

32-
class Backend {
33-
public:
34-
virtual ~Backend()= default;
33+
class Backend
34+
{
35+
public:
36+
virtual ~Backend() = default;
3537

3638
/// Pack
3739
virtual void Pack(const std::string& path, const std::string& key, std::string*& messageString) = 0;

CCDB/include/CCDB/BackendOCDB.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@
2020
#include <iosfwd>
2121
#include <memory>
2222

23-
namespace o2 {
24-
namespace CDB {
23+
namespace o2
24+
{
25+
namespace ccdb
26+
{
2527

26-
class BackendOCDB : public Backend {
28+
class BackendOCDB : public Backend
29+
{
2730

28-
private:
29-
public:
31+
private:
32+
public:
3033
BackendOCDB();
3134
~BackendOCDB() override = default;
3235

CCDB/include/CCDB/BackendRiak.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@
1717

1818
#include "CCDB/Backend.h"
1919

20-
namespace o2 {
21-
namespace CDB {
20+
namespace o2
21+
{
22+
namespace ccdb
23+
{
2224

23-
class BackendRiak : public Backend {
25+
class BackendRiak : public Backend
26+
{
2427

25-
private:
28+
private:
2629
/// Deserializes a message and stores the value to an std::string using Protocol Buffers
2730
void Deserialize(const std::string& messageString, std::string& object);
2831

@@ -32,7 +35,7 @@ class BackendRiak : public Backend {
3235
/// Decompresses compressed_string to uncompressed_string using zlib
3336
void Decompress(std::string& uncompressed_string, const std::string& compressed_string);
3437

35-
public:
38+
public:
3639
BackendRiak();
3740
~BackendRiak() override = default;
3841

0 commit comments

Comments
 (0)