HVChannel::HVChannel(const DataItem& item, const shared_ptr< IDataSource > src) :f_id(item.num_field<size_t>("id")),f_highvoltage_id(item.num_field<size_t>("highvoltage_id")), f_idx(item.num_field<size_t>("channelidx")),f_status(item["status"]), f_givespositive_hv(item.flag("givespositivevoltage")), f_minv(item.num_field<double>("minv")),f_maxv(item.num_field<double>("maxv")),f_maxi(item.num_field<size_t>("maxi")){}
HVPMConnection::HVPMConnection(const DataItem& item, const shared_ptr< IDataSource >) :f_id(item.num_field<size_t>("id")),f_hvchannel_id(item.num_field<size_t>("hvchannel_id")), f_photomultiplier_id(item.num_field<size_t>("photomultiplier_id")),f_setup_id(item.num_field<size_t>("setup_id")), f_slot_id(item.num_field<size_t>("slot_id")),f_side(item.flag("isrightside")?side_right:side_left){}