127 mout.
debug(
"start" );
129 mout.
debug2(
"DataSelector: " , this->dataSelector );
135 mout.debug3(
"collect the applicable paths" );
136 ODIMPathList dataPaths;
139 this->dataSelector.getPaths(srcRoot, dataPaths);
141 if (dataPaths.empty()){
142 if (!this->dataSelector.getQuantitySelector().test(
"HGHT")){
143 mout.experimental<LOG_INFO>(
"no dataset's selected, but height=[HGHT] requested, continuing");
146 mout.
warn(
"no dataset's selected");
150 mout.debug3(
"populate the dataset map, paths=" , dataPaths.size() );
157 if (!path.front().is(ODIMPathElem::DATASET)){
160 mout.
warn(
"odd 1st path elem (..), with selector: ", this->dataSelector);
167 if (!parentElem.
is(ODIMPathElem::DATASET)){
168 mout.
warn(
"path does not start with /dataset.. :", path,
", with selector: ", this->dataSelector);
173 const Hi5Tree & srcDataSet = srcRoot(parentElem);
179 const ODIM srcODIM(srcDataSet.data.image);
180 std::string datetime = srcODIM.startdate + srcODIM.starttime;
183 mout.
attention<LOG_DEBUG+1>(
"start=", dstODIM.startdate,
'+', dstODIM.starttime,
" nominal<", datetime,
"> end==", dstODIM.enddate,
'+', dstODIM.endtime);
185 if (sweeps.find(datetime) == sweeps.end()){
186 mout.
debug2(
"adding time=", datetime,
':', parentElem);
215 if (ProductBase::appendResults.is(ODIMPathElem::DATASET)){
216 if (ProductBase::appendResults.getIndex()){
217 dataSetPathElem.index = ProductBase::appendResults.getIndex();
220 ODIMPathTools::getNextChild(dstRoot, dataSetPathElem);
223 else if (ProductBase::appendResults.is(ODIMPathElem::DATA)){
226 else if (ProductBase::appendResults.is(ODIMPathElem::ROOT)){
227 if (!dstRoot.empty() && (&srcRoot != &dstRoot)){
228 mout.info(
"clearing previous result, use --append [data|dataset] to avoid");
233 dataSetPathElem = ProductBase::appendResults;
234 mout.
warn(
"non-standard path location '", dataSetPathElem,
"', consider --help append ");
241 mout.
debug(
"storing product in path: ", dataSetPathElem);
253 Hi5Tree & dstDataSet = dstRoot[dataSetPathElem];
256 this->computeSingleProduct(sweeps, dstProductDataset);
259 ProductBase::setRackVersion(how);
260 if (!dstProductDataset.empty()){
262 how[
"angles"] = dstProductDataset.getFirstData().odim.angles;
274 mout.revised<LOG_DEBUG>(
"check DataSet metadata");
278 for (
const ODIMPathElem::group_t group: {ODIMPathElem::WHAT, ODIMPathElem::WHERE, ODIMPathElem::HOW}){
279 dstRoot[group].data.attributes = srcRoot[group].data.attributes;
283 rootWhat[
"object"] = this->odim.object;
284 rootWhat[
"version"] = this->odim.version;
286 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"product"] = this->odim.product;
287 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"startdate"] = dstODIM.startdate;
288 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"starttime"] = dstODIM.starttime;
289 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"enddate"] = dstODIM.enddate;
290 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"endtime"] = dstODIM.endtime;
293 if (ODIM::versionFlagger.isSet(ODIM::RACK_EXTENSIONS)){
295 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"product2"] = dstODIM.product;
298 std::stringstream sstr;
301 for (
const std::string & key: params.
getKeyList()){
308 sstr << key <<
'=' << params[key];
310 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"rack_prodpar"] = sstr.str();