diff --git a/lib/imc_block.hpp b/lib/imc_block.hpp index 9838c27..7a8d336 100644 --- a/lib/imc_block.hpp +++ b/lib/imc_block.hpp @@ -40,9 +40,6 @@ namespace imc // w.r.t. to first byte of block (=0) std::vector parameters_; - // particular imc object represented by this block - // imc::rawobject imc_object_; - public: // constructor @@ -71,7 +68,6 @@ namespace imc try { parse_parameters(); - // parse_object(); } catch (const std::exception& e) { throw std::runtime_error( std::string("block: failed to parse parameters/objects: ") + e.what() @@ -106,19 +102,6 @@ namespace imc parameters_.back().end( this->end_ - 1 ); } - // pass buffer and parameters associated to block to generate corres. object - // void parse_object() - // { - // try { - // imc_object_.parse(thekey_,buffer_,parameters_); - // } catch (const std::exception& e) { - // throw std::runtime_error( - // std::string("failed to parse imc::object for key ") - // + thekey_.name_ + std::string(": ") + e.what() - // ); - // } - // } - public: // access members @@ -163,7 +146,7 @@ namespace imc } // get info string - std::string get_info(bool include_object = true, int width = 20) + std::string get_info(int width = 20) { // summarize parameters in single string std::string prsstr("{"); @@ -183,14 +166,6 @@ namespace imc <size()<<"\n" < keys = { - // - // // critical keys - // {"CF2", key(true,"CF","format version and processor",1)}, - // {"CK1", key(true,"CK","start of group of keys",1)}, - // {"CB1", key(true,"CB","group of channels",1)}, - // {"CT1", key(true,"CT","text definition",1)}, - // {"CG1", key(true,"CG","group of components",1)}, - // {"CD1", key(true,"CD","abscissa description",1)}, - // {"CD2", key(true,"CD","abscissa description",2)}, - // {"CZ1", key(true,"CZ","scaling of z-axis",1)}, - // {"CC1", key(true,"CC","start of component",1)}, - // {"CP1", key(true,"CP","buffer, datatype and samples of component",1)}, - // {"Cb1", key(true,"Cb","buffer description",1)}, - // {"CR1", key(true,"CR","permissible range of values in component",1)}, - // {"CN1", key(true,"CN","name and comment of channel",1)}, - // {"CS1", key(true,"CS","raw binary data",1)}, - // {"CI1", key(true,"CI","single numerical value",1)}, - // {"Ca1", key(true,"Ca","add reference key",1)}, - // - // // noncritical keys - // {"NO1", key(false,"NO","origin of data",1)}, - // {"NT1", key(false,"NT","timestamp of trigger",1)}, - // {"ND1", key(false,"ND","(color) display properties",1)}, - // {"NU1", key(false,"NU","user defined key",1)}, - // {"Np1", key(false,"Np","property of channel",1)}, - // {"NE1", key(false,"NE","extraction rule for BUS channels",1)} - // - // }; - const std::vector keys = { // critical keys diff --git a/lib/imc_raw.hpp b/lib/imc_raw.hpp index 4ecda6a..a7eafc9 100644 --- a/lib/imc_raw.hpp +++ b/lib/imc_raw.hpp @@ -315,77 +315,6 @@ namespace imc return channels; } - // get specific channel data - // TODO generalize and simplify channel extraction!! - // imc::channel_tab get_channel(std::string channel) - // { - // // declare single channel table - // imc::channel_tab chtab; - // - // // ordinate parameters - // std::string yunit = std::string(""); - // unsigned long int num_samples = -1; - // // imc::datatype dtype; - // int numbits = -1; - // double yoffset = -1.0, yfactor = -1.0; - // - // // abscissa parameters - // double dx = -1.0; - // double xoffset = -1.0; - // std::string xunit = std::string(""); - // - // // search block for required parameters - // for ( imc::block blk: this->rawblocks_ ) - // { - // if ( blk.get_key() == imc::keys.at("CR") ) - // { - // yunit = blk.get_parameter(blk.get_parameters()[7]); - // } - // - // if ( blk.get_key() == imc::keys.at("Cb") ) - // { - // num_samples = std::stoul(blk.get_parameter(blk.get_parameters()[7])); - // xoffset = std::stod(blk.get_parameter(blk.get_parameters()[11])); - // } - // - // if ( blk.get_key() == imc::keys.at("CP") ) - // { - // numbits = std::stoi(blk.get_parameter(blk.get_parameters()[5])); - // } - // - // if ( blk.get_key() == imc::keys.at("CR") ) - // { - // yfactor = std::stod(blk.get_parameter(blk.get_parameters()[3])); - // yoffset = std::stod(blk.get_parameter(blk.get_parameters()[4])); - // yunit = blk.get_parameter(blk.get_parameters()[7]); - // } - // - // if ( blk.get_key() == imc::keys.at("CD") ) - // { - // std::cout<<"got CD\n"; - // dx = std::stod(blk.get_parameter(blk.get_parameters()[2])); - // xunit = blk.get_parameter(blk.get_parameters()[7]); - // } - // } - // - // std::cout<<"yunit:"<