27 #ifndef GW_XGAMMALINK_H
31 #ifndef GW_NUCLEARLEVEL_H
35 #ifndef GW_LEVELSCHEME_H
53 Link *ENSDF::GetLink(
const char *record, TString &)
57 newlink = NULL; s =
"";
58 if ( IsRecord(record,
"GAMMA") ) {
59 if ( GetCC(record) == 0 ) {
68 ((
GammaLink *)newlink)->GetEnergy().Set(GetE(record,tmp), GetDE(record));
69 if ( tmp.find(
"?") != string::npos )
70 { ((
GammaLink *)newlink)->GetEnergy().SetInfo(InfoData::kTentative);}
74 if ( tmp.find(
"?") != string::npos )
77 if ( record[77] ==
'C' || record[77] ==
'?' ) {
78 ((
GammaLink *)newlink)->GetEnergy().SetInfo(InfoData::kTentative);
85 Level *ENSDF::GetLevel(
const char *record, TString &opt)
87 static char spinoffset[] =
"JKLMNOPQRSTUVWXYZABCDEFGHI";
92 if ( IsRecord(record,
"LEVEL") ) {
99 lev->
GetT().
Set(GetT(record,unit_t,tmp1),GetDT(record));
100 if ( tmp1.find(
"?") != string::npos )
106 if ( tmp1.find(
"?") != string::npos ) {
109 tmp1.erase(tmp1.find(
"?"),1);
126 tmp1 = GetJPI(record);
127 if (tmp1.find(
"NATURAL/UNNATURAL") != string::npos) {
128 if ( gDebug == 1)
printf(
"NATURAL/UNNATURAL J in ENSDF::GetLevel() \n");
132 if (tmp1.find(
"NOT") != string::npos) {
133 if ( gDebug == 1)
printf(
"NOT J in ENSDF::GetLevel()\n");
141 for (
int i = 0; i < 26; i++) {
143 tmp2 = spinoffset[i]; tmp2 +=
"+" ;
144 if ( (l = tmp1.find(tmp2,0)) != string::npos )
145 { s += spinoffset[i]; tmp1.erase(l,2);
break; }
146 if ( (l = tmp1.find(spinoffset[i],0)) != string::npos )
147 { s += spinoffset[i]; tmp1.erase(l,1);
break; }
150 if ( tmp1.find(
"-") != string::npos && tmp1.find(
"+") != string::npos ) {
151 if ( gDebug == 1)
printf(
" - and + in ENSDF::GetLevel()\n");
158 if ( tmp1.find(
"-") != string::npos ) {
163 if ( gDebug == 1)
printf(
" - in ENSDF::GetLevel()\n");
165 if ( tmp1.find(
"-)") != string::npos ) {
170 if ( gDebug == 1)
printf(
" -? in ENSDF::GetLevel()\n");
172 if ( tmp1.find(
"+") != string::npos ) {
177 if ( gDebug == 1)
printf(
" + in ENSDF::GetLevel()\n");
179 if ( tmp1.find(
"+)") != string::npos ) {
184 if ( gDebug == 1)
printf(
" +? in ENSDF::GetLevel()\n");
189 if ( gDebug > 0 )cout <<
" Multiple values of spin and/or parity "<< tmp1 <<
endl;
190 bool multiple =
false; l = string::npos;
191 if ( (l = tmp1.find(
"OR")) != string::npos ) { tmp1.erase(l); multiple =
true;}
192 if ( (l = tmp1.find(
",")) != string::npos ) { tmp1.erase(l); multiple =
true;}
193 if ( (l = tmp1.find(
"AND")) != string::npos ) { tmp1.erase(l); multiple =
true;}
194 if ( (l = tmp1.find(
"&")) != string::npos ) { tmp1.erase(l); multiple =
true;}
195 if ( (l = tmp1.find(
"TO")) != string::npos ) { tmp1.erase(l); multiple =
true;}
196 if ( (l = tmp1.find(
":")) != string::npos ) { tmp1.erase(l); multiple =
true;}
197 if ( (l = tmp1.find(
"AP")) != string::npos ) { tmp1.erase(l,2); multiple =
true;}
198 if ( (l = tmp1.find(
"LE")) != string::npos ) { tmp1.erase(l,2); multiple =
true;}
199 if ( (l = tmp1.find(
"GE")) != string::npos ) { tmp1.erase(l,2); multiple =
true;}
201 if ( gDebug > 0 ) cout <<
" Multiple values of spin and/or parity "<< tmp1 <<
endl;
207 if ( (l = tmp1.find(
"(")) != string::npos ) {
210 if ( (l = tmp1.find(
")")) != string::npos ) {
218 if ( (l = tmp1.find(
"/2")) != string::npos ) {
219 tmp1.erase(l,2); d = 2;
221 istringstream spinstring(tmp1); spinstring >> n ;
222 if ( spinstring.fail() ) {
237 opt = s.data();
return lev;
240 void ENSDF::ls(std::ostream &)
const
249 char *record = BlankRecord();
251 Open(
"DY_ENSDF.ens"); BaseENSDF::ls(cout);
253 unsigned int idset;
bool ok;
255 idset = IsDataSet(
"152DY");
257 ok = FirstRecord(idset,record);
259 if ( IsRecord(record,
"LEVEL") ) {
260 GetLevel(record,tmp)->ls();
262 if ( IsRecord(record,
"GAMMA") ) {
265 ok = NextRecord(idset,record);
268 else {
printf(
"Cannot find data set in test \n "); }
printf("******************************************************************** \n")
virtual void SetColor(EDefaultColor color)
Set color.
virtual void Set(Data_T data)
set the measure and its error (default err=0)
virtual bool IsData(UShort_t) const
to get some information about this data
void Set(Int_t n, Int_t d=1)
To set the spin.
interface to ENSDF Evaluated Nuclear Structure Data File
A XGammaLink is a converted gamma-ray link.
header file for a NuclearLevel
A link between two levels.
Parity & GetParity()
get the parity and modify it if it is needed
Measure< Float_t > & GetEnergy()
Measure< Float_t > & GetE()
to get the energy and modify it if it is needed
ENSDF: Interface between ENSDF files and the GammaWare Nuclear data related objects.
virtual Measure< Float_t > & GetConversion()
to get/modify the conversion coefficient and its error
void Set(Parity::EParity)
header file for a LevelScheme
virtual Measure< Float_t > & GetStrength()
to get the strength and modify it if it is needed
virtual void SetX2(Double_t)
All labels are shifted when moving a level to another position.
virtual void SetY1(Double_t)
All labels are shifted when moving a level to another position.
ADF::LogMessage & endl(ADF::LogMessage &log)
virtual void SetLabel(const char *, Int_t)
to set labels
virtual void SetX1(Double_t)
All labels are shifted when moving a level to another position.
Spin & GetSpin()
to get the spin and modify it if it is needed
virtual void SetInfo(InfoData::EData)
to set some information about this data
A GammaLink binds two nuclear levels.
Measure< Float_t > & GetT()
header file for a XGammaLink
virtual void SetStyle(EDefaultStyle style)
Set style.
Data_T GetValue() const
get the value, cannot be overloaded
Base class describing a general level.