BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParityC.cc
Go to the documentation of this file.
1#include "EvtParityC.hh"
2
3std::map<string, double> parityC::_parityCMap_;
4
5
7 string location = getenv("BESEVTGENROOT");
8 location += "/share/_parityC.list_";
9 //-- debugging
10 cout<<"The _parity.list_ location is "<<location<<endl;
11 //--
12 ifstream file(location.c_str());
13 string parname;
14 double pval;
15 if(file==0){cout<<" parity::readParity: No particle parity list are available"<<endl;abort();}
16 while(!file.eof()){
17 file>>parname>>pval;
18 pair<string, double> prt(parname,pval);
19 //-- for debugging
20 //cout<<"parname, pval "<<parname<<" "<<pval<<endl;
21
22 _parityCMap_.insert(prt);
23 }
24}
25
26double parityC::getC(string parname){
27 double thepar;
28 thepar = _parityCMap_[parname];
29 //if(thepar ==0 ){cout<<"parity::getP::No entries in parity list available for "<<parname<<endl; abort();}
30 return thepar;
31}
char * file
Definition: DQA_TO_DB.cxx:15
#define prt(n)
std::ifstream ifstream
Definition: bpkt_streams.h:44