From 036d63e8796387b64fa7cfde91b6d29d8f9874af 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 ++-
 Setup/SetupStack.h                        | 10 ++++++-
 do-copyright.py                           | 33 +++++++++++++++++++----
 22 files changed, 100 insertions(+), 136 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 00000000..7ea74e9c
--- /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 d8cf7ff5..eb04eed3 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 106fb632..4395fb2a 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 6f818462..18006260 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 1cd15c6a..dc4c61e6 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 4d9badf8..45d1d72a 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 8672aa17..fbd227c1 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 b5f496aa..e10690b5 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 01d74543..c2fc6b0f 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 69bcfd6f..4b2a7f76 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 95306edc..80f4a572 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 824426aa..9e9b303f 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 d59846fc..a9340f72 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 0993edd9..ac2e3ed1 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 a3bf6346..b086994c 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 1bf9872a..8619d3c4 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 af4dbb96..786044ae 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 1028c4b7..4495ebd1 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 7b7492d4..86fa97ad 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 8653b2cc..86a2a8f8 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/Setup/SetupStack.h b/Setup/SetupStack.h
index fdfde3d8..e3929d1d 100644
--- a/Setup/SetupStack.h
+++ b/Setup/SetupStack.h
@@ -12,9 +12,17 @@
 #ifndef _corsika_setup_setupstack_h_
 #define _corsika_setup_setupstack_h_
 
-#include <corsika/stack/nuclear_extension/NuclearStackExtension.h>
+// the basic particle data stack:
 #include <corsika/stack/super_stupid/SuperStupidStack.h>
 
+// extension with nuclear data for Code::Nucleus
+#include <corsika/stack/nuclear_extension/NuclearStackExtension.h>
+
+// extension with geometry information for tracking
+#include <corsika/stack/CombinedStack.h>
+#include <corsika/stack/CombinedStack.h>
+
+
 // this is an auxiliary help typedef, which I don't know how to put
 // into NuclearStackExtension.h where it belongs...
 template <typename StackIter>
diff --git a/do-copyright.py b/do-copyright.py
index 24c5beb6..b88829bc 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