TkN 2.1
Toolkit for Nuclei
tkensdf_level_rec.h
1/********************************************************************************
2 * Copyright (c) : Université de Lyon 1, CNRS/IN2P3, UMR5822, *
3 * IP2I, F-69622 Villeurbanne Cedex, France *
4 * Normandie Université, ENSICAEN, UNICAEN, CNRS/IN2P3, *
5 * LPC Caen, F-14000 Caen, France *
6 * Contibutor(s) : *
7 * Jérémie Dudouet jeremie.dudouet@cnrs.fr [2020] *
8 * Diego Gruyer diego.gruyer@cnrs.fr [2020] *
9 * *
10 * This software is governed by the CeCILL-B license under French law and *
11 * abiding by the rules of distribution of free software. You can use, *
12 * modify and/ or redistribute the software under the terms of the *
13 * CeCILL-B license as circulated by CEA, CNRS and INRIA at the following *
14 * URL \"http://www.cecill.info\". *
15 * *
16 * As a counterpart to the access to the source code and rights to copy, *
17 * modify and redistribute granted by the license, users are provided *
18 * only with a limited warranty and the software's author, the holder of *
19 * the economic rights, and the successive licensors have only limited *
20 * liability. *
21 * *
22 * In this respect, the user's attention is drawn to the risks associated *
23 * with loading, using, modifying and/or developing or reproducing the *
24 * software by the user in light of its specific status of free software, *
25 * that may mean that it is complicated to manipulate, and that also *
26 * therefore means that it is reserved for developers and experienced *
27 * professionals having in-depth computer knowledge. Users are therefore *
28 * encouraged to load and test the software's suitability as regards *
29 * their requirements in conditions enabling the security of their *
30 * systems and/or data to be ensured and, more generally, to use and *
31 * operate it in the same conditions as regards security. *
32 * *
33 * The fact that you are presently reading this means that you have had *
34 * knowledge of the CeCILL-B license and that you accept its terms. *
35 ********************************************************************************/
36
73#ifndef tkensdf_level_rec_H
74#define tkensdf_level_rec_H
75
76#include "tkensdf_record.h"
77#include "tkstring.h"
78#include "tkspin_parity.h"
79
80namespace tkn{
81
83
84public:
85
89
91 bool fJPi_tentative = false;
92 double fJ = 0;
93 bool fPi = true;
94
95 int flevelid = -1;
96
97public:
98
100 tkensdf_level_rec(const tkensdf_level_rec &_level_record) = default;
102
104 virtual bool set_record(const tkstring &_record) override;
106 virtual void analyse_record() override;
108 void analyse_continuation_record() override;
109
111 tkstring get_jpi_str(const tkstring &_record) const {return _record.substr(21,18);}
112
114 bool decode_jpi(const tkstring &_st);
115
116 const tkspin *get_J() const {return &fSpin;}
117 const tkparity *get_Pi() const {return &fParity;}
118
119 const tkstring &get_Jpi_str() const {return fJPi_str;}
120 const double &get_j() const {return fJ;}
121 const bool &get_pi() const {return fPi;}
122
123 void clear() override;
124 void print(std::ostream &) const override;
125
126private:
127
128};
129}
130
131#endif
Decodding of the ENSDF level properties.
void print(std::ostream &) const override
void analyse_continuation_record() override
analyse a continuation record
const bool & get_pi() const
tkstring get_jpi_str(const tkstring &_record) const
extract the JPi part
virtual void analyse_record() override
analyse the record content
const tkstring & get_Jpi_str() const
virtual bool set_record(const tkstring &_record) override
define the record from a string
const tkparity * get_Pi() const
const double & get_j() const
bool decode_jpi(const tkstring &_st)
decode the spin parity part
tkspin fSpin
spin parameters
tkensdf_level_rec(const tkensdf_level_rec &_level_record)=default
const tkspin * get_J() const
Decodding of the ENSDF records.
Nuclear excited state parity.
Definition: tkspin_parity.h:85
Nuclear excited state spin.
Definition: tkspin_parity.h:49
std::string with usefull tricks from TString (ROOT) and KVString (KaliVeda) and more....
Definition: tkstring.h:54
tkstring substr(size_type __pos=0, size_type __n=npos) const
Inlines.
Definition: tkstring.h:179
Definition: tklog.cpp:39