Skip to content

Commit

Permalink
separate cellID const for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
fdplacido authored and vvolkl committed Oct 20, 2021
1 parent 5c278e8 commit 9a5185c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "k4FWCoreTest_cellID_reader.h"
#include "k4FWCoreTest_cellID_writer.h"


DECLARE_COMPONENT(k4FWCoreTest_cellID_reader)
Expand All @@ -23,7 +24,7 @@ StatusCode k4FWCoreTest_cellID_reader::execute() {
auto collID = simtrackerhits_coll->getID();
const auto cellIDstr = m_simTrackerHitReaderHandle.getCollMetadataCellID(collID);

if (cellIDstr != "M:3,S-1:3,I:9,J:9,K-1:6") {
if (cellIDstr != cellIDtest) {
std::cout << "ERROR cellID is: " << cellIDstr << std::endl;
return StatusCode::FAILURE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ StatusCode k4FWCoreTest_cellID_writer::execute() {

for (auto& id : collids->ids()) {
auto& collmd = m_podioDataSvc->getProvider().getCollectionMetaData(id);
collmd.setValue("CellIDEncodingString", "M:3,S-1:3,I:9,J:9,K-1:6");
collmd.setValue("CellIDEncodingString", cellIDtest);
}

return StatusCode::SUCCESS;
Expand Down
2 changes: 2 additions & 0 deletions test/k4FWCoreTest/src/components/k4FWCoreTest_cellID_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
// datamodel
#include "edm4hep/SimTrackerHitCollection.h"

const std::string cellIDtest = "M:3,S-1:3,I:9,J:9,K-1:6";

/** @class k4FWCoreTest_cellID
* Lightweight producer for edm data to test cellID
*/
Expand Down

0 comments on commit 9a5185c

Please sign in to comment.