IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 82d819a0 authored by ralfulrich's avatar ralfulrich
Browse files

better doxygen

parent ff34f19a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
/**
@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__);
......
/**
@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)
......
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment