00001
00002
00003
00004 #include "psddl_hdf2psana/lusi.ddl.h"
00005 #include "hdf5pp/ArrayType.h"
00006 #include "hdf5pp/CompoundType.h"
00007 #include "hdf5pp/EnumType.h"
00008 #include "hdf5pp/VlenType.h"
00009 #include "hdf5pp/Utils.h"
00010 #include "PSEvt/DataProxy.h"
00011 #include "psddl_hdf2psana/Exceptions.h"
00012 namespace psddl_hdf2psana {
00013 namespace Lusi {
00014
00015 hdf5pp::Type ns_DiodeFexConfigV1_v0_dataset_config_stored_type()
00016 {
00017 typedef ns_DiodeFexConfigV1_v0::dataset_config DsType;
00018 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00019 hsize_t _array_type_base_shape[] = { 3 };
00020 hdf5pp::ArrayType _array_type_base = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<float>::stored_type(), 1, _array_type_base_shape);
00021 type.insert("base", offsetof(DsType, base), _array_type_base);
00022 hsize_t _array_type_scale_shape[] = { 3 };
00023 hdf5pp::ArrayType _array_type_scale = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<float>::stored_type(), 1, _array_type_scale_shape);
00024 type.insert("scale", offsetof(DsType, scale), _array_type_scale);
00025 return type;
00026 }
00027
00028 hdf5pp::Type ns_DiodeFexConfigV1_v0::dataset_config::stored_type()
00029 {
00030 static hdf5pp::Type type = ns_DiodeFexConfigV1_v0_dataset_config_stored_type();
00031 return type;
00032 }
00033
00034 hdf5pp::Type ns_DiodeFexConfigV1_v0_dataset_config_native_type()
00035 {
00036 typedef ns_DiodeFexConfigV1_v0::dataset_config DsType;
00037 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00038 hsize_t _array_type_base_shape[] = { 3 };
00039 hdf5pp::ArrayType _array_type_base = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<float>::native_type(), 1, _array_type_base_shape);
00040 type.insert("base", offsetof(DsType, base), _array_type_base);
00041 hsize_t _array_type_scale_shape[] = { 3 };
00042 hdf5pp::ArrayType _array_type_scale = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<float>::native_type(), 1, _array_type_scale_shape);
00043 type.insert("scale", offsetof(DsType, scale), _array_type_scale);
00044 return type;
00045 }
00046
00047 hdf5pp::Type ns_DiodeFexConfigV1_v0::dataset_config::native_type()
00048 {
00049 static hdf5pp::Type type = ns_DiodeFexConfigV1_v0_dataset_config_native_type();
00050 return type;
00051 }
00052
00053 ns_DiodeFexConfigV1_v0::dataset_config::dataset_config()
00054 {
00055 }
00056
00057 ns_DiodeFexConfigV1_v0::dataset_config::dataset_config(const Psana::Lusi::DiodeFexConfigV1& psanaobj)
00058 {
00059 {
00060 const __typeof__(psanaobj.base())& arr = psanaobj.base();
00061 std::copy(arr.begin(), arr.begin()+3, base);
00062 }
00063 {
00064 const __typeof__(psanaobj.scale())& arr = psanaobj.scale();
00065 std::copy(arr.begin(), arr.begin()+3, scale);
00066 }
00067 }
00068
00069 ns_DiodeFexConfigV1_v0::dataset_config::~dataset_config()
00070 {
00071 }
00072 boost::shared_ptr<Psana::Lusi::DiodeFexConfigV1>
00073 Proxy_DiodeFexConfigV1_v0::getTypedImpl(PSEvt::ProxyDictI* dict, const Pds::Src& source, const std::string& key)
00074 {
00075 if (not m_data) {
00076 boost::shared_ptr<Lusi::ns_DiodeFexConfigV1_v0::dataset_config> ds_config = hdf5pp::Utils::readGroup<Lusi::ns_DiodeFexConfigV1_v0::dataset_config>(m_group, "config", m_idx);
00077 m_data.reset(new PsanaType(ds_config->base, ds_config->scale));
00078 }
00079 return m_data;
00080 }
00081
00082
00083 void make_datasets_DiodeFexConfigV1_v0(const Psana::Lusi::DiodeFexConfigV1& obj,
00084 hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00085 {
00086 {
00087 hdf5pp::Type dstype = Lusi::ns_DiodeFexConfigV1_v0::dataset_config::stored_type();
00088 hdf5pp::Utils::createDataset(group, "config", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);
00089 }
00090 }
00091
00092 void store_DiodeFexConfigV1_v0(const Psana::Lusi::DiodeFexConfigV1* obj, hdf5pp::Group group, long index, bool append)
00093 {
00094 if (obj) {
00095 Lusi::ns_DiodeFexConfigV1_v0::dataset_config ds_data(*obj);
00096 if (append) {
00097 hdf5pp::Utils::storeAt(group, "config", ds_data, index);
00098 } else {
00099 hdf5pp::Utils::storeScalar(group, "config", ds_data);
00100 }
00101 } else if (append) {
00102 hdf5pp::Utils::resizeDataset(group, "config", index < 0 ? index : index + 1);
00103 }
00104 }
00105
00106 boost::shared_ptr<PSEvt::Proxy<Psana::Lusi::DiodeFexConfigV1> > make_DiodeFexConfigV1(int version, hdf5pp::Group group, hsize_t idx) {
00107 switch (version) {
00108 case 0:
00109 return boost::make_shared<Proxy_DiodeFexConfigV1_v0>(group, idx);
00110 default:
00111 return boost::make_shared<PSEvt::DataProxy<Psana::Lusi::DiodeFexConfigV1> >(boost::shared_ptr<Psana::Lusi::DiodeFexConfigV1>());
00112 }
00113 }
00114
00115 void make_datasets(const Psana::Lusi::DiodeFexConfigV1& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
00116 int deflate, bool shuffle, int version)
00117 {
00118 if (version < 0) version = 0;
00119 group.createAttr<uint32_t>("_schemaVersion").store(version);
00120 switch (version) {
00121 case 0:
00122 make_datasets_DiodeFexConfigV1_v0(obj, group, chunkPolicy, deflate, shuffle);
00123 break;
00124 default:
00125 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.DiodeFexConfigV1", version);
00126 }
00127 }
00128
00129 void store_DiodeFexConfigV1(const Psana::Lusi::DiodeFexConfigV1* obj, hdf5pp::Group group, long index, int version, bool append)
00130 {
00131 if (version < 0) version = 0;
00132 if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
00133 switch (version) {
00134 case 0:
00135 store_DiodeFexConfigV1_v0(obj, group, index, append);
00136 break;
00137 default:
00138 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.DiodeFexConfigV1", version);
00139 }
00140 }
00141
00142 void store(const Psana::Lusi::DiodeFexConfigV1& obj, hdf5pp::Group group, int version)
00143 {
00144 store_DiodeFexConfigV1(&obj, group, 0, version, false);
00145 }
00146
00147 void store_at(const Psana::Lusi::DiodeFexConfigV1* obj, hdf5pp::Group group, long index, int version)
00148 {
00149 store_DiodeFexConfigV1(obj, group, index, version, true);
00150 }
00151
00152
00153 hdf5pp::Type ns_DiodeFexConfigV2_v0_dataset_config_stored_type()
00154 {
00155 typedef ns_DiodeFexConfigV2_v0::dataset_config DsType;
00156 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00157 hsize_t _array_type_base_shape[] = { 16 };
00158 hdf5pp::ArrayType _array_type_base = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<float>::stored_type(), 1, _array_type_base_shape);
00159 type.insert("base", offsetof(DsType, base), _array_type_base);
00160 hsize_t _array_type_scale_shape[] = { 16 };
00161 hdf5pp::ArrayType _array_type_scale = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<float>::stored_type(), 1, _array_type_scale_shape);
00162 type.insert("scale", offsetof(DsType, scale), _array_type_scale);
00163 return type;
00164 }
00165
00166 hdf5pp::Type ns_DiodeFexConfigV2_v0::dataset_config::stored_type()
00167 {
00168 static hdf5pp::Type type = ns_DiodeFexConfigV2_v0_dataset_config_stored_type();
00169 return type;
00170 }
00171
00172 hdf5pp::Type ns_DiodeFexConfigV2_v0_dataset_config_native_type()
00173 {
00174 typedef ns_DiodeFexConfigV2_v0::dataset_config DsType;
00175 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00176 hsize_t _array_type_base_shape[] = { 16 };
00177 hdf5pp::ArrayType _array_type_base = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<float>::native_type(), 1, _array_type_base_shape);
00178 type.insert("base", offsetof(DsType, base), _array_type_base);
00179 hsize_t _array_type_scale_shape[] = { 16 };
00180 hdf5pp::ArrayType _array_type_scale = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<float>::native_type(), 1, _array_type_scale_shape);
00181 type.insert("scale", offsetof(DsType, scale), _array_type_scale);
00182 return type;
00183 }
00184
00185 hdf5pp::Type ns_DiodeFexConfigV2_v0::dataset_config::native_type()
00186 {
00187 static hdf5pp::Type type = ns_DiodeFexConfigV2_v0_dataset_config_native_type();
00188 return type;
00189 }
00190
00191 ns_DiodeFexConfigV2_v0::dataset_config::dataset_config()
00192 {
00193 }
00194
00195 ns_DiodeFexConfigV2_v0::dataset_config::dataset_config(const Psana::Lusi::DiodeFexConfigV2& psanaobj)
00196 {
00197 {
00198 const __typeof__(psanaobj.base())& arr = psanaobj.base();
00199 std::copy(arr.begin(), arr.begin()+16, base);
00200 }
00201 {
00202 const __typeof__(psanaobj.scale())& arr = psanaobj.scale();
00203 std::copy(arr.begin(), arr.begin()+16, scale);
00204 }
00205 }
00206
00207 ns_DiodeFexConfigV2_v0::dataset_config::~dataset_config()
00208 {
00209 }
00210 boost::shared_ptr<Psana::Lusi::DiodeFexConfigV2>
00211 Proxy_DiodeFexConfigV2_v0::getTypedImpl(PSEvt::ProxyDictI* dict, const Pds::Src& source, const std::string& key)
00212 {
00213 if (not m_data) {
00214 boost::shared_ptr<Lusi::ns_DiodeFexConfigV2_v0::dataset_config> ds_config = hdf5pp::Utils::readGroup<Lusi::ns_DiodeFexConfigV2_v0::dataset_config>(m_group, "config", m_idx);
00215 m_data.reset(new PsanaType(ds_config->base, ds_config->scale));
00216 }
00217 return m_data;
00218 }
00219
00220
00221 void make_datasets_DiodeFexConfigV2_v0(const Psana::Lusi::DiodeFexConfigV2& obj,
00222 hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00223 {
00224 {
00225 hdf5pp::Type dstype = Lusi::ns_DiodeFexConfigV2_v0::dataset_config::stored_type();
00226 hdf5pp::Utils::createDataset(group, "config", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);
00227 }
00228 }
00229
00230 void store_DiodeFexConfigV2_v0(const Psana::Lusi::DiodeFexConfigV2* obj, hdf5pp::Group group, long index, bool append)
00231 {
00232 if (obj) {
00233 Lusi::ns_DiodeFexConfigV2_v0::dataset_config ds_data(*obj);
00234 if (append) {
00235 hdf5pp::Utils::storeAt(group, "config", ds_data, index);
00236 } else {
00237 hdf5pp::Utils::storeScalar(group, "config", ds_data);
00238 }
00239 } else if (append) {
00240 hdf5pp::Utils::resizeDataset(group, "config", index < 0 ? index : index + 1);
00241 }
00242 }
00243
00244 boost::shared_ptr<PSEvt::Proxy<Psana::Lusi::DiodeFexConfigV2> > make_DiodeFexConfigV2(int version, hdf5pp::Group group, hsize_t idx) {
00245 switch (version) {
00246 case 0:
00247 return boost::make_shared<Proxy_DiodeFexConfigV2_v0>(group, idx);
00248 default:
00249 return boost::make_shared<PSEvt::DataProxy<Psana::Lusi::DiodeFexConfigV2> >(boost::shared_ptr<Psana::Lusi::DiodeFexConfigV2>());
00250 }
00251 }
00252
00253 void make_datasets(const Psana::Lusi::DiodeFexConfigV2& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
00254 int deflate, bool shuffle, int version)
00255 {
00256 if (version < 0) version = 0;
00257 group.createAttr<uint32_t>("_schemaVersion").store(version);
00258 switch (version) {
00259 case 0:
00260 make_datasets_DiodeFexConfigV2_v0(obj, group, chunkPolicy, deflate, shuffle);
00261 break;
00262 default:
00263 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.DiodeFexConfigV2", version);
00264 }
00265 }
00266
00267 void store_DiodeFexConfigV2(const Psana::Lusi::DiodeFexConfigV2* obj, hdf5pp::Group group, long index, int version, bool append)
00268 {
00269 if (version < 0) version = 0;
00270 if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
00271 switch (version) {
00272 case 0:
00273 store_DiodeFexConfigV2_v0(obj, group, index, append);
00274 break;
00275 default:
00276 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.DiodeFexConfigV2", version);
00277 }
00278 }
00279
00280 void store(const Psana::Lusi::DiodeFexConfigV2& obj, hdf5pp::Group group, int version)
00281 {
00282 store_DiodeFexConfigV2(&obj, group, 0, version, false);
00283 }
00284
00285 void store_at(const Psana::Lusi::DiodeFexConfigV2* obj, hdf5pp::Group group, long index, int version)
00286 {
00287 store_DiodeFexConfigV2(obj, group, index, version, true);
00288 }
00289
00290
00291 hdf5pp::Type ns_DiodeFexV1_v0_dataset_data_stored_type()
00292 {
00293 typedef ns_DiodeFexV1_v0::dataset_data DsType;
00294 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00295 type.insert("value", offsetof(DsType, value), hdf5pp::TypeTraits<float>::stored_type());
00296 return type;
00297 }
00298
00299 hdf5pp::Type ns_DiodeFexV1_v0::dataset_data::stored_type()
00300 {
00301 static hdf5pp::Type type = ns_DiodeFexV1_v0_dataset_data_stored_type();
00302 return type;
00303 }
00304
00305 hdf5pp::Type ns_DiodeFexV1_v0_dataset_data_native_type()
00306 {
00307 typedef ns_DiodeFexV1_v0::dataset_data DsType;
00308 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00309 type.insert("value", offsetof(DsType, value), hdf5pp::TypeTraits<float>::native_type());
00310 return type;
00311 }
00312
00313 hdf5pp::Type ns_DiodeFexV1_v0::dataset_data::native_type()
00314 {
00315 static hdf5pp::Type type = ns_DiodeFexV1_v0_dataset_data_native_type();
00316 return type;
00317 }
00318
00319 ns_DiodeFexV1_v0::dataset_data::dataset_data()
00320 {
00321 }
00322
00323 ns_DiodeFexV1_v0::dataset_data::dataset_data(const Psana::Lusi::DiodeFexV1& psanaobj)
00324 : value(psanaobj.value())
00325 {
00326 }
00327
00328 ns_DiodeFexV1_v0::dataset_data::~dataset_data()
00329 {
00330 }
00331 boost::shared_ptr<Psana::Lusi::DiodeFexV1>
00332 Proxy_DiodeFexV1_v0::getTypedImpl(PSEvt::ProxyDictI* dict, const Pds::Src& source, const std::string& key)
00333 {
00334 if (not m_data) {
00335 boost::shared_ptr<Lusi::ns_DiodeFexV1_v0::dataset_data> ds_data = hdf5pp::Utils::readGroup<Lusi::ns_DiodeFexV1_v0::dataset_data>(m_group, "data", m_idx);
00336 m_data.reset(new PsanaType(ds_data->value));
00337 }
00338 return m_data;
00339 }
00340
00341
00342 void make_datasets_DiodeFexV1_v0(const Psana::Lusi::DiodeFexV1& obj,
00343 hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00344 {
00345 {
00346 hdf5pp::Type dstype = Lusi::ns_DiodeFexV1_v0::dataset_data::stored_type();
00347 hdf5pp::Utils::createDataset(group, "data", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);
00348 }
00349 }
00350
00351 void store_DiodeFexV1_v0(const Psana::Lusi::DiodeFexV1* obj, hdf5pp::Group group, long index, bool append)
00352 {
00353 if (obj) {
00354 Lusi::ns_DiodeFexV1_v0::dataset_data ds_data(*obj);
00355 if (append) {
00356 hdf5pp::Utils::storeAt(group, "data", ds_data, index);
00357 } else {
00358 hdf5pp::Utils::storeScalar(group, "data", ds_data);
00359 }
00360 } else if (append) {
00361 hdf5pp::Utils::resizeDataset(group, "data", index < 0 ? index : index + 1);
00362 }
00363 }
00364
00365 boost::shared_ptr<PSEvt::Proxy<Psana::Lusi::DiodeFexV1> > make_DiodeFexV1(int version, hdf5pp::Group group, hsize_t idx) {
00366 switch (version) {
00367 case 0:
00368 return boost::make_shared<Proxy_DiodeFexV1_v0>(group, idx);
00369 default:
00370 return boost::make_shared<PSEvt::DataProxy<Psana::Lusi::DiodeFexV1> >(boost::shared_ptr<Psana::Lusi::DiodeFexV1>());
00371 }
00372 }
00373
00374 void make_datasets(const Psana::Lusi::DiodeFexV1& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
00375 int deflate, bool shuffle, int version)
00376 {
00377 if (version < 0) version = 0;
00378 group.createAttr<uint32_t>("_schemaVersion").store(version);
00379 switch (version) {
00380 case 0:
00381 make_datasets_DiodeFexV1_v0(obj, group, chunkPolicy, deflate, shuffle);
00382 break;
00383 default:
00384 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.DiodeFexV1", version);
00385 }
00386 }
00387
00388 void store_DiodeFexV1(const Psana::Lusi::DiodeFexV1* obj, hdf5pp::Group group, long index, int version, bool append)
00389 {
00390 if (version < 0) version = 0;
00391 if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
00392 switch (version) {
00393 case 0:
00394 store_DiodeFexV1_v0(obj, group, index, append);
00395 break;
00396 default:
00397 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.DiodeFexV1", version);
00398 }
00399 }
00400
00401 void store(const Psana::Lusi::DiodeFexV1& obj, hdf5pp::Group group, int version)
00402 {
00403 store_DiodeFexV1(&obj, group, 0, version, false);
00404 }
00405
00406 void store_at(const Psana::Lusi::DiodeFexV1* obj, hdf5pp::Group group, long index, int version)
00407 {
00408 store_DiodeFexV1(obj, group, index, version, true);
00409 }
00410
00411
00412 hdf5pp::Type ns_IpmFexConfigV1_v0_dataset_config_stored_type()
00413 {
00414 typedef ns_IpmFexConfigV1_v0::dataset_config DsType;
00415 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00416 hsize_t _array_type_diode_shape[] = { 4 };
00417 hdf5pp::ArrayType _array_type_diode = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<Lusi::ns_DiodeFexConfigV1_v0::dataset_config>::stored_type(), 1, _array_type_diode_shape);
00418 type.insert("diode", offsetof(DsType, diode), _array_type_diode);
00419 type.insert("xscale", offsetof(DsType, xscale), hdf5pp::TypeTraits<float>::stored_type());
00420 type.insert("yscale", offsetof(DsType, yscale), hdf5pp::TypeTraits<float>::stored_type());
00421 return type;
00422 }
00423
00424 hdf5pp::Type ns_IpmFexConfigV1_v0::dataset_config::stored_type()
00425 {
00426 static hdf5pp::Type type = ns_IpmFexConfigV1_v0_dataset_config_stored_type();
00427 return type;
00428 }
00429
00430 hdf5pp::Type ns_IpmFexConfigV1_v0_dataset_config_native_type()
00431 {
00432 typedef ns_IpmFexConfigV1_v0::dataset_config DsType;
00433 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00434 hsize_t _array_type_diode_shape[] = { 4 };
00435 hdf5pp::ArrayType _array_type_diode = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<Lusi::ns_DiodeFexConfigV1_v0::dataset_config>::native_type(), 1, _array_type_diode_shape);
00436 type.insert("diode", offsetof(DsType, diode), _array_type_diode);
00437 type.insert("xscale", offsetof(DsType, xscale), hdf5pp::TypeTraits<float>::native_type());
00438 type.insert("yscale", offsetof(DsType, yscale), hdf5pp::TypeTraits<float>::native_type());
00439 return type;
00440 }
00441
00442 hdf5pp::Type ns_IpmFexConfigV1_v0::dataset_config::native_type()
00443 {
00444 static hdf5pp::Type type = ns_IpmFexConfigV1_v0_dataset_config_native_type();
00445 return type;
00446 }
00447
00448 ns_IpmFexConfigV1_v0::dataset_config::dataset_config()
00449 {
00450 }
00451
00452 ns_IpmFexConfigV1_v0::dataset_config::dataset_config(const Psana::Lusi::IpmFexConfigV1& psanaobj)
00453 : xscale(psanaobj.xscale())
00454 , yscale(psanaobj.yscale())
00455 {
00456 {
00457 const __typeof__(psanaobj.diode())& arr = psanaobj.diode();
00458 std::copy(arr.begin(), arr.begin()+4, diode);
00459 }
00460 }
00461
00462 ns_IpmFexConfigV1_v0::dataset_config::~dataset_config()
00463 {
00464 }
00465 ndarray<const Psana::Lusi::DiodeFexConfigV1, 1> IpmFexConfigV1_v0::diode() const {
00466 if (not m_ds_config) read_ds_config();
00467 if (m_ds_storage_config_diode.empty()) {
00468 unsigned shape[] = {NCHANNELS};
00469 ndarray<Psana::Lusi::DiodeFexConfigV1, 1> tmparr(shape);
00470 unsigned size = tmparr.size();
00471 ndarray<Psana::Lusi::DiodeFexConfigV1, 1>::iterator it = tmparr.begin();
00472 for (unsigned i = 0; i != size; ++ i, ++ it) {
00473 *it = Psana::Lusi::DiodeFexConfigV1(m_ds_config->diode[i]);
00474 }
00475 m_ds_storage_config_diode = tmparr;
00476 }
00477 return m_ds_storage_config_diode;
00478 }
00479 float IpmFexConfigV1_v0::xscale() const {
00480 if (not m_ds_config) read_ds_config();
00481 return float(m_ds_config->xscale);
00482 }
00483 float IpmFexConfigV1_v0::yscale() const {
00484 if (not m_ds_config) read_ds_config();
00485 return float(m_ds_config->yscale);
00486 }
00487 void IpmFexConfigV1_v0::read_ds_config() const {
00488 m_ds_config = hdf5pp::Utils::readGroup<Lusi::ns_IpmFexConfigV1_v0::dataset_config>(m_group, "config", m_idx);
00489 }
00490
00491 void make_datasets_IpmFexConfigV1_v0(const Psana::Lusi::IpmFexConfigV1& obj,
00492 hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00493 {
00494 {
00495 hdf5pp::Type dstype = Lusi::ns_IpmFexConfigV1_v0::dataset_config::stored_type();
00496 hdf5pp::Utils::createDataset(group, "config", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);
00497 }
00498 }
00499
00500 void store_IpmFexConfigV1_v0(const Psana::Lusi::IpmFexConfigV1* obj, hdf5pp::Group group, long index, bool append)
00501 {
00502 if (obj) {
00503 Lusi::ns_IpmFexConfigV1_v0::dataset_config ds_data(*obj);
00504 if (append) {
00505 hdf5pp::Utils::storeAt(group, "config", ds_data, index);
00506 } else {
00507 hdf5pp::Utils::storeScalar(group, "config", ds_data);
00508 }
00509 } else if (append) {
00510 hdf5pp::Utils::resizeDataset(group, "config", index < 0 ? index : index + 1);
00511 }
00512 }
00513
00514 boost::shared_ptr<PSEvt::Proxy<Psana::Lusi::IpmFexConfigV1> > make_IpmFexConfigV1(int version, hdf5pp::Group group, hsize_t idx) {
00515 switch (version) {
00516 case 0:
00517 return boost::make_shared<PSEvt::DataProxy<Psana::Lusi::IpmFexConfigV1> >(boost::make_shared<IpmFexConfigV1_v0>(group, idx));
00518 default:
00519 return boost::make_shared<PSEvt::DataProxy<Psana::Lusi::IpmFexConfigV1> >(boost::shared_ptr<Psana::Lusi::IpmFexConfigV1>());
00520 }
00521 }
00522
00523 void make_datasets(const Psana::Lusi::IpmFexConfigV1& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
00524 int deflate, bool shuffle, int version)
00525 {
00526 if (version < 0) version = 0;
00527 group.createAttr<uint32_t>("_schemaVersion").store(version);
00528 switch (version) {
00529 case 0:
00530 make_datasets_IpmFexConfigV1_v0(obj, group, chunkPolicy, deflate, shuffle);
00531 break;
00532 default:
00533 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.IpmFexConfigV1", version);
00534 }
00535 }
00536
00537 void store_IpmFexConfigV1(const Psana::Lusi::IpmFexConfigV1* obj, hdf5pp::Group group, long index, int version, bool append)
00538 {
00539 if (version < 0) version = 0;
00540 if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
00541 switch (version) {
00542 case 0:
00543 store_IpmFexConfigV1_v0(obj, group, index, append);
00544 break;
00545 default:
00546 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.IpmFexConfigV1", version);
00547 }
00548 }
00549
00550 void store(const Psana::Lusi::IpmFexConfigV1& obj, hdf5pp::Group group, int version)
00551 {
00552 store_IpmFexConfigV1(&obj, group, 0, version, false);
00553 }
00554
00555 void store_at(const Psana::Lusi::IpmFexConfigV1* obj, hdf5pp::Group group, long index, int version)
00556 {
00557 store_IpmFexConfigV1(obj, group, index, version, true);
00558 }
00559
00560
00561 hdf5pp::Type ns_IpmFexConfigV2_v0_dataset_config_stored_type()
00562 {
00563 typedef ns_IpmFexConfigV2_v0::dataset_config DsType;
00564 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00565 hsize_t _array_type_diode_shape[] = { 4 };
00566 hdf5pp::ArrayType _array_type_diode = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<Lusi::ns_DiodeFexConfigV2_v0::dataset_config>::stored_type(), 1, _array_type_diode_shape);
00567 type.insert("diode", offsetof(DsType, diode), _array_type_diode);
00568 type.insert("xscale", offsetof(DsType, xscale), hdf5pp::TypeTraits<float>::stored_type());
00569 type.insert("yscale", offsetof(DsType, yscale), hdf5pp::TypeTraits<float>::stored_type());
00570 return type;
00571 }
00572
00573 hdf5pp::Type ns_IpmFexConfigV2_v0::dataset_config::stored_type()
00574 {
00575 static hdf5pp::Type type = ns_IpmFexConfigV2_v0_dataset_config_stored_type();
00576 return type;
00577 }
00578
00579 hdf5pp::Type ns_IpmFexConfigV2_v0_dataset_config_native_type()
00580 {
00581 typedef ns_IpmFexConfigV2_v0::dataset_config DsType;
00582 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00583 hsize_t _array_type_diode_shape[] = { 4 };
00584 hdf5pp::ArrayType _array_type_diode = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<Lusi::ns_DiodeFexConfigV2_v0::dataset_config>::native_type(), 1, _array_type_diode_shape);
00585 type.insert("diode", offsetof(DsType, diode), _array_type_diode);
00586 type.insert("xscale", offsetof(DsType, xscale), hdf5pp::TypeTraits<float>::native_type());
00587 type.insert("yscale", offsetof(DsType, yscale), hdf5pp::TypeTraits<float>::native_type());
00588 return type;
00589 }
00590
00591 hdf5pp::Type ns_IpmFexConfigV2_v0::dataset_config::native_type()
00592 {
00593 static hdf5pp::Type type = ns_IpmFexConfigV2_v0_dataset_config_native_type();
00594 return type;
00595 }
00596
00597 ns_IpmFexConfigV2_v0::dataset_config::dataset_config()
00598 {
00599 }
00600
00601 ns_IpmFexConfigV2_v0::dataset_config::dataset_config(const Psana::Lusi::IpmFexConfigV2& psanaobj)
00602 : xscale(psanaobj.xscale())
00603 , yscale(psanaobj.yscale())
00604 {
00605 {
00606 const __typeof__(psanaobj.diode())& arr = psanaobj.diode();
00607 std::copy(arr.begin(), arr.begin()+4, diode);
00608 }
00609 }
00610
00611 ns_IpmFexConfigV2_v0::dataset_config::~dataset_config()
00612 {
00613 }
00614 ndarray<const Psana::Lusi::DiodeFexConfigV2, 1> IpmFexConfigV2_v0::diode() const {
00615 if (not m_ds_config) read_ds_config();
00616 if (m_ds_storage_config_diode.empty()) {
00617 unsigned shape[] = {NCHANNELS};
00618 ndarray<Psana::Lusi::DiodeFexConfigV2, 1> tmparr(shape);
00619 unsigned size = tmparr.size();
00620 ndarray<Psana::Lusi::DiodeFexConfigV2, 1>::iterator it = tmparr.begin();
00621 for (unsigned i = 0; i != size; ++ i, ++ it) {
00622 *it = Psana::Lusi::DiodeFexConfigV2(m_ds_config->diode[i]);
00623 }
00624 m_ds_storage_config_diode = tmparr;
00625 }
00626 return m_ds_storage_config_diode;
00627 }
00628 float IpmFexConfigV2_v0::xscale() const {
00629 if (not m_ds_config) read_ds_config();
00630 return float(m_ds_config->xscale);
00631 }
00632 float IpmFexConfigV2_v0::yscale() const {
00633 if (not m_ds_config) read_ds_config();
00634 return float(m_ds_config->yscale);
00635 }
00636 void IpmFexConfigV2_v0::read_ds_config() const {
00637 m_ds_config = hdf5pp::Utils::readGroup<Lusi::ns_IpmFexConfigV2_v0::dataset_config>(m_group, "config", m_idx);
00638 }
00639
00640 void make_datasets_IpmFexConfigV2_v0(const Psana::Lusi::IpmFexConfigV2& obj,
00641 hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00642 {
00643 {
00644 hdf5pp::Type dstype = Lusi::ns_IpmFexConfigV2_v0::dataset_config::stored_type();
00645 hdf5pp::Utils::createDataset(group, "config", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);
00646 }
00647 }
00648
00649 void store_IpmFexConfigV2_v0(const Psana::Lusi::IpmFexConfigV2* obj, hdf5pp::Group group, long index, bool append)
00650 {
00651 if (obj) {
00652 Lusi::ns_IpmFexConfigV2_v0::dataset_config ds_data(*obj);
00653 if (append) {
00654 hdf5pp::Utils::storeAt(group, "config", ds_data, index);
00655 } else {
00656 hdf5pp::Utils::storeScalar(group, "config", ds_data);
00657 }
00658 } else if (append) {
00659 hdf5pp::Utils::resizeDataset(group, "config", index < 0 ? index : index + 1);
00660 }
00661 }
00662
00663 boost::shared_ptr<PSEvt::Proxy<Psana::Lusi::IpmFexConfigV2> > make_IpmFexConfigV2(int version, hdf5pp::Group group, hsize_t idx) {
00664 switch (version) {
00665 case 0:
00666 return boost::make_shared<PSEvt::DataProxy<Psana::Lusi::IpmFexConfigV2> >(boost::make_shared<IpmFexConfigV2_v0>(group, idx));
00667 default:
00668 return boost::make_shared<PSEvt::DataProxy<Psana::Lusi::IpmFexConfigV2> >(boost::shared_ptr<Psana::Lusi::IpmFexConfigV2>());
00669 }
00670 }
00671
00672 void make_datasets(const Psana::Lusi::IpmFexConfigV2& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
00673 int deflate, bool shuffle, int version)
00674 {
00675 if (version < 0) version = 0;
00676 group.createAttr<uint32_t>("_schemaVersion").store(version);
00677 switch (version) {
00678 case 0:
00679 make_datasets_IpmFexConfigV2_v0(obj, group, chunkPolicy, deflate, shuffle);
00680 break;
00681 default:
00682 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.IpmFexConfigV2", version);
00683 }
00684 }
00685
00686 void store_IpmFexConfigV2(const Psana::Lusi::IpmFexConfigV2* obj, hdf5pp::Group group, long index, int version, bool append)
00687 {
00688 if (version < 0) version = 0;
00689 if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
00690 switch (version) {
00691 case 0:
00692 store_IpmFexConfigV2_v0(obj, group, index, append);
00693 break;
00694 default:
00695 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.IpmFexConfigV2", version);
00696 }
00697 }
00698
00699 void store(const Psana::Lusi::IpmFexConfigV2& obj, hdf5pp::Group group, int version)
00700 {
00701 store_IpmFexConfigV2(&obj, group, 0, version, false);
00702 }
00703
00704 void store_at(const Psana::Lusi::IpmFexConfigV2* obj, hdf5pp::Group group, long index, int version)
00705 {
00706 store_IpmFexConfigV2(obj, group, index, version, true);
00707 }
00708
00709
00710 hdf5pp::Type ns_IpmFexV1_v0_dataset_data_stored_type()
00711 {
00712 typedef ns_IpmFexV1_v0::dataset_data DsType;
00713 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00714 hsize_t _array_type_channel_shape[] = { 4 };
00715 hdf5pp::ArrayType _array_type_channel = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<float>::stored_type(), 1, _array_type_channel_shape);
00716 type.insert("channel", offsetof(DsType, channel), _array_type_channel);
00717 type.insert("sum", offsetof(DsType, sum), hdf5pp::TypeTraits<float>::stored_type());
00718 type.insert("xpos", offsetof(DsType, xpos), hdf5pp::TypeTraits<float>::stored_type());
00719 type.insert("ypos", offsetof(DsType, ypos), hdf5pp::TypeTraits<float>::stored_type());
00720 return type;
00721 }
00722
00723 hdf5pp::Type ns_IpmFexV1_v0::dataset_data::stored_type()
00724 {
00725 static hdf5pp::Type type = ns_IpmFexV1_v0_dataset_data_stored_type();
00726 return type;
00727 }
00728
00729 hdf5pp::Type ns_IpmFexV1_v0_dataset_data_native_type()
00730 {
00731 typedef ns_IpmFexV1_v0::dataset_data DsType;
00732 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00733 hsize_t _array_type_channel_shape[] = { 4 };
00734 hdf5pp::ArrayType _array_type_channel = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<float>::native_type(), 1, _array_type_channel_shape);
00735 type.insert("channel", offsetof(DsType, channel), _array_type_channel);
00736 type.insert("sum", offsetof(DsType, sum), hdf5pp::TypeTraits<float>::native_type());
00737 type.insert("xpos", offsetof(DsType, xpos), hdf5pp::TypeTraits<float>::native_type());
00738 type.insert("ypos", offsetof(DsType, ypos), hdf5pp::TypeTraits<float>::native_type());
00739 return type;
00740 }
00741
00742 hdf5pp::Type ns_IpmFexV1_v0::dataset_data::native_type()
00743 {
00744 static hdf5pp::Type type = ns_IpmFexV1_v0_dataset_data_native_type();
00745 return type;
00746 }
00747
00748 ns_IpmFexV1_v0::dataset_data::dataset_data()
00749 {
00750 }
00751
00752 ns_IpmFexV1_v0::dataset_data::dataset_data(const Psana::Lusi::IpmFexV1& psanaobj)
00753 : sum(psanaobj.sum())
00754 , xpos(psanaobj.xpos())
00755 , ypos(psanaobj.ypos())
00756 {
00757 {
00758 const __typeof__(psanaobj.channel())& arr = psanaobj.channel();
00759 std::copy(arr.begin(), arr.begin()+4, channel);
00760 }
00761 }
00762
00763 ns_IpmFexV1_v0::dataset_data::~dataset_data()
00764 {
00765 }
00766 boost::shared_ptr<Psana::Lusi::IpmFexV1>
00767 Proxy_IpmFexV1_v0::getTypedImpl(PSEvt::ProxyDictI* dict, const Pds::Src& source, const std::string& key)
00768 {
00769 if (not m_data) {
00770 boost::shared_ptr<Lusi::ns_IpmFexV1_v0::dataset_data> ds_data = hdf5pp::Utils::readGroup<Lusi::ns_IpmFexV1_v0::dataset_data>(m_group, "data", m_idx);
00771 m_data.reset(new PsanaType(ds_data->channel, ds_data->sum, ds_data->xpos, ds_data->ypos));
00772 }
00773 return m_data;
00774 }
00775
00776
00777 void make_datasets_IpmFexV1_v0(const Psana::Lusi::IpmFexV1& obj,
00778 hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00779 {
00780 {
00781 hdf5pp::Type dstype = Lusi::ns_IpmFexV1_v0::dataset_data::stored_type();
00782 hdf5pp::Utils::createDataset(group, "data", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);
00783 }
00784 }
00785
00786 void store_IpmFexV1_v0(const Psana::Lusi::IpmFexV1* obj, hdf5pp::Group group, long index, bool append)
00787 {
00788 if (obj) {
00789 Lusi::ns_IpmFexV1_v0::dataset_data ds_data(*obj);
00790 if (append) {
00791 hdf5pp::Utils::storeAt(group, "data", ds_data, index);
00792 } else {
00793 hdf5pp::Utils::storeScalar(group, "data", ds_data);
00794 }
00795 } else if (append) {
00796 hdf5pp::Utils::resizeDataset(group, "data", index < 0 ? index : index + 1);
00797 }
00798 }
00799
00800 boost::shared_ptr<PSEvt::Proxy<Psana::Lusi::IpmFexV1> > make_IpmFexV1(int version, hdf5pp::Group group, hsize_t idx) {
00801 switch (version) {
00802 case 0:
00803 return boost::make_shared<Proxy_IpmFexV1_v0>(group, idx);
00804 default:
00805 return boost::make_shared<PSEvt::DataProxy<Psana::Lusi::IpmFexV1> >(boost::shared_ptr<Psana::Lusi::IpmFexV1>());
00806 }
00807 }
00808
00809 void make_datasets(const Psana::Lusi::IpmFexV1& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
00810 int deflate, bool shuffle, int version)
00811 {
00812 if (version < 0) version = 0;
00813 group.createAttr<uint32_t>("_schemaVersion").store(version);
00814 switch (version) {
00815 case 0:
00816 make_datasets_IpmFexV1_v0(obj, group, chunkPolicy, deflate, shuffle);
00817 break;
00818 default:
00819 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.IpmFexV1", version);
00820 }
00821 }
00822
00823 void store_IpmFexV1(const Psana::Lusi::IpmFexV1* obj, hdf5pp::Group group, long index, int version, bool append)
00824 {
00825 if (version < 0) version = 0;
00826 if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
00827 switch (version) {
00828 case 0:
00829 store_IpmFexV1_v0(obj, group, index, append);
00830 break;
00831 default:
00832 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.IpmFexV1", version);
00833 }
00834 }
00835
00836 void store(const Psana::Lusi::IpmFexV1& obj, hdf5pp::Group group, int version)
00837 {
00838 store_IpmFexV1(&obj, group, 0, version, false);
00839 }
00840
00841 void store_at(const Psana::Lusi::IpmFexV1* obj, hdf5pp::Group group, long index, int version)
00842 {
00843 store_IpmFexV1(obj, group, index, version, true);
00844 }
00845
00846
00847 hdf5pp::Type ns_PimImageConfigV1_v0_dataset_config_stored_type()
00848 {
00849 typedef ns_PimImageConfigV1_v0::dataset_config DsType;
00850 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00851 type.insert("xscale", offsetof(DsType, xscale), hdf5pp::TypeTraits<float>::stored_type());
00852 type.insert("yscale", offsetof(DsType, yscale), hdf5pp::TypeTraits<float>::stored_type());
00853 return type;
00854 }
00855
00856 hdf5pp::Type ns_PimImageConfigV1_v0::dataset_config::stored_type()
00857 {
00858 static hdf5pp::Type type = ns_PimImageConfigV1_v0_dataset_config_stored_type();
00859 return type;
00860 }
00861
00862 hdf5pp::Type ns_PimImageConfigV1_v0_dataset_config_native_type()
00863 {
00864 typedef ns_PimImageConfigV1_v0::dataset_config DsType;
00865 hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00866 type.insert("xscale", offsetof(DsType, xscale), hdf5pp::TypeTraits<float>::native_type());
00867 type.insert("yscale", offsetof(DsType, yscale), hdf5pp::TypeTraits<float>::native_type());
00868 return type;
00869 }
00870
00871 hdf5pp::Type ns_PimImageConfigV1_v0::dataset_config::native_type()
00872 {
00873 static hdf5pp::Type type = ns_PimImageConfigV1_v0_dataset_config_native_type();
00874 return type;
00875 }
00876
00877 ns_PimImageConfigV1_v0::dataset_config::dataset_config()
00878 {
00879 }
00880
00881 ns_PimImageConfigV1_v0::dataset_config::dataset_config(const Psana::Lusi::PimImageConfigV1& psanaobj)
00882 : xscale(psanaobj.xscale())
00883 , yscale(psanaobj.yscale())
00884 {
00885 }
00886
00887 ns_PimImageConfigV1_v0::dataset_config::~dataset_config()
00888 {
00889 }
00890 boost::shared_ptr<Psana::Lusi::PimImageConfigV1>
00891 Proxy_PimImageConfigV1_v0::getTypedImpl(PSEvt::ProxyDictI* dict, const Pds::Src& source, const std::string& key)
00892 {
00893 if (not m_data) {
00894 boost::shared_ptr<Lusi::ns_PimImageConfigV1_v0::dataset_config> ds_config = hdf5pp::Utils::readGroup<Lusi::ns_PimImageConfigV1_v0::dataset_config>(m_group, "config", m_idx);
00895 m_data.reset(new PsanaType(ds_config->xscale, ds_config->yscale));
00896 }
00897 return m_data;
00898 }
00899
00900
00901 void make_datasets_PimImageConfigV1_v0(const Psana::Lusi::PimImageConfigV1& obj,
00902 hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00903 {
00904 {
00905 hdf5pp::Type dstype = Lusi::ns_PimImageConfigV1_v0::dataset_config::stored_type();
00906 hdf5pp::Utils::createDataset(group, "config", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);
00907 }
00908 }
00909
00910 void store_PimImageConfigV1_v0(const Psana::Lusi::PimImageConfigV1* obj, hdf5pp::Group group, long index, bool append)
00911 {
00912 if (obj) {
00913 Lusi::ns_PimImageConfigV1_v0::dataset_config ds_data(*obj);
00914 if (append) {
00915 hdf5pp::Utils::storeAt(group, "config", ds_data, index);
00916 } else {
00917 hdf5pp::Utils::storeScalar(group, "config", ds_data);
00918 }
00919 } else if (append) {
00920 hdf5pp::Utils::resizeDataset(group, "config", index < 0 ? index : index + 1);
00921 }
00922 }
00923
00924 boost::shared_ptr<PSEvt::Proxy<Psana::Lusi::PimImageConfigV1> > make_PimImageConfigV1(int version, hdf5pp::Group group, hsize_t idx) {
00925 switch (version) {
00926 case 0:
00927 return boost::make_shared<Proxy_PimImageConfigV1_v0>(group, idx);
00928 default:
00929 return boost::make_shared<PSEvt::DataProxy<Psana::Lusi::PimImageConfigV1> >(boost::shared_ptr<Psana::Lusi::PimImageConfigV1>());
00930 }
00931 }
00932
00933 void make_datasets(const Psana::Lusi::PimImageConfigV1& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
00934 int deflate, bool shuffle, int version)
00935 {
00936 if (version < 0) version = 0;
00937 group.createAttr<uint32_t>("_schemaVersion").store(version);
00938 switch (version) {
00939 case 0:
00940 make_datasets_PimImageConfigV1_v0(obj, group, chunkPolicy, deflate, shuffle);
00941 break;
00942 default:
00943 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.PimImageConfigV1", version);
00944 }
00945 }
00946
00947 void store_PimImageConfigV1(const Psana::Lusi::PimImageConfigV1* obj, hdf5pp::Group group, long index, int version, bool append)
00948 {
00949 if (version < 0) version = 0;
00950 if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
00951 switch (version) {
00952 case 0:
00953 store_PimImageConfigV1_v0(obj, group, index, append);
00954 break;
00955 default:
00956 throw ExceptionSchemaVersion(ERR_LOC, "Lusi.PimImageConfigV1", version);
00957 }
00958 }
00959
00960 void store(const Psana::Lusi::PimImageConfigV1& obj, hdf5pp::Group group, int version)
00961 {
00962 store_PimImageConfigV1(&obj, group, 0, version, false);
00963 }
00964
00965 void store_at(const Psana::Lusi::PimImageConfigV1* obj, hdf5pp::Group group, long index, int version)
00966 {
00967 store_PimImageConfigV1(obj, group, index, version, true);
00968 }
00969
00970 }
00971 }