Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
  • Loading branch information
m-fila and jmcarcell committed Feb 20, 2025
1 parent 7757a0c commit c9a8b99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions doc/uniqueIDGen.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ StatusCode ExampleAlgorithm::initialize() {
m_service = service("UniqueIDGenSvc");
```
Then, use the service during execution:
Then, use the service during execution (`execute` member function for algorithm derived from `Gaudi::Algorithm` or `operator()` for functional algorithms):
```cpp
StatusCode ExampleAlgorithm::execute(const EventContext&) const {
Expand Down Expand Up @@ -114,14 +114,14 @@ public:
podio::UserDataCollection<double> operator()(const edm4hep::EventHeaderCollection& evtHeader) const final {
const auto evt = evtHeader[0];

// obtain unique value
// obtain unique value
auto uid = m_uniqueIDSvc->getUniqueID(evt.getEventNumber(), evt.getRunNumber(), name());

// seed TRandom3 or some other PRNG of your choice
auto prng = TRandom3(uid);

auto coll = podio::UserDataCollection<double>();
coll.push_back(a);
coll.push_back(prng.Rndm());
return coll;
}
```
Expand Down
3 changes: 2 additions & 1 deletion test/k4FWCoreTest/src/components/ExampleRNGSeedingAlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ class ExampleRNGSeedingAlg final
podio::UserDataCollection<double> operator()(const edm4hep::EventHeaderCollection& evtHeader) const final {
const auto evt = evtHeader[0];

// obtain unique value
// obtain unique value
auto uid = m_uniqueIDSvc->getUniqueID(evt.getEventNumber(), evt.getRunNumber(), name());

// seed TRandom3 or some other PRNG of your choice
auto prng = TRandom3(uid);

auto coll = podio::UserDataCollection<double>();
coll.push_back(prng.Rndm());
return coll;
Expand Down

0 comments on commit c9a8b99

Please sign in to comment.