# Which package or class supersede the TSpectrum for searching peaks？

**URL:** <https://root-forum.cern.ch/t/which-package-or-class-supersede-the-tspectrum-for-searching-peaks/51459>\
**Category:** ROOT\
**Created:** [September 5, 2022, 6:27am UTC](https://root-forum.cern.ch/t/which-package-or-class-supersede-the-tspectrum-for-searching-peaks/51459 "2022-09-05T06:27:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![zlg](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/3da27b/32.png) [@zlg](https://root-forum.cern.ch/u/zlg)\
**Post date:** [September 5, 2022, 6:27am UTC](https://root-forum.cern.ch/t/which-package-or-class-supersede-the-tspectrum-for-searching-peaks/51459/1 "2022-09-05T06:27:03Z")

</div>

The reference of classes treating the Spectrum in root marked with following notes

## Legacy Code

TSpectrum is a legacy interface: it is not recommended to use it in new code. There will be no bug fixes nor new developments.

I also notice that the TSpectrum.h and related includes have been removed from root release.

So who know which packages or classes supersede the TSpectrum classess?

* * *

\_ROOT Version: 6.26  
\_Platform: Linux x36\_64  
\_Compiler: gcc 11.3.1

* * *

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [September 5, 2022, 6:33am UTC](https://root-forum.cern.ch/t/which-package-or-class-supersede-the-tspectrum-for-searching-peaks/51459/2 "2022-09-05T06:33:50Z")

</div>

This code is not maintained anymore, but it is NOT removed.  
There is no replacement (known / planned).

> [@If TSpectrum Class is Legacy Code? Another Code For TSpectrum?](https://root-forum.cern.ch/t/if-tspectrum-class-is-legacy-code-another-code-for-tspectrum/50833/2):
>

---

<div class="post-metadata">

**Author:** ![zlg](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/3da27b/32.png) [@zlg](https://root-forum.cern.ch/u/zlg)\
**Post date:** [September 5, 2022, 1:38pm UTC](https://root-forum.cern.ch/t/which-package-or-class-supersede-the-tspectrum-for-searching-peaks/51459/4 "2022-09-05T13:38:05Z")

</div>

Thank you. You‘re quite right. The spectrum classes were just not installed by default.  
The package name root-spectrum.x86\_64 contains the files.

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [September 5, 2022, 3:43pm UTC](https://root-forum.cern.ch/t/which-package-or-class-supersede-the-tspectrum-for-searching-peaks/51459/5 "2022-09-05T15:43:41Z")

</div>

I’ve filed [[TSpectrum] avoid recurrent questions on forum concerning legacy by ferdymercury · Pull Request #11315 · root-project/root · GitHub](https://github.com/root-project/root/pull/11315)

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [September 6, 2022, 7:18am UTC](https://root-forum.cern.ch/t/which-package-or-class-supersede-the-tspectrum-for-searching-peaks/51459/6 "2022-09-06T07:18:56Z")

</div>

The Legacy banner says:

_TSpectrum is a legacy interface: it is not recommended to use it in new code. There will be no bug fixes nor new developments._

It means you can use it, but you are warned that if you find a bug it will not be fixed and if you ask for improvements they will not be done. Therefore it is not recommended to base NEW (long-term production) code on it. But that’s your choice, you are free to do what you want, and depending on the context, TSpectrum might still be a good choice.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [September 7, 2022, 1:33pm UTC](https://root-forum.cern.ch/t/which-package-or-class-supersede-the-tspectrum-for-searching-peaks/51459/7 "2022-09-07T13:33:13Z")

</div>

PR here: [[skip-ci] redefine the legacy alias by couet · Pull Request #11327 · root-project/root · GitHub](https://github.com/root-project/root/pull/11327)

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [September 21, 2022, 1:34pm UTC](https://root-forum.cern.ch/t/which-package-or-class-supersede-the-tspectrum-for-searching-peaks/51459/8 "2022-09-21T13:34:09Z")

</div>

Closed on September 21, 2022, 1:34pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
