Skip to content

Commit

Permalink
Fix typos and grammar in comments and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Nov 8, 2022
1 parent eb4bc1a commit 2bf17a5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/starterkit/k4MarlinWrapperCLIC/CEDViaWrapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ The `event_display.py` options file that is used above and that is present in th
- Exchange the LCIO input reading by the podio input reading (see above)
- Attach the `EDM4hep2LcioTool` to the wrapped `CEDViewer` processor

This should allow to arrive at a similar steering file even for slightly different configurations. One potential pitfal is the slightly different naming of the `ddsim` outputs between LCIO and EDM4hep (see [this issue](https://github.com/AIDASoft/DD4hep/issues/921)). This can be addressed by configuring the EDM4hep to LCIO converter (`edmConvTool` in the code above) to map the names accordingly.
This should allow one to arrive at a similar steering file even for slightly different configurations. One potential pitfall is the slightly different naming of the `ddsim` outputs between LCIO and EDM4hep (see [this issue](https://github.com/AIDASoft/DD4hep/issues/921)). This can be addressed by configuring the EDM4hep to LCIO converter (`edmConvTool` in the code above) to map the names accordingly.
4 changes: 2 additions & 2 deletions doc/starterkit/k4MarlinWrapperCLIC/edmConverters.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Collections from events that are already read, or are produced by a Gaudi Algori

1. Instantiate the `EDM4hep2LcioTool` Gaudi Tool, e.g. as `edmConvTool = EDM4hep2LcioTool("EDM4hep2lcio")`
2. Indicate the collections to convert using the options of the tool.
+ To sipmly convert all available collections use `edmConvTool.convertAll = True` (this is also the default!)
+ To simply convert all available collections use `edmConvTool.convertAll = True` (this is also the default!)
+ If you want to convert all available collections but want to rename some of them, e.g. because an algorithm expects a different name, use the `collNameMapping` option. This maps the input name to the output name; `edmConvTool.collNameMapping = {'MCParticles': 'MCParticle'}` will convert the input `'MCParticles'` into the `'MCParticle'` collection.
+ To convert only a subset of all available collections, set the `convertAll` option to `False` and indicate the collections to convert via the `collNameMapping` option.
3. Select the Gaudi Algorithm that will convert the indicated collections.
Expand Down Expand Up @@ -158,7 +158,7 @@ Collections from events that are already read, or are produced by a gaudi Algori

1. Instantiate the `Lcio2EDM4hepTool` Gaudi Tool, e.g. as `lcioConvTool = Lcio2EDM4hepTool("LCIO2EDM4hep")`.
2. Indicate the collections to convert in the options of the tool.
+ To sipmly convert all available collections use `lcioConvTool.convertAll = True` (this is also the default!)
+ To simply convert all available collections use `lcioConvTool.convertAll = True` (this is also the default!)
+ If you want to convert all available collections but want to rename some of them, e.g. because an algorithm expects a different name, use the `collNameMapping` option. This maps the input name to the output name; `lcioConvTool.collNameMapping = {'MCParticles': 'MCParticle'}` will convert the input `'MCParticles'` into the `'MCParticle'` collection.
+ To convert only a subset of all available collections, set the `convertAll` option to `False` and indicate the collections to convert via the `collNameMapping` option.
3. Select the Gaudi Algorithm that will convert the indicated collections.
Expand Down
4 changes: 2 additions & 2 deletions k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,11 @@ void EDM4hep2LcioTool::convertAdd(const std::string& e4h_coll_name, const std::s
StatusCode EDM4hep2LcioTool::convertCollections(lcio::LCEventImpl* lcio_event) {
const auto collections = m_podioDataSvc->getCollections();

// Start of with the pre-defined collection name mappings
// Start off with the pre-defined collection name mappings
auto collsToConvert{m_collNames.value()};
if (m_convertAll) {
info() << "Converting all collections from EDM4hep to LCIO" << endmsg;
// And simply add the rest, taking exploiting the fact that emplace will not
// And simply add the rest, exploiting the fact that emplace will not
// replace existing entries with the same key
for (const auto& [name, _] : collections) {
collsToConvert.emplace(name, name);
Expand Down
2 changes: 1 addition & 1 deletion k4MarlinWrapper/src/components/Lcio2EDM4hep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ StatusCode Lcio2EDM4hepTool::convertCollections(lcio::LCEventImpl* the_event) {
std::unique_ptr<k4LCIOConverter> lcio_converter = std::make_unique<k4LCIOConverter>(id_table);
lcio_converter->set(the_event);

// Start of with the pre-defined collection name mappings
// Start off with the pre-defined collection name mappings
auto collsToConvert{m_collNames.value()};
if (m_convertAll) {
const auto* collections = the_event->getCollectionNames();
Expand Down

0 comments on commit 2bf17a5

Please sign in to comment.