From 3e054591979d97fe437eb2f095d1de5028efc0a6 Mon Sep 17 00:00:00 2001 From: ralfulrich <ralf.ulrich@kit.edu> Date: Fri, 8 Feb 2019 12:40:59 +0100 Subject: [PATCH] fixed do-copyright-script --- Framework/Cascade/Cascade.dox | 8 ++++++ Framework/Geometry/BaseTrajectory.h | 9 ------- Framework/Geometry/BaseVector.h | 9 ------- Framework/Geometry/CoordinateSystem.cc | 9 ------- Framework/Geometry/FourVector.h | 9 ------- Framework/Geometry/Helix.h | 9 ------- Framework/Geometry/Line.h | 9 ------- Framework/Geometry/RootCoordinateSystem.h | 9 ------- Framework/Geometry/Sphere.h | 9 ------- Framework/Geometry/Trajectory.h | 9 ------- Framework/Geometry/Volume.h | 9 ------- Framework/Geometry/testFourVector.cc | 9 ------- Framework/Particles/ParticleProperties.cc | 9 ------- Framework/StackInterface/SecondaryView.h | 11 ++++++++ Framework/StackInterface/testTestStack.h | 11 ++++++++ Framework/Units/PhysicalConstants.h | 27 +++++-------------- Framework/Units/PhysicalUnits.h | 11 ++++++++ Framework/Utilities/CorsikaFenvOSX.cc | 11 ++++++++ Processes/Sibyll/NuclearInteraction.h | 3 ++- Processes/Sibyll/nuclib.h | 3 ++- do-copyright.py | 33 +++++++++++++++++++---- 21 files changed, 91 insertions(+), 135 deletions(-) create mode 100644 Framework/Cascade/Cascade.dox diff --git a/Framework/Cascade/Cascade.dox b/Framework/Cascade/Cascade.dox new file mode 100644 index 000000000..7ea74e9c5 --- /dev/null +++ b/Framework/Cascade/Cascade.dox @@ -0,0 +1,8 @@ +/** + + + Here are have to explain the corsika::cascade::Cascade class and its + functionality. + + +*/ \ No newline at end of file diff --git a/Framework/Geometry/BaseTrajectory.h b/Framework/Geometry/BaseTrajectory.h index d8cf7ff56..eb04eed3d 100644 --- a/Framework/Geometry/BaseTrajectory.h +++ b/Framework/Geometry/BaseTrajectory.h @@ -9,15 +9,6 @@ * the license. */ -/* - * (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 106fb6324..4395fb2ae 100644 --- a/Framework/Geometry/BaseVector.h +++ b/Framework/Geometry/BaseVector.h @@ -9,15 +9,6 @@ * the license. */ -/* - * (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 6f818462b..180062609 100644 --- a/Framework/Geometry/CoordinateSystem.cc +++ b/Framework/Geometry/CoordinateSystem.cc @@ -9,15 +9,6 @@ * the license. */ -/* - * (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 <stdexcept> diff --git a/Framework/Geometry/FourVector.h b/Framework/Geometry/FourVector.h index 1cd15c6af..dc4c61e6e 100644 --- a/Framework/Geometry/FourVector.h +++ b/Framework/Geometry/FourVector.h @@ -9,15 +9,6 @@ * the license. */ -/* - * (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_corsika_framework_geometry_fourvector_h_ #define _include_corsika_framework_geometry_fourvector_h_ diff --git a/Framework/Geometry/Helix.h b/Framework/Geometry/Helix.h index 4d9badf8c..45d1d72a0 100644 --- a/Framework/Geometry/Helix.h +++ b/Framework/Geometry/Helix.h @@ -9,15 +9,6 @@ * the license. */ -/* - * (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/Line.h b/Framework/Geometry/Line.h index 8672aa178..fbd227c18 100644 --- a/Framework/Geometry/Line.h +++ b/Framework/Geometry/Line.h @@ -9,15 +9,6 @@ * the license. */ -/* - * (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/RootCoordinateSystem.h b/Framework/Geometry/RootCoordinateSystem.h index b5f496aa4..e10690b5c 100644 --- a/Framework/Geometry/RootCoordinateSystem.h +++ b/Framework/Geometry/RootCoordinateSystem.h @@ -9,15 +9,6 @@ * the license. */ -/* - * (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_corsika_geometry_rootcoordinatesystem_h_ #define _include_corsika_geometry_rootcoordinatesystem_h_ diff --git a/Framework/Geometry/Sphere.h b/Framework/Geometry/Sphere.h index 01d74543e..c2fc6b0fb 100644 --- a/Framework/Geometry/Sphere.h +++ b/Framework/Geometry/Sphere.h @@ -9,15 +9,6 @@ * the license. */ -/* - * (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 69bcfd6f8..4b2a7f76c 100644 --- a/Framework/Geometry/Trajectory.h +++ b/Framework/Geometry/Trajectory.h @@ -9,15 +9,6 @@ * the license. */ -/* - * (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/Volume.h b/Framework/Geometry/Volume.h index 95306edca..80f4a572b 100644 --- a/Framework/Geometry/Volume.h +++ b/Framework/Geometry/Volume.h @@ -9,15 +9,6 @@ * the license. */ -/* - * (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_VOLUME_H_ #define _include_VOLUME_H_ diff --git a/Framework/Geometry/testFourVector.cc b/Framework/Geometry/testFourVector.cc index 824426aad..9e9b303fd 100644 --- a/Framework/Geometry/testFourVector.cc +++ b/Framework/Geometry/testFourVector.cc @@ -9,15 +9,6 @@ * the license. */ -/* - * (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 diff --git a/Framework/Particles/ParticleProperties.cc b/Framework/Particles/ParticleProperties.cc index a1a3e8cf9..266f2e9c0 100644 --- a/Framework/Particles/ParticleProperties.cc +++ b/Framework/Particles/ParticleProperties.cc @@ -9,15 +9,6 @@ * the license. */ -/* - * (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 <iostream> diff --git a/Framework/StackInterface/SecondaryView.h b/Framework/StackInterface/SecondaryView.h index 0993edd98..ac2e3ed19 100644 --- a/Framework/StackInterface/SecondaryView.h +++ b/Framework/StackInterface/SecondaryView.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_corsika_stack_secondaryview_h_ #define _include_corsika_stack_secondaryview_h_ diff --git a/Framework/StackInterface/testTestStack.h b/Framework/StackInterface/testTestStack.h index a3bf63466..b086994cc 100644 --- a/Framework/StackInterface/testTestStack.h +++ b/Framework/StackInterface/testTestStack.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_corsika_stack_testTestStack_h_ #define _include_corsika_stack_testTestStack_h_ diff --git a/Framework/Units/PhysicalConstants.h b/Framework/Units/PhysicalConstants.h index 79dd0e6de..75dfc51ce 100644 --- a/Framework/Units/PhysicalConstants.h +++ b/Framework/Units/PhysicalConstants.h @@ -1,25 +1,12 @@ -/** - * \file PhysicalConstants - * - * \brief Several physical constants. - * \author Michael S. Kenniston, Martin Moene - * \date 7 September 2013 - * \since 0.4 - * - * Copyright 2013 Universiteit Leiden. All rights reserved. - * - * Copyright (c) 2001 by Michael S. Kenniston. For the most - * recent version check www.xnet.com/~msk/quantity. Permission is granted - * to use this code without restriction so long as this copyright - * notice appears in all source files. - * - * This code is provided as-is, with no warrantee of correctness. - * - * Distributed under the Boost Software License, Version 1.0. (See accompanying - * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - * + +/* + * (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_PHYSICAL_CONSTANTS_H diff --git a/Framework/Units/PhysicalUnits.h b/Framework/Units/PhysicalUnits.h index af4dbb966..786044aef 100644 --- a/Framework/Units/PhysicalUnits.h +++ b/Framework/Units/PhysicalUnits.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_PhysicalUnits_h_ #define _include_PhysicalUnits_h_ diff --git a/Framework/Utilities/CorsikaFenvOSX.cc b/Framework/Utilities/CorsikaFenvOSX.cc index 1028c4b7e..4495ebd1e 100644 --- a/Framework/Utilities/CorsikaFenvOSX.cc +++ b/Framework/Utilities/CorsikaFenvOSX.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. + */ + /** * Import public domain code * diff --git a/Processes/Sibyll/NuclearInteraction.h b/Processes/Sibyll/NuclearInteraction.h index e050b8c7e..d9eca3967 100644 --- a/Processes/Sibyll/NuclearInteraction.h +++ b/Processes/Sibyll/NuclearInteraction.h @@ -1,5 +1,5 @@ -/** +/* * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu * * See file AUTHORS for a list of contributors. @@ -9,6 +9,7 @@ * the license. */ + #ifndef _corsika_process_sibyll_nuclearinteraction_h_ #define _corsika_process_sibyll_nuclearinteraction_h_ diff --git a/Processes/Sibyll/nuclib.h b/Processes/Sibyll/nuclib.h index 8653b2cc2..86a2a8f82 100644 --- a/Processes/Sibyll/nuclib.h +++ b/Processes/Sibyll/nuclib.h @@ -1,5 +1,5 @@ -/** +/* * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu * * See file AUTHORS for a list of contributors. @@ -9,6 +9,7 @@ * the license. */ + #ifndef _include_nuclib_interface_h_ #define _include_nuclib_interface_h_ diff --git a/do-copyright.py b/do-copyright.py index 24c5beb6a..b88829bcf 100755 --- a/do-copyright.py +++ b/do-copyright.py @@ -14,6 +14,8 @@ text = """ */\n """ +Debug = 0 # 0: nothing, 1: checking, 2: filesystem + excludeDirs = ["ThirdParty", "git"] excludeFiles = ['PhysicalConstants.h','CorsikaFenvOSX.cc'] @@ -21,6 +23,10 @@ extensions = [".cc", ".h", ".test"] def checkNote(filename): + if Debug>0: + print ("***********************************************") + print ("file: " + filename ) + startNote = [] endNote = [] @@ -46,7 +52,13 @@ def checkNote(filename): endNote.append(iLine) searchStatus = 0 iLine += 1 - + + if Debug>0: + txt = "states: n=" + str(len(startNote)) + for i in xrange(len(startNote)): + txt += ", [" + str(startNote[i]) + "-" + str(endNote[i]) + "]" + print ("stats: ") + txt + # now check if first copyright notices is already identical... isSame = False if len(startNote)>0: @@ -58,8 +70,10 @@ def checkNote(filename): break if noteLines[iLine+1].strip(" \n") != lines[startNote[0]+iLine].strip(" \n"): isSame = False - print "need update: " + filename + " new=\'" + noteLines[iLine+1] + "\' vs old=\'" + lines[startNote+iLine].rstrip('\n') + "\'" + print "need update: " + filename + " new=\'" + noteLines[iLine+1] + "\' vs old=\'" + lines[startNote[0]+iLine].rstrip('\n') + "\'" break + if Debug>0: + print ("isSame=" + str(isSame)) # check if notice is the same, or we need to remove multiple notices... if isSame and len(startNote)<=1: @@ -98,16 +112,25 @@ def checkNote(filename): def next_file(x, dir_name, files): for check in excludeDirs : if check in dir_name: - return + if Debug>1: + print ("exclude-dir: " + check) + return True for check in files : + if (os.path.isdir(check)): + continue filename, file_extension = os.path.splitext(check) if '#' in check or '~' in check: - return + continue for check2 in excludeFiles : if check2 in check: - return + if Debug>1: + print ("exclude: " + check2) + continue if file_extension in extensions: checkNote(dir_name + "/" + check) + else: + if Debug>1: + print ("exclude-extension: " + dir_name + "/" + check) os.path.walk("./", next_file, 0) -- GitLab