9 #include <framework/database/DBImportObjPtr.h>
10 #include <framework/database/Configuration.h>
11 #include <framework/logging/LogSystem.h>
12 #include <framework/utilities/FileSystem.h>
14 #include <ecl/dbobjects/ECLChannelMap.h>
15 #include <ecl/utility/ECLChannelMapper.h>
23 int main(
int argc,
char** argv)
26 std::cout <<
"Usage: eclWriteChannelMap experiment run [experimentEnd] [runEnd]" << std::endl;
29 int experiment = std::stoi(argv[1]);
30 int run = std::stoi(argv[2]);
33 if (argc > 3) exp_end = std::stoi(argv[3]);
34 if (argc > 4) run_end = std::stoi(argv[4]);
39 conf.prependTestingPayloadLocation(
"localdb/database.txt");
44 logging->setDebugLevel(10);
50 B2FATAL(
"eclChannelMapper initialization file " << map_path <<
" doesn't exist");
60 std::cout <<
"Successfully wrote payload ECLChannelMap with iov "
61 << experiment <<
"," << run <<
"," << exp_end <<
"," << run_end << std::endl;
static Configuration & getInstance()
Get a reference to the instance which will be used when the Database is initialized.
Class for importing a single object to the database.
This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbo...
ECLChannelMap getDBObject()
Convert internal data to ECLChannelMap database object.
bool initFromFile()
Initialize channel mapper using data stored in default location.
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
static bool fileExists(const std::string &filename)
Check if the file with given filename exists.
A class that describes the interval of experiments/runs for which an object in the database is valid.
@ c_Debug
Debug: for code development.
LogConfig * getLogConfig()
Returns global log system configuration.
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Abstract base class for different kinds of events.
int main(int argc, char **argv)
Run all tests.