Skip to content

Commit 331f0fb

Browse files
authored
Merge pull request #1 from agheata/initial
Initial commit
2 parents d1f5efb + fa22e3d commit 331f0fb

File tree

15 files changed

+2717
-2
lines changed

15 files changed

+2717
-2
lines changed

.clang-format

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# SPDX-FileCopyrightText: 2020 CERN
2+
# SPDX-License-Identifier: Apache-2.0
3+
---
4+
Language: Cpp
5+
# BasedOnStyle: LLVM
6+
AccessModifierOffset: -2
7+
AlignAfterOpenBracket: Align
8+
AlignConsecutiveAssignments: true
9+
# This would be nice to have but seems to also (mis)align function parameters
10+
AlignConsecutiveDeclarations: false
11+
AlignEscapedNewlinesLeft: true
12+
AlignOperands: true
13+
AlignTrailingComments: true
14+
AllowAllParametersOfDeclarationOnNextLine: true
15+
AllowShortBlocksOnASingleLine: false
16+
AllowShortCaseLabelsOnASingleLine: false
17+
AllowShortFunctionsOnASingleLine: Inline
18+
AllowShortIfStatementsOnASingleLine: true
19+
AllowShortLoopsOnASingleLine: false
20+
AlwaysBreakAfterReturnType: None
21+
AlwaysBreakBeforeMultilineStrings: false
22+
AlwaysBreakTemplateDeclarations: true
23+
BinPackArguments: true
24+
BinPackParameters: true
25+
BraceWrapping:
26+
AfterClass: false
27+
AfterControlStatement: false
28+
AfterEnum: false
29+
AfterFunction: true
30+
AfterNamespace: false
31+
AfterObjCDeclaration: false
32+
AfterStruct: false
33+
AfterUnion: false
34+
BeforeCatch: false
35+
BeforeElse: false
36+
IndentBraces: false
37+
BreakBeforeBinaryOperators: None
38+
BreakBeforeBraces: Custom
39+
BreakBeforeTernaryOperators: true
40+
BreakConstructorInitializersBeforeComma: false
41+
ColumnLimit: 120
42+
CommentPragmas: '^ IWYU pragma:'
43+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
44+
ConstructorInitializerIndentWidth: 4
45+
ContinuationIndentWidth: 4
46+
Cpp11BracedListStyle: true
47+
DerivePointerAlignment: false
48+
DisableFormat: false
49+
ExperimentalAutoDetectBinPacking: false
50+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
51+
IncludeCategories:
52+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
53+
Priority: 2
54+
- Regex: '^(<|"(gtest|isl|json)/)'
55+
Priority: 3
56+
- Regex: '.*'
57+
Priority: 1
58+
IndentCaseLabels: false
59+
IndentWidth: 2
60+
IndentWrappedFunctionNames: false
61+
InsertNewlineAtEOF: true
62+
KeepEmptyLinesAtTheStartOfBlocks: true
63+
MacroBlockBegin: ''
64+
MacroBlockEnd: ''
65+
MaxEmptyLinesToKeep: 1
66+
NamespaceIndentation: None
67+
ObjCBlockIndentWidth: 2
68+
ObjCSpaceAfterProperty: false
69+
ObjCSpaceBeforeProtocolList: true
70+
PenaltyBreakBeforeFirstCallParameter: 19
71+
PenaltyBreakComment: 300
72+
PenaltyBreakFirstLessLess: 120
73+
PenaltyBreakString: 1000
74+
PenaltyExcessCharacter: 1000000
75+
PenaltyReturnTypeOnItsOwnLine: 60000
76+
PointerAlignment: Right
77+
ReflowComments: true
78+
SortIncludes: false
79+
SpaceAfterCStyleCast: false
80+
SpaceBeforeAssignmentOperators: true
81+
SpaceBeforeParens: ControlStatements
82+
SpaceInEmptyParentheses: false
83+
SpacesBeforeTrailingComments: 1
84+
SpacesInAngles: false
85+
SpacesInContainerLiterals: true
86+
SpacesInCStyleCastParentheses: false
87+
SpacesInParentheses: false
88+
SpacesInSquareBrackets: false
89+
Standard: Cpp11
90+
TabWidth: 2
91+
UseTab: Never
92+
...
93+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SPDX-FileCopyrightText: 2025 CERN for the benefit of the AdePT project
2+
# SPDX-License-Identifier: CC-BY-4.0
3+
4+
name: Clang-Format Check
5+
6+
on: [pull_request, push]
7+
8+
jobs:
9+
clang-format-check:
10+
runs-on: ubuntu-22.04
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
# 1) Add the official LLVM repository for clang-format, the highest available version for ubuntu-22 is clang 19
15+
- name: Add LLVM apt repo (Clang 19)
16+
run: |
17+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
18+
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main"
19+
sudo apt-get update
20+
21+
# 2) Install latest version
22+
- name: Install clang-format
23+
run: |
24+
sudo apt-get install -y clang-format-19
25+
clang-format-19 --version
26+
27+
# 3) Check formatting
28+
- name: Check formatting
29+
run: |
30+
# Specify file extensions to be checked
31+
FILES=$(git ls-files '*.cpp' '*.h' '*.cu' '*.cuh' '*.hh' '*.cc' '*.icc')
32+
33+
# '-n' checks if files need reformatting
34+
# '--Werror' throws an error if formatting is incorrect
35+
clang-format-19 -style=file -n --Werror $FILES

.github/workflows/reuse.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-FileCopyrightText: 2017-2019 Free Software Foundation Europe e.V.
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
name: REUSE Compliance Check
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: REUSE Compliance Check
14+
uses: fsfe/reuse-action@v1

CMakeLists.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-FileCopyrightText: 2025 CERN for the benefit of the AdePT project
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.25)
5+
6+
project(AdePTExamples
7+
VERSION 0.1.0
8+
LANGUAGES CXX CUDA)
9+
10+
# Options for later when you start adding examples
11+
option(ADEPT_EXAMPLES_BUILD_TESTS "Build tests for AdePT examples" ON)
12+
option(ADEPT_EXAMPLES_ENABLE_CUDA "Enable CUDA builds (required for most AdePT examples)" ON)
13+
14+
# Find AdePT (and, transitively, VecGeom / VecCore / G4HepEm)
15+
#
16+
# You typically provide CMAKE_PREFIX_PATH so that CMake can locate AdePT’s config.
17+
# e.g.:
18+
# cmake -S. -Bbuild \
19+
# -DCMAKE_PREFIX_PATH="<path_to_AdePT_installation>;<other_deps>"
20+
#
21+
find_package(AdePT REQUIRED)
22+
23+
message(STATUS "Found AdePT include dirs: ${AdePT_INCLUDE_DIRS}")
24+
message(STATUS "Found AdePT libraries : ${AdePT_LIBRARIES}")
25+
26+
# Later: add actual examples under examples/
27+
add_subdirectory(examples)
28+
29+
# Optionally, you can expose a meta-target for all examples once they exist
30+
# add_custom_target(adept_examples_all DEPENDS <example-targets-go-here>)

