10#include <ecl/dbobjects/ECLChannelMap.h>
11#include <ecl/mapper/ECLChannelMapper.h>
14#include <framework/database/Configuration.h>
15#include <framework/database/DBImportObjPtr.h>
16#include <framework/logging/LogSystem.h>
17#include <framework/utilities/FileSystem.h>
26int main(
int argc,
char** argv)
29 std::cout <<
"Usage: eclWriteChannelMap experiment run [experimentEnd] [runEnd]" << std::endl;
32 int experiment = std::stoi(argv[1]);
33 int run = std::stoi(argv[2]);
36 if (argc > 3) exp_end = std::stoi(argv[3]);
37 if (argc > 4) run_end = std::stoi(argv[4]);
42 conf.prependTestingPayloadLocation(
"localdb/database.txt");
53 B2FATAL(
"eclChannelMapper initialization file " << map_path <<
" doesn't exist");
63 std::cout <<
"Successfully wrote payload ECLChannelMap with iov "
64 << 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.
void setDebugLevel(int debugLevel)
Configure the debug messaging level.
@ c_Debug
Debug: for code development.
void setLogLevel(ELogLevel logLevel)
Configure the log level.
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.