Skip to content

Commit

Permalink
Remove obsolete const_cast's.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed Dec 10, 2022
1 parent 1a927fc commit 350fffb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions RecoHGCal/TICL/plugins/PatternRecognitionbyCA.cc
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ void PatternRecognitionbyCA<TILES>::energyRegressionAndID(const std::vector<reco
//
// 1. Set default values for regressed energy and particle id for each trackster.
// 2. Store indices of tracksters whose total sum of cluster energies is above the
// eidMinClusterEnergy_ (GeV) treshold. Inference is not applied for soft tracksters.
// eidMinClusterEnergy_ (GeV) threshold. Inference is not applied for soft tracksters.
// 3. When no trackster passes the selection, return.
// 4. Create input and output tensors. The batch dimension is determined by the number of
// selected tracksters.
Expand Down Expand Up @@ -457,7 +457,7 @@ void PatternRecognitionbyCA<TILES>::energyRegressionAndID(const std::vector<reco
}

// run the inference (7)
tensorflow::run(const_cast<tensorflow::Session *>(eidSession), inputList, outputNames, &outputs);
tensorflow::run(eidSession, inputList, outputNames, &outputs);

// store regressed energy per trackster (8)
if (!eidOutputNameEnergy_.empty()) {
Expand Down
4 changes: 2 additions & 2 deletions RecoHGCal/TICL/plugins/PatternRecognitionbyCLUE3D.cc
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ void PatternRecognitionbyCLUE3D<TILES>::energyRegressionAndID(const std::vector<
//
// 1. Set default values for regressed energy and particle id for each trackster.
// 2. Store indices of tracksters whose total sum of cluster energies is above the
// eidMinClusterEnergy_ (GeV) treshold. Inference is not applied for soft tracksters.
// eidMinClusterEnergy_ (GeV) threshold. Inference is not applied for soft tracksters.
// 3. When no trackster passes the selection, return.
// 4. Create input and output tensors. The batch dimension is determined by the number of
// selected tracksters.
Expand Down Expand Up @@ -464,7 +464,7 @@ void PatternRecognitionbyCLUE3D<TILES>::energyRegressionAndID(const std::vector<
}

// run the inference (7)
tensorflow::run(const_cast<tensorflow::Session *>(eidSession), inputList, outputNames, &outputs);
tensorflow::run(eidSession, inputList, outputNames, &outputs);

// store regressed energy per trackster (8)
if (!eidOutputNameEnergy_.empty()) {
Expand Down
4 changes: 2 additions & 2 deletions RecoHGCal/TICL/plugins/PatternRecognitionbyFastJet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void PatternRecognitionbyFastJet<TILES>::energyRegressionAndID(const std::vector
//
// 1. Set default values for regressed energy and particle id for each trackster.
// 2. Store indices of tracksters whose total sum of cluster energies is above the
// eidMinClusterEnergy_ (GeV) treshold. Inference is not applied for soft tracksters.
// eidMinClusterEnergy_ (GeV) threshold. Inference is not applied for soft tracksters.
// 3. When no trackster passes the selection, return.
// 4. Create input and output tensors. The batch dimension is determined by the number of
// selected tracksters.
Expand Down Expand Up @@ -273,7 +273,7 @@ void PatternRecognitionbyFastJet<TILES>::energyRegressionAndID(const std::vector
}

// run the inference (7)
tensorflow::run(const_cast<tensorflow::Session *>(eidSession), inputList, outputNames, &outputs);
tensorflow::run(eidSession, inputList, outputNames, &outputs);

// store regressed energy per trackster (8)
if (!eidOutputNameEnergy_.empty()) {
Expand Down
4 changes: 2 additions & 2 deletions RecoHGCal/TICL/plugins/TrackstersMergeProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ void TrackstersMergeProducer::energyRegressionAndID(const std::vector<reco::Calo
//
// 1. Set default values for regressed energy and particle id for each trackster.
// 2. Store indices of tracksters whose total sum of cluster energies is above the
// eidMinClusterEnergy_ (GeV) treshold. Inference is not applied for soft tracksters.
// eidMinClusterEnergy_ (GeV) threshold. Inference is not applied for soft tracksters.
// 3. When no trackster passes the selection, return.
// 4. Create input and output tensors. The batch dimension is determined by the number of
// selected tracksters.
Expand Down Expand Up @@ -504,7 +504,7 @@ void TrackstersMergeProducer::energyRegressionAndID(const std::vector<reco::Calo
}

// run the inference (7)
tensorflow::run(const_cast<tensorflow::Session *>(eidSession), inputList, outputNames, &outputs);
tensorflow::run(eidSession, inputList, outputNames, &outputs);

// store regressed energy per trackster (8)
if (!eidOutputNameEnergy_.empty()) {
Expand Down
4 changes: 2 additions & 2 deletions RecoHGCal/TICL/plugins/TrackstersMergeProducerV3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ void TrackstersMergeProducerV3::energyRegressionAndID(const std::vector<reco::Ca
//
// 1. Set default values for regressed energy and particle id for each trackster.
// 2. Store indices of tracksters whose total sum of cluster energies is above the
// eidMinClusterEnergy_ (GeV) treshold. Inference is not applied for soft tracksters.
// eidMinClusterEnergy_ (GeV) threshold. Inference is not applied for soft tracksters.
// 3. When no trackster passes the selection, return.
// 4. Create input and output tensors. The batch dimension is determined by the number of
// selected tracksters.
Expand Down Expand Up @@ -637,7 +637,7 @@ void TrackstersMergeProducerV3::energyRegressionAndID(const std::vector<reco::Ca
}

// run the inference (7)
tensorflow::run(const_cast<tensorflow::Session *>(eidSession), inputList, outputNames, &outputs);
tensorflow::run(eidSession, inputList, outputNames, &outputs);

// store regressed energy per trackster (8)
if (!eidOutputNameEnergy_.empty()) {
Expand Down

0 comments on commit 350fffb

Please sign in to comment.