diff --git a/.gitignore b/.gitignore index 9656bc848ff52f63938067173e1372348527c92a..13cf148097e976bcd75db46f2ada28fcbd2cd064 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ **/*~ +**/*.bak +**/*log build/ Framework/Particles/GeneratedParticleProperties.inc +flymd.html +flymd.md diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000000000000000000000000000000000000..7036fa76902c4d4368664f0b745b5ea621a7e62f --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Maximilian Reininghaus, maximilian.reininghaus@kit.edu +Ralf Ulrich, ralf.ulrich@kit.edu diff --git a/COLLABORATION_AGREEMENT.md b/COLLABORATION_AGREEMENT.md new file mode 100644 index 0000000000000000000000000000000000000000..c00bec0f76a902d205a291c14122ae6ffc09ea6f --- /dev/null +++ b/COLLABORATION_AGREEMENT.md @@ -0,0 +1,103 @@ +# Collaboration agreement + +The CORSIKA project very much welcomes all collaboration and +contributions. The aim of the CORSIKA project is to create a +scientific software framework as a fundamental tool for research. The +collaboration agreement and the licensing model are based on the +guidelines layed out by HSF +[[1]](https://hepsoftwarefoundation.org/activities/licensing.html) or +CERN +[[2]](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=2ahUKEwiLqKG00dXdAhUOZFAKHdIwAh4QFjAAegQIARAC&url=https%3A%2F%2Findico.cern.ch%2Fcategory%2F4251%2Fattachments%2F101%2F505%2FOSL-2012-01-Open_Source_Licences_at_CERN-Short_version.pdf&usg=AOvVaw1n4S0PQCSeE6wbdfdhKDqF), +[[3]](http://legal.web.cern.ch/licensing/software), and follow the +examples of other big scientific software projects. + +The CORSIKA project consists of the contributions from the scientific +community and individuals in a best effort to deliver the best +possible computing performance and physics output. +The MCnet guidelines developed by [www.montecarlonet.org](www.montecarlonet.org) +are copied in [MCNET_GUIDELINES](MCNET_GUIDELINES) -- they provide a very good +additional scope that contributors should read and follow. + +All possible +liability and licensing question are only handled by the adopted +software license. + +## The software license of the CORSIKA project +The license adopted for the CORSIKA project is the explicit copyleft +license GPLv3, as copied in full in the file +[LICENSE](LICENSE). Each source file of the CORSIKA project contains a +short statement of the copyright and this license. Each binary or +source code release of CORSIKA must contain the file LICENSE. The +code, documentation and content in the folder [ThirdParty](ThirdParty) +is not integral part of the CORSIKA project and can be based on or +include other licenses, which must be compatible with GPLv3. Check the +content of this folder for details. It depends on the configuration of +the build system to what extend this code is used to build CORSIKA. + +## Who is the "copyright holder" +For legal reasons and the ability to maintain the CORSIKA project +effectively over a very long lifespan of several decades, all +contributors are required to transfer their copyright to the CORSIKA +Project. Of course you will be duly credited and your name will appear +on the contributors page and in the [AUTHORS](AUTHORS) file shipped +with every binary and source distribution. The copyright transfer is +necessary to be able to effectively defend the project in case of +litigation. The copyright holder may change, if decided by the CORSIKA +Project. The current copyright holder is the CORSIKA Project +corsika-project@lists.kit.edu, with the current chair person Ralf Ulrich (KIT) ralf.ulrich@kit.edu. + +## Definition of a "contributor" +Contributor is a person of whom at least one merge request was +accepted for the master branch of the CORSIKA project at +[https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika](https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika). +All contributors will be co-listed and credited as (software) authors +of the CORSIKA project, as well as listed indefinitely in the +[AUTHORS](AUTHORS) file. Contributors should add their name and +contact data to the [AUTHORS](AUTHORS) file, as part of one of their +merge requests. This file is always distributed together with all +source and binary releases. If you contribute to any non-master +branch, you can add your name to the [AUTHORS](AUTHORS) file of this +particular branch, but all official releases are normally performed +via the master branch. + +If you want to contribute, you need to read +[GUIDELINES](GUIDELINES.md) and comply with these rules, or help to +improve them. + + +## Definition and working mode of the CORSIKA Project panel +The CORSIKA Project panel makes all decisions for the CORSIKA +Project. It can also change the +[COLLABORATION\_AGREEMENT](COLLABORATION\_AGREEMENT.md), the +[GUIDELINES](GUIDELINES.md) or any other structure or document relevant for the CORSIKA Project. + +The CORSIKA Project *panel* consists (October 2018) of + + * Ralph Engel (KIT) + * Dieter Heck (KIT) + * Tanguy Pierog (KIT) + * Maximilian Reininghaus (KIT) + * Markus Roth (KIT) + * Ralf Ulrich (KIT) + * Michael Unger (KIT) + * Darko Veberic (KIT) + +and can be contacted via corsika-project@lists.kit.edu. The chair +person of the CORSIKA Project is Ralf Ulrich (KIT). Members of the +CORSIKA Project *panel* are *Maintainer* of the CORSIKA Project in +gitlab at +[https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika](https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika), +and have special responsibilities for this reason. + +## Changing to a different license, for parts, or the complete project + +The CORSIKA Project panel can change the license for parts or the entire project. + +## Planning and performing releases + +The CORSIKA Project panel decides on releases of the software, and about the content of it. + +## Changes to the Collaboration Agreement + +The CORSIKA Project panel decides on changes to the Collaboration +agreement. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..50d23b305d872735ce7a47d237c630b27cd2c443 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,216 @@ +# Contributing + +The CORSIKA project is committed to fostering and preserving a +diverse, welcoming community; all participants are expected to +respect that. + +- [Getting Started](#getting-started) + - [Very first steps](#very-first-steps) + - [Opening issues](#opening-issues) + - [Participating in discussions](#participating-in-discussions) + - [Improving and reviewing docs](#improving-and-reviewing-docs) + - [Reviewing and testing changes](#reviewing-and-testing-changes) +- [Proposing and making changes](#proposing-and-making-changes) + - [Finding something to work on](#finding-something-to-work-on) + - [Before you start](#before-you-start-work) + - [Before you open your PR](#before-you-open-your-pr) + - [Review process](#review-process) +- [Getting more involved](#getting-more-involved) + +## Getting started + +Not sure where to start? If you haven't already, take a look at the +[docs](http://xi-editor.github.io/xi-editor/docs.html) to get a better +sense of the project. Read through some issues and some open PRs, to +get a sense for the habits of existing contributors. Drop by the #xi +channel on [irc.mozilla.org](https://mozilla.logbot.info/xi) to follow +ongoing discussions or ask questions. Clone the repos you're +interested in, and make sure you can build and run the tests. If you +can't, open an issue, and someone will try to help. Once you're up and +running, there are a a number of ways to participate: + +### Opening issues + +If you have a question or a feature request or think you've found a bug, +please open an issue. When opening an issue, include any details that +might be relevant: for a bug this might be the steps required to +reproduce; for a feature request it might be a detailed explanation of +the behaviour you are imagining, an outline of how it would be used, +and/or examples of how this feature is used in other editors. + +#### Before you open an issue + +Before opening an issue, **try to identify where the issue belongs**. +Is it a problem with the frontend or with core? The frontend is +responsible for drawing windows and UI, and handling events; the core +is responsible for most everything else. Issues with the frontend +should be opened in that frontend's repository, and issues with +core should be opened in the +[xi-editor](https://github.com/xi-editor/xi-editor/issues) repo. + +Finally, before opening an issue, **use github's search bar** to make +sure there isn't an existing (open or closed) issue for your particular +problem. + +### Participating in discussions + +An _explicit_ goal of xi-editor is to be an educational resource. +Everyone is encouraged to participate in discussion issues (issues with +the 'discussion' or 'planning' labels), and we expect people +participating in discussions to be respectful of the fact that we all +have different backgrounds and levels of experience. Similarly, if +something is confusing, feel free to ask for clarification! If you're +confused, other people probably are as well. + +### Improving and reviewing docs + +If the docs are unclear or incomplete, please open an issue or a PR to +improve them. This is an especially valuable form of feedback from new +contributors, who are seeing things for the first time, and will be best +positioned to identify areas that need improvement. + +### Reviewing and testing changes + +One of the best ways to get more familiar with the project is by reading +other people's pull requests. If there's something in a commit that you +don't understand, this is a great time to ask for clarification. Testing +changes is also very helpful, especially for bug fixes or feature +additions. Check out a change and try it out; does it work? Can you find +edge cases? Manual testing is very valuable. For more information on +reviews, see [code review process](#review-process). + + +## Proposing and making changes + +### Finding something to work on + +If you're looking for something to work on, a good first step is to browse +the [issues](https://github.com/xi-editor/xi-editor/issues). Specifically, +issues that are labeled +[help wanted](https://github.com/xi-editor/xi-editor/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) and/or +[easy](https://github.com/xi-editor/xi-editor/issues?q=is%3Aissue+is%3Aopen+label%3Aeasy) +are good places to start. If you can't find anything there, feel free to ask +on IRC, or play around with the editor and try to identify something that +_you_ think is missing. + +### Before you start work + +Before starting to work on an issue, consider the following: + +- _Is it a bugfix or small change?_ If you notice a small bug somewhere, + and you believe you have a fix, feel free to open a pull request directly. + +- _Is it a feature?_ If you have an idea for a new editor feature that is + along the lines of something that already exists (for instance, adding a + new command to reverse the letters in a selected region) _consider_ + opening a short issue beforehand, describing the feature you have in mind. + Other contributors might be able to identify possible issues or + refinements. This isn't _necessary_, but it might end up saving you work, + and it means you will get to close an issue when your PR gets merged, + which feels good. + +- _Is it a major feature, affecting for instance the behaviour or appearance + of a frontend, or the API or architecture of core?_ Before working on a + large change, please open a discussion/proposal issue. This should describe + the problem you're trying to solve, and the approach you're considering; + think of this as a 'lite' version of Rust's + [RFC](https://github.com/rust-lang/rfcs) process. + + +### Before you open your PR + +Before pressing the 'Create pull request' button, + +- _Run the tests_. It's easy to accidentally break something with even a small + change, so always run the tests locally before submitting (or updating) a PR. + You can run all checks locally with the `xi-editor/rust/run_all_checks`. script. + +- _Add a message for your reviewers_. When submitting a PR, take advantage + of the opportunity to include a message. Your goal here should be to help + your reviewers. Are there any parts of your change that you're uncertain + about? Are there any non-obvious explanations for some of your decisions? + If your change changes some behaviour, how might it be tested? + +- ***Be your own first reviewer***. On the page where you enter your message, + you have a final opportunity to see your PR _as it will be seen by your + reviewers_. This is a great opportunity to give it one last review, yourself. + Imagine that it is someone else's work, that you're reviewing: what comments + would you have? If you spot a typo or a problem, you can push an update in + place, without losing your PR message or other state. + +- _Add yourself to the AUTHORS file_. If this is your first substantive pull +request in this repo, feel free to add yourself to the AUTHORS file. + +### Review process + +Every non-trivial pull request goes through review. Everyone is welcome to +participate in review; review is an excellent time to ask questions about +code or design decisions that you don't understand. + +All pull requests must be approved by an appropriate reviewer before they +are merged. For bug fixes and smaller changes, this can be anyone who has +commit rights to the repo in question; larger changes (changes which add a +feature, or significantly change behaviour or API) should also be approved by +a maintainer. + +Before being merged, a change must pass +[CI](https://en.wikipedia.org/wiki/Continuous_integration). + +#### Responsibilites of the approving reviewer + +If you approve a change, it is expected that you: +- understand what the change is trying to do, and how it is doing it +- have manually built and tested the change, to verify it works as intended +- believe the change generally matches the idioms, formatting rules, +and overall coding style of the relevant repo +- are ready and able to help resolve any problems that may be introduced by +merging the change. + +If a PR is made by a contributor who has write access to the repo in question, +they are responsible for merging/rebasing the PR after it has been approved; +otherwise it will be merged by the reviewer. + +If a patch adds or modifies behaviour that is observable in the client, +the reviewer should build the patch and verify that it works as expected. + +### After submitting your change + +You've done all this, and submitted your patch. What now? + +_Read other PRs_. If you're waiting for a review, it's likely that other +pull requests are waiting for review as well. This can be a good time +to go and take a look at what other work is happening in the project; +and if another PR has review comments, it might provide a clue to the +type of feedback you might expect. + +_Patience_. As a general goal, we try to respond to all pull requests +within a few days, and to do preliminary review within a week, but we +don't always succeed. If you've opened a PR and haven't heard from +anyone, feel free to comment on it, or stop by the IRC channel, to ask +if anyone has had a chance to take a look. It's very possible that it's +been lost in the shuffle. + +## Getting more involved + +If you are participating in the xi-editor project, you may receive +additional privileges: + +_Organization membership_: If you are regularly making contributions +to a xi project, in any of the forms outlined above, we will be happy to +add you to the xi-editor organization, which will give you the ability +to do things like add labels to issues and view active projects. + +_Contributor_: If you are regularly making substantive contributions +to a specific xi project, we will be happy to add you as a contributor +to the repo in question. Contributors are encouraged to review and +approve changes, respond to issues, and generally help to maintain +the project in question. + +_Maintainer_: If you are making substantive contributions to multiple +repos over an extended period, you are regularly reviewing the work of +other contributors, and you are actively participating in planning and +discussion, you may, (at the discretion of @raphlinus) be invited to +take on the role of _maintainer_. Maintainers are responsible for +coordinating the general direction of the project, resolving +architectural questions, and doing the day to day work of moving the +project forward. diff --git a/Documentation/Examples/geometry_example.cc b/Documentation/Examples/geometry_example.cc index 6a05974fd6d5e0224d809072b99979e29578f7d2..dac31edc4ad173e6860a7cbabb901366cedb27d1 100644 --- a/Documentation/Examples/geometry_example.cc +++ b/Documentation/Examples/geometry_example.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/geometry/CoordinateSystem.h> #include <corsika/geometry/Point.h> #include <corsika/geometry/Sphere.h> diff --git a/Documentation/Examples/helix_example.cc b/Documentation/Examples/helix_example.cc index 9d6cdb23c5de0e2f4dd879cc63179a0ba3dd6ab7..aea320270191ebcfb14e37a41fbdbbde2014c209 100644 --- a/Documentation/Examples/helix_example.cc +++ b/Documentation/Examples/helix_example.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/geometry/CoordinateSystem.h> #include <corsika/geometry/Helix.h> #include <corsika/geometry/Point.h> diff --git a/Documentation/Examples/logger_example.cc b/Documentation/Examples/logger_example.cc index 94fcb588a2b4ebe225dd7750a17d5beb66abda38..1bd72012ec936e33d9caf791f240d1f7b24dde0b 100644 --- a/Documentation/Examples/logger_example.cc +++ b/Documentation/Examples/logger_example.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/logging/Logger.h> #include <boost/format.hpp> #include <fstream> diff --git a/Documentation/Examples/stack_example.cc b/Documentation/Examples/stack_example.cc index 691cdb38440e916ee97f637705ea2bbfe3db89ba..f0a04f79be09dff2c58a74bc4822c443c12061f0 100644 --- a/Documentation/Examples/stack_example.cc +++ b/Documentation/Examples/stack_example.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/particles/ParticleProperties.h> #include <corsika/stack/super_stupid/SuperStupidStack.h> #include <iomanip> diff --git a/Documentation/Examples/staticsequence_example.cc b/Documentation/Examples/staticsequence_example.cc index 92813f2e368d6db9c2016446ca069e8d890b5034..8049983f767a5ea28544f83cda9bffc84a35d95a 100644 --- a/Documentation/Examples/staticsequence_example.cc +++ b/Documentation/Examples/staticsequence_example.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <array> #include <iomanip> #include <iostream> diff --git a/Environment/FlatAtmosphere/FlatAtmosphere.h b/Environment/FlatAtmosphere/FlatAtmosphere.h index 8b137891791fe96927ad78e64b0aad7bded08bdc..90582b3dfb00d2d85850b81455a2a4c0c061413b 100644 --- a/Environment/FlatAtmosphere/FlatAtmosphere.h +++ b/Environment/FlatAtmosphere/FlatAtmosphere.h @@ -1 +1,10 @@ +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ diff --git a/Framework/Cascade/Cascade.cc b/Framework/Cascade/Cascade.cc index 1bd6b5b2b1c2681edb48e77f51028ad54d10bf08..14a4699e479dc83361ef084d8734f632d4617edc 100644 --- a/Framework/Cascade/Cascade.cc +++ b/Framework/Cascade/Cascade.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/cascade/Cascade.h> using namespace corsika::cascade; diff --git a/Framework/Cascade/Cascade.h b/Framework/Cascade/Cascade.h index 25935d3a639cd0f6fc8974174b55391b4dd08710..505949fb9fc46da67efaa2b996f9b1888f0cbb1b 100644 --- a/Framework/Cascade/Cascade.h +++ b/Framework/Cascade/Cascade.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_Cascade_h_ #define _include_Cascade_h_ diff --git a/Framework/Cascade/Step.cc b/Framework/Cascade/Step.cc index 60349c748f8438857a5dc4ffda338063a180634f..503bc80b1644ce66d60e9e80e9627c8d9c3daefa 100644 --- a/Framework/Cascade/Step.cc +++ b/Framework/Cascade/Step.cc @@ -1,4 +1,13 @@ +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ namespace cascade; diff --git a/Framework/Cascade/testCascade.cc b/Framework/Cascade/testCascade.cc index 9d30afcefa12ac8b9a6f5b2798045cd6b1a61ccc..b16dfeed43a0eb20c0747c3be36f72a94b663252 100644 --- a/Framework/Cascade/testCascade.cc +++ b/Framework/Cascade/testCascade.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/cascade/Cascade.h> #include <corsika/geometry/LineTrajectory.h> #include <corsika/process/ProcessSequence.h> diff --git a/Framework/Geometry/BaseTrajectory.h b/Framework/Geometry/BaseTrajectory.h index e4eafb853117b47e4778e14b17c4ba54f46ad7b4..b39335c8c482bc18637fd28a95c90f2123fbaa40 100644 --- a/Framework/Geometry/BaseTrajectory.h +++ b/Framework/Geometry/BaseTrajectory.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_BASETRAJECTORY_H #define _include_BASETRAJECTORY_H diff --git a/Framework/Geometry/BaseVector.h b/Framework/Geometry/BaseVector.h index f2079e91cc953b34499c2146da68c4cf88dfed8d..2cd1c3e490be90485164a060cefc708dbd64806e 100644 --- a/Framework/Geometry/BaseVector.h +++ b/Framework/Geometry/BaseVector.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_BASEVECTOR_H_ #define _include_BASEVECTOR_H_ diff --git a/Framework/Geometry/CoordinateSystem.cc b/Framework/Geometry/CoordinateSystem.cc index b74808cdbaa115ad5b1e1b04dd7d9379b3f5d74c..9cf3a1a64125d4fe53236529bd821c6b2c5e57c5 100644 --- a/Framework/Geometry/CoordinateSystem.cc +++ b/Framework/Geometry/CoordinateSystem.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/geometry/CoordinateSystem.h> using namespace corsika::geometry; diff --git a/Framework/Geometry/CoordinateSystem.h b/Framework/Geometry/CoordinateSystem.h index d30e9b4389ad772de241446bf1eb1c22b5e301e9..a6a0912904b6704cc7ad3fcbd4100ff64946976e 100644 --- a/Framework/Geometry/CoordinateSystem.h +++ b/Framework/Geometry/CoordinateSystem.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_COORDINATESYSTEM_H_ #define _include_COORDINATESYSTEM_H_ diff --git a/Framework/Geometry/Helix.h b/Framework/Geometry/Helix.h index bd62d1919b5500ab22f2bad1eb2968a93dc90c0f..018299bcf63fa83f6022ffbc56e733a618a5bd1f 100644 --- a/Framework/Geometry/Helix.h +++ b/Framework/Geometry/Helix.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_HELIX_H_ #define _include_HELIX_H_ diff --git a/Framework/Geometry/LineTrajectory.h b/Framework/Geometry/LineTrajectory.h index ee65b5e54e9ec3743b12b6aa8a14a6965e6d4eeb..f13f8d822947e2b90fa9a7ba7f69d23f43b0c1f8 100644 --- a/Framework/Geometry/LineTrajectory.h +++ b/Framework/Geometry/LineTrajectory.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_LINETRAJECTORY_H #define _include_LINETRAJECTORY_H diff --git a/Framework/Geometry/Point.h b/Framework/Geometry/Point.h index debbf91854abdb1852052d487981400d4966da8a..26de8510662aefc6961c536541483d28c136c3ce 100644 --- a/Framework/Geometry/Point.h +++ b/Framework/Geometry/Point.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_POINT_H_ #define _include_POINT_H_ diff --git a/Framework/Geometry/QuantityVector.h b/Framework/Geometry/QuantityVector.h index f4b6bbe0eded87cd0cd8c3a406190347c8f37b10..c128039df660cb00aca4908d1b24dc9568258c02 100644 --- a/Framework/Geometry/QuantityVector.h +++ b/Framework/Geometry/QuantityVector.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_QUANTITYVECTOR_H_ #define _include_QUANTITYVECTOR_H_ diff --git a/Framework/Geometry/Sphere.h b/Framework/Geometry/Sphere.h index 28b4e7dc63d5ded1ecd6d047df442af4557e4f20..436c8e4029472ed17e211b2a02c0c3e486ab33a2 100644 --- a/Framework/Geometry/Sphere.h +++ b/Framework/Geometry/Sphere.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_SPHERE_H_ #define _include_SPHERE_H_ diff --git a/Framework/Geometry/Trajectory.h b/Framework/Geometry/Trajectory.h index 0ce2b536659d1662e08aff8a4ea233ade3f430f1..237f37931e7ddc5ec6f23713c4fdcbc30123668a 100644 --- a/Framework/Geometry/Trajectory.h +++ b/Framework/Geometry/Trajectory.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_TRAJECTORY_H #define _include_TRAJECTORY_H diff --git a/Framework/Geometry/Vector.h b/Framework/Geometry/Vector.h index fcebc10f73a12ad37494a59d32614c88e9697a31..cb4e4900544705c10a37ff16a0fd4ba00b0f9b29 100644 --- a/Framework/Geometry/Vector.h +++ b/Framework/Geometry/Vector.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_VECTOR_H_ #define _include_VECTOR_H_ diff --git a/Framework/Geometry/testGeometry.cc b/Framework/Geometry/testGeometry.cc index 182f9c07d13e8351a8341be3490f1c64fca81707..7702fbda674b856f3423cfa1b106633a60784f85 100644 --- a/Framework/Geometry/testGeometry.cc +++ b/Framework/Geometry/testGeometry.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one // cpp file #include <catch2/catch.hpp> diff --git a/Framework/Logging/BufferedSink.h b/Framework/Logging/BufferedSink.h index 33cb1afa7b7ae0d65e0b8c173248294c008d8b26..2c0f7be9b721c7910724a25aca4d8488d54e2422 100644 --- a/Framework/Logging/BufferedSink.h +++ b/Framework/Logging/BufferedSink.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_BufferedSink_h_ #define _include_BufferedSink_h_ diff --git a/Framework/Logging/Logger.h b/Framework/Logging/Logger.h index fca23d70caa28a899af91f025852df0089c10b81..2639df8af6a573170c096d4f44b72e93bc593697 100644 --- a/Framework/Logging/Logger.h +++ b/Framework/Logging/Logger.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + /** @File Logger.h diff --git a/Framework/Logging/MessageOff.h b/Framework/Logging/MessageOff.h index d22d131eb5ddaf012a61341033ce8ee10e3e8e5d..4bdf10d5af622b5fdc1b35316fa258be1322573e 100644 --- a/Framework/Logging/MessageOff.h +++ b/Framework/Logging/MessageOff.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_MessageOff_h_ #define _include_MessageOff_h_ diff --git a/Framework/Logging/MessageOn.h b/Framework/Logging/MessageOn.h index a25928674a73ccbe1837190043a2688be4118ea1..c7756150f03f521ee7b54f0385270face22edb6e 100644 --- a/Framework/Logging/MessageOn.h +++ b/Framework/Logging/MessageOn.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_MessageOn_h_ #define _include_MessageOn_h_ diff --git a/Framework/Logging/NoSink.h b/Framework/Logging/NoSink.h index d0ba53649f2f4654e9b19fd75c1e84445eed84f6..6e2fe48ebf66b072031eab47c6a2370b38cd2a52 100644 --- a/Framework/Logging/NoSink.h +++ b/Framework/Logging/NoSink.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_NoSink_h_ #define _include_NoSink_h_ diff --git a/Framework/Logging/Sink.h b/Framework/Logging/Sink.h index f51b70294ebdf4ac63362448e5b851d7a52b62b3..74a42185e6be225da119f0812d653756ef30da4f 100644 --- a/Framework/Logging/Sink.h +++ b/Framework/Logging/Sink.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_Sink_h_ #define _include_Sink_h_ diff --git a/Framework/Logging/testLogging.cc b/Framework/Logging/testLogging.cc index d28c46de441f66801367ef39f1f103ac3997b057..12a77b3cab504672438e0e6f7d4fe2383d35b8d6 100644 --- a/Framework/Logging/testLogging.cc +++ b/Framework/Logging/testLogging.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/logging/Logger.h> #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one diff --git a/Framework/Particles/ParticleProperties.h b/Framework/Particles/ParticleProperties.h index e28648127830ab150556ec781ee057e4b6c39976..8adb7f307b068fd294681b1647bb0d871405f90d 100644 --- a/Framework/Particles/ParticleProperties.h +++ b/Framework/Particles/ParticleProperties.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + /** @file Particles.h diff --git a/Framework/Particles/testParticles.cc b/Framework/Particles/testParticles.cc index 098780caf1d5459170bb7f816ea569235707a252..443d167c43ea49eb5a74972a3a780f3b4d280565 100644 --- a/Framework/Particles/testParticles.cc +++ b/Framework/Particles/testParticles.cc @@ -1,4 +1,14 @@ +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/particles/ParticleProperties.h> #include <corsika/units/PhysicalUnits.h> diff --git a/Framework/ProcessSequence/ProcessReturn.h b/Framework/ProcessSequence/ProcessReturn.h index 9d43cdf07bcd7bdbc8fb604387b7c46d444e4460..82cc816c5ae9bd9d731f00c33f9bf0321a02d650 100644 --- a/Framework/ProcessSequence/ProcessReturn.h +++ b/Framework/ProcessSequence/ProcessReturn.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_ProcessReturn_h_ #define _include_ProcessReturn_h_ diff --git a/Framework/ProcessSequence/ProcessSequence.h b/Framework/ProcessSequence/ProcessSequence.h index bfb2c99320c4cf2e588502b1b3b8b2686e069d8a..4b2fc83c28ad0e1ec978c24814e5a4285a00aa40 100644 --- a/Framework/ProcessSequence/ProcessSequence.h +++ b/Framework/ProcessSequence/ProcessSequence.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_ProcessSequence_h_ #define _include_ProcessSequence_h_ diff --git a/Framework/ProcessSequence/testProcessSequence.cc b/Framework/ProcessSequence/testProcessSequence.cc index a83d23b3cb290ba715e726ce952f0ea85149095a..b144230eb5fa81a11caf0c98dd28d9ca8b043a05 100644 --- a/Framework/ProcessSequence/testProcessSequence.cc +++ b/Framework/ProcessSequence/testProcessSequence.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one // cpp file #include <catch2/catch.hpp> diff --git a/Framework/Random/RNGManager.cc b/Framework/Random/RNGManager.cc index e28d9d57b5b02fbd698bbba5c3673573ae5cd8a4..3245e8bfd4b5557fcf0cda06f9a09cf15a4ca90e 100644 --- a/Framework/Random/RNGManager.cc +++ b/Framework/Random/RNGManager.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/random/RNGManager.h> void corsika::random::RNGManager::RegisterRandomStream(std::string const& pStreamName) { diff --git a/Framework/Random/RNGManager.h b/Framework/Random/RNGManager.h index 9c38400e3a30aa2dedabcba43dfabb82a1c789c9..5e05b750c0d1a5cba02bfc0483cb72ee50bc8084 100644 --- a/Framework/Random/RNGManager.h +++ b/Framework/Random/RNGManager.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_RNGManager_h_ #define _include_RNGManager_h_ diff --git a/Framework/Random/testRandom.cc b/Framework/Random/testRandom.cc index 222a25549c6b3a8a01ba3f7298ec4024e2211c67..6e4cfa11d0034c85567218b73c486b1e32f497c2 100644 --- a/Framework/Random/testRandom.cc +++ b/Framework/Random/testRandom.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one // cpp file #include <catch2/catch.hpp> diff --git a/Framework/StackInterface/ParticleBase.h b/Framework/StackInterface/ParticleBase.h index b907129295a006a88092c6b5d0caa346b9706de0..1d1d51efaed25155e88976ac364f2605e7498a33 100644 --- a/Framework/StackInterface/ParticleBase.h +++ b/Framework/StackInterface/ParticleBase.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_particleBase_h_ #define _include_particleBase_h_ diff --git a/Framework/StackInterface/Stack.h b/Framework/StackInterface/Stack.h index d493ef5eff59912afd195f9e75f6c5f21744cd2f..b4660144df60754df6ff8e78e45d0920f5a58cf8 100644 --- a/Framework/StackInterface/Stack.h +++ b/Framework/StackInterface/Stack.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_Stack_h__ #define _include_Stack_h__ diff --git a/Framework/StackInterface/StackIterator.h b/Framework/StackInterface/StackIterator.h index bcbb8340d6aaa02b317dbeb123a1c99bcc650a31..9e8d07e68bedc5080a0a750b3e73972664bf712c 100644 --- a/Framework/StackInterface/StackIterator.h +++ b/Framework/StackInterface/StackIterator.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_StackIterator_h__ #define _include_StackIterator_h__ diff --git a/Framework/StackInterface/testStackInterface.cc b/Framework/StackInterface/testStackInterface.cc index e00ecc18333c18baee2b7372d473726e5460419c..078a09407c713287c36c9a48d20e5e842a32bc09 100644 --- a/Framework/StackInterface/testStackInterface.cc +++ b/Framework/StackInterface/testStackInterface.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/stack/Stack.h> #include <iomanip> diff --git a/Framework/Units/testUnits.cc b/Framework/Units/testUnits.cc index 7fc0b00a6e3959d1cce05e31ed3239a7a82105df..2c6f4c14fdc64673270a0570955af88a70592384 100644 --- a/Framework/Units/testUnits.cc +++ b/Framework/Units/testUnits.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one // cpp file #include <catch2/catch.hpp> diff --git a/GUIDELINES.md b/GUIDELINES.md new file mode 100644 index 0000000000000000000000000000000000000000..7a7d567786f4cbf9e2ba768b0bd4f5aa8c8f7535 --- /dev/null +++ b/GUIDELINES.md @@ -0,0 +1,109 @@ +# Guidelines for code development, structure, formating etc. + +The CORSIKA Project very much welcomes contributions. Here we outlined +how you can find the right place to contribute, and how to do that. +Connect to http://gitlab.ikp.kit.edu and corsika-devel@lists.kit.edu +or corsika-project@lists.kit.edu to get in touch with the project. +The CORSIKA Project decides on the [GUIDELINES](GUIDELINES.md), and can +change them. + +## Code formatting + +We rely on `clang-format` for code formatting. This has the tremendous +advantage that definitely all code follows the same formatting rules, +and nobody at any point needs to invest time and effort into code +formatting. We provide a script `do-clang-format.sh`, which can be +very useful. But we urge everybody to integrate `clang-format` already +on the level of your source code editor. See [the official +page](https://clang.llvm.org/docs/ClangFormat.html) for information +about `clang-format` and its editor integration. + +The definition of source code format is written down in the file +[.clang-format](.clang-format) and can be changed, if the CORSIKA +Project agrees on it. To see what is possible, check +e.g. [link1](https://clangformat.com/) or +[link2](https://zed0.co.uk/clang-format-configurator/). + +## Naming conventions + +While `clang-format` does the structural formatting, we still need to agree on naming conventions: + + - Classes and structs start with capital letters + - Class member variables start with "f" + - Any static variable has a "g" prefix. A static member variable starts with "fg" + - Class member functions start with capital letters + - Any class getter begins with "Get", and setter with "Set" + - enums should be "enum class", and start with a capital "E", enum entries start with "e" + + - We use namespaces to avoid clashes and to structure code + - *Everything* is part of the corsika namespace + - All classes and objects are encapsulated into suited sub-namespaces, + thus corsika::geometry, corsika::processes, corsika::units, etc. + - Namespace names do not use capital letters. + - Every header file is copied during build and install into + "include/corsika/[namespace]" which also means, each header file + can only provide definitions for a _single_ namespace. It is one + main purpose of namespaces to structure the location of header + files. + - Each header file uses an include protection that includes at + least the namespace name, and header file name, thus, `#ifndef + __include_geometry_Point_h__` or `#ifnedf __geometry_Point_h__`, + or similar are acceptable. + - Header files should always be included with `<..>`, thus, + `#include <corsika/geometry/Point.h>` since the build system + will always provide the correct include directives (and files + anyway cannot be found in file-system paths that typically do + not follow the namespace naming conventions outlined + here). + + - Header files are named after the main class (or object) they + define. This also means each header file name starts with a + capital letter. + + + +## Coding rules + + - Code may not introduce any compiler errors, or warnings + - All unit tests must succeed at all times + - We use C++17 concepts wherever useful and helpful + - On any major error or malfunction we throw an exception. This is needed and required for complex physics and shower debugging. + - We never catch exceptions for error handling, there might be very few special exceptions from this. We need to discuss such cases. + - Everything that should not change should be `const` + - Everything that does not need to be visible to the outside of a class/struct should be `private` or `protected` + - We prefer the use of references, wherever useful + - There cannot be any pointer in the interface of any class or object + exposed to outside users, there might be pointers for very special cases + inside of classes. + - When you contribute new code, or extend existing code, at the same time provide unit-tests for all functionality. + - Code must be documented with `doxygen` commands + + +# How to contribute + + - We organize all development via `Issues` that may be feature requests, + ideas, or bugs fix requests. + - New issues can be created, or existing issues + picked up. + - Issues are discussed in meetings or via corsika-devel@lists.kit.edu within the CORSIKA Project. + - Issues are assigned to milestones. + - The work on issues is performed in `branches` that can be best + created directly via the gitlab web interface. + - Proposed code to close one issue (located in a specific git + branch) is reviewed and eventually discussed, and finally merged + into the master branch to close the issue. + + + +# How to become scientific author of the CORSIKA Project + +The CORSIKA Project decides on who becomes scientific author. The +following conditions are clearly sufficient, but not all of them are +required all the time: + - responsibility for a particular functionality or part + - follows these [GUIDELINES](GUIDELINES.md) + - agrees to the [COLLABORATION_AGREEMENT](COLLABORATION_AGREEMENT.md) + - active in the CORSIKA Project, that means responsive to + discussions and problems in corsika-devel@list.kit.edu or on https//gitlab.ikp.kit.edu, of relevant *issues*, + or in (phone) meetings + - the members of the CORSIKA Project panel agree diff --git a/MCNET_GUIDELINES b/MCNET_GUIDELINES new file mode 100644 index 0000000000000000000000000000000000000000..60d53f92a3d9f5edab6725c863591b286d6b618c --- /dev/null +++ b/MCNET_GUIDELINES @@ -0,0 +1,112 @@ +These guidelines are copied from: http://www.montecarlonet.org/ +--------------------------------------------------------------- + + + MCNET GUIDELINES + + for Event Generator Authors and Users + + + PREAMBLE + +This generator has been developed as part of an academic research +project and is the result of many years of work by the authors. +Proper academic recognition is a requirement for its continued +development. + +The components of the program have been developed to work together +as a coherent physics framework. We believe that the creation of +separately maintained forks or piecewise distribution of individual +parts would diminish their scientific value. + +The authors are convinced that software development in a scientific +context requires full availability of all source code, to further +progress and to allow local modifications to meet the specific +requirements of the individual user. + +Therefore we have decided to release this program under the GNU +General Public License (GPL) version 2 (with the option to instead +follow the terms and conditions of any later version of GPL). This +ensures that the source code will be available to you and grants you +the freedom to use and modify the program. You can redistribute your +modified versions as long as you retain the GPL and respect existing +copyright notices (see the file 'COPYING' for details). + +By using the GPL, we entrust you with considerable freedom and expect +you to use it wisely, since the GPL does not address the issues in +the first two paragraphs. To remedy this shortcoming, we have +formulated the following guidelines relevant for the distribution +and usage of event generator software in an academic setting. + + + GUIDELINES + +1) The integrity of the program should be respected. + ------------------------------------------------- + +1.1) Suspected bugs and proposed fixes should be reported back to the + original authors to be considered for inclusion in the standard + distribution. No independently developed and maintained forks + should be created as long as the original authors actively work on + the program. + +1.2) The program should normally be redistributed in its entirety. + When there are special reasons, an agreement should be sought with + the original authors to redistribute only specific parts. This + should be arranged such that the redistributed parts remain + updated in step with the standard distribution. + +1.3) Any changes in the code must be clearly marked in the source + (reason, author, date) and documented. If any modified version is + redistributed it should be stated at the point of distribution + (download link) that it has been modified and why. + +1.4) If a significant part of the code is used by another program, + this should be clearly specified in that program's documentation and + stated at its point of distribution. + +1.5) Copyright information and references may not be removed. + Copyright-related program messages may not be altered and must be + printed even if only a part of the program is used. Adding further + messages specifying any modifications is encouraged. + + +2) The program and its physics should be properly cited when used for + academic publications + ------------------------------------------------------------------ + +2.1) The main software reference as designated by the program authors + should always be cited. + +2.2) In addition, the original literature on which the program is based + should be cited to the extent that it is of relevance for a study, + applying the same threshold criteria as for other literature. + +2.3) When several programs are combined, they should all be mentioned, + commensurate with their importance for the physics study at hand. + +2.4) To make published results reproducible, the exact versions of the + codes that were used and any relevant program and parameter + modifications should be spelled out. + + + POSTSCRIPT + +The copyright license of the software is the GPL v2 alone, therefore +the above guidelines are not legally binding. However, we reserve the +right to criticize offenders. The guidelines should always be combined +with common sense, for interpretation and for issues not covered. +Enquiries regarding the guidelines and related issues are encouraged +and should be directed to the authors of the program. + +Please note that the program, including all its code and documentation, +is intended for academic use and is delivered "as is" to be used at +your own risk, without any guarantees. + +---------------------------------------------------------------------- + +These guidelines were edited by Nils Lavesson and David Grellscheid +for the MCnet collaboration, which has approved and agreed to respect +them. MCnet is a Marie Curie Research Training Network funded under +Framework Programme 6 contract MRTN-CT-2006-035606. + diff --git a/Main/Environment.h b/Main/Environment.h index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..90582b3dfb00d2d85850b81455a2a4c0c061413b 100644 --- a/Main/Environment.h +++ b/Main/Environment.h @@ -0,0 +1,10 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ diff --git a/Main/Stack.h b/Main/Stack.h index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..90582b3dfb00d2d85850b81455a2a4c0c061413b 100644 --- a/Main/Stack.h +++ b/Main/Stack.h @@ -0,0 +1,10 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ diff --git a/Main/shower.cc b/Main/shower.cc index 7bc09673a29ed82e49f1939a52b3f5c86f31adad..10facda7435af5d9f6f1ab83223a25ad61c068b1 100644 --- a/Main/shower.cc +++ b/Main/shower.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <utl/Stack.h> int main(int argc, char** argv) { return 0; } diff --git a/Processes/NullModel/NullModel.cc b/Processes/NullModel/NullModel.cc index 4da71dc16066f65af4623db7a45338ac9c8fde0c..3629d522a3383abcb5954a84f2fa47d1a1d45354 100644 --- a/Processes/NullModel/NullModel.cc +++ b/Processes/NullModel/NullModel.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/process/null_model/NullModel.h> using namespace corsika::process::null_model; diff --git a/Processes/NullModel/NullModel.h b/Processes/NullModel/NullModel.h index 98782765696e7d0a87d19611bba0d9fc1e9f4c7f..dc3bf504bca57e2cadcc264ec50e9903dcd9a2ad 100644 --- a/Processes/NullModel/NullModel.h +++ b/Processes/NullModel/NullModel.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _Physics_NullModel_NullModel_h_ #define _Physics_NullModel_NullModel_h_ diff --git a/Processes/NullModel/testNullModel.cc b/Processes/NullModel/testNullModel.cc index 311c732cec4b3cbdb8bcb4d4886b37df0e940696..c098b025b678427f1e244fc8052d0dd889f11d08 100644 --- a/Processes/NullModel/testNullModel.cc +++ b/Processes/NullModel/testNullModel.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one // cpp file #include <catch2/catch.hpp> diff --git a/Processes/Sibyll/ParticleConversion.cc b/Processes/Sibyll/ParticleConversion.cc index 6aca2fcf0a07a1ee89eeb859fbb6b40b37e96ec3..9925b97b9e90dba68dc38f46fd5ddb32e71c68c7 100644 --- a/Processes/Sibyll/ParticleConversion.cc +++ b/Processes/Sibyll/ParticleConversion.cc @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/particles/ParticleProperties.h> #include <corsika/process/sibyll/ParticleConversion.h> diff --git a/Processes/Sibyll/ParticleConversion.h b/Processes/Sibyll/ParticleConversion.h index f39c1297964d33846bedcb6160203f11f882c95d..bceee13dc04ef7075b0857bfc6bca0ff7f4b8728 100644 --- a/Processes/Sibyll/ParticleConversion.h +++ b/Processes/Sibyll/ParticleConversion.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_processes_sibyll_particles_h_ #define _include_processes_sibyll_particles_h_ diff --git a/Processes/Sibyll/testSibyll.cc b/Processes/Sibyll/testSibyll.cc index 4c5bed4df1b42c351587569ed5a0b192f19f1f2d..ab1c552e37192772e582602bb61e3e1ad4495b27 100644 --- a/Processes/Sibyll/testSibyll.cc +++ b/Processes/Sibyll/testSibyll.cc @@ -1,4 +1,14 @@ +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #include <corsika/particles/ParticleProperties.h> #include <corsika/process/sibyll/ParticleConversion.h> #include <corsika/units/PhysicalUnits.h> diff --git a/SCIENTIFIC_AUTHORS b/SCIENTIFIC_AUTHORS new file mode 100644 index 0000000000000000000000000000000000000000..2e7676f3785ea1388b14abc71b9298e810c4cca3 --- /dev/null +++ b/SCIENTIFIC_AUTHORS @@ -0,0 +1,2 @@ +(empty...tbd) + diff --git a/Stack/DummyStack/DummyStack.h b/Stack/DummyStack/DummyStack.h index 8dd528a7e1f7a1fa9fe35f0ac6373f3a881727db..63b84bf30e4c03a80de512a78c1cb0677d95f7b9 100644 --- a/Stack/DummyStack/DummyStack.h +++ b/Stack/DummyStack/DummyStack.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_dummystack_h_ #define _include_dummystack_h_ diff --git a/Stack/DummyStack/SuperStupidStack.h b/Stack/DummyStack/SuperStupidStack.h index c1b9215d08c96d6c5f3ca5923718bd64df9ff12a..47647e2c397ba8c7aab7ecda35cb05a700516176 100644 --- a/Stack/DummyStack/SuperStupidStack.h +++ b/Stack/DummyStack/SuperStupidStack.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_superstupidstack_h_ #define _include_superstupidstack_h_ diff --git a/Stack/SuperStupidStack/SuperStupidStack.h b/Stack/SuperStupidStack/SuperStupidStack.h index f5674e2cf885c809c17c631e0e3a832afc566047..66eed2d784c437b59bc87973b1723b586e63f51d 100644 --- a/Stack/SuperStupidStack/SuperStupidStack.h +++ b/Stack/SuperStupidStack/SuperStupidStack.h @@ -1,3 +1,14 @@ + +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + #ifndef _include_superstupidstack_h_ #define _include_superstupidstack_h_ diff --git a/do-copyright.py b/do-copyright.py new file mode 100755 index 0000000000000000000000000000000000000000..dcbd9d0593f260e69bd1effc84560a8e1307dbfa --- /dev/null +++ b/do-copyright.py @@ -0,0 +1,79 @@ +#!/usr/bin/python + +import os.path + +text = """ +/** + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * See file AUTHORS for a list of contributors. + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. +*/\n +""" + +excludeDirs = ["ThirdParty", "git"] +excludeFiles = ['PhysicalConstants.h'] + +extensions = [".cc", ".h", ".test"] + +def checkNote(filename): + + startNote = -1 + endNote = -1 + isCopyright = False + lines = [] + + with open(filename, "r") as file: + for line in file.readlines(): + lines.append(line) + file.close() + + + for iLine in range(len(lines)): + line = lines[iLine] + if "/**" in line and startNote == -1: + startNote = iLine + if "copyright" in line.lower() and startNote>=0 and endNote==-1: + isCopyright = True + if "*/" in line and startNote>=0 and endNote==-1: + endNote = iLine + iLine += 1 + + #if startNote>=0 and endNote>=0 and isCopyright: + #print filename + #for iLine in range(startNote, endNote+1): + # print lines[iLine] + + os.rename(filename, filename+".bak") + + with open(filename, "w") as file: + + file.write(text) + + firstLine = 0 + if startNote>=0 and endNote>=0 and isCopyright: + firstLine = endNote + 2 + + for iLine in range(firstLine, len(lines)): + file.write(lines[iLine]) + + file.close() + + +def next_file(x, dir_name, files): + for check in excludeDirs : + if check in dir_name: + return + for check in files : + filename, file_extension = os.path.splitext(check) + for check2 in excludeFiles : + if check2 in check: + return + if file_extension in extensions: + checkNote(dir_name + "/" + check) + + +os.path.walk("./", next_file, 0)