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