I want to generate a executable from a gas file that i have writting.
#include <iostream>
#include "Garfield/MediumMagboltz.hh"
#include "Garfield/FundamentalConstants.hh"
using namespace Garfield;
int main(int argc, char * argv[]) {
const double pressure = 1 * AtmosphericPressure;
const double temperature = 300;
// Setup the gas.
MediumMagboltz gas;
gas.SetComposition("Neonio", 100);
gas.SetTemperature(temperature);
gas.SetPressure(pressure);
// Set the field range to be covered by the gas table.
const size_t nE = 20;
const double emin = 1;
const double emax = 100000.;
// Flag to request logarithmic spacing.
constexpr bool useLog = true;
gas.SetFieldGrid(emin, emax, nE, useLog);
const int ncoll = 10;
// Run Magboltz to generate the gas table.
gas.GenerateGasTable(ncoll);
// Save the table.
gas.WriteGasFile("Neonio");
}
The problem is that when i type gcc gas.C, the files from garfield can’t be located.
I think i could try to write a cmake files that links the necessary informations so that all files can be located, but i am questioning myself if there is not a easier way to do it?