IAP GITLAB

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • AirShowerPhysics/corsika
  • rulrich/corsika
  • AAAlvesJr/corsika
  • Andre/corsika
  • arrabito/corsika
  • Nikos/corsika
  • olheiser73/corsika
  • AirShowerPhysics/papers/corsika
  • pranav/corsika
9 results
Show changes
/*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* 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.
* This software is distributed under the terms of the 3-clause BSD license.
* See file LICENSE for a full version of the license.
*/
#pragma once
......
/*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* 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.
* This software is distributed under the terms of the 3-clause BSD license.
* See file LICENSE for a full version of the license.
*/
#pragma once
#include <corsika/geometry/Plane.h>
#include <corsika/process/ContinuousProcess.h>
#include <corsika/setup/SetupStack.h>
#include <corsika/setup/SetupTrajectory.h>
#include <corsika/units/PhysicalUnits.h>
#include <boost/histogram.hpp>
......@@ -24,22 +21,26 @@
namespace corsika::history {
class HistoryObservationPlane : public ContinuousProcess<HistoryObservationPlane> {
template <typename TStack>
class HistoryObservationPlane
: public ContinuousProcess<HistoryObservationPlane<TStack>> {
public:
HistoryObservationPlane(setup::Stack const&, Plane const&, bool = true);
HistoryObservationPlane(TStack const&, Plane const&, bool = true);
LengthType getMaxStepLength(setup::Stack::particle_type const&,
setup::Trajectory const& vTrajectory);
template <typename TParticle, typename TTrajectory>
LengthType getMaxStepLength(TParticle const&, TTrajectory const& vTrajectory);
ProcessReturn doContinuous(setup::Stack::particle_type const& vParticle,
setup::Trajectory const& vTrajectory);
template <typename TParticle, typename TTrajectory>
ProcessReturn doContinuous(TParticle const& vParticle,
TTrajectory const& vTrajectory);
auto const& histogram() const { return histogram_; }
private:
void fillHistoryHistogram(setup::Stack::particle_type const&);
template <typename TParticle>
void fillHistoryHistogram(TParticle const&);
setup::Stack const& stack_;
TStack const& stack_;
Plane const plane_;
bool const deleteOnHit_;
......
/*
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
*
* 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.
* This software is distributed under the terms of the 3-clause BSD license.
* See file LICENSE for a full version of the license.
*/
#pragma once
......
/*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* 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.
* This software is distributed under the terms of the 3-clause BSD license.
* See file LICENSE for a full version of the license.
*/
#pragma once
......@@ -67,10 +66,8 @@ namespace corsika::history {
/**
* @class HistoryDataInterface
*
* corresponding defintion of a stack-readout object, the iteractor
* dereference operator will deliver access to these function
// defintion of a stack-readout object, the iteractor dereference
// operator will deliver access to these function
* corresponding definition of a stack-readout object, the iteractor
* dereference operator will deliver access to these function.
*/
template <typename T, typename TEvent>
class HistoryDataInterface : public T {
......
/*
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
* 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.
* This software is distributed under the terms of the 3-clause BSD license.
* See file LICENSE for a full version of the license.
*/
#pragma once
......
#!/usr/bin/env python3
#
# (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
#
# This software is distributed under the terms of the 3-clause BSD license.
# See file LICENSE for a full version of the license.
#
"""
Run clang-format with the style file in the CORSIKA repository.
By default it finds new files and files with modifications with respect to the current master and prints the filenames which need clang-formatting. Returns 1 if there are files which need modifications and 0 otherwise, so it can be used as a test.
By default it finds new files and files with modifications with respect
to the current master and prints the filenames which need clang-formatting.
Returns 1 if there are files which need modifications and 0 otherwise,
so it can be used as a test.
"""
import argparse
import subprocess as subp
import os
import sys
import re
debug = False
do_progress = False
try:
from progress.bar import ChargingBar
......@@ -28,7 +41,9 @@ parser.add_argument("--docker", action="store_true",
args = parser.parse_args()
excludeDirs = [r"^(\./)?modules/", r"^(\./)?externals/", r"^(\./)?build", r"^(\./)?install", r"(\./)?\.git", r"^(\./)?corsika/framework/units",]
excludeDirs = [r"^(\./)?modules/", r"^(\./)?externals/", r"^(\./)?build", r"^(\./)?install",
r"(\./)?\.git", r"^(\./)?corsika/framework/units",
r"^(\./)?Random123/"]
filelist = []
if args.all:
......@@ -77,6 +92,9 @@ else:
filelist_clean.append(f)
filelist = filelist_clean
if debug:
print ("filelist: ", filelist)
cmd = "clang-format"
if "CLANG_FORMAT" in os.environ:
cmd = os.environ["CLANG_FORMAT"]
......@@ -99,11 +117,18 @@ if do_progress:
bar = ChargingBar('Processing', max=len(filelist))
if args.apply:
changed = []
for filename in filelist:
if bar: bar.next()
a = open(filename, "rb").read()
subp.check_call(cmd.split() + ["-i", filename])
b = open(filename, "rb").read()
if a != b:
changed.append(filename)
if bar: bar.finish()
if debug:
print ("changed: ", changed)
else:
# only print files which need formatting
files_need_formatting = 0
......
#!/usr/bin/env python3
#
# (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
#
# This software is distributed under the terms of the 3-clause BSD license.
# See file LICENSE for a full version of the license.
#
"""
Script to crawl all files (hpp,inl,cpp) in a directory structure and
check if there is an initial comment block within each file that
resembles the CORSIKA 8 copyright notice.
Exceptions can be specified in `excludeDirs` and `excludedFiles`.
"""
import os
import sys, getopt
import re
......@@ -10,9 +26,8 @@ import re
text = """/*
* (c) Copyright YEAR CORSIKA Project, corsika-project@lists.kit.edu
*
* 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.
* This software is distributed under the terms of the 3-clause BSD license.
* See file LICENSE for a full version of the license.
*/\n
"""
......@@ -21,7 +36,7 @@ Debug settings are 0: nothing, 1: checking, 2: filesystem
"""
Debug = 0
excludeDirs = ["./modules", "./externals", "build", "install", "git", "framework/units"]
excludeDirs = ["./modules", "./externals", "build", "install", "git", "framework/units", "Random123"]
excludeFiles = ['PhysicalConstants.h','CorsikaFenvOSX.cc', 'sgn.h', 'quartic.h']
extensions = [".cpp", ".inl", ".hpp"]
......
......@@ -25,8 +25,8 @@ if (DOXYGEN_FOUND)
COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/latex; pdflatex refman.tex
)
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc OPTIONAL)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf DESTINATION share/doc OPTIONAL)
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DATADIR}/corsika/doc OPTIONAL)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf DESTINATION ${CMAKE_INSTALL_DATADIR}/corsika/doc OPTIONAL)
if (SPHINX_FOUND)
......