CODE_OF_CONDUCT.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2025 CERN for the benefit of the AdePT project
3+
SPDX-License-Identifier: CC-BY-4.0
4+
-->
5+
6+
# Code Of Conduct
7+
8+
The AdePT project observes [CERN's Code of Conduct](https://cern.ch/codeofconduct).
9+
Below is a plain text summary of the [official PDF](https://cds.cern.ch/record/2240689/files/BrochureCodeofConductEN.pdf?)
10+
as of 1. April 2020. Please consult the [PDF](https://cds.cern.ch/record/2240689/files/BrochureCodeofConductEN.pdf?)
11+
for up-to-date information.
12+
13+
## USING THE CODE OF CONDUCT
14+
15+
We encourage a culture of openness where all contributors feel free to engage in a discussion about the Code of Conduct.
16+
17+
If you are unsure about any aspect of the Code of Conduct, there are a number of resources you may wish to access, including your hierarchy, the Human Resources Department, the Ombud Office or the Internal Audit.
18+
19+
In addition, to increase understanding of how the Code of Conduct applies to practical situations, you are encouraged to consult the Code of Conduct online FAQ’s, accessible at cern.ch/codeofconduct. This website will be updated on a regular basis.
20+
21+
## INTRODUCTION BY THE DIRECTOR-GENERAL
22+
23+
What we do in our working lives is important, and the way we do it is equally so. This is particularly true with the diverse community we have at CERN. People from all over the world come here, bringing with them different cultures and different ways of working. This diversity is part of our strength, and it’s something that we need to nurture constantly. That’s why CERN has developed a Code of Conduct that is built on a set of core CERN values, defined following broad consultation by the HR Department across the Organization in order to determine the values that underline the spirit of CERN.
24+
25+
Those values are integrity, commitment, professionalism, creativity and diversity. Taken together, they provide the basis for respect: respect for others, respect for the Organization and respect for its mission.
26+
27+
The Code of Conduct is the blueprint for how we work together. It was launched in 2010, accompanied by an Ombud Office to provide an informal route to the resolution of potential conflicts, and to serve as an interpreter of the Code of Conduct if and when necessary. I think it is fair to say that since then CERN’s values have become a natural and inherent part of the Organisation’s working landscape.
28+
29+
There have been occasions where people have had to be reminded of the Code’s stipulations, but these have been rare. Rather than a tool for the Organization to use as a stick, the Code is a tool for all of us to use as a guide.
30+
31+
Our Code of Conduct sets out in black and white the basic standards and rules of behaviour that we can expect to find in the workplace, and it provides guidance on how our actions may influence and support the good reputation of CERN. It is there to ensure that we pursue our mission of research, innovation, training and collaboration while respecting the highest ethical standards of behaviour.
32+
33+
It is not an exhaustive list of dos and don’ts. Rather, it is a practical guide, assisting us in understanding the consequences of how we treat others, how can we expect to be treated in the workplace, and how we should behave as ambassadors for CERN and for particle physics. It serves to help us maintain and develop a workplace marked by mutual respect.
34+
35+
Nurturing respect generates self-respect, and a respectful workplace is one where everyone can give their best in a supportive, collaborative, and pleasant environment.
36+
37+
**Fabiola Gianotti**, Director-General
38+
39+
## INTEGRITY
40+
BEHAVING ETHICALLY, WITH INTELLECTUAL HONESTY AND BEING ACCOUNTABLE FOR ONE’S OWN ACTIONS.
41+
42+
A high standard of integrity in the performance of our work and in our relationships with others promotes a culture of trust and responsibility.
43+
44+
### AS CERN CONTRIBUTORS, WE:
45+
46+
- Exercise our authority responsibly. In particular, we abstain from using our authority or position to obtain personal benefits or favours.
47+
- Demonstrate fairness and impartiality.
48+
- Ensure that we credit others for their contribution.
49+
- Avoid conflict of interest or situations that could be perceived as such.
50+
- Refrain from any act or omission designed to deceive others, or to achieve a gain resulting in a loss of funds or reputation for CERN.
51+
- Safeguard confidential information, documents or data, and ensure that such material in our possession is properly protected.
52+
- Respect the privacy of others and protect personal information given to us in confidence.
53+
54+
## COMMITMENT
55+
DEMONSTRATING A HIGH LEVEL OF MOTIVATION AND DEDICATION TO THE ORGANIZATION
56+
57+
Our collective commitment to CERN is essential both to the achievement of its mission and the protection of its reputation.
58+
59+
### AS CERN CONTRIBUTORS, WE:
60+
- Promote the CERN mission and act in accordance with CERN values.
61+
- Appreciate that our behaviour, both on site and outside CERN, may reflect upon CERN.
62+
- Protect the reputation of CERN and our colleagues in communications with internal and external parties.
63+
- Familiarize ourselves with all applicable rules and regulations.
64+
- Promote and maintain a safe and healthy environment, following relevant safety rules.
65+
- Educate ourselves on the responsibilities which accompany the privileges and immunities which may be granted to us for the benefit of CERN.
66+
- Demonstrate flexibility and adapt to CERN’s evolving needs.
67+
68+
## PROFESSIONALISM
69+
PRODUCING A HIGH LEVEL OF RESULTS WITHIN RESOURCE AND TIME CONSTRAINTS AND FOSTERING MUTUAL UNDERSTANDING
70+
71+
Our ability to deliver and to create a positive work environment permits us to achieve high professional standards, individually and collectively.
72+
73+
### AS CERN CONTRIBUTORS, WE:
74+
75+
- Define clear and realistic objectives and deliverables for our activities, and communicate them to our colleagues.
76+
- Ensure that the human, material and financial resources entrusted to us are used optimally for the benefit of CERN.
77+
- Invest in CERN’s future by taking long-term effectiveness into account when managing short and medium-term activities.
78+
- Maintain a professional environment characterized by good working relations and an atmosphere of tolerance and mutual respect.
79+
- Provide advice and guidance to colleagues, where appropriate, and exercise adequate supervision and control over tasks that we delegate.
80+
- Address conflict proactively and impartially.
81+
- Abstain from and actively discourage all forms of harassment as well as verbal, non-verbal, written or physical abuse.
82+
83+
## CREATIVITY
84+
BEING AT THE FOREFRONT OF ONE’S PROFESSIONAL FIELD, FURTHERING INNOVATION AND ORGANIZATIONAL DEVELOPMENT
85+
86+
CERN encourages continuous learning and development and values innovation as well as a proactive approach to acquiring and sharing information.
87+
88+
### AS CERN CONTRIBUTORS, WE:
89+
- Follow developments within our domain.
90+
- Use our professional experience in a constructive manner.
91+
- Contribute to the evolution of CERN by committing to sharing our knowledge.
92+
- Share with internal parties any information that could benefit them in their work.
93+
- Are open to new ideas and approaches.
94+
- Adopt alternative outlooks in order to generate new thoughts and concepts.
95+
- Conduct our work in a structured way to enhance knowledge transfer and continuity.
96+
97+
## DIVERSITY
98+
APPRECIATING DIFFERENCES, FOSTERING EQUALITY, AND PROMOTING COLLABORATION
99+
100+
CERN’s excellence derives from an environment in which the knowledge and perspectives of a diverse workforce are valued and dialogue is encouraged at all levels.
101+
102+
### AS CERN CONTRIBUTORS, WE:
103+
- Respect and value differences.
104+
- Promote inclusiveness in the workplace in terms of both personal characteristics and professional abilities.
105+
- Demonstrate team spirit and invest in team building.
106+
- Treat others with tact, courtesy and respect.
107+
- Abstain from and actively discourage discrimination in all forms.
108+
- Avoid offending others by exercising restraint, and are aware that statements or actions not intended to be offensive to another person may be perceived as such.
109+
- Refrain from unpleasant or disparaging remarks or actions, in particular on the basis of sex, age, religion, beliefs, nationality, culture, ethnicity, race, sexual orientation, status at CERN, disability, or family situation.
110+

0 commit comments

Comments
 (0)