Commit 3aac4802 authored by Chao Peng's avatar Chao Peng
Browse files

add deprecation warnings for algorithms

parent 237a393a
......@@ -38,6 +38,8 @@ namespace Jug {
}
StatusCode initialize() override {
warning() << "Deprecated algorithm for digi/reco, use Jug::Digi::CalorimeterHitDigi"
"and Jug::Reco::CalorimeterHitReco instead" << endmsg;
if (GaudiAlgorithm::initialize().isFailure())
return StatusCode::FAILURE;
IRndmGenSvc* randSvc = svc<IRndmGenSvc>("RndmGenSvc", true);
......
......@@ -35,6 +35,8 @@ namespace Jug {
}
StatusCode initialize() override
{
warning() << "Deprecated algorithm for digi/reco, use Jug::Digi::CalorimeterHitDigi"
"and Jug::Reco::CalorimeterHitReco instead" << endmsg;
IRndmGenSvc* randSvc = svc<IRndmGenSvc>("RndmGenSvc", true);
StatusCode sc = m_gaussDist.initialize(randSvc, Rndm::Gauss(0.0, m_energyResolution.value()));
if (!sc.isSuccess()) {
......
......@@ -52,6 +52,8 @@ namespace Jug {
StatusCode initialize() override
{
warning() << "Deprecated algorithm for digi/reco, use Jug::Digi::CalorimeterHitDigi"
"and Jug::Reco::CalorimeterHitReco instead" << endmsg;
if (GaudiAlgorithm::initialize().isFailure())
return StatusCode::FAILURE;
IRndmGenSvc* randSvc = svc<IRndmGenSvc>("RndmGenSvc", true);
......
......@@ -48,6 +48,8 @@ namespace Jug {
}
StatusCode initialize() override {
warning() << "Deprecated algorithm for digi/reco, use Jug::Digi::CalorimeterHitDigi"
"and Jug::Reco::CalorimeterHitReco instead" << endmsg;
IRndmGenSvc* randSvc = svc<IRndmGenSvc>("RndmGenSvc", true);
StatusCode sc = m_gaussDist_a.initialize(randSvc, Rndm::Gauss(0.0, m_energyResolution_a.value() ));
if (!sc.isSuccess()) {
......
......@@ -42,6 +42,8 @@ namespace Jug::Reco {
StatusCode initialize() override
{
warning() << "Deprecated algorithm for digi/reco, use Jug::Digi::CalorimeterHitDigi"
"and Jug::Reco::CalorimeterHitReco instead" << endmsg;
if (GaudiAlgorithm::initialize().isFailure()) {
return StatusCode::FAILURE;
}
......
......@@ -46,6 +46,8 @@ namespace Jug::Reco {
StatusCode initialize() override
{
warning() << "Deprecated algorithm for digi/reco, use Jug::Digi::CalorimeterHitDigi"
"and Jug::Reco::CalorimeterHitReco instead" << endmsg;
if (GaudiAlgorithm::initialize().isFailure()) {
return StatusCode::FAILURE;
}
......
......@@ -57,6 +57,8 @@ namespace Jug::Reco {
StatusCode initialize() override
{
warning() << "Deprecated algorithm for digi/reco, use Jug::Digi::CalorimeterHitDigi"
"and Jug::Reco::CalorimeterHitReco instead" << endmsg;
if (GaudiAlgorithm::initialize().isFailure()) {
return StatusCode::FAILURE;
}
......@@ -104,8 +106,8 @@ namespace Jug::Reco {
float energy = (rh.amplitude() - m_pedMeanADC) / (float) m_capADC * m_dyRangeADC; // convert ADC -> energy
float time = rh.timeStamp(); // ns
auto id = rh.cellID();
int lid = (id_dec != nullptr & m_layerField.value().size()) ? static_cast<int>(id_dec->get(id, layer_idx)) : -1;
int sid = (id_dec != nullptr & m_sectorField.value().size()) ? static_cast<int>(id_dec->get(id, sector_idx)) : -1;
int lid = ((id_dec != nullptr) & m_layerField.value().size()) ? static_cast<int>(id_dec->get(id, layer_idx)) : -1;
int sid = ((id_dec != nullptr) & m_sectorField.value().size()) ? static_cast<int>(id_dec->get(id, sector_idx)) : -1;
// global positions
auto gpos = m_geoSvc->cellIDPositionConverter()->position(id);
......
......@@ -46,6 +46,8 @@ namespace Jug::Reco {
StatusCode initialize() override
{
warning() << "Deprecated algorithm for digi/reco, use Jug::Digi::CalorimeterHitDigi"
"and Jug::Reco::CalorimeterHitReco instead" << endmsg;
if (GaudiAlgorithm::initialize().isFailure()) {
return StatusCode::FAILURE;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment