General Purpose Geodetic Library
VpSetup.cpp
Go to the documentation of this file.
1 /*
2  * This file is a part of vgosDbProcLogs. vgosDbProcLogs is a part of
3  * CALC/SOLVE system and is designed to extract data, meteo parameters
4  * and cable calibrations, from stations log files and store them in
5  * the vgosDb format.
6  * Copyright (C) 2015-2020 Sergei Bolotin.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #include <iostream>
24 #include <stdlib.h>
25 #include <sys/utsname.h>
26 
27 
28 #include <QtCore/QDir>
29 #include <QtCore/QFileInfo>
30 
31 
32 #include <SgLogger.h>
33 
34 
35 #include "VpSetup.h"
36 #include "vgosDbProcLogs.h"
37 
38 
39 
40 
41 /*=======================================================================================================
42 *
43 * METHODS:
44 *
45 *======================================================================================================*/
47  path2Home_ (""),
48  path2VgosDbFiles_ ("/500/vgosDb"),
49  path2MasterFiles_ ("/500/oper/master"),
50  path2SessionFiles_("/500/sessions"),
51  path2AuxLogs_ ("Logs"),
52  identities_(),
53  defaultCableSignByStn_(),
54  rinexFileNameByStn_(),
55  rinexPressureOffsetByStn_()
56 {
58  useLocalLocale_ = false;
59  //
60  defaultCableSignByStn_.insert("WETTZELL", 1);
61 
62  rinexFileNameByStn_.insert("WESTFORD", "sa01");
63  rinexFileNameByStn_.insert("FORTLEZA", "ceeu");
64  rinexPressureOffsetByStn_.insert("WESTFORD", 1.9); //mbar
65 };
66 
67 
68 
69 //
71 {
72 };
73 
74 
75 
76 //
77 void VpSetup::setUpBinaryIdentities(const QString& argv0)
78 {
79  QFileInfo fi(argv0);
80  identities_.setExecBinaryName(fi.fileName());
81  identities_.setExecDir(fi.canonicalPath());
82  identities_.setCurrentDir(QDir::currentPath());
84 };
85 
86 
87 
88 //
90 {
91  std::cout << "The setup of the software " << qPrintable(vgosDbProcLogsVersion.name()) << ":\n";
92 
93  std::cout
94  << " The Home Direcory:\t\t\t\"" << qPrintable(path2Home_) << "\"\n"
95  << " Path to session files:\t\t\"" << qPrintable(path2SessionFiles_) << "\"\n"
96  << " Path to VgosDb files:\t\t\"" << qPrintable(path2VgosDbFiles_) << "\"\n"
97  << " Path to Master files:\t\t\"" << qPrintable(path2MasterFiles_) << "\"\n"
98  << " Save log file for each session:\t" << (have2SavePerSessionLog_?"Yes":"No") << "\n"
99  << " Do not alternate locale set up:\t" << (useLocalLocale_?"Yes":"No") << "\n"
100  ;
102  std::cout
103  << " Path to logs for each session:\t\"" << qPrintable(path2AuxLogs_) << "\"\n";
104 
106 
107 };
108 /*=====================================================================================================*/
void setCurrentDir(const QString &)
Definition: SgIdentities.h:391
void print2stdOut()
void setExecBinaryName(const QString &)
Definition: SgIdentities.h:399
void setExecDir(const QString &)
Definition: SgIdentities.h:383
void setDriverVersion(const SgVersion &)
QString name(NameFormat fmt=NF_Human) const
Definition: SgVersion.cpp:54
bool useLocalLocale_
Definition: VpSetup.h:181
QString path2Home_
Definition: VpSetup.h:175
QString path2MasterFiles_
Definition: VpSetup.h:177
QMap< QString, QString > rinexFileNameByStn_
Definition: VpSetup.h:189
void setUpBinaryIdentities(const QString &)
Definition: VpSetup.cpp:77
QString path2SessionFiles_
Definition: VpSetup.h:178
QMap< QString, double > rinexPressureOffsetByStn_
Definition: VpSetup.h:191
QString path2VgosDbFiles_
Definition: VpSetup.h:176
void print2stdOut()
Definition: VpSetup.cpp:89
SgIdentities identities_
Definition: VpSetup.h:184
QString path2AuxLogs_
Definition: VpSetup.h:179
VpSetup()
Definition: VpSetup.cpp:46
QMap< QString, int > defaultCableSignByStn_
Definition: VpSetup.h:187
bool have2SavePerSessionLog_
Definition: VpSetup.h:180
virtual ~VpSetup()
Definition: VpSetup.cpp:70
SgVersion vgosDbProcLogsVersion