diff --git a/Documentation/Doxygen/Doxyfile.in b/Documentation/Doxygen/Doxyfile.in index 8920c8db207584e53c7b64dfd8e59117c129dad8..47bcf61eb06572fab45ea308f3bf9091bbae512f 100644 --- a/Documentation/Doxygen/Doxyfile.in +++ b/Documentation/Doxygen/Doxyfile.in @@ -2,22 +2,24 @@ PROJECT_NAME = CORSIKA PROJECT_NUMBER = 8.0.0 OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/ -INPUT = @CMAKE_CURRENT_SOURCE_DIR@/../.. @CMAKE_CURRENT_BINARY_DIR@/Framework/Particles/ +INPUT = @PROJECT_SOURCE_DIR@ @PROJECT_BINARY_DIR@/Framework EXCLUDE_PATTERNS = */ThirdParty/*/* GENERATE_HTML = YES GENERATE_LATEX = YES FILE_PATTERNS = *.cc *.cpp *.cxx *.h *.dox *.inc +EXTENSION_MAPPING = inc=C++ RECURSIVE = YES SOURCE_BROWSER = YES # INLINE_SOURCES -CLASS_DIAGRAMS = YES +CLASS_DIAGRAMS = NO HAVE_DOT = YES CLASS_GRAPH = YES -UML_LOOK = YES +COLLABORATION_GRAPH = NO +UML_LOOK = NO TEMPLATE_RELATIONS = YES INCLUDE_GRAPH = YES GRAPHICAL_HIERARCHY = YES diff --git a/Framework/Logging/Logger.h b/Framework/Logging/Logger.h index 6b8acd2cc95da21c3fa0ad250b1f7e1e93554ef9..b01a617ace8b259a51c040ef7bf0e3e1c8d0dda6 100644 --- a/Framework/Logging/Logger.h +++ b/Framework/Logging/Logger.h @@ -1,5 +1,7 @@ /** @File Logger.h + + Everything around logfile generation and text output. */ #ifndef _include_logger_h_ @@ -22,13 +24,13 @@ using namespace std; using namespace boost; -/** - Everything around logfile generation and text output. -*/ namespace fwk { + /** + @class Logger + Defines one stream to accept messages, and to wrote those into TSink. The helper class MessageOn will convert input at compile-time into message strings. The helper class MessageOff, @@ -63,6 +65,19 @@ namespace fwk { } // end namesapce + +/** + * @def LOG(...) + * + * This is the main interface to the logging facilities. If Logger + * object are defined (e.g. log1) use as + * @example LOG(log1, "var1=", variable1int, "var2=", variabl2double) + * for arbitrary long sequence + * of arguments. This may also include boost::format objects the + * output is concatenated, if log1 is switched off at compile time, + * the whole LOG command is optimized away by the compiler. + */ + #define LOG(__LOGGER,...) \ __LOGGER.Log(__LOGGER.GetName(), __FILE__,":", __LINE__, " (", __func__, ") -> ", ##__VA_ARGS__); diff --git a/Framework/Particles/Particles.h b/Framework/Particles/Particles.h index ab3c43a99e432a140d9f9a2cc4ab4334cf002ea1..cf1fbdaa468b15ee458dafa06860d999984c9d82 100644 --- a/Framework/Particles/Particles.h +++ b/Framework/Particles/Particles.h @@ -1,3 +1,9 @@ +/** + @file Particles.h + + Interface to particle properties + */ + #ifndef _include_Particle_h_ #define _include_Particle_h_ @@ -7,10 +13,24 @@ #include <fwk/GeneratedParticleProperties.inc> + namespace fwk { + /** + * @namespace particle + * + * The properties of all elementary particles is stored here. The data + * is taken from the Pythia ParticleData.xml file. + * + */ + namespace particle { + /** + * @function GetMass + * + * return mass of particle + */ auto constexpr GetMass(InternalParticleCode const p) { return masses[static_cast<uint8_t const>(p)]; @@ -21,14 +41,14 @@ namespace fwk { return pdg_codes[static_cast<uint8_t const>(p)]; } - auto constexpr GetElectricChargeQN(InternalParticleCode const p) + auto constexpr GetElectricChargeNumber(InternalParticleCode const p) { - return electric_charge[static_cast<uint8_t const>(p)]; + return electric_charge[static_cast<uint8_t const>(p)] / 3; } auto constexpr GetElectricCharge(InternalParticleCode const p) { - return GetElectricChargeQN(p) * (phys::units::e / 3.); + return GetElectricChargeNumber(p) * (phys::units::e); } auto const GetName(InternalParticleCode const p) diff --git a/Framework/Particles/pdxml_reader.py b/Framework/Particles/pdxml_reader.py index 4964661c35216a79721291953ac72ddc2cbe50a9..494ae8fa5ff7db0a40727d93def9e2ff3c3b7d87 100755 --- a/Framework/Particles/pdxml_reader.py +++ b/Framework/Particles/pdxml_reader.py @@ -203,13 +203,20 @@ def gen_classes(pythia_db): break string += "\n"; - string += "/** @class " + cname + "\n" + string += "/** @class " + cname + "\n\n" + string += " * Particle properties are taken from the PYTHIA8 ParticleData.xml file:<br>\n" + string += " * - pdg=" + str(pythia_db[cname]['pdg']) +"\n" + string += " * - mass=" + str(pythia_db[cname]['mass']) + " GeV \n" + string += " * - charge= " + str(pythia_db[cname]['electric_charge']/3) + " \n" + string += " * - name=" + str(cname) + "\n" + string += " * - anti=" + str(antiP) + "\n" string += "*/\n\n" string += "class " + cname + "{\n" string += " public:\n" string += " static InternalParticleCode GetType() { return Type; }\n" string += " static quantity<energy_d> GetMass() { return masses[TypeIndex]; }\n" string += " static quantity<electric_charge_d> GetCharge() { return phys::units::e*electric_charge[TypeIndex]/3; }\n" + string += " static int GetChargeNumber() { return electric_charge[TypeIndex]/3; }\n" string += " static std::string GetName() { return names[TypeIndex]; }\n" string += " static InternalParticleCode GetAntiParticle() { return AntiType; }\n" string += " static const InternalParticleCode Type = InternalParticleCode::" + cname + ";\n"