Commit f2504985 authored by Stezowski Olivier's avatar Stezowski Olivier
Browse files

Merge branch 'preprod' into 'master'

Merge preprod to Master

See merge request IPNL_GAMMA/narval_emulator!34
parents 55182d05 5ab55be4
zPrograms/FitSpek.o
zPrograms/ListFrames
zPrograms/ListFrames.o
zPrograms/Misc.o
zPrograms/Mixfft.o
zPrograms/ReadSpek.o
zPrograms/RecalEnergy
zPrograms/RecalEnergy.o
zPrograms/SortCapsule
zPrograms/SortCapsule.o
zPrograms/SortFFT
zPrograms/SortFFT.o
zPrograms/SortPsaHits
zPrograms/SortPsaHits.o
zPrograms/matlib.o
zPrograms/speclib.o
zPrograms/xTalkInvert
zPrograms/xTalkInvert.o
zPrograms/xTalkMake
zPrograms/xTalkMake.o
zPrograms/xTalkSort
zPrograms/xTalkSort.o
image: gitlab-registry.in2p3.fr/ipnl_gamma/ganpro:latest
image: gitlab-registry.in2p3.fr/ipnl_gamma/docker_gamma:latest
stages:
- build
......@@ -13,30 +13,23 @@ compile:
- mkdir AgataSoftware
- cd AgataSoftware
- git clone https://gitlab.in2p3.fr/IPNL_GAMMA/scripts.git
- (exit `python scripts/gRaySoftware.py --adf=origin/preprod all | grep "recipe for target" | grep failed | wc -l`)
- (exit `python scripts/gRaySoftware.py --mfm= all | grep "recipe for target" | grep failed | wc -l`)
- python scripts/gRaySoftware.py --adf=origin/preprod all
- python scripts/gRaySoftware.py --mfm= all
- cp -r ../narval_emulator ./agapro
- echo "Compilation without ROOT..."
- (exit `python scripts/gRaySoftware.py --agapro= conf compile install | grep "recipe for target" | grep failed | wc -l`)
- python scripts/gRaySoftware.py --agapro= conf compile install
- export ROOTSYS=/opt/root/
- export PATH=$ROOTSYS/bin/:$PATH
- export LD_LIBRARY_PATH=$ROOTSYS/lib/:$LD_LIBRARY_PATH
- echo "Compilation with ROOT..."
- (exit `python scripts/gRaySoftware.py --agapro= conf compile install | grep "recipe for target" | grep failed | wc -l`)
- python scripts/gRaySoftware.py --agapro= conf compile install
- cd agapro/
- mkdir -p cppcheck_output
- cppcheck --xml --xml-version=2 --enable=style,performance,portability,unusedFunction -i AGATREE -i PRISMA -i cmake -i config -i zPrograms -i zUseful . 2> cppcheck_output/output.xml
- cp -r cppcheck_output ../../narval_emulator/
# - cd doxyfiles/
# - rm -rf doc
# - doxygen Doxyfile.in
# - cd doc
# - tar -czf doxygen.tgz html
# - cp doxygen.tgz ../../../../narval_emulator/
artifacts:
paths:
- ./cppcheck_output/output.xml
# - ./doxygen.tgz
sonar:
stage: publish
......
......@@ -45,9 +45,14 @@ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
#
# Where to look first for cmake modules
#
if(DEFINED ENV{AGATASOFTWARE_TOP_DIR})
set(CMAKE_MODULE_PATH $ENV{AGATASOFTWARE_TOP_DIR}/scripts/cmake/Modules ${CMAKE_MODULE_PATH})
if(DEFINED ENV{G_RAYSOFTWARE_TOP_DIR})
set(CMAKE_MODULE_PATH $ENV{G_RAYSOFTWARE_TOP_DIR}/scripts/cmake/Modules ${CMAKE_MODULE_PATH})
else()
if(DEFINED ENV{AGATASOFTWARE_TOP_DIR})
set(CMAKE_MODULE_PATH $ENV{AGATASOFTWARE_TOP_DIR}/scripts/cmake/Modules ${CMAKE_MODULE_PATH})
endif()
endif()
message("PATH to search for cmake modules ${CMAKE_MODULE_PATH}")
#
# define format for libraries (force .so for macos)
......@@ -98,6 +103,8 @@ find_package(ADF REQUIRED)
#
find_package(ROOT)
find_package(MFM)
find_package(DCOD)
# Find module using simple test
include(AGAPROMacroUtilities)
include(AGAPROSearchInstalledSoftware)
......
......@@ -222,7 +222,6 @@ void ChainOfActors::Dispatch()
int used1=thisLocker->GetDataSize(myIndex);
if(used1 == 0) { // refill only if no rest data in exchange buffer
thisLocker->StoreData(myIndex, (char*)dispatchBuff, dispatchSize);
int used2=thisLocker->GetDataSize(myIndex);
dispatchSize = 0; // StoreData guaranteed to take all data
dispatchFlag = false;
thisLocker->Unlock(myIndex);
......@@ -257,9 +256,7 @@ void ChainOfActors::DispatchEOD()
UInt_t i4dat[kEodKeySize] = {sizeof(i4dat), 0, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF};
i4dat[1] = ptrBuilder->uKeyIn[indQueue];
int used1=thisLocker->GetDataSize(myIndex);
thisLocker->AddData(myIndex, (char*)i4dat, sizeof(i4dat)); // bytes
int used2=thisLocker->GetDataSize(myIndex);
dispatchSize = 0;
isClosed = true;
thisLocker->Unlock(myIndex);
......
......@@ -169,7 +169,7 @@ vector<ChainOfActors *> theChains;
// this part used only during setup
struct builder_t {
builder_t(std::string name) : pEventBuilder(NULL), theName(name), numInputs(0), indChain(-1) {}
builder_t(const std::string& name) : pEventBuilder(NULL), theName(name), numInputs(0), indChain(-1) {}
EventBuilder *pEventBuilder;
std::string theName;
int numInputs;
......@@ -872,7 +872,7 @@ void listKeysAndExit()
delete pf6;
#if defined(HAS_MFM) && defined(HAS_ROOT)
AGAPRO::TB_AgNedDiam *pf7 = new AGAPRO::TB_AgNedDiam;
AGAPRO::TreeBuilder *pf7 = new AGAPRO::TreeBuilder;
pf7->GetParameters("", true);
delete pf7;
#endif
......@@ -1121,11 +1121,11 @@ bool topologyConfNew()
}
// 42
#if defined(HAS_MFM) && defined(HAS_ROOT)
else if(pActor->libName == "TB_AgNedDiam") { // no mother-daughter model
cout << "TB_AgNedDiam ..." << endl;
AGAPRO::TB_AgNedDiam::process_config(pActor->libConf.c_str(), &error_config);
else if(pActor->libName == "TreeBuilder") { // no mother-daughter model
cout << "TreeBuilder ..." << endl;
AGAPRO::TreeBuilder::process_config(pActor->libConf.c_str(), &error_config);
IF_ERRORCONFIG(error_config);
pActor->nrvPointer = new AGAPRO::TB_AgNedDiam;
pActor->nrvPointer = new AGAPRO::TreeBuilder;
pActor->libItem = 420;
}
#endif
......@@ -1394,11 +1394,11 @@ bool topologyConfNew()
pActor->libItem = 1;
}
#if defined(HAS_MFM) && defined(HAS_ROOT)
else if(pActor->libName == "TB_AgNedDiam") {
cout << "TB_AgNedDiam ..." << endl;
else if(pActor->libName == "TreeBuilder") {
cout << "TreeBuilder ..." << endl;
BasicAFC::process_config(pActor->libConf.c_str(), &error_config);
if(error_config) {cout << pActor->libName << "::process_config failed" << endl; return false;}
pActor->nrvPointer = new TB_AgNedDiam;
pActor->nrvPointer = new TreeBuilder;
pActor->libItem = 1;
}
#endif
......@@ -1584,7 +1584,7 @@ bool topologyInit()
bool topologyStart()
{
UInt_t error_code; uint32_t e_code;
UInt_t error_code;
for(size_t nc = 0; nc < theChains.size(); nc++) {
ChainOfActors * pChain = theChains[nc];
......@@ -1592,7 +1592,7 @@ bool topologyStart()
pChain->runThreaded = runThreaded;
bool printmsg = true;
for(int na = 0; na < pChain->numActors; na++) {
error_code = 0; e_code = 0;
error_code = 0;
actor *pActor = &pChain->theActors[na];
if(!pActor->nrvPointer && !pActor->evbPointer)
continue;
......@@ -1640,14 +1640,14 @@ bool topologyStart()
bool topologyStop()
{
UInt_t error_code; uint32_t e_code;
UInt_t error_code;
for(size_t nc = 0; nc < theChains.size(); nc++) {
ChainOfActors * pChain = theChains[nc];
cout << "\n FINISHING CHAIN " << nc << endl;
bool printmsg = true;
for(int na = 0; na < pChain->numActors; na++) {
error_code = 0; e_code = 0;
error_code = 0;
actor *pActor = &pChain->theActors[na];
if(!pActor->nrvPointer && !pActor->evbPointer)
continue;
......
......@@ -24,7 +24,7 @@ const int rQueuesStep = 1000000; // 10 ms steps
bool stopSig;
#endif
EventBuilder::EventBuilder(std::string name, unsigned int nque) :
EventBuilder::EventBuilder(const std::string& name, unsigned int nque) :
nQueues(0), nevCount(0), oevCount(0),
evQue(NULL), evQueEvts(NULL), isGood(NULL), minTstamp(0), oldTstamp(0), minChain(0),
inQueLocker(NULL), statKeys(NULL),
......@@ -183,7 +183,6 @@ void EventBuilder::PrintStat()
cout << endl;
}
double faver = double(totMult)/double(sumMult);
cout << " <mult> = ";
cout << fixed << setprecision(2) << setw(6) << double(totMult)/double(sumMult) << endl;
......@@ -697,7 +696,6 @@ bool EventBuilder::InitBuilder()
UInt_t EventBuilder::GetParameters(const std::string& confFile, Bool_t doList)
{
string bType; int btV1(0), btV2(0);
string inpKey;
string MandatoryinpKey;
UInt_t ind1(0); int val1(0);
......@@ -708,8 +706,6 @@ UInt_t EventBuilder::GetParameters(const std::string& confFile, Bool_t doList)
, &gActualClass);
conf.Add("SaveDataDir", "where to write data and spectra"
, &fOdirPrefix);
//conf.Add("BuilderType", "builder type(TimeStamp | EventNumber) coincidence_window start_from(default = 0)"
// , &bType, &btV1, &btV2).SetRequired(2);
conf.Add("KeyIn", "symbolic_name (e.g. data:psa) of the input frames"
, &inpKey);
conf.Add("KeyOut", "symbolic_name (e.g. event:data:psa) of \"\". 'None' to avoid the surrounding frame"
......@@ -897,7 +893,7 @@ bool EventBuilder::InitKeys(unsigned int nv)
return (nerrors == 0);
}
void EventBuilder::PrintDFAgentKeys(std::string str)
void EventBuilder::PrintDFAgentKeys(const std::string& str)
{
return;
......
......@@ -110,7 +110,7 @@ public:
public:
EventBuilder(std::string name, unsigned int nque = 1);
EventBuilder(const std::string& name, unsigned int nque = 1);
const std::string &GetConfPath() {
return fConfPath;
......@@ -153,7 +153,7 @@ public:
}
void PrintStat();
void PrintDFAgentKeys(std::string str);
void PrintDFAgentKeys(const std::string& str);
void CheckEvent_Tstamp();
......
#----------------------------------------------------------------------------
# Search Narval : Only if WITH_NARVAL is given
#
......@@ -16,8 +15,17 @@ if (EXISTS ${WITH_NARVAL}/narval_install)
else()
MESSAGE("[AGAPRO] Narval has not been found on this machine")
endif()
#----------------------------------------------------------------------------
if (DCOD_FOUND)
SET(HAS_DCOD ON)
set(DO_NARVAL_INTERFACE ON)
message("[AGAPRO] + Configured with DCOD enabled")
else()
message("[AGAPRO] + Configured with DCOD disabled")
endif()
#----------------------------------------------------------------------------
# THREAD SUPPORT.
#
......
......@@ -7,6 +7,7 @@
#cmakedefine HAS_C11
#cmakedefine HAS_ROOT
#cmakedefine HAS_MFM
#cmakedefine HAS_DCOD
//////////////////////////////
......
......@@ -57,6 +57,13 @@ else()
message("[AGAPRO] + Configured with MFM disabled")
endif()
if (DCOD_FOUND)
SET(HAS_DCOD ON)
message("[AGAPRO] + Configured with DCOD enabled")
else()
message("[AGAPRO] + Configured with DCOD disabled")
endif()
#
#
configure_file (
......
......@@ -64,10 +64,7 @@ class ConfReader
std::vector<Par *> vpar;
std::vector<char *> saved;
Com() : keyCount(0), parCount(0), Required(-1), Disabled(false), HasError(false) {}
Com(const std::string &keyw, const std::string &help) : keyCount(0), parCount(0), Required(-1), Disabled(false), HasError(false) {
Keyw = keyw;
KeyLow = keyw;
Help = help;
Com(const std::string &keyw, const std::string &help) : keyCount(0), parCount(0), Required(-1), Disabled(false), HasError(false), Keyw(keyw), KeyLow(keyw), Help(help) {
transform(KeyLow.begin(), KeyLow.end(), KeyLow.begin(), ::tolower);
}
int GetData(std::string data, bool verbose);
......@@ -234,6 +231,17 @@ public:
defaultRequired = -1; // by default, all parameters of a command must be given
smartDefaults = inf; // single-bool keywords default to true unless they start with No/Dont
}
~ConfReader(){
for(unsigned int i=0;i<vcom.size();++i){
for(unsigned int j=0;j<vcom[i]->saved.size();++j){
delete [] vcom[i]->saved[j];
}
for(unsigned int j=0;j<vcom[i]->vpar.size();++j){
delete vcom[i]->vpar[j];
}
delete vcom[i];
}
}
int Size() const {return int(vcom.size());}
int Find(const std::string& name) const;
void Show(const std::string& className = "") const;
......
......@@ -84,7 +84,7 @@ private:
public:
CycleServer(int cycleMin = defaultMinCycleTime, int cycleMax = defaultMaxCycleTime);
virtual ~CycleServer() {}
void SetCommandFile(std::string name) { comFile = name; }
void SetCommandFile(const std::string& name) { comFile = name; }
void Start(const std::string &name, int pprompt = 1, int cycleMin = defaultMinCycleTime, int cycleMax = defaultMaxCycleTime);
void Exec(uint64_t tstNew, int nevts);
void Save(bool erase = false);
......
......@@ -44,7 +44,7 @@ public:
void AddToBuffer ( unsigned short int *, int );
public:
void SetPrefix (std::string pfx) {filePrefix = pfx;}
void SetPrefix (const std::string& pfx) {filePrefix = pfx;}
void BeginOfRun ( int );
void EndOfRun ();
......
......@@ -71,7 +71,7 @@ bool stringTrim(std::string& str, const std::string& cmt)
return false;
}
void stringRemove(std::string &str, const std::string rem, bool by_char) {
void stringRemove(std::string &str, const std::string& rem, bool by_char) {
if(by_char) {
size_t nn = str.find_first_of(rem);
while(nn != string::npos) {
......@@ -88,7 +88,7 @@ void stringRemove(std::string &str, const std::string rem, bool by_char) {
}
}
bool stringFirst(std::string &line, std::string &keyw, const std::string sep)
bool stringFirst(std::string &line, std::string &keyw, const std::string& sep)
{
stringTrim(line, "#");
if(line.empty())
......@@ -102,7 +102,7 @@ bool stringFirst(std::string &line, std::string &keyw, const std::string sep)
return true;
}
bool stringSplit(std::string &line, std::string &keyw, std::string &data, const std::string sep)
bool stringSplit(std::string &line, std::string &keyw, std::string &data, const std::string& sep)
{
stringTrim(line, "#");
if(line.empty())
......@@ -138,7 +138,7 @@ bool stringSplit(std::string &line, std::string &keyw, std::string &data, const
return true;
}
int stringCount(std::string &line, const std::string sep)
int stringCount(std::string &line, const std::string& sep)
{
stringTrim(line, "#");
if(line.empty())
......@@ -231,7 +231,7 @@ bool stringIncrement(std::string &str, int count)
return true;
}
bool stringIncrement(std::string &str, const std::string sep, int count)
bool stringIncrement(std::string &str, const std::string& sep, int count)
{
if(count == 0)
return false;
......@@ -323,7 +323,7 @@ int stringLocate(const std::string &s1, const std::vector<std::string> &sv, bool
}
int getKeyFromFile(const std::string filename, const std::string theKey, std::string &theValue, bool verbose)
int getKeyFromFile(const std::string& filename, const std::string& theKey, std::string &theValue, bool verbose)
{
ifstream configfile( filename.c_str() );
if(!configfile.good()) {
......
......@@ -21,18 +21,18 @@ inline double get_wall_time() {
void stringTrim(std::string &str);
bool stringTrim(std::string &str, const std::string& cmt);
bool stringFirst(std::string &line, std::string &keyw, const std::string sep = " \t");
bool stringSplit(std::string &line, std::string &keyw, std::string &data, const std::string sep = " \t");
int stringCount(std::string &line, const std::string sep = " \t");
bool stringFirst(std::string &line, std::string &keyw, const std::string& sep = " \t");
bool stringSplit(std::string &line, std::string &keyw, std::string &data, const std::string& sep = " \t");
int stringCount(std::string &line, const std::string& sep = " \t");
bool stringIncrement(std::string &str, int count = 1);
bool stringIncrement(std::string &str, const std::string sep, int count = 1);
bool stringIncrement(std::string &str, const std::string& sep, int count = 1);
bool stringEq (const std::string &s1, const std::string &s2, bool ignorecase = true);
bool stringHas (const std::string &s1, const std::string &s2, bool ignorecase = true);
int stringWhere (const std::string &s1, const std::string &s2, bool ignorecase = true);
int stringLocate(const std::string &s1, const std::vector<std::string> &s2, bool ignorecase = true, bool partial = true);
void stringRemove(std::string &str, const std::string rem, bool by_char = true);
void stringRemove(std::string &str, const std::string& rem, bool by_char = true);
int getKeyFromFile(const std::string filename, const std::string theKey, std::string &theValue, bool verbose = false);
int getKeyFromFile(const std::string& filename, const std::string& theKey, std::string &theValue, bool verbose = false);
void forceTailSlash(std::string &dr);
bool forceExtension(std::string &fn, const std::string &type);
bool fileExists(const std::string &fname);
......
......@@ -131,7 +131,7 @@ const double c8 = 1./sqrt(2.);
void MixFFT::factorize(int n, int *nFact, int fact[])
{
int i,j,k;
int i,j;
int nRadix;
int radices[7];
int factors[maxFactorCount];
......@@ -173,7 +173,7 @@ void MixFFT::factorize(int n, int *nFact, int fact[])
}
if (n>1)
{
for (k=2; (k-1)*(k-1) < n; k++) // D.B.2013 (k=2; k < sqrt(n)+1; k++) compiler complains on sqrt(n)
for (int k=2; (k-1)*(k-1) < n; k++) // D.B.2013 (k=2; k < sqrt(n)+1; k++) compiler complains on sqrt(n)
while ((n % k) == 0)
{
n=n / k;
......@@ -235,7 +235,7 @@ void MixFFT::permute(int nPoint, int nFact,
double xRe[], double xIm[],
double yRe[], double yIm[])
{
int i,j,k;
int i,k;
int count[maxFactorCount];
for (i=1; i<=nFact; i++) count[i]=0;
......@@ -244,7 +244,7 @@ void MixFFT::permute(int nPoint, int nFact,
{
yRe[i] = xRe[k];
yIm[i] = xIm[k];
j=1;
int j=1;
k=k+remain[j];
count[1] = count[1]+1;
while (count[j] >= fact[j])
......@@ -407,7 +407,7 @@ void MixFFT::fft_10()
void MixFFT::fft_odd(int radix)
{
double rere, reim, imre, imim;
int i,j,k,n,max;
int i,j,n,max;
n = radix;
max = (n + 1)/2;
......@@ -425,7 +425,7 @@ void MixFFT::fft_odd(int radix)
zIm[j]=zIm[0];
zRe[n-j]=zRe[0];
zIm[n-j]=zIm[0];
k=j;
int k=j;
for (i=1; i < max; i++)
{
rere = trigRe[k] * vRe[i];
......
......@@ -48,7 +48,7 @@ class MultiHist_t
format = tnm;
}
void setFileName(const std::string fn) {
void setFileName(const std::string& fn) {
size_t special = fn.find_first_of("?");
if (special != std::string::npos) {
std::string fn1 = fn.substr(0, special);
......@@ -71,7 +71,7 @@ class MultiHist_t
return fname;
}
void setComment(const std::string comm, const std::string lpfx = "") {
void setComment(const std::string& comm, const std::string& lpfx = "") {
comment = comm;
lstart = lpfx;
}
......@@ -189,7 +189,9 @@ public:
#ifdef MHIST_LMBUFF_ENABLE
virtual bool setupSwapper(int num = 1, int len = MHIST_LMBUFF_MINLEN) = 0;
#endif
virtual ~MultiHist_t() {}
virtual ~MultiHist_t() {
delete myIO;
}
void setEnable(bool val) {
enabled = val;
......@@ -197,13 +199,13 @@ public:
bool getEnable() const {
return (enabled ? true : false);
}
void setFileName(const std::string fn) {
void setFileName(const std::string& fn) {
myIO->setFileName(fn);
}
std::string getFileName() const {
return myIO->getFileName();
}
void setComment(const std::string comm, const std::string lpfx = "") {
void setComment(const std::string& comm, const std::string& lpfx = "") {
myIO->setComment(comm, lpfx);
}
std::string getComment() const {
......
......@@ -139,7 +139,7 @@ bool TextReader::BuildMetaLines()
return true;
}
void TextReader::PrintMetaLines(const std::string fname)
void TextReader::PrintMetaLines(const std::string& fname)
{
cout << " File " << fname << " decoded according to the following format:" << endl;
if(theKeys.size()) {
......@@ -149,7 +149,7 @@ void TextReader::PrintMetaLines(const std::string fname)
}
}
int TextReader::LocateKey(const std::string kname)
int TextReader::LocateKey(const std::string& kname)
{
for(size_t nk = 0; nk < theKeys.size(); nk++) {
if( stringEq(kname, theKeys[nk].keyword) )
......@@ -158,7 +158,7 @@ int TextReader::LocateKey(const std::string kname)
return -1;
}
int TextReader::LocateData(size_t whichKey, const std::string dname)
int TextReader::LocateData(size_t whichKey, const std::string& dname)
{
if( whichKey >= theKeys.size() )
return -1;
......@@ -205,14 +205,14 @@ int TextReader::DecodeLine(size_t whichKey, int occurrence)
return -2;
}
int TextReader::DecodeText(size_t whichKey, const std::string text)
int TextReader::DecodeText(size_t whichKey, const std::string& text)
{
if(whichKey >= theKeys.size() || text.size()==0 )
return 0;
return theKeys[whichKey].DecodeText(text);
}
int TextReader::KeyItem::LocateData(const std::string dname)
int TextReader::KeyItem::LocateData(const std::string& dname)
{
for(size_t nn = 0; nn<vdat.size(); nn++) {
if(vdat[nn].name == dname)
......@@ -221,7 +221,7 @@ int TextReader::KeyItem::LocateData(const std::string dname)
return -1;
}
int TextReader::KeyItem::DecodeText(const std::string text)
int TextReader::KeyItem::DecodeText(const std::string& text)
{
size_t found = 0;
string ltext = text;
......
......@@ -8,7 +8,7 @@ class TextReader
{
public:
struct DataItem {
DataItem(char type=0, const std::string name="") : dtype(type), name(name), ivalue(0), fvalue(0) {}
DataItem(char type=0, const std::string& name="") : dtype(type), name(name), ivalue(0), fvalue(0) {}
std::string name;
int dtype; // d f s
int ivalue;
......@@ -26,12 +26,12 @@ public:
bool GetData(size_t nn, double &rr) {if(nn>=vdat.size()) return false; rr= vdat[nn].fvalue; return true;}
bool GetData(size_t nn, std::string &rr) {if(nn>=vdat.size()) return false; rr= vdat[nn].svalue; return true;}
// get vdat by name
bool GetData(const std::string name, int &rr) {int nn=LocateData(name); if(nn<0) return false; rr= vdat[nn].ivalue; return true;}
bool GetData(const std::string name, float &rr) {int nn=LocateData(name); if(nn<0) return false; rr=float(vdat[nn].fvalue); return true;}
bool GetData(const std::string name, double &rr) {int nn=LocateData(name); if(nn<0) return false; rr= vdat[nn].fvalue; return true;}
bool GetData(const std::string name, std::string &rr) {int nn=LocateData(name); if(nn<0) return false; rr= vdat[nn].svalue; return true;}
int DecodeText(const std::string line);
int LocateData(const std::string vname);
bool GetData(const std::string& name, int &rr) {int nn=LocateData(name); if(nn<0) return false; rr= vdat[nn].ivalue; return true;}
bool GetData(const std::string& name, float &rr) {int nn=LocateData(name); if(nn<0) return false; rr=float(vdat[nn].fvalue); return true;}
bool GetData(const std::string& name, double &rr) {int nn=LocateData(name); if(nn<0) return false; rr= vdat[nn].fvalue; return true;}
bool GetData(const std::string& name, std::string &rr) {int nn=LocateData(name); if(nn<0) return false; rr= vdat[nn].svalue; return true;}
int DecodeText(const std::string& line);
int LocateData(const std::string& vname);
size_t NumVariables() {return vdat.size<