#include <CSVTablesBase.h>
Definition at line 7 of file CSVTablesBase.h.
◆ CSVTablesBase() [1/2]
CSVTablesBase::CSVTablesBase |
( |
std::string |
subsystem | ) |
|
|
protected |
◆ CSVTablesBase() [2/2]
◆ GetTable()
std::shared_ptr< CSVWrapper > CSVTablesBase::GetTable |
( |
int |
table_num | ) |
|
Definition at line 23 of file CSVTablesBase.cxx.
29 #ifdef OFFLINE_DECODER
31 auto file = std::ifstream(mappingfilename, std::ifstream::in);
32 if (!mappingfilename.empty() &&
file.good()) {
33 m_tables.at(table_num-1) = std::make_shared<CSVWrapper> (
file);
37 throw std::runtime_error(std::string(
"Cannot find file ") + suffixName);
40 const char* l1caloRootEnv =
std::getenv(
"L1CALO_ROOT");
42 throw l1calo::EnvUndefined(ERS_HERE,
"L1CALO_ROOT");
46 std::string l1caloRoot(l1caloRootEnv);
47 auto baseDir = l1caloRoot.substr(0,l1caloRoot.find_last_of(
"/"));
48 std::vector<std::string> mapDirs = {
49 baseDir +
"/channelMappings/data/",
50 baseDir +
"/installed/share/data/channelMappings/",
52 for (
auto& basePath: mapDirs) {
53 auto mappingfilename = basePath + suffixName;
54 auto file = std::ifstream(mappingfilename, std::ifstream::in);
56 m_tables.at(table_num-1) = std::make_shared<CSVWrapper> (
file);
61 std::string suffixPath = suffixName +
" (under " + baseDir +
")";
62 throw l1calo::FileError(ERS_HERE,
"open",suffixPath);
◆ operator=()
◆ m_subsystem
std::string CSVTablesBase::m_subsystem |
|
private |
◆ m_table_opens
std::array<bool, 6> CSVTablesBase::m_table_opens |
|
private |
◆ m_tables
std::array<std::shared_ptr<CSVWrapper>, 6> CSVTablesBase::m_tables |
|
private |
The documentation for this class was generated from the following files: