Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for two types of crashes in recent nightlies #83

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions RecFCCeeCalorimeter/src/components/AugmentClustersFCCee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ StatusCode AugmentClustersFCCee::initialize()
}

// initialise the list of metadata for the clusters
// append to the metadata of the input clusters
std::vector<std::string> showerShapeDecorations = m_inShapeParameterHandle.get();
// append to the metadata of the input clusters (if any)
std::vector<std::string> emptyVector;
std::vector<std::string> showerShapeDecorations = m_inShapeParameterHandle.get(emptyVector);
giovannimarchiori marked this conversation as resolved.
Show resolved Hide resolved
for (size_t k = 0; k < m_detectorNames.size(); k++)
{
const char *detector = m_detectorNames[k].c_str();
Expand All @@ -91,8 +92,6 @@ StatusCode AugmentClustersFCCee::finalize()

StatusCode AugmentClustersFCCee::execute([[maybe_unused]] const EventContext &evtCtx) const
{


// get the input collection with clusters
const edm4hep::ClusterCollection *inClusters = m_inClusters.get();

Expand Down
4 changes: 2 additions & 2 deletions RecFCCeeCalorimeter/src/components/AugmentClustersFCCee.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ class AugmentClustersFCCee : public Gaudi::Algorithm
this, "systemNames", {"EMB"}, "Names of the detectors, corresponding to systemIDs"};
/// Numbers of layers of the detectors
Gaudi::Property<std::vector<size_t>> m_numLayers{
this, "numLayers", {12}, "Numbers of layers of the systems"};
this, "numLayers", {11}, "Numbers of layers of the systems"};
/// Weights for each detector layer for theta position log-weighting
Gaudi::Property<std::vector<std::vector<double>>> m_thetaRecalcLayerWeights{
this,
"thetaRecalcWeights",
{{-1, 3.0, 3.0, 3.0, 4.25, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0}},
{{-1, 3.0, 3.0, 3.0, 4.25, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0}},
"Weights for each detector layer for theta position log-weighting. If negative use linear weight."};
/// Name of the detector readouts, corresponding to system IDs in m_systemIDs
Gaudi::Property<std::vector<std::string>> m_readoutNames{
Expand Down
13 changes: 10 additions & 3 deletions RecFCCeeCalorimeter/src/components/CalibrateCaloClusters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ StatusCode CalibrateCaloClusters::initialize()
}

// read from the metadata the names of the shape parameters in the input clusters and append the total raw energy to the output
std::vector<std::string> shapeParameters = m_inShapeParameterHandle.get();
std::vector<std::string> emptyVector;
std::vector<std::string> shapeParameters = m_inShapeParameterHandle.get(emptyVector);
shapeParameters.push_back("rawE");
m_outShapeParameterHandle.put(shapeParameters);

Expand Down Expand Up @@ -241,7 +242,10 @@ StatusCode CalibrateCaloClusters::readCalibrationFile(const std::string &calibra
debug() << "Input Node Name/Shape (" << m_input_names.size() << "):" << endmsg;
for (std::size_t i = 0; i < m_ortSession->GetInputCount(); i++)
{
m_input_names.insert(m_input_names.end(), m_ortSession->GetInputNames().begin(), m_ortSession->GetInputNames().end());
// for old ONNX runtime version
// m_input_names.emplace_back(m_ortSession->GetInputName(i, allocator));
// for new runtime version
m_input_names.emplace_back(m_ortSession->GetInputNameAllocated(i, allocator).get());
m_input_shapes = m_ortSession->GetInputTypeInfo(i).GetTensorTypeAndShapeInfo().GetShape();
debug() << "\t" << m_input_names.at(i) << " : ";
for (std::size_t k = 0; k < m_input_shapes.size() - 1; k++)
Expand All @@ -263,7 +267,10 @@ StatusCode CalibrateCaloClusters::readCalibrationFile(const std::string &calibra
debug() << "Output Node Name/Shape (" << m_output_names.size() << "):" << endmsg;
for (std::size_t i = 0; i < m_ortSession->GetOutputCount(); i++)
{
m_output_names.insert(m_output_names.end(), m_ortSession->GetOutputNames().begin(), m_ortSession->GetOutputNames().end());
// for old ONNX runtime version
// m_output_names.emplace_back(m_ortSession->GetOutputName(i, allocator));
// for new runtime version
m_output_names.emplace_back(m_ortSession->GetOutputNameAllocated(i, allocator).get());
m_output_shapes = m_ortSession->GetOutputTypeInfo(i).GetTensorTypeAndShapeInfo().GetShape();
debug() << "\t" << m_output_names.at(i) << " : ";
for (std::size_t k = 0; k < m_output_shapes.size() - 1; k++)
Expand Down
Loading