1
0
mirror of https://github.com/paboyle/Grid.git synced 2026-01-03 19:29:29 +00:00

First commit for measurement software 'Hadrons'

This commit is contained in:
2015-10-27 17:33:18 +00:00
parent 8709117aea
commit 538b16610b
10 changed files with 238 additions and 1 deletions

View File

@@ -0,0 +1,58 @@
/*
* Application.cc, part of Grid
*
* Copyright (C) 2015 Antonin Portelli
*
* Grid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Grid is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Grid. If not, see <http://www.gnu.org/licenses/>.
*/
#include <Hadrons/Application.hpp>
using namespace std;
using namespace Grid;
using namespace Hadrons;
/******************************************************************************
* Application implementation *
******************************************************************************/
// constructor /////////////////////////////////////////////////////////////////
Application::Application(int argc, char *argv[])
{
if (argc < 2)
{
cerr << "usage: " << argv[0] << " <parameter file> [Grid options]";
cerr << endl;
exit(EXIT_FAILURE);
}
parameterFileName_ = argv[1];
Grid_init(&argc, &argv);
HadronsLogError.Active(GridLogError.isActive());
HadronsLogWarning.Active(GridLogWarning.isActive());
HadronsLogMessage.Active(GridLogMessage.isActive());
HadronsLogDebug.Active(GridLogDebug.isActive());
LOG(Message) << "Grid initialized" << endl;
}
// destructor //////////////////////////////////////////////////////////////////
Application::~Application(void)
{
LOG(Message) << "Grid is finalizing now" << endl;
Grid_finalize();
}
// execute /////////////////////////////////////////////////////////////////////
void Application::run(void)
{
}