Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Sep 5, 2024
1 parent df69ed2 commit 85b91bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/CLUENtuplizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class CLUENtuplizer : public Gaudi::Algorithm {
mutable DataHandle<edm4hep::CalorimeterHitCollection> EE_calo_handle {"EndcapInputHits", Gaudi::DataHandle::Reader, this};
mutable DataHandle<edm4hep::EventHeaderCollection> ev_handle {"EventHeader", Gaudi::DataHandle::Reader, this};
mutable DataHandle<edm4hep::MCParticleCollection> mcp_handle {"MCParticles", Gaudi::DataHandle::Reader, this};
mutable DataHandle<edm4hep::ClusterCollection> cluster_handle {ClusterCollectionName, Gaudi::DataHandle::Reader, this};
MetaDataHandle<std::string> cellIDHandle {EB_calo_handle, edm4hep::CellIDEncoding, Gaudi::DataHandle::Reader};

bool singleMCParticle = false;
Expand Down
4 changes: 4 additions & 0 deletions src/CLUENtuplizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ StatusCode CLUENtuplizer::execute(const EventContext&) const {
debug() << "ECAL Calorimeter Hits Size = " << (*EB_calo_coll).size()+(*EE_calo_coll).size() << endmsg;

// Read cluster collection
// This should be fixed, for now the const cast is added to be able to create the handle
// as it was done before https://github.com/key4hep/k4Clue/pull/60
DataHandle<edm4hep::ClusterCollection> cluster_handle {
ClusterCollectionName, Gaudi::DataHandle::Reader, const_cast<CLUENtuplizer*>(this) };
cluster_coll = cluster_handle.get();

// Get collection metadata cellID which is valid for both EB, EE and Clusters
Expand Down

0 comments on commit 85b91bf

Please sign in to comment.