Skip to content

Commit 7859ec8

Browse files
authored
MCH: remove usage of to-be-banned #pragma once (#6491)
1 parent 7ad2447 commit 7859ec8

16 files changed

Lines changed: 67 additions & 24 deletions

Detectors/MUON/MCH/DevIO/Digits/DigitD0.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#pragma once
12+
#ifndef O2_MCH_DEVIO_DIGITS_DIGIT_D0_H
13+
#define O2_MCH_DEVIO_DIGITS_DIGIT_D0_H
1314

1415
#include <fstream>
1516
#include <vector>
@@ -31,3 +32,5 @@ struct DigitD0 {
3132
};
3233

3334
} // namespace o2::mch::io::impl
35+
36+
#endif

Detectors/MUON/MCH/DevIO/Digits/DigitFileFormat.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#pragma once
12+
#ifndef O2_MCH_DEVIO_DIGITS_DIGIT_FILE_FORMAT_H
13+
#define O2_MCH_DEVIO_DIGITS_DIGIT_FILE_FORMAT_H
1314

1415
#include <cstdint>
1516
#include <iosfwd>
@@ -49,3 +50,4 @@ DigitFileFormat readDigitFileFormat(std::istream& in);
4950
bool isValid(DigitFileFormat dff);
5051

5152
} // namespace o2::mch::io
53+
#endif

Detectors/MUON/MCH/DevIO/Digits/DigitIO.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#pragma once
12+
#ifndef O2_MCH_DEVIO_DIGITS_DIGIT_IO_H
13+
#define O2_MCH_DEVIO_DIGITS_DIGIT_IO_H
1314

1415
#include "DigitReader.h"
1516
#include "DigitWriter.h"
17+
18+
#endif

Detectors/MUON/MCH/DevIO/Digits/DigitIOBaseTask.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#pragma once
12+
#ifndef O2_MCH_DEVIO_DIGITS_DIGIT_IO_BASE_TASK_H
13+
#define O2_MCH_DEVIO_DIGITS_DIGIT_IO_BASE_TASK_H
1314

1415
#include "Framework/ConfigParamSpec.h"
1516
#include <cstdint>
@@ -31,7 +32,7 @@ class ROFRecord;
3132
namespace o2::mch::io
3233
{
3334

34-
/**
35+
/**
3536
* DigitIOBaseTask implements the commonalities between reader and writer
3637
* tasks, like the handling of the common options.
3738
*/
@@ -89,3 +90,4 @@ class DigitIOBaseTask
8990
std::vector<o2::framework::ConfigParamSpec> getCommonOptions();
9091

9192
} // namespace o2::mch::io
93+
#endif

Detectors/MUON/MCH/DevIO/Digits/DigitIOV0.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#pragma once
12+
#ifndef O2_MCH_DEVIO_DIGITS_DIGIT_IO_H
13+
#define O2_MCH_DEVIO_DIGITS_DIGIT_IO_H
1314

1415
#include "DigitReaderImpl.h"
1516
#include "DigitWriterImpl.h"
@@ -57,3 +58,5 @@ struct DigitWriterV0 : public DigitWriterImpl {
5758
};
5859

5960
} // namespace o2::mch::io::impl
61+
62+
#endif

Detectors/MUON/MCH/DevIO/Digits/DigitIOV1.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#pragma once
12+
#ifndef O2_MCH_DEVIO_DIGITS_DIGIT_IO_V1_H
13+
#define O2_MCH_DEVIO_DIGITS_DIGIT_IO_V1_H
1314

1415
#include "DigitReaderImpl.h"
1516
#include <vector>
@@ -41,3 +42,4 @@ struct DigitWriterV1 : public DigitWriterImpl {
4142
};
4243

4344
} // namespace o2::mch::io::impl
45+
#endif

Detectors/MUON/MCH/DevIO/Digits/DigitIOV2.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#pragma once
12+
#ifndef O2_MCH_DEVIO_DIGITS_DIGIT_IO_V2_H
13+
#define O2_MCH_DEVIO_DIGITS_DIGIT_IO_V2_H
1314

1415
#include "DigitReaderImpl.h"
1516
#include "DigitWriterImpl.h"
@@ -57,3 +58,4 @@ struct DigitWriterV2 : public DigitWriterImpl {
5758
};
5859

5960
} // namespace o2::mch::io::impl
61+
#endif

Detectors/MUON/MCH/DevIO/Digits/DigitIOV3.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#pragma once
12+
#ifndef O2_MCH_DEVIO_DIGITS_DIGIT_IO_V3_H
13+
#define O2_MCH_DEVIO_DIGITS_DIGIT_IO_V3_H
1314

1415
#include "DigitReaderImpl.h"
1516
#include <vector>
@@ -41,3 +42,4 @@ struct DigitWriterV3 : public DigitWriterImpl {
4142
};
4243

4344
} // namespace o2::mch::io::impl
45+
#endif

Detectors/MUON/MCH/DevIO/Digits/DigitReader.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#pragma once
12+
#ifndef O2_MCH_DEVIO_DIGITS_DIGIT_READER_H
13+
#define O2_MCH_DEVIO_DIGITS_DIGIT_READER_H
1314

1415
#include <iosfwd>
1516
#include "DigitFileFormat.h"
@@ -50,17 +51,17 @@ class DigitReader
5051
std::vector<ROFRecord>& rofs);
5152

5253
/** Count the number of timeframes in the input stream.
53-
* WARNING : depending on the size of the input this might be a
54+
* WARNING : depending on the size of the input this might be a
5455
* costly operation */
5556
size_t nofTimeFrames() const;
5657

5758
/** Count the number of ROFRecords in the input stream
58-
* WARNING : depending on the size of the input this might be a
59+
* WARNING : depending on the size of the input this might be a
5960
* costly operation */
6061
size_t nofROFs() const;
6162

6263
/** Count the number of digits in the input stream
63-
* WARNING : depending on the size of the input this might be a
64+
* WARNING : depending on the size of the input this might be a
6465
* costly operation */
6566
size_t nofDigits() const;
6667

@@ -81,3 +82,5 @@ class DigitReader
8182
};
8283

8384
} // namespace o2::mch::io
85+
86+
#endif

Detectors/MUON/MCH/DevIO/Digits/DigitReaderImpl.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#pragma once
12+
#ifndef O2_MCH_DEVIO_DIGITS_DIGIT_READER_IMPL_H
13+
#define O2_MCH_DEVIO_DIGITS_DIGIT_READER_IMPL_H
1314

1415
#include <istream>
1516
#include "DigitFileFormat.h"
@@ -39,3 +40,5 @@ struct DigitReaderImpl {
3940
std::unique_ptr<DigitReaderImpl> createDigitReaderImpl(int version);
4041

4142
} // namespace o2::mch::io::impl
43+
44+
#endif

0 commit comments

Comments
 (0)