From ccbf21b1f8781f4215708a333d644b7496eaf82e Mon Sep 17 00:00:00 2001 From: Mateusz Jakub Fila Date: Thu, 22 Aug 2024 15:41:16 +0200 Subject: [PATCH 1/2] fix typos --- k4FWCore/components/EventHeaderCreator.h | 2 +- k4FWCore/components/PodioOutput.cpp | 2 +- k4FWCore/components/Writer.cpp | 2 +- k4FWCore/include/k4FWCore/DataHandle.h | 2 +- k4FWCore/include/k4FWCore/MetaDataHandle.h | 4 ++-- k4Interface/include/k4Interface/ISimG4ActionTool.h | 2 +- k4Interface/include/k4Interface/ISimG4DetectorConstruction.h | 2 +- k4Interface/include/k4Interface/ISimG4EventProviderTool.h | 2 +- k4Interface/include/k4Interface/ISimG4GflashTool.h | 2 +- k4Interface/include/k4Interface/ISimG4ParticleSmearTool.h | 2 +- k4Interface/include/k4Interface/ISimG4PhysicsList.h | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/k4FWCore/components/EventHeaderCreator.h b/k4FWCore/components/EventHeaderCreator.h index a2d08a81..ccebe12e 100644 --- a/k4FWCore/components/EventHeaderCreator.h +++ b/k4FWCore/components/EventHeaderCreator.h @@ -23,7 +23,7 @@ #include "k4FWCore/DataHandle.h" /*** - * Algortihm that creates an EventHeader collection and fills it with eventNumber and runNumber + * Algorithm that creates an EventHeader collection and fills it with eventNumber and runNumber */ namespace edm4hep { diff --git a/k4FWCore/components/PodioOutput.cpp b/k4FWCore/components/PodioOutput.cpp index 65ae7ded..2d8e774b 100644 --- a/k4FWCore/components/PodioOutput.cpp +++ b/k4FWCore/components/PodioOutput.cpp @@ -120,7 +120,7 @@ StatusCode PodioOutput::finalize() { // HepMCToEDMConverter.genparticles = "GenParticles"; // Note that quotes are added to all property values, // which leads to problems with ints, lists, dicts and bools. - // For theses types, the quotes must be removed in postprocessing. + // For these types, the quotes must be removed in postprocessing. config_stream << std::get<0>(per_property) << " = \"" << std::get<1>(per_property) << "\";" << std::endl; config_data.push_back(config_stream.str()); } diff --git a/k4FWCore/components/Writer.cpp b/k4FWCore/components/Writer.cpp index bcf8fe37..1ce6986e 100644 --- a/k4FWCore/components/Writer.cpp +++ b/k4FWCore/components/Writer.cpp @@ -98,7 +98,7 @@ class Writer final : public Gaudi::Functional::Consumer(per_property) << " = \"" << std::get<1>(per_property) << "\";" << std::endl; config_data.push_back(config_stream.str()); } diff --git a/k4FWCore/include/k4FWCore/DataHandle.h b/k4FWCore/include/k4FWCore/DataHandle.h index 37ada6f1..599a4a78 100644 --- a/k4FWCore/include/k4FWCore/DataHandle.h +++ b/k4FWCore/include/k4FWCore/DataHandle.h @@ -103,7 +103,7 @@ DataHandle::DataHandle(const std::string& descriptor, Gaudi::DataHandle::Mode } /** - * Try to retrieve from the transient store. If the retrieval succeded and + * Try to retrieve from the transient store. If the retrieval succeeded and * this is the first time we retrieve, perform a dynamic cast to the desired * object. Then finally set the handle as Read. * If this is not the first time we cast and the cast worked, just use the diff --git a/k4FWCore/include/k4FWCore/MetaDataHandle.h b/k4FWCore/include/k4FWCore/MetaDataHandle.h index be05fb9c..fa5881c2 100644 --- a/k4FWCore/include/k4FWCore/MetaDataHandle.h +++ b/k4FWCore/include/k4FWCore/MetaDataHandle.h @@ -52,7 +52,7 @@ template class MetaDataHandle { /// Set the value for this MetaDataHandle /// - /// @note This can only be called during initalize and/or finalize but not + /// @note This can only be called during initialize and/or finalize but not /// during execute for algorithms that use it void put(T); @@ -124,7 +124,7 @@ template void MetaDataHandle::put(T value) { throw GaudiException("MetaDataHandle policy violation", "Put for non-writing MetaDataHandle not allowed", StatusCode::FAILURE); // check whether we are in the proper State - // put is only allowed in the initalization + // put is only allowed in the initialization std::string full_descriptor = fullDescriptor(); // DataHandle based algorithms diff --git a/k4Interface/include/k4Interface/ISimG4ActionTool.h b/k4Interface/include/k4Interface/ISimG4ActionTool.h index 76314259..c419e363 100644 --- a/k4Interface/include/k4Interface/ISimG4ActionTool.h +++ b/k4Interface/include/k4Interface/ISimG4ActionTool.h @@ -37,7 +37,7 @@ class ISimG4ActionTool : virtual public IAlgTool { /// Retrieve interface ID DeclareInterfaceID(ISimG4ActionTool, 1, 0); - /** get initilization hook for the user action + /** get initialization hook for the user action * @return pointer to G4VUserActionInitialization */ virtual G4VUserActionInitialization* userActionInitialization() = 0; diff --git a/k4Interface/include/k4Interface/ISimG4DetectorConstruction.h b/k4Interface/include/k4Interface/ISimG4DetectorConstruction.h index 0053eb58..a1f2f1d0 100644 --- a/k4Interface/include/k4Interface/ISimG4DetectorConstruction.h +++ b/k4Interface/include/k4Interface/ISimG4DetectorConstruction.h @@ -37,7 +37,7 @@ class ISimG4DetectorConstruction : virtual public IAlgTool { /// Retrieve interface ID DeclareInterfaceID(ISimG4DetectorConstruction, 1, 0); - /** get initilization hook for the geometry + /** get initialization hook for the geometry * @return pointer to G4VUserDetectorConstruction */ virtual G4VUserDetectorConstruction* detectorConstruction() = 0; diff --git a/k4Interface/include/k4Interface/ISimG4EventProviderTool.h b/k4Interface/include/k4Interface/ISimG4EventProviderTool.h index da1cce6d..a4ad816f 100644 --- a/k4Interface/include/k4Interface/ISimG4EventProviderTool.h +++ b/k4Interface/include/k4Interface/ISimG4EventProviderTool.h @@ -36,7 +36,7 @@ class ISimG4EventProviderTool : virtual public IAlgTool { public: DeclareInterfaceID(ISimG4EventProviderTool, 1, 0); - /** get initilization hook for the geometry + /** get initialization hook for the geometry * @return pointer to the G4Event containing primary particles */ virtual G4Event* g4Event() = 0; diff --git a/k4Interface/include/k4Interface/ISimG4GflashTool.h b/k4Interface/include/k4Interface/ISimG4GflashTool.h index eb739c49..6033f46a 100644 --- a/k4Interface/include/k4Interface/ISimG4GflashTool.h +++ b/k4Interface/include/k4Interface/ISimG4GflashTool.h @@ -28,7 +28,7 @@ /** @class ISimG4GflashTool SimG4Interface/SimG4Interface/ISimG4GflashTool.h ISimG4GflashTool.h * * Interface to the Gflash parametrisation tool. - * It returns the parametriation that should be attached to the GFlashShowerModel. + * It returns the parametrisation that should be attached to the GFlashShowerModel. * * @author Anna Zaborowska */ diff --git a/k4Interface/include/k4Interface/ISimG4ParticleSmearTool.h b/k4Interface/include/k4Interface/ISimG4ParticleSmearTool.h index 04c75c92..224efbb7 100644 --- a/k4Interface/include/k4Interface/ISimG4ParticleSmearTool.h +++ b/k4Interface/include/k4Interface/ISimG4ParticleSmearTool.h @@ -46,7 +46,7 @@ class ISimG4ParticleSmearTool : virtual public IAlgTool { */ virtual StatusCode smearMomentum(CLHEP::Hep3Vector& aMom, int aPdg = 0) = 0; - /** Check conditions of the smearing model, especially if the given parametrs do not exceed the parameters of the + /** Check conditions of the smearing model, especially if the given parameters do not exceed the parameters of the * model. * @param[in] aMinMomentum Minimum momentum. * @param[in] aMaxMomentum Maximum momentum. diff --git a/k4Interface/include/k4Interface/ISimG4PhysicsList.h b/k4Interface/include/k4Interface/ISimG4PhysicsList.h index 4acb8c68..63342076 100644 --- a/k4Interface/include/k4Interface/ISimG4PhysicsList.h +++ b/k4Interface/include/k4Interface/ISimG4PhysicsList.h @@ -37,7 +37,7 @@ class ISimG4PhysicsList : virtual public IAlgTool { /// Retrieve interface ID DeclareInterfaceID(ISimG4PhysicsList, 1, 0); - /** get initilization hook for the physics list + /** get initialization hook for the physics list * @return pointer to G4VModularPhysicsList */ virtual G4VModularPhysicsList* physicsList() = 0; From c4cb0d4ce42e62144d4503e93ea09a2646ce81db Mon Sep 17 00:00:00 2001 From: Mateusz Jakub Fila Date: Thu, 22 Aug 2024 15:41:53 +0200 Subject: [PATCH 2/2] fix outdated usage example from readme --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c00401dd..e4e65115 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ Algorithm to read data from one or multiple input file(s) on disk. Algorithm to write data to an output file on disk. ## k4run -```bash +``` $ k4run --help -usage: k4run [-h] [--dry-run] [-v] [-n NUM_EVENTS] [-l] [--gdb] [--ncpus NCPUS] [config_files ...] +usage: k4run [--dry-run] [-v] [-n NUM_EVENTS] [-l] [--gdb] [-h] [config_files ...] Run job in the Key4HEP framework @@ -32,14 +32,14 @@ positional arguments: config_files Gaudi config (python) files describing the job options: - -h, --help show this help message and exit --dry-run Do not actually run the job, just parse the config files -v, --verbose Run job with verbose output -n NUM_EVENTS, --num-events NUM_EVENTS Number of events to run - -l, --list Print all the configurable components available in the framework and exit + -l, --list Print all the configurable components available in the + framework and exit --gdb Attach gdb debugger - --ncpus NCPUS Start Gaudi in parallel mode using NCPUS processes. 0 => serial mode (default), -1 => use all CPUs + -h, --help show this help message and exit ``` When supplied with a Gaudi steering file `k4run --help file.py` also shows the settable properties of the Gaudi algorithms used in the file. Additionally, it is possible to add further arguments and use them in the steering file by using the Python `argparse.ArgumentParser` shared by `k4run`. ```python