125 mout.
debug(
"start" );
127 mout.
debug2(
"DataSelector: " , this->dataSelector );
133 mout.debug3(
"collect the applicable paths" );
134 ODIMPathList dataPaths;
137 this->dataSelector.getPaths(srcRoot, dataPaths);
139 if (dataPaths.empty()){
140 if (!this->dataSelector.getQuantitySelector().test(
"HGHT")){
141 mout.experimental<LOG_INFO>(
"no dataset's selected, but height=[HGHT] requested, continuing");
144 mout.
warn(
"no dataset's selected");
148 mout.debug3(
"populate the dataset map, paths=" , dataPaths.size() );
155 if (!path.front().is(ODIMPathElem::DATASET)){
158 mout.
warn(
"odd 1st path elem (..), with selector: ", this->dataSelector);
165 if (!parentElem.
is(ODIMPathElem::DATASET)){
166 mout.
warn(
"path does not start with /dataset.. :", path,
", with selector: ", this->dataSelector);
171 const Hi5Tree & srcDataSet = srcRoot(parentElem);
177 const ODIM srcODIM(srcDataSet.data.image);
178 std::string datetime = srcODIM.startdate + srcODIM.starttime;
181 mout.
attention<LOG_DEBUG>(dstODIM.startdate,
'+', dstODIM.starttime,
" ?== ", datetime,
" < ", dstODIM.enddate,
'+', dstODIM.endtime);
183 if (sweeps.find(datetime) == sweeps.end()){
184 mout.
debug2(
"adding time=", datetime,
':', parentElem);
213 if (ProductBase::appendResults.is(ODIMPathElem::DATASET)){
214 if (ProductBase::appendResults.getIndex()){
215 dataSetPathElem.index = ProductBase::appendResults.getIndex();
218 ODIMPathTools::getNextChild(dstRoot, dataSetPathElem);
221 else if (ProductBase::appendResults.is(ODIMPathElem::DATA)){
224 else if (ProductBase::appendResults.is(ODIMPathElem::ROOT)){
225 if (!dstRoot.empty() && (&srcRoot != &dstRoot)){
226 mout.info(
"clearing previous result, use --append [data|dataset] to avoid");
231 dataSetPathElem = ProductBase::appendResults;
232 mout.
warn(
"non-standard path location '", dataSetPathElem,
"', consider --help append ");
239 mout.
debug(
"storing product in path: ", dataSetPathElem);
251 Hi5Tree & dstDataSet = dstRoot[dataSetPathElem];
254 this->computeSingleProduct(sweeps, dstProductDataset);
257 ProductBase::setRackVersion(how);
258 if (!dstProductDataset.empty()){
260 how[
"angles"] = dstProductDataset.getFirstData().odim.angles;
272 mout.revised<LOG_DEBUG>(
"check DataSet metadata");
276 for (
const ODIMPathElem::group_t group: {ODIMPathElem::WHAT, ODIMPathElem::WHERE, ODIMPathElem::HOW}){
277 dstRoot[group].data.attributes = srcRoot[group].data.attributes;
281 rootWhat[
"object"] = this->odim.object;
282 rootWhat[
"version"] = this->odim.version;
284 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"product"] = this->odim.product;
285 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"startdate"] = dstODIM.startdate;
286 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"starttime"] = dstODIM.starttime;
287 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"enddate"] = dstODIM.enddate;
288 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"endtime"] = dstODIM.endtime;
291 if (ODIM::versionFlagger.isSet(ODIM::RACK_EXTENSIONS)){
293 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"product2"] = dstODIM.product;
296 std::stringstream sstr;
299 for (
const std::string & key: params.
getKeyList()){
306 sstr << key <<
'=' << params[key];
308 dstDataSet[ODIMPathElem::WHAT].data.attributes[
"rack_prodpar"] = sstr.str();