Skip to content

Commit 1753323

Browse files
Format code
1 parent a0a6e8c commit 1753323

10 files changed

Lines changed: 571 additions & 201 deletions

.clang-format

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# LArSoft format agreed upon by SciSoft team in Sept. 2022
2+
---
3+
Language: Cpp
4+
# BasedOnStyle: Mozilla
5+
AccessModifierOffset: -2
6+
AlignAfterOpenBracket: Align
7+
AlignConsecutiveAssignments: false
8+
AlignConsecutiveDeclarations: false
9+
AlignEscapedNewlines: Right
10+
AlignOperands: true
11+
AlignTrailingComments: true
12+
AllowAllParametersOfDeclarationOnNextLine: false
13+
AllowShortBlocksOnASingleLine: true
14+
AllowShortCaseLabelsOnASingleLine: true
15+
AllowShortFunctionsOnASingleLine: Inline
16+
AllowShortIfStatementsOnASingleLine: true
17+
AllowShortLoopsOnASingleLine: false
18+
AlwaysBreakAfterDefinitionReturnType: None
19+
AlwaysBreakAfterReturnType: None
20+
AlwaysBreakBeforeMultilineStrings: false
21+
AlwaysBreakTemplateDeclarations: true
22+
BinPackArguments: false
23+
BinPackParameters: false
24+
BraceWrapping:
25+
AfterClass: false
26+
AfterControlStatement: false
27+
AfterEnum: false
28+
AfterFunction: true
29+
AfterNamespace: false
30+
AfterObjCDeclaration: false
31+
AfterStruct: false
32+
AfterUnion: false
33+
BeforeCatch: true
34+
BeforeElse: true
35+
IndentBraces: false
36+
SplitEmptyFunction: false
37+
SplitEmptyRecord: false
38+
SplitEmptyNamespace: false
39+
BreakBeforeBinaryOperators: None
40+
BreakBeforeBraces: Custom
41+
BreakBeforeInheritanceComma: false
42+
BreakBeforeTernaryOperators: false
43+
# BreakConstructorInitializersBeforeComma: false
44+
BreakConstructorInitializers: BeforeComma
45+
BreakAfterJavaFieldAnnotations: false
46+
BreakStringLiterals: true
47+
ColumnLimit: 100
48+
CommentPragmas: '^ IWYU pragma:'
49+
CompactNamespaces: false
50+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
51+
ConstructorInitializerIndentWidth: 2
52+
ContinuationIndentWidth: 2
53+
Cpp11BracedListStyle: true
54+
DerivePointerAlignment: false
55+
DisableFormat: false
56+
ExperimentalAutoDetectBinPacking: false
57+
FixNamespaceComments: false
58+
ForEachMacros:
59+
- foreach
60+
- Q_FOREACH
61+
- BOOST_FOREACH
62+
IncludeCategories:
63+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
64+
Priority: 2
65+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
66+
Priority: 3
67+
- Regex: '.*'
68+
Priority: 1
69+
IncludeIsMainRegex: '(Test)?$'
70+
IndentCaseLabels: false
71+
IndentWidth: 2
72+
IndentWrappedFunctionNames: false
73+
JavaScriptQuotes: Leave
74+
JavaScriptWrapImports: true
75+
KeepEmptyLinesAtTheStartOfBlocks: true
76+
MacroBlockBegin: ''
77+
MacroBlockEnd: ''
78+
MaxEmptyLinesToKeep: 1
79+
NamespaceIndentation: All
80+
ObjCBlockIndentWidth: 2
81+
ObjCSpaceAfterProperty: true
82+
ObjCSpaceBeforeProtocolList: false
83+
PenaltyBreakAssignment: 2
84+
PenaltyBreakBeforeFirstCallParameter: 19
85+
PenaltyBreakComment: 300
86+
PenaltyBreakFirstLessLess: 120
87+
PenaltyBreakString: 1000
88+
PenaltyExcessCharacter: 1000000
89+
PenaltyReturnTypeOnItsOwnLine: 200
90+
PointerAlignment: Left
91+
ReflowComments: false
92+
SortIncludes: true
93+
SortUsingDeclarations: true
94+
SpaceAfterCStyleCast: false
95+
SpaceAfterTemplateKeyword: true
96+
SpaceBeforeAssignmentOperators: true
97+
SpaceBeforeParens: ControlStatements
98+
SpaceInEmptyParentheses: false
99+
SpacesBeforeTrailingComments: 1
100+
SpacesInAngles: false
101+
SpacesInContainerLiterals: false
102+
SpacesInCStyleCastParentheses: false
103+
SpacesInParentheses: false
104+
SpacesInSquareBrackets: false
105+
Standard: Cpp11
106+
TabWidth: 8
107+
UseTab: Never
108+
...

sbndcode/.clang-format

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# LArSoft format agreed upon by SciSoft team in Sept. 2022
2+
---
3+
Language: Cpp
4+
# BasedOnStyle: Mozilla
5+
AccessModifierOffset: -2
6+
AlignAfterOpenBracket: Align
7+
AlignConsecutiveAssignments: false
8+
AlignConsecutiveDeclarations: false
9+
AlignEscapedNewlines: Right
10+
AlignOperands: true
11+
AlignTrailingComments: true
12+
AllowAllParametersOfDeclarationOnNextLine: false
13+
AllowShortBlocksOnASingleLine: true
14+
AllowShortCaseLabelsOnASingleLine: true
15+
AllowShortFunctionsOnASingleLine: Inline
16+
AllowShortIfStatementsOnASingleLine: true
17+
AllowShortLoopsOnASingleLine: false
18+
AlwaysBreakAfterDefinitionReturnType: None
19+
AlwaysBreakAfterReturnType: None
20+
AlwaysBreakBeforeMultilineStrings: false
21+
AlwaysBreakTemplateDeclarations: true
22+
BinPackArguments: false
23+
BinPackParameters: false
24+
BraceWrapping:
25+
AfterClass: false
26+
AfterControlStatement: false
27+
AfterEnum: false
28+
AfterFunction: true
29+
AfterNamespace: false
30+
AfterObjCDeclaration: false
31+
AfterStruct: false
32+
AfterUnion: false
33+
BeforeCatch: true
34+
BeforeElse: true
35+
IndentBraces: false
36+
SplitEmptyFunction: false
37+
SplitEmptyRecord: false
38+
SplitEmptyNamespace: false
39+
BreakBeforeBinaryOperators: None
40+
BreakBeforeBraces: Custom
41+
BreakBeforeInheritanceComma: false
42+
BreakBeforeTernaryOperators: false
43+
# BreakConstructorInitializersBeforeComma: false
44+
BreakConstructorInitializers: BeforeComma
45+
BreakAfterJavaFieldAnnotations: false
46+
BreakStringLiterals: true
47+
ColumnLimit: 100
48+
CommentPragmas: '^ IWYU pragma:'
49+
CompactNamespaces: false
50+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
51+
ConstructorInitializerIndentWidth: 2
52+
ContinuationIndentWidth: 2
53+
Cpp11BracedListStyle: true
54+
DerivePointerAlignment: false
55+
DisableFormat: false
56+
ExperimentalAutoDetectBinPacking: false
57+
FixNamespaceComments: false
58+
ForEachMacros:
59+
- foreach
60+
- Q_FOREACH
61+
- BOOST_FOREACH
62+
IncludeCategories:
63+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
64+
Priority: 2
65+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
66+
Priority: 3
67+
- Regex: '.*'
68+
Priority: 1
69+
IncludeIsMainRegex: '(Test)?$'
70+
IndentCaseLabels: false
71+
IndentWidth: 2
72+
IndentWrappedFunctionNames: false
73+
JavaScriptQuotes: Leave
74+
JavaScriptWrapImports: true
75+
KeepEmptyLinesAtTheStartOfBlocks: true
76+
MacroBlockBegin: ''
77+
MacroBlockEnd: ''
78+
MaxEmptyLinesToKeep: 1
79+
NamespaceIndentation: All
80+
ObjCBlockIndentWidth: 2
81+
ObjCSpaceAfterProperty: true
82+
ObjCSpaceBeforeProtocolList: false
83+
PenaltyBreakAssignment: 2
84+
PenaltyBreakBeforeFirstCallParameter: 19
85+
PenaltyBreakComment: 300
86+
PenaltyBreakFirstLessLess: 120
87+
PenaltyBreakString: 1000
88+
PenaltyExcessCharacter: 1000000
89+
PenaltyReturnTypeOnItsOwnLine: 200
90+
PointerAlignment: Left
91+
ReflowComments: false
92+
SortIncludes: true
93+
SortUsingDeclarations: true
94+
SpaceAfterCStyleCast: false
95+
SpaceAfterTemplateKeyword: true
96+
SpaceBeforeAssignmentOperators: true
97+
SpaceBeforeParens: ControlStatements
98+
SpaceInEmptyParentheses: false
99+
SpacesBeforeTrailingComments: 1
100+
SpacesInAngles: false
101+
SpacesInContainerLiterals: false
102+
SpacesInCStyleCastParentheses: false
103+
SpacesInParentheses: false
104+
SpacesInSquareBrackets: false
105+
Standard: Cpp11
106+
TabWidth: 8
107+
UseTab: Never
108+
...
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# LArSoft format agreed upon by SciSoft team in Sept. 2022
2+
---
3+
Language: Cpp
4+
# BasedOnStyle: Mozilla
5+
AccessModifierOffset: -2
6+
AlignAfterOpenBracket: Align
7+
AlignConsecutiveAssignments: false
8+
AlignConsecutiveDeclarations: false
9+
AlignEscapedNewlines: Right
10+
AlignOperands: true
11+
AlignTrailingComments: true
12+
AllowAllParametersOfDeclarationOnNextLine: false
13+
AllowShortBlocksOnASingleLine: true
14+
AllowShortCaseLabelsOnASingleLine: true
15+
AllowShortFunctionsOnASingleLine: Inline
16+
AllowShortIfStatementsOnASingleLine: true
17+
AllowShortLoopsOnASingleLine: false
18+
AlwaysBreakAfterDefinitionReturnType: None
19+
AlwaysBreakAfterReturnType: None
20+
AlwaysBreakBeforeMultilineStrings: false
21+
AlwaysBreakTemplateDeclarations: true
22+
BinPackArguments: false
23+
BinPackParameters: false
24+
BraceWrapping:
25+
AfterClass: false
26+
AfterControlStatement: false
27+
AfterEnum: false
28+
AfterFunction: true
29+
AfterNamespace: false
30+
AfterObjCDeclaration: false
31+
AfterStruct: false
32+
AfterUnion: false
33+
BeforeCatch: true
34+
BeforeElse: true
35+
IndentBraces: false
36+
SplitEmptyFunction: false
37+
SplitEmptyRecord: false
38+
SplitEmptyNamespace: false
39+
BreakBeforeBinaryOperators: None
40+
BreakBeforeBraces: Custom
41+
BreakBeforeInheritanceComma: false
42+
BreakBeforeTernaryOperators: false
43+
# BreakConstructorInitializersBeforeComma: false
44+
BreakConstructorInitializers: BeforeComma
45+
BreakAfterJavaFieldAnnotations: false
46+
BreakStringLiterals: true
47+
ColumnLimit: 100
48+
CommentPragmas: '^ IWYU pragma:'
49+
CompactNamespaces: false
50+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
51+
ConstructorInitializerIndentWidth: 2
52+
ContinuationIndentWidth: 2
53+
Cpp11BracedListStyle: true
54+
DerivePointerAlignment: false
55+
DisableFormat: false
56+
ExperimentalAutoDetectBinPacking: false
57+
FixNamespaceComments: false
58+
ForEachMacros:
59+
- foreach
60+
- Q_FOREACH
61+
- BOOST_FOREACH
62+
IncludeCategories:
63+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
64+
Priority: 2
65+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
66+
Priority: 3
67+
- Regex: '.*'
68+
Priority: 1
69+
IncludeIsMainRegex: '(Test)?$'
70+
IndentCaseLabels: false
71+
IndentWidth: 2
72+
IndentWrappedFunctionNames: false
73+
JavaScriptQuotes: Leave
74+
JavaScriptWrapImports: true
75+
KeepEmptyLinesAtTheStartOfBlocks: true
76+
MacroBlockBegin: ''
77+
MacroBlockEnd: ''
78+
MaxEmptyLinesToKeep: 1
79+
NamespaceIndentation: All
80+
ObjCBlockIndentWidth: 2
81+
ObjCSpaceAfterProperty: true
82+
ObjCSpaceBeforeProtocolList: false
83+
PenaltyBreakAssignment: 2
84+
PenaltyBreakBeforeFirstCallParameter: 19
85+
PenaltyBreakComment: 300
86+
PenaltyBreakFirstLessLess: 120
87+
PenaltyBreakString: 1000
88+
PenaltyExcessCharacter: 1000000
89+
PenaltyReturnTypeOnItsOwnLine: 200
90+
PointerAlignment: Left
91+
ReflowComments: false
92+
SortIncludes: true
93+
SortUsingDeclarations: true
94+
SpaceAfterCStyleCast: false
95+
SpaceAfterTemplateKeyword: true
96+
SpaceBeforeAssignmentOperators: true
97+
SpaceBeforeParens: ControlStatements
98+
SpaceInEmptyParentheses: false
99+
SpacesBeforeTrailingComments: 1
100+
SpacesInAngles: false
101+
SpacesInContainerLiterals: false
102+
SpacesInCStyleCastParentheses: false
103+
SpacesInParentheses: false
104+
SpacesInSquareBrackets: false
105+
Standard: Cpp11
106+
TabWidth: 8
107+
UseTab: Never

sbndcode/DatabaseInterface/CMakeLists.txt

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
cet_enable_asserts()
22

33
set( MODULE_LIBRARIES
4-
lardataobj::RecoBase
5-
sbnobj::Common_Trigger
6-
larcore::Geometry_Geometry_service
7-
lardata::DetectorClocksService
8-
art_root_io::TFileService_service
4+
art_root_io::TFileService_service
95
art_root_io::tfile_support
10-
lardataobj::RawData
11-
ROOT::Tree
126
)
137
set( LIB_LIBRARIES
14-
art::Framework_Services_Registry
15-
messagefacility::MF_MessageLogger
16-
lardataobj::RecoBase
17-
lardata::Utilities
18-
sbnobj::Common_PMT_Data
8+
art::Framework_Services_Registry
9+
messagefacility::MF_MessageLogger
10+
lardata::Utilities
1911
larevt::CalibrationDBI_IOVData
2012
larevt::CalibrationDBI_Providers
2113
)
2214
set( SERVICE_LIBRARIES
2315
sbndcode_DatabaseInterface
24-
larcore::Geometry_Geometry_service
25-
lardata::DetectorClocksService
2616
)
2717

2818
file(GLOB lib_srcs *.cxx)

sbndcode/DatabaseInterface/IPMTCalibrationDatabaseService.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,17 @@
1313
// LArSoft libraries
1414
#include "larcore/CoreUtils/ServiceProviderWrappers.h"
1515

16-
1716
// -----------------------------------------------------------------------------
1817
namespace sbndDB {
1918
/// The only thing this service does is to return its service provider of type
2019
/// `sbndDB::PMTCalibrationDatabase`.
21-
using IPMTCalibrationDatabaseService
22-
= lar::ServiceProviderInterfaceWrapper<PMTCalibrationDatabase>;
20+
using IPMTCalibrationDatabaseService =
21+
lar::ServiceProviderInterfaceWrapper<PMTCalibrationDatabase>;
2322
}
2423

25-
2624
// -----------------------------------------------------------------------------
2725
DECLARE_ART_SERVICE_INTERFACE(sbndDB::IPMTCalibrationDatabaseService, SHARED)
2826

29-
3027
// -----------------------------------------------------------------------------
3128

32-
3329
#endif // ICARUSCODE_DATABASEINTERFACE_IPMTCALIBRATIONDATABASESERVICE_H

0 commit comments

Comments
 (0)