psddl_hdf2psana/src/cspad.ddl.cpp

Go to the documentation of this file.
00001 
00002 // *** Do not edit this file, it is auto-generated ***
00003 
00004 #include "psddl_hdf2psana/cspad.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 #include "psddl_hdf2psana/cspad.h"
00013 namespace psddl_hdf2psana {
00014 namespace CsPad {
00015 
00016 hdf5pp::Type ns_CsPadDigitalPotsCfg_v0_dataset_data_stored_type()
00017 {
00018   typedef ns_CsPadDigitalPotsCfg_v0::dataset_data DsType;
00019   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00020   hsize_t _array_type_pots_shape[] = { 80 };
00021   hdf5pp::ArrayType _array_type_pots = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint8_t>::stored_type(), 1, _array_type_pots_shape);
00022   type.insert("pots", offsetof(DsType, pots), _array_type_pots);
00023   return type;
00024 }
00025 
00026 hdf5pp::Type ns_CsPadDigitalPotsCfg_v0::dataset_data::stored_type()
00027 {
00028   static hdf5pp::Type type = ns_CsPadDigitalPotsCfg_v0_dataset_data_stored_type();
00029   return type;
00030 }
00031 
00032 hdf5pp::Type ns_CsPadDigitalPotsCfg_v0_dataset_data_native_type()
00033 {
00034   typedef ns_CsPadDigitalPotsCfg_v0::dataset_data DsType;
00035   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00036   hsize_t _array_type_pots_shape[] = { 80 };
00037   hdf5pp::ArrayType _array_type_pots = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint8_t>::native_type(), 1, _array_type_pots_shape);
00038   type.insert("pots", offsetof(DsType, pots), _array_type_pots);
00039   return type;
00040 }
00041 
00042 hdf5pp::Type ns_CsPadDigitalPotsCfg_v0::dataset_data::native_type()
00043 {
00044   static hdf5pp::Type type = ns_CsPadDigitalPotsCfg_v0_dataset_data_native_type();
00045   return type;
00046 }
00047 
00048 ns_CsPadDigitalPotsCfg_v0::dataset_data::dataset_data()
00049 {
00050 }
00051 
00052 ns_CsPadDigitalPotsCfg_v0::dataset_data::dataset_data(const Psana::CsPad::CsPadDigitalPotsCfg& psanaobj)
00053 {
00054   {
00055     const __typeof__(psanaobj.pots())& arr = psanaobj.pots();
00056     std::copy(arr.begin(), arr.begin()+80, pots);
00057   }
00058 }
00059 
00060 ns_CsPadDigitalPotsCfg_v0::dataset_data::~dataset_data()
00061 {
00062 }
00063 ndarray<const uint8_t, 1> CsPadDigitalPotsCfg_v0::pots() const {
00064   if (not m_ds_data) read_ds_data();
00065   boost::shared_ptr<uint8_t> ptr(m_ds_data, m_ds_data->pots);
00066   return make_ndarray(ptr, PotsPerQuad);
00067 }
00068 void CsPadDigitalPotsCfg_v0::read_ds_data() const {
00069   m_ds_data = hdf5pp::Utils::readGroup<CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data>(m_group, "data", m_idx);
00070 }
00071 
00072 void make_datasets_CsPadDigitalPotsCfg_v0(const Psana::CsPad::CsPadDigitalPotsCfg& obj, 
00073       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00074 {
00075   {
00076     hdf5pp::Type dstype = CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data::stored_type();
00077     hdf5pp::Utils::createDataset(group, "data", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
00078   }
00079 }
00080 
00081 void store_CsPadDigitalPotsCfg_v0(const Psana::CsPad::CsPadDigitalPotsCfg* obj, hdf5pp::Group group, long index, bool append)
00082 {
00083   if (obj) {
00084     CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data ds_data(*obj);
00085     if (append) {
00086       hdf5pp::Utils::storeAt(group, "data", ds_data, index);
00087     } else {
00088       hdf5pp::Utils::storeScalar(group, "data", ds_data);
00089     }
00090   } else if (append) {
00091     hdf5pp::Utils::resizeDataset(group, "data", index < 0 ? index : index + 1);
00092   }
00093 }
00094 
00095 
00096 hdf5pp::Type ns_CsPadReadOnlyCfg_v0_dataset_data_stored_type()
00097 {
00098   typedef ns_CsPadReadOnlyCfg_v0::dataset_data DsType;
00099   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00100   type.insert("shiftTest", offsetof(DsType, shiftTest), hdf5pp::TypeTraits<uint32_t>::stored_type());
00101   type.insert("version", offsetof(DsType, version), hdf5pp::TypeTraits<uint32_t>::stored_type());
00102   return type;
00103 }
00104 
00105 hdf5pp::Type ns_CsPadReadOnlyCfg_v0::dataset_data::stored_type()
00106 {
00107   static hdf5pp::Type type = ns_CsPadReadOnlyCfg_v0_dataset_data_stored_type();
00108   return type;
00109 }
00110 
00111 hdf5pp::Type ns_CsPadReadOnlyCfg_v0_dataset_data_native_type()
00112 {
00113   typedef ns_CsPadReadOnlyCfg_v0::dataset_data DsType;
00114   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00115   type.insert("shiftTest", offsetof(DsType, shiftTest), hdf5pp::TypeTraits<uint32_t>::native_type());
00116   type.insert("version", offsetof(DsType, version), hdf5pp::TypeTraits<uint32_t>::native_type());
00117   return type;
00118 }
00119 
00120 hdf5pp::Type ns_CsPadReadOnlyCfg_v0::dataset_data::native_type()
00121 {
00122   static hdf5pp::Type type = ns_CsPadReadOnlyCfg_v0_dataset_data_native_type();
00123   return type;
00124 }
00125 
00126 ns_CsPadReadOnlyCfg_v0::dataset_data::dataset_data()
00127 {
00128 }
00129 
00130 ns_CsPadReadOnlyCfg_v0::dataset_data::dataset_data(const Psana::CsPad::CsPadReadOnlyCfg& psanaobj)
00131   : shiftTest(psanaobj.shiftTest())
00132   , version(psanaobj.version())
00133 {
00134 }
00135 
00136 ns_CsPadReadOnlyCfg_v0::dataset_data::~dataset_data()
00137 {
00138 }
00139 
00140 hdf5pp::Type ns_ProtectionSystemThreshold_v0_dataset_data_stored_type()
00141 {
00142   typedef ns_ProtectionSystemThreshold_v0::dataset_data DsType;
00143   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00144   type.insert("adcThreshold", offsetof(DsType, adcThreshold), hdf5pp::TypeTraits<uint32_t>::stored_type());
00145   type.insert("pixelCountThreshold", offsetof(DsType, pixelCountThreshold), hdf5pp::TypeTraits<uint32_t>::stored_type());
00146   return type;
00147 }
00148 
00149 hdf5pp::Type ns_ProtectionSystemThreshold_v0::dataset_data::stored_type()
00150 {
00151   static hdf5pp::Type type = ns_ProtectionSystemThreshold_v0_dataset_data_stored_type();
00152   return type;
00153 }
00154 
00155 hdf5pp::Type ns_ProtectionSystemThreshold_v0_dataset_data_native_type()
00156 {
00157   typedef ns_ProtectionSystemThreshold_v0::dataset_data DsType;
00158   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00159   type.insert("adcThreshold", offsetof(DsType, adcThreshold), hdf5pp::TypeTraits<uint32_t>::native_type());
00160   type.insert("pixelCountThreshold", offsetof(DsType, pixelCountThreshold), hdf5pp::TypeTraits<uint32_t>::native_type());
00161   return type;
00162 }
00163 
00164 hdf5pp::Type ns_ProtectionSystemThreshold_v0::dataset_data::native_type()
00165 {
00166   static hdf5pp::Type type = ns_ProtectionSystemThreshold_v0_dataset_data_native_type();
00167   return type;
00168 }
00169 
00170 ns_ProtectionSystemThreshold_v0::dataset_data::dataset_data()
00171 {
00172 }
00173 
00174 ns_ProtectionSystemThreshold_v0::dataset_data::dataset_data(const Psana::CsPad::ProtectionSystemThreshold& psanaobj)
00175   : adcThreshold(psanaobj.adcThreshold())
00176   , pixelCountThreshold(psanaobj.pixelCountThreshold())
00177 {
00178 }
00179 
00180 ns_ProtectionSystemThreshold_v0::dataset_data::~dataset_data()
00181 {
00182 }
00183 
00184 hdf5pp::Type ns_CsPadGainMapCfg_v0_dataset_data_stored_type()
00185 {
00186   typedef ns_CsPadGainMapCfg_v0::dataset_data DsType;
00187   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00188   hsize_t _array_type_gainMap_shape[] = { 185, 194 };
00189   hdf5pp::ArrayType _array_type_gainMap = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint16_t>::stored_type(), 2, _array_type_gainMap_shape);
00190   type.insert("gainMap", offsetof(DsType, gainMap), _array_type_gainMap);
00191   return type;
00192 }
00193 
00194 hdf5pp::Type ns_CsPadGainMapCfg_v0::dataset_data::stored_type()
00195 {
00196   static hdf5pp::Type type = ns_CsPadGainMapCfg_v0_dataset_data_stored_type();
00197   return type;
00198 }
00199 
00200 hdf5pp::Type ns_CsPadGainMapCfg_v0_dataset_data_native_type()
00201 {
00202   typedef ns_CsPadGainMapCfg_v0::dataset_data DsType;
00203   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00204   hsize_t _array_type_gainMap_shape[] = { 185, 194 };
00205   hdf5pp::ArrayType _array_type_gainMap = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint16_t>::native_type(), 2, _array_type_gainMap_shape);
00206   type.insert("gainMap", offsetof(DsType, gainMap), _array_type_gainMap);
00207   return type;
00208 }
00209 
00210 hdf5pp::Type ns_CsPadGainMapCfg_v0::dataset_data::native_type()
00211 {
00212   static hdf5pp::Type type = ns_CsPadGainMapCfg_v0_dataset_data_native_type();
00213   return type;
00214 }
00215 
00216 ns_CsPadGainMapCfg_v0::dataset_data::dataset_data()
00217 {
00218 }
00219 
00220 ns_CsPadGainMapCfg_v0::dataset_data::dataset_data(const Psana::CsPad::CsPadGainMapCfg& psanaobj)
00221 {
00222   {
00223     const __typeof__(psanaobj.gainMap())& arr = psanaobj.gainMap();
00224     std::copy(arr.begin(), arr.begin()+35890, gainMap[0]);
00225   }
00226 }
00227 
00228 ns_CsPadGainMapCfg_v0::dataset_data::~dataset_data()
00229 {
00230 }
00231 ndarray<const uint16_t, 2> CsPadGainMapCfg_v0::gainMap() const {
00232   if (not m_ds_data) read_ds_data();
00233   boost::shared_ptr<uint16_t> ptr(m_ds_data, m_ds_data->gainMap[0]);
00234   return make_ndarray(ptr, ColumnsPerASIC,MaxRowsPerASIC);
00235 }
00236 void CsPadGainMapCfg_v0::read_ds_data() const {
00237   m_ds_data = hdf5pp::Utils::readGroup<CsPad::ns_CsPadGainMapCfg_v0::dataset_data>(m_group, "data", m_idx);
00238 }
00239 
00240 void make_datasets_CsPadGainMapCfg_v0(const Psana::CsPad::CsPadGainMapCfg& obj, 
00241       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00242 {
00243   {
00244     hdf5pp::Type dstype = CsPad::ns_CsPadGainMapCfg_v0::dataset_data::stored_type();
00245     hdf5pp::Utils::createDataset(group, "data", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
00246   }
00247 }
00248 
00249 void store_CsPadGainMapCfg_v0(const Psana::CsPad::CsPadGainMapCfg* obj, hdf5pp::Group group, long index, bool append)
00250 {
00251   if (obj) {
00252     CsPad::ns_CsPadGainMapCfg_v0::dataset_data ds_data(*obj);
00253     if (append) {
00254       hdf5pp::Utils::storeAt(group, "data", ds_data, index);
00255     } else {
00256       hdf5pp::Utils::storeScalar(group, "data", ds_data);
00257     }
00258   } else if (append) {
00259     hdf5pp::Utils::resizeDataset(group, "data", index < 0 ? index : index + 1);
00260   }
00261 }
00262 
00263 
00264 hdf5pp::Type ns_ConfigV1QuadReg_v0_dataset_data_stored_type()
00265 {
00266   typedef ns_ConfigV1QuadReg_v0::dataset_data DsType;
00267   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00268   type.insert("readClkSet", offsetof(DsType, readClkSet), hdf5pp::TypeTraits<uint32_t>::stored_type());
00269   type.insert("readClkHold", offsetof(DsType, readClkHold), hdf5pp::TypeTraits<uint32_t>::stored_type());
00270   type.insert("dataMode", offsetof(DsType, dataMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
00271   type.insert("prstSel", offsetof(DsType, prstSel), hdf5pp::TypeTraits<uint32_t>::stored_type());
00272   type.insert("acqDelay", offsetof(DsType, acqDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
00273   type.insert("intTime", offsetof(DsType, intTime), hdf5pp::TypeTraits<uint32_t>::stored_type());
00274   type.insert("digDelay", offsetof(DsType, digDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
00275   type.insert("ampIdle", offsetof(DsType, ampIdle), hdf5pp::TypeTraits<uint32_t>::stored_type());
00276   type.insert("injTotal", offsetof(DsType, injTotal), hdf5pp::TypeTraits<uint32_t>::stored_type());
00277   type.insert("rowColShiftPer", offsetof(DsType, rowColShiftPer), hdf5pp::TypeTraits<uint32_t>::stored_type());
00278   type.insert("readOnly", offsetof(DsType, readOnly), hdf5pp::TypeTraits<CsPad::ns_CsPadReadOnlyCfg_v0::dataset_data>::stored_type());
00279   type.insert("digitalPots", offsetof(DsType, digitalPots), hdf5pp::TypeTraits<CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data>::stored_type());
00280   type.insert("gainMap", offsetof(DsType, gainMap), hdf5pp::TypeTraits<CsPad::ns_CsPadGainMapCfg_v0::dataset_data>::stored_type());
00281   hsize_t _array_type_shiftSelect_shape[] = { 4 };
00282   hdf5pp::ArrayType _array_type_shiftSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::stored_type(), 1, _array_type_shiftSelect_shape);
00283   type.insert("shiftSelect", offsetof(DsType, shiftSelect), _array_type_shiftSelect);
00284   hsize_t _array_type_edgeSelect_shape[] = { 4 };
00285   hdf5pp::ArrayType _array_type_edgeSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::stored_type(), 1, _array_type_edgeSelect_shape);
00286   type.insert("edgeSelect", offsetof(DsType, edgeSelect), _array_type_edgeSelect);
00287   return type;
00288 }
00289 
00290 hdf5pp::Type ns_ConfigV1QuadReg_v0::dataset_data::stored_type()
00291 {
00292   static hdf5pp::Type type = ns_ConfigV1QuadReg_v0_dataset_data_stored_type();
00293   return type;
00294 }
00295 
00296 hdf5pp::Type ns_ConfigV1QuadReg_v0_dataset_data_native_type()
00297 {
00298   typedef ns_ConfigV1QuadReg_v0::dataset_data DsType;
00299   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00300   type.insert("readClkSet", offsetof(DsType, readClkSet), hdf5pp::TypeTraits<uint32_t>::native_type());
00301   type.insert("readClkHold", offsetof(DsType, readClkHold), hdf5pp::TypeTraits<uint32_t>::native_type());
00302   type.insert("dataMode", offsetof(DsType, dataMode), hdf5pp::TypeTraits<uint32_t>::native_type());
00303   type.insert("prstSel", offsetof(DsType, prstSel), hdf5pp::TypeTraits<uint32_t>::native_type());
00304   type.insert("acqDelay", offsetof(DsType, acqDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
00305   type.insert("intTime", offsetof(DsType, intTime), hdf5pp::TypeTraits<uint32_t>::native_type());
00306   type.insert("digDelay", offsetof(DsType, digDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
00307   type.insert("ampIdle", offsetof(DsType, ampIdle), hdf5pp::TypeTraits<uint32_t>::native_type());
00308   type.insert("injTotal", offsetof(DsType, injTotal), hdf5pp::TypeTraits<uint32_t>::native_type());
00309   type.insert("rowColShiftPer", offsetof(DsType, rowColShiftPer), hdf5pp::TypeTraits<uint32_t>::native_type());
00310   type.insert("readOnly", offsetof(DsType, readOnly), hdf5pp::TypeTraits<CsPad::ns_CsPadReadOnlyCfg_v0::dataset_data>::native_type());
00311   type.insert("digitalPots", offsetof(DsType, digitalPots), hdf5pp::TypeTraits<CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data>::native_type());
00312   type.insert("gainMap", offsetof(DsType, gainMap), hdf5pp::TypeTraits<CsPad::ns_CsPadGainMapCfg_v0::dataset_data>::native_type());
00313   hsize_t _array_type_shiftSelect_shape[] = { 4 };
00314   hdf5pp::ArrayType _array_type_shiftSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::native_type(), 1, _array_type_shiftSelect_shape);
00315   type.insert("shiftSelect", offsetof(DsType, shiftSelect), _array_type_shiftSelect);
00316   hsize_t _array_type_edgeSelect_shape[] = { 4 };
00317   hdf5pp::ArrayType _array_type_edgeSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::native_type(), 1, _array_type_edgeSelect_shape);
00318   type.insert("edgeSelect", offsetof(DsType, edgeSelect), _array_type_edgeSelect);
00319   return type;
00320 }
00321 
00322 hdf5pp::Type ns_ConfigV1QuadReg_v0::dataset_data::native_type()
00323 {
00324   static hdf5pp::Type type = ns_ConfigV1QuadReg_v0_dataset_data_native_type();
00325   return type;
00326 }
00327 
00328 ns_ConfigV1QuadReg_v0::dataset_data::dataset_data()
00329 {
00330 }
00331 
00332 ns_ConfigV1QuadReg_v0::dataset_data::dataset_data(const Psana::CsPad::ConfigV1QuadReg& psanaobj)
00333   : readClkSet(psanaobj.readClkSet())
00334   , readClkHold(psanaobj.readClkHold())
00335   , dataMode(psanaobj.dataMode())
00336   , prstSel(psanaobj.prstSel())
00337   , acqDelay(psanaobj.acqDelay())
00338   , intTime(psanaobj.intTime())
00339   , digDelay(psanaobj.digDelay())
00340   , ampIdle(psanaobj.ampIdle())
00341   , injTotal(psanaobj.injTotal())
00342   , rowColShiftPer(psanaobj.rowColShiftPer())
00343   , readOnly(psanaobj.ro())
00344   , digitalPots(psanaobj.dp())
00345   , gainMap(psanaobj.gm())
00346 {
00347   {
00348     const __typeof__(psanaobj.shiftSelect())& arr = psanaobj.shiftSelect();
00349     std::copy(arr.begin(), arr.begin()+4, shiftSelect);
00350   }
00351   {
00352     const __typeof__(psanaobj.edgeSelect())& arr = psanaobj.edgeSelect();
00353     std::copy(arr.begin(), arr.begin()+4, edgeSelect);
00354   }
00355 }
00356 
00357 ns_ConfigV1QuadReg_v0::dataset_data::~dataset_data()
00358 {
00359 }
00360 ndarray<const uint32_t, 1> ConfigV1QuadReg_v0::shiftSelect() const {
00361   if (not m_ds_data) read_ds_data();
00362   boost::shared_ptr<uint32_t> ptr(m_ds_data, m_ds_data->shiftSelect);
00363   return make_ndarray(ptr, TwoByTwosPerQuad);
00364 }
00365 ndarray<const uint32_t, 1> ConfigV1QuadReg_v0::edgeSelect() const {
00366   if (not m_ds_data) read_ds_data();
00367   boost::shared_ptr<uint32_t> ptr(m_ds_data, m_ds_data->edgeSelect);
00368   return make_ndarray(ptr, TwoByTwosPerQuad);
00369 }
00370 uint32_t ConfigV1QuadReg_v0::readClkSet() const {
00371   if (not m_ds_data) read_ds_data();
00372   return uint32_t(m_ds_data->readClkSet);
00373 }
00374 uint32_t ConfigV1QuadReg_v0::readClkHold() const {
00375   if (not m_ds_data) read_ds_data();
00376   return uint32_t(m_ds_data->readClkHold);
00377 }
00378 uint32_t ConfigV1QuadReg_v0::dataMode() const {
00379   if (not m_ds_data) read_ds_data();
00380   return uint32_t(m_ds_data->dataMode);
00381 }
00382 uint32_t ConfigV1QuadReg_v0::prstSel() const {
00383   if (not m_ds_data) read_ds_data();
00384   return uint32_t(m_ds_data->prstSel);
00385 }
00386 uint32_t ConfigV1QuadReg_v0::acqDelay() const {
00387   if (not m_ds_data) read_ds_data();
00388   return uint32_t(m_ds_data->acqDelay);
00389 }
00390 uint32_t ConfigV1QuadReg_v0::intTime() const {
00391   if (not m_ds_data) read_ds_data();
00392   return uint32_t(m_ds_data->intTime);
00393 }
00394 uint32_t ConfigV1QuadReg_v0::digDelay() const {
00395   if (not m_ds_data) read_ds_data();
00396   return uint32_t(m_ds_data->digDelay);
00397 }
00398 uint32_t ConfigV1QuadReg_v0::ampIdle() const {
00399   if (not m_ds_data) read_ds_data();
00400   return uint32_t(m_ds_data->ampIdle);
00401 }
00402 uint32_t ConfigV1QuadReg_v0::injTotal() const {
00403   if (not m_ds_data) read_ds_data();
00404   return uint32_t(m_ds_data->injTotal);
00405 }
00406 uint32_t ConfigV1QuadReg_v0::rowColShiftPer() const {
00407   if (not m_ds_data) read_ds_data();
00408   return uint32_t(m_ds_data->rowColShiftPer);
00409 }
00410 const Psana::CsPad::CsPadReadOnlyCfg& ConfigV1QuadReg_v0::ro() const {
00411   if (not m_ds_data) read_ds_data();
00412   m_ds_storage_data_readOnly = Psana::CsPad::CsPadReadOnlyCfg(m_ds_data->readOnly);
00413   return m_ds_storage_data_readOnly;
00414 }
00415 const Psana::CsPad::CsPadDigitalPotsCfg& ConfigV1QuadReg_v0::dp() const {
00416   if (not m_ds_storage_data_digitalPots) {
00417     if (not m_ds_data) read_ds_data();
00418     boost::shared_ptr<CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data> tmp(m_ds_data, &m_ds_data->digitalPots);
00419     m_ds_storage_data_digitalPots = boost::make_shared<CsPad::CsPadDigitalPotsCfg_v0>(tmp);
00420   }
00421   return *m_ds_storage_data_digitalPots;
00422 }
00423 const Psana::CsPad::CsPadGainMapCfg& ConfigV1QuadReg_v0::gm() const {
00424   if (not m_ds_storage_data_gainMap) {
00425     if (not m_ds_data) read_ds_data();
00426     boost::shared_ptr<CsPad::ns_CsPadGainMapCfg_v0::dataset_data> tmp(m_ds_data, &m_ds_data->gainMap);
00427     m_ds_storage_data_gainMap = boost::make_shared<CsPad::CsPadGainMapCfg_v0>(tmp);
00428   }
00429   return *m_ds_storage_data_gainMap;
00430 }
00431 void ConfigV1QuadReg_v0::read_ds_data() const {
00432   m_ds_data = hdf5pp::Utils::readGroup<CsPad::ns_ConfigV1QuadReg_v0::dataset_data>(m_group, "data", m_idx);
00433 }
00434 
00435 void make_datasets_ConfigV1QuadReg_v0(const Psana::CsPad::ConfigV1QuadReg& obj, 
00436       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00437 {
00438   {
00439     hdf5pp::Type dstype = CsPad::ns_ConfigV1QuadReg_v0::dataset_data::stored_type();
00440     hdf5pp::Utils::createDataset(group, "data", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
00441   }
00442 }
00443 
00444 void store_ConfigV1QuadReg_v0(const Psana::CsPad::ConfigV1QuadReg* obj, hdf5pp::Group group, long index, bool append)
00445 {
00446   if (obj) {
00447     CsPad::ns_ConfigV1QuadReg_v0::dataset_data ds_data(*obj);
00448     if (append) {
00449       hdf5pp::Utils::storeAt(group, "data", ds_data, index);
00450     } else {
00451       hdf5pp::Utils::storeScalar(group, "data", ds_data);
00452     }
00453   } else if (append) {
00454     hdf5pp::Utils::resizeDataset(group, "data", index < 0 ? index : index + 1);
00455   }
00456 }
00457 
00458 
00459 hdf5pp::Type ns_ConfigV2QuadReg_v0_dataset_data_stored_type()
00460 {
00461   typedef ns_ConfigV2QuadReg_v0::dataset_data DsType;
00462   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00463   type.insert("readClkSet", offsetof(DsType, readClkSet), hdf5pp::TypeTraits<uint32_t>::stored_type());
00464   type.insert("readClkHold", offsetof(DsType, readClkHold), hdf5pp::TypeTraits<uint32_t>::stored_type());
00465   type.insert("dataMode", offsetof(DsType, dataMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
00466   type.insert("prstSel", offsetof(DsType, prstSel), hdf5pp::TypeTraits<uint32_t>::stored_type());
00467   type.insert("acqDelay", offsetof(DsType, acqDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
00468   type.insert("intTime", offsetof(DsType, intTime), hdf5pp::TypeTraits<uint32_t>::stored_type());
00469   type.insert("digDelay", offsetof(DsType, digDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
00470   type.insert("ampIdle", offsetof(DsType, ampIdle), hdf5pp::TypeTraits<uint32_t>::stored_type());
00471   type.insert("injTotal", offsetof(DsType, injTotal), hdf5pp::TypeTraits<uint32_t>::stored_type());
00472   type.insert("rowColShiftPer", offsetof(DsType, rowColShiftPer), hdf5pp::TypeTraits<uint32_t>::stored_type());
00473   type.insert("ampReset", offsetof(DsType, ampReset), hdf5pp::TypeTraits<uint32_t>::stored_type());
00474   type.insert("digCount", offsetof(DsType, digCount), hdf5pp::TypeTraits<uint32_t>::stored_type());
00475   type.insert("digPeriod", offsetof(DsType, digPeriod), hdf5pp::TypeTraits<uint32_t>::stored_type());
00476   type.insert("readOnly", offsetof(DsType, readOnly), hdf5pp::TypeTraits<CsPad::ns_CsPadReadOnlyCfg_v0::dataset_data>::stored_type());
00477   type.insert("digitalPots", offsetof(DsType, digitalPots), hdf5pp::TypeTraits<CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data>::stored_type());
00478   type.insert("gainMap", offsetof(DsType, gainMap), hdf5pp::TypeTraits<CsPad::ns_CsPadGainMapCfg_v0::dataset_data>::stored_type());
00479   hsize_t _array_type_shiftSelect_shape[] = { 4 };
00480   hdf5pp::ArrayType _array_type_shiftSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::stored_type(), 1, _array_type_shiftSelect_shape);
00481   type.insert("shiftSelect", offsetof(DsType, shiftSelect), _array_type_shiftSelect);
00482   hsize_t _array_type_edgeSelect_shape[] = { 4 };
00483   hdf5pp::ArrayType _array_type_edgeSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::stored_type(), 1, _array_type_edgeSelect_shape);
00484   type.insert("edgeSelect", offsetof(DsType, edgeSelect), _array_type_edgeSelect);
00485   return type;
00486 }
00487 
00488 hdf5pp::Type ns_ConfigV2QuadReg_v0::dataset_data::stored_type()
00489 {
00490   static hdf5pp::Type type = ns_ConfigV2QuadReg_v0_dataset_data_stored_type();
00491   return type;
00492 }
00493 
00494 hdf5pp::Type ns_ConfigV2QuadReg_v0_dataset_data_native_type()
00495 {
00496   typedef ns_ConfigV2QuadReg_v0::dataset_data DsType;
00497   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00498   type.insert("readClkSet", offsetof(DsType, readClkSet), hdf5pp::TypeTraits<uint32_t>::native_type());
00499   type.insert("readClkHold", offsetof(DsType, readClkHold), hdf5pp::TypeTraits<uint32_t>::native_type());
00500   type.insert("dataMode", offsetof(DsType, dataMode), hdf5pp::TypeTraits<uint32_t>::native_type());
00501   type.insert("prstSel", offsetof(DsType, prstSel), hdf5pp::TypeTraits<uint32_t>::native_type());
00502   type.insert("acqDelay", offsetof(DsType, acqDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
00503   type.insert("intTime", offsetof(DsType, intTime), hdf5pp::TypeTraits<uint32_t>::native_type());
00504   type.insert("digDelay", offsetof(DsType, digDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
00505   type.insert("ampIdle", offsetof(DsType, ampIdle), hdf5pp::TypeTraits<uint32_t>::native_type());
00506   type.insert("injTotal", offsetof(DsType, injTotal), hdf5pp::TypeTraits<uint32_t>::native_type());
00507   type.insert("rowColShiftPer", offsetof(DsType, rowColShiftPer), hdf5pp::TypeTraits<uint32_t>::native_type());
00508   type.insert("ampReset", offsetof(DsType, ampReset), hdf5pp::TypeTraits<uint32_t>::native_type());
00509   type.insert("digCount", offsetof(DsType, digCount), hdf5pp::TypeTraits<uint32_t>::native_type());
00510   type.insert("digPeriod", offsetof(DsType, digPeriod), hdf5pp::TypeTraits<uint32_t>::native_type());
00511   type.insert("readOnly", offsetof(DsType, readOnly), hdf5pp::TypeTraits<CsPad::ns_CsPadReadOnlyCfg_v0::dataset_data>::native_type());
00512   type.insert("digitalPots", offsetof(DsType, digitalPots), hdf5pp::TypeTraits<CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data>::native_type());
00513   type.insert("gainMap", offsetof(DsType, gainMap), hdf5pp::TypeTraits<CsPad::ns_CsPadGainMapCfg_v0::dataset_data>::native_type());
00514   hsize_t _array_type_shiftSelect_shape[] = { 4 };
00515   hdf5pp::ArrayType _array_type_shiftSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::native_type(), 1, _array_type_shiftSelect_shape);
00516   type.insert("shiftSelect", offsetof(DsType, shiftSelect), _array_type_shiftSelect);
00517   hsize_t _array_type_edgeSelect_shape[] = { 4 };
00518   hdf5pp::ArrayType _array_type_edgeSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::native_type(), 1, _array_type_edgeSelect_shape);
00519   type.insert("edgeSelect", offsetof(DsType, edgeSelect), _array_type_edgeSelect);
00520   return type;
00521 }
00522 
00523 hdf5pp::Type ns_ConfigV2QuadReg_v0::dataset_data::native_type()
00524 {
00525   static hdf5pp::Type type = ns_ConfigV2QuadReg_v0_dataset_data_native_type();
00526   return type;
00527 }
00528 
00529 ns_ConfigV2QuadReg_v0::dataset_data::dataset_data()
00530 {
00531 }
00532 
00533 ns_ConfigV2QuadReg_v0::dataset_data::dataset_data(const Psana::CsPad::ConfigV2QuadReg& psanaobj)
00534   : readClkSet(psanaobj.readClkSet())
00535   , readClkHold(psanaobj.readClkHold())
00536   , dataMode(psanaobj.dataMode())
00537   , prstSel(psanaobj.prstSel())
00538   , acqDelay(psanaobj.acqDelay())
00539   , intTime(psanaobj.intTime())
00540   , digDelay(psanaobj.digDelay())
00541   , ampIdle(psanaobj.ampIdle())
00542   , injTotal(psanaobj.injTotal())
00543   , rowColShiftPer(psanaobj.rowColShiftPer())
00544   , ampReset(psanaobj.ampReset())
00545   , digCount(psanaobj.digCount())
00546   , digPeriod(psanaobj.digPeriod())
00547   , readOnly(psanaobj.ro())
00548   , digitalPots(psanaobj.dp())
00549   , gainMap(psanaobj.gm())
00550 {
00551   {
00552     const __typeof__(psanaobj.shiftSelect())& arr = psanaobj.shiftSelect();
00553     std::copy(arr.begin(), arr.begin()+4, shiftSelect);
00554   }
00555   {
00556     const __typeof__(psanaobj.edgeSelect())& arr = psanaobj.edgeSelect();
00557     std::copy(arr.begin(), arr.begin()+4, edgeSelect);
00558   }
00559 }
00560 
00561 ns_ConfigV2QuadReg_v0::dataset_data::~dataset_data()
00562 {
00563 }
00564 ndarray<const uint32_t, 1> ConfigV2QuadReg_v0::shiftSelect() const {
00565   if (not m_ds_data) read_ds_data();
00566   boost::shared_ptr<uint32_t> ptr(m_ds_data, m_ds_data->shiftSelect);
00567   return make_ndarray(ptr, TwoByTwosPerQuad);
00568 }
00569 ndarray<const uint32_t, 1> ConfigV2QuadReg_v0::edgeSelect() const {
00570   if (not m_ds_data) read_ds_data();
00571   boost::shared_ptr<uint32_t> ptr(m_ds_data, m_ds_data->edgeSelect);
00572   return make_ndarray(ptr, TwoByTwosPerQuad);
00573 }
00574 uint32_t ConfigV2QuadReg_v0::readClkSet() const {
00575   if (not m_ds_data) read_ds_data();
00576   return uint32_t(m_ds_data->readClkSet);
00577 }
00578 uint32_t ConfigV2QuadReg_v0::readClkHold() const {
00579   if (not m_ds_data) read_ds_data();
00580   return uint32_t(m_ds_data->readClkHold);
00581 }
00582 uint32_t ConfigV2QuadReg_v0::dataMode() const {
00583   if (not m_ds_data) read_ds_data();
00584   return uint32_t(m_ds_data->dataMode);
00585 }
00586 uint32_t ConfigV2QuadReg_v0::prstSel() const {
00587   if (not m_ds_data) read_ds_data();
00588   return uint32_t(m_ds_data->prstSel);
00589 }
00590 uint32_t ConfigV2QuadReg_v0::acqDelay() const {
00591   if (not m_ds_data) read_ds_data();
00592   return uint32_t(m_ds_data->acqDelay);
00593 }
00594 uint32_t ConfigV2QuadReg_v0::intTime() const {
00595   if (not m_ds_data) read_ds_data();
00596   return uint32_t(m_ds_data->intTime);
00597 }
00598 uint32_t ConfigV2QuadReg_v0::digDelay() const {
00599   if (not m_ds_data) read_ds_data();
00600   return uint32_t(m_ds_data->digDelay);
00601 }
00602 uint32_t ConfigV2QuadReg_v0::ampIdle() const {
00603   if (not m_ds_data) read_ds_data();
00604   return uint32_t(m_ds_data->ampIdle);
00605 }
00606 uint32_t ConfigV2QuadReg_v0::injTotal() const {
00607   if (not m_ds_data) read_ds_data();
00608   return uint32_t(m_ds_data->injTotal);
00609 }
00610 uint32_t ConfigV2QuadReg_v0::rowColShiftPer() const {
00611   if (not m_ds_data) read_ds_data();
00612   return uint32_t(m_ds_data->rowColShiftPer);
00613 }
00614 uint32_t ConfigV2QuadReg_v0::ampReset() const {
00615   if (not m_ds_data) read_ds_data();
00616   return uint32_t(m_ds_data->ampReset);
00617 }
00618 uint32_t ConfigV2QuadReg_v0::digCount() const {
00619   if (not m_ds_data) read_ds_data();
00620   return uint32_t(m_ds_data->digCount);
00621 }
00622 uint32_t ConfigV2QuadReg_v0::digPeriod() const {
00623   if (not m_ds_data) read_ds_data();
00624   return uint32_t(m_ds_data->digPeriod);
00625 }
00626 const Psana::CsPad::CsPadReadOnlyCfg& ConfigV2QuadReg_v0::ro() const {
00627   if (not m_ds_data) read_ds_data();
00628   m_ds_storage_data_readOnly = Psana::CsPad::CsPadReadOnlyCfg(m_ds_data->readOnly);
00629   return m_ds_storage_data_readOnly;
00630 }
00631 const Psana::CsPad::CsPadDigitalPotsCfg& ConfigV2QuadReg_v0::dp() const {
00632   if (not m_ds_storage_data_digitalPots) {
00633     if (not m_ds_data) read_ds_data();
00634     boost::shared_ptr<CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data> tmp(m_ds_data, &m_ds_data->digitalPots);
00635     m_ds_storage_data_digitalPots = boost::make_shared<CsPad::CsPadDigitalPotsCfg_v0>(tmp);
00636   }
00637   return *m_ds_storage_data_digitalPots;
00638 }
00639 const Psana::CsPad::CsPadGainMapCfg& ConfigV2QuadReg_v0::gm() const {
00640   if (not m_ds_storage_data_gainMap) {
00641     if (not m_ds_data) read_ds_data();
00642     boost::shared_ptr<CsPad::ns_CsPadGainMapCfg_v0::dataset_data> tmp(m_ds_data, &m_ds_data->gainMap);
00643     m_ds_storage_data_gainMap = boost::make_shared<CsPad::CsPadGainMapCfg_v0>(tmp);
00644   }
00645   return *m_ds_storage_data_gainMap;
00646 }
00647 void ConfigV2QuadReg_v0::read_ds_data() const {
00648   m_ds_data = hdf5pp::Utils::readGroup<CsPad::ns_ConfigV2QuadReg_v0::dataset_data>(m_group, "data", m_idx);
00649 }
00650 
00651 void make_datasets_ConfigV2QuadReg_v0(const Psana::CsPad::ConfigV2QuadReg& obj, 
00652       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00653 {
00654   {
00655     hdf5pp::Type dstype = CsPad::ns_ConfigV2QuadReg_v0::dataset_data::stored_type();
00656     hdf5pp::Utils::createDataset(group, "data", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
00657   }
00658 }
00659 
00660 void store_ConfigV2QuadReg_v0(const Psana::CsPad::ConfigV2QuadReg* obj, hdf5pp::Group group, long index, bool append)
00661 {
00662   if (obj) {
00663     CsPad::ns_ConfigV2QuadReg_v0::dataset_data ds_data(*obj);
00664     if (append) {
00665       hdf5pp::Utils::storeAt(group, "data", ds_data, index);
00666     } else {
00667       hdf5pp::Utils::storeScalar(group, "data", ds_data);
00668     }
00669   } else if (append) {
00670     hdf5pp::Utils::resizeDataset(group, "data", index < 0 ? index : index + 1);
00671   }
00672 }
00673 
00674 
00675 hdf5pp::Type ns_ConfigV3QuadReg_v0_dataset_data_stored_type()
00676 {
00677   typedef ns_ConfigV3QuadReg_v0::dataset_data DsType;
00678   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00679   type.insert("readClkSet", offsetof(DsType, readClkSet), hdf5pp::TypeTraits<uint32_t>::stored_type());
00680   type.insert("readClkHold", offsetof(DsType, readClkHold), hdf5pp::TypeTraits<uint32_t>::stored_type());
00681   type.insert("dataMode", offsetof(DsType, dataMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
00682   type.insert("prstSel", offsetof(DsType, prstSel), hdf5pp::TypeTraits<uint32_t>::stored_type());
00683   type.insert("acqDelay", offsetof(DsType, acqDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
00684   type.insert("intTime", offsetof(DsType, intTime), hdf5pp::TypeTraits<uint32_t>::stored_type());
00685   type.insert("digDelay", offsetof(DsType, digDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
00686   type.insert("ampIdle", offsetof(DsType, ampIdle), hdf5pp::TypeTraits<uint32_t>::stored_type());
00687   type.insert("injTotal", offsetof(DsType, injTotal), hdf5pp::TypeTraits<uint32_t>::stored_type());
00688   type.insert("rowColShiftPer", offsetof(DsType, rowColShiftPer), hdf5pp::TypeTraits<uint32_t>::stored_type());
00689   type.insert("ampReset", offsetof(DsType, ampReset), hdf5pp::TypeTraits<uint32_t>::stored_type());
00690   type.insert("digCount", offsetof(DsType, digCount), hdf5pp::TypeTraits<uint32_t>::stored_type());
00691   type.insert("digPeriod", offsetof(DsType, digPeriod), hdf5pp::TypeTraits<uint32_t>::stored_type());
00692   type.insert("biasTuning", offsetof(DsType, biasTuning), hdf5pp::TypeTraits<uint32_t>::stored_type());
00693   type.insert("pdpmndnmBalance", offsetof(DsType, pdpmndnmBalance), hdf5pp::TypeTraits<uint32_t>::stored_type());
00694   type.insert("readOnly", offsetof(DsType, readOnly), hdf5pp::TypeTraits<CsPad::ns_CsPadReadOnlyCfg_v0::dataset_data>::stored_type());
00695   type.insert("digitalPots", offsetof(DsType, digitalPots), hdf5pp::TypeTraits<CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data>::stored_type());
00696   type.insert("gainMap", offsetof(DsType, gainMap), hdf5pp::TypeTraits<CsPad::ns_CsPadGainMapCfg_v0::dataset_data>::stored_type());
00697   hsize_t _array_type_shiftSelect_shape[] = { 4 };
00698   hdf5pp::ArrayType _array_type_shiftSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::stored_type(), 1, _array_type_shiftSelect_shape);
00699   type.insert("shiftSelect", offsetof(DsType, shiftSelect), _array_type_shiftSelect);
00700   hsize_t _array_type_edgeSelect_shape[] = { 4 };
00701   hdf5pp::ArrayType _array_type_edgeSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::stored_type(), 1, _array_type_edgeSelect_shape);
00702   type.insert("edgeSelect", offsetof(DsType, edgeSelect), _array_type_edgeSelect);
00703   return type;
00704 }
00705 
00706 hdf5pp::Type ns_ConfigV3QuadReg_v0::dataset_data::stored_type()
00707 {
00708   static hdf5pp::Type type = ns_ConfigV3QuadReg_v0_dataset_data_stored_type();
00709   return type;
00710 }
00711 
00712 hdf5pp::Type ns_ConfigV3QuadReg_v0_dataset_data_native_type()
00713 {
00714   typedef ns_ConfigV3QuadReg_v0::dataset_data DsType;
00715   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00716   type.insert("readClkSet", offsetof(DsType, readClkSet), hdf5pp::TypeTraits<uint32_t>::native_type());
00717   type.insert("readClkHold", offsetof(DsType, readClkHold), hdf5pp::TypeTraits<uint32_t>::native_type());
00718   type.insert("dataMode", offsetof(DsType, dataMode), hdf5pp::TypeTraits<uint32_t>::native_type());
00719   type.insert("prstSel", offsetof(DsType, prstSel), hdf5pp::TypeTraits<uint32_t>::native_type());
00720   type.insert("acqDelay", offsetof(DsType, acqDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
00721   type.insert("intTime", offsetof(DsType, intTime), hdf5pp::TypeTraits<uint32_t>::native_type());
00722   type.insert("digDelay", offsetof(DsType, digDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
00723   type.insert("ampIdle", offsetof(DsType, ampIdle), hdf5pp::TypeTraits<uint32_t>::native_type());
00724   type.insert("injTotal", offsetof(DsType, injTotal), hdf5pp::TypeTraits<uint32_t>::native_type());
00725   type.insert("rowColShiftPer", offsetof(DsType, rowColShiftPer), hdf5pp::TypeTraits<uint32_t>::native_type());
00726   type.insert("ampReset", offsetof(DsType, ampReset), hdf5pp::TypeTraits<uint32_t>::native_type());
00727   type.insert("digCount", offsetof(DsType, digCount), hdf5pp::TypeTraits<uint32_t>::native_type());
00728   type.insert("digPeriod", offsetof(DsType, digPeriod), hdf5pp::TypeTraits<uint32_t>::native_type());
00729   type.insert("biasTuning", offsetof(DsType, biasTuning), hdf5pp::TypeTraits<uint32_t>::native_type());
00730   type.insert("pdpmndnmBalance", offsetof(DsType, pdpmndnmBalance), hdf5pp::TypeTraits<uint32_t>::native_type());
00731   type.insert("readOnly", offsetof(DsType, readOnly), hdf5pp::TypeTraits<CsPad::ns_CsPadReadOnlyCfg_v0::dataset_data>::native_type());
00732   type.insert("digitalPots", offsetof(DsType, digitalPots), hdf5pp::TypeTraits<CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data>::native_type());
00733   type.insert("gainMap", offsetof(DsType, gainMap), hdf5pp::TypeTraits<CsPad::ns_CsPadGainMapCfg_v0::dataset_data>::native_type());
00734   hsize_t _array_type_shiftSelect_shape[] = { 4 };
00735   hdf5pp::ArrayType _array_type_shiftSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::native_type(), 1, _array_type_shiftSelect_shape);
00736   type.insert("shiftSelect", offsetof(DsType, shiftSelect), _array_type_shiftSelect);
00737   hsize_t _array_type_edgeSelect_shape[] = { 4 };
00738   hdf5pp::ArrayType _array_type_edgeSelect = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint32_t>::native_type(), 1, _array_type_edgeSelect_shape);
00739   type.insert("edgeSelect", offsetof(DsType, edgeSelect), _array_type_edgeSelect);
00740   return type;
00741 }
00742 
00743 hdf5pp::Type ns_ConfigV3QuadReg_v0::dataset_data::native_type()
00744 {
00745   static hdf5pp::Type type = ns_ConfigV3QuadReg_v0_dataset_data_native_type();
00746   return type;
00747 }
00748 
00749 ns_ConfigV3QuadReg_v0::dataset_data::dataset_data()
00750 {
00751 }
00752 
00753 ns_ConfigV3QuadReg_v0::dataset_data::dataset_data(const Psana::CsPad::ConfigV3QuadReg& psanaobj)
00754   : readClkSet(psanaobj.readClkSet())
00755   , readClkHold(psanaobj.readClkHold())
00756   , dataMode(psanaobj.dataMode())
00757   , prstSel(psanaobj.prstSel())
00758   , acqDelay(psanaobj.acqDelay())
00759   , intTime(psanaobj.intTime())
00760   , digDelay(psanaobj.digDelay())
00761   , ampIdle(psanaobj.ampIdle())
00762   , injTotal(psanaobj.injTotal())
00763   , rowColShiftPer(psanaobj.rowColShiftPer())
00764   , ampReset(psanaobj.ampReset())
00765   , digCount(psanaobj.digCount())
00766   , digPeriod(psanaobj.digPeriod())
00767   , biasTuning(psanaobj.biasTuning())
00768   , pdpmndnmBalance(psanaobj.pdpmndnmBalance())
00769   , readOnly(psanaobj.ro())
00770   , digitalPots(psanaobj.dp())
00771   , gainMap(psanaobj.gm())
00772 {
00773   {
00774     const __typeof__(psanaobj.shiftSelect())& arr = psanaobj.shiftSelect();
00775     std::copy(arr.begin(), arr.begin()+4, shiftSelect);
00776   }
00777   {
00778     const __typeof__(psanaobj.edgeSelect())& arr = psanaobj.edgeSelect();
00779     std::copy(arr.begin(), arr.begin()+4, edgeSelect);
00780   }
00781 }
00782 
00783 ns_ConfigV3QuadReg_v0::dataset_data::~dataset_data()
00784 {
00785 }
00786 ndarray<const uint32_t, 1> ConfigV3QuadReg_v0::shiftSelect() const {
00787   if (not m_ds_data) read_ds_data();
00788   boost::shared_ptr<uint32_t> ptr(m_ds_data, m_ds_data->shiftSelect);
00789   return make_ndarray(ptr, TwoByTwosPerQuad);
00790 }
00791 ndarray<const uint32_t, 1> ConfigV3QuadReg_v0::edgeSelect() const {
00792   if (not m_ds_data) read_ds_data();
00793   boost::shared_ptr<uint32_t> ptr(m_ds_data, m_ds_data->edgeSelect);
00794   return make_ndarray(ptr, TwoByTwosPerQuad);
00795 }
00796 uint32_t ConfigV3QuadReg_v0::readClkSet() const {
00797   if (not m_ds_data) read_ds_data();
00798   return uint32_t(m_ds_data->readClkSet);
00799 }
00800 uint32_t ConfigV3QuadReg_v0::readClkHold() const {
00801   if (not m_ds_data) read_ds_data();
00802   return uint32_t(m_ds_data->readClkHold);
00803 }
00804 uint32_t ConfigV3QuadReg_v0::dataMode() const {
00805   if (not m_ds_data) read_ds_data();
00806   return uint32_t(m_ds_data->dataMode);
00807 }
00808 uint32_t ConfigV3QuadReg_v0::prstSel() const {
00809   if (not m_ds_data) read_ds_data();
00810   return uint32_t(m_ds_data->prstSel);
00811 }
00812 uint32_t ConfigV3QuadReg_v0::acqDelay() const {
00813   if (not m_ds_data) read_ds_data();
00814   return uint32_t(m_ds_data->acqDelay);
00815 }
00816 uint32_t ConfigV3QuadReg_v0::intTime() const {
00817   if (not m_ds_data) read_ds_data();
00818   return uint32_t(m_ds_data->intTime);
00819 }
00820 uint32_t ConfigV3QuadReg_v0::digDelay() const {
00821   if (not m_ds_data) read_ds_data();
00822   return uint32_t(m_ds_data->digDelay);
00823 }
00824 uint32_t ConfigV3QuadReg_v0::ampIdle() const {
00825   if (not m_ds_data) read_ds_data();
00826   return uint32_t(m_ds_data->ampIdle);
00827 }
00828 uint32_t ConfigV3QuadReg_v0::injTotal() const {
00829   if (not m_ds_data) read_ds_data();
00830   return uint32_t(m_ds_data->injTotal);
00831 }
00832 uint32_t ConfigV3QuadReg_v0::rowColShiftPer() const {
00833   if (not m_ds_data) read_ds_data();
00834   return uint32_t(m_ds_data->rowColShiftPer);
00835 }
00836 uint32_t ConfigV3QuadReg_v0::ampReset() const {
00837   if (not m_ds_data) read_ds_data();
00838   return uint32_t(m_ds_data->ampReset);
00839 }
00840 uint32_t ConfigV3QuadReg_v0::digCount() const {
00841   if (not m_ds_data) read_ds_data();
00842   return uint32_t(m_ds_data->digCount);
00843 }
00844 uint32_t ConfigV3QuadReg_v0::digPeriod() const {
00845   if (not m_ds_data) read_ds_data();
00846   return uint32_t(m_ds_data->digPeriod);
00847 }
00848 uint32_t ConfigV3QuadReg_v0::biasTuning() const {
00849   if (not m_ds_data) read_ds_data();
00850   return uint32_t(m_ds_data->biasTuning);
00851 }
00852 uint32_t ConfigV3QuadReg_v0::pdpmndnmBalance() const {
00853   if (not m_ds_data) read_ds_data();
00854   return uint32_t(m_ds_data->pdpmndnmBalance);
00855 }
00856 const Psana::CsPad::CsPadReadOnlyCfg& ConfigV3QuadReg_v0::ro() const {
00857   if (not m_ds_data) read_ds_data();
00858   m_ds_storage_data_readOnly = Psana::CsPad::CsPadReadOnlyCfg(m_ds_data->readOnly);
00859   return m_ds_storage_data_readOnly;
00860 }
00861 const Psana::CsPad::CsPadDigitalPotsCfg& ConfigV3QuadReg_v0::dp() const {
00862   if (not m_ds_storage_data_digitalPots) {
00863     if (not m_ds_data) read_ds_data();
00864     boost::shared_ptr<CsPad::ns_CsPadDigitalPotsCfg_v0::dataset_data> tmp(m_ds_data, &m_ds_data->digitalPots);
00865     m_ds_storage_data_digitalPots = boost::make_shared<CsPad::CsPadDigitalPotsCfg_v0>(tmp);
00866   }
00867   return *m_ds_storage_data_digitalPots;
00868 }
00869 const Psana::CsPad::CsPadGainMapCfg& ConfigV3QuadReg_v0::gm() const {
00870   if (not m_ds_storage_data_gainMap) {
00871     if (not m_ds_data) read_ds_data();
00872     boost::shared_ptr<CsPad::ns_CsPadGainMapCfg_v0::dataset_data> tmp(m_ds_data, &m_ds_data->gainMap);
00873     m_ds_storage_data_gainMap = boost::make_shared<CsPad::CsPadGainMapCfg_v0>(tmp);
00874   }
00875   return *m_ds_storage_data_gainMap;
00876 }
00877 void ConfigV3QuadReg_v0::read_ds_data() const {
00878   m_ds_data = hdf5pp::Utils::readGroup<CsPad::ns_ConfigV3QuadReg_v0::dataset_data>(m_group, "data", m_idx);
00879 }
00880 
00881 void make_datasets_ConfigV3QuadReg_v0(const Psana::CsPad::ConfigV3QuadReg& obj, 
00882       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
00883 {
00884   {
00885     hdf5pp::Type dstype = CsPad::ns_ConfigV3QuadReg_v0::dataset_data::stored_type();
00886     hdf5pp::Utils::createDataset(group, "data", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
00887   }
00888 }
00889 
00890 void store_ConfigV3QuadReg_v0(const Psana::CsPad::ConfigV3QuadReg* obj, hdf5pp::Group group, long index, bool append)
00891 {
00892   if (obj) {
00893     CsPad::ns_ConfigV3QuadReg_v0::dataset_data ds_data(*obj);
00894     if (append) {
00895       hdf5pp::Utils::storeAt(group, "data", ds_data, index);
00896     } else {
00897       hdf5pp::Utils::storeScalar(group, "data", ds_data);
00898     }
00899   } else if (append) {
00900     hdf5pp::Utils::resizeDataset(group, "data", index < 0 ? index : index + 1);
00901   }
00902 }
00903 
00904 
00905 hdf5pp::Type ns_ConfigV1_v0_dataset_config_stored_type()
00906 {
00907   typedef ns_ConfigV1_v0::dataset_config DsType;
00908   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00909   type.insert("concentratorVersion", offsetof(DsType, concentratorVersion), hdf5pp::TypeTraits<uint32_t>::stored_type());
00910   type.insert("runDelay", offsetof(DsType, runDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
00911   type.insert("eventCode", offsetof(DsType, eventCode), hdf5pp::TypeTraits<uint32_t>::stored_type());
00912   type.insert("inactiveRunMode", offsetof(DsType, inactiveRunMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
00913   type.insert("activeRunMode", offsetof(DsType, activeRunMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
00914   type.insert("testDataIndex", offsetof(DsType, testDataIndex), hdf5pp::TypeTraits<uint32_t>::stored_type());
00915   type.insert("payloadPerQuad", offsetof(DsType, payloadPerQuad), hdf5pp::TypeTraits<uint32_t>::stored_type());
00916   type.insert("badAsicMask0", offsetof(DsType, badAsicMask0), hdf5pp::TypeTraits<uint32_t>::stored_type());
00917   type.insert("badAsicMask1", offsetof(DsType, badAsicMask1), hdf5pp::TypeTraits<uint32_t>::stored_type());
00918   type.insert("asicMask", offsetof(DsType, asicMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
00919   type.insert("quadMask", offsetof(DsType, quadMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
00920   hsize_t _array_type_quads_shape[] = { 4 };
00921   hdf5pp::ArrayType _array_type_quads = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ConfigV1QuadReg_v0::dataset_data>::stored_type(), 1, _array_type_quads_shape);
00922   type.insert("quads", offsetof(DsType, quads), _array_type_quads);
00923   return type;
00924 }
00925 
00926 hdf5pp::Type ns_ConfigV1_v0::dataset_config::stored_type()
00927 {
00928   static hdf5pp::Type type = ns_ConfigV1_v0_dataset_config_stored_type();
00929   return type;
00930 }
00931 
00932 hdf5pp::Type ns_ConfigV1_v0_dataset_config_native_type()
00933 {
00934   typedef ns_ConfigV1_v0::dataset_config DsType;
00935   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
00936   type.insert("concentratorVersion", offsetof(DsType, concentratorVersion), hdf5pp::TypeTraits<uint32_t>::native_type());
00937   type.insert("runDelay", offsetof(DsType, runDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
00938   type.insert("eventCode", offsetof(DsType, eventCode), hdf5pp::TypeTraits<uint32_t>::native_type());
00939   type.insert("inactiveRunMode", offsetof(DsType, inactiveRunMode), hdf5pp::TypeTraits<uint32_t>::native_type());
00940   type.insert("activeRunMode", offsetof(DsType, activeRunMode), hdf5pp::TypeTraits<uint32_t>::native_type());
00941   type.insert("testDataIndex", offsetof(DsType, testDataIndex), hdf5pp::TypeTraits<uint32_t>::native_type());
00942   type.insert("payloadPerQuad", offsetof(DsType, payloadPerQuad), hdf5pp::TypeTraits<uint32_t>::native_type());
00943   type.insert("badAsicMask0", offsetof(DsType, badAsicMask0), hdf5pp::TypeTraits<uint32_t>::native_type());
00944   type.insert("badAsicMask1", offsetof(DsType, badAsicMask1), hdf5pp::TypeTraits<uint32_t>::native_type());
00945   type.insert("asicMask", offsetof(DsType, asicMask), hdf5pp::TypeTraits<uint32_t>::native_type());
00946   type.insert("quadMask", offsetof(DsType, quadMask), hdf5pp::TypeTraits<uint32_t>::native_type());
00947   hsize_t _array_type_quads_shape[] = { 4 };
00948   hdf5pp::ArrayType _array_type_quads = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ConfigV1QuadReg_v0::dataset_data>::native_type(), 1, _array_type_quads_shape);
00949   type.insert("quads", offsetof(DsType, quads), _array_type_quads);
00950   return type;
00951 }
00952 
00953 hdf5pp::Type ns_ConfigV1_v0::dataset_config::native_type()
00954 {
00955   static hdf5pp::Type type = ns_ConfigV1_v0_dataset_config_native_type();
00956   return type;
00957 }
00958 
00959 ns_ConfigV1_v0::dataset_config::dataset_config()
00960 {
00961 }
00962 
00963 ns_ConfigV1_v0::dataset_config::dataset_config(const Psana::CsPad::ConfigV1& psanaobj)
00964   : concentratorVersion(psanaobj.concentratorVersion())
00965   , runDelay(psanaobj.runDelay())
00966   , eventCode(psanaobj.eventCode())
00967   , inactiveRunMode(psanaobj.inactiveRunMode())
00968   , activeRunMode(psanaobj.activeRunMode())
00969   , testDataIndex(psanaobj.tdi())
00970   , payloadPerQuad(psanaobj.payloadSize())
00971   , badAsicMask0(psanaobj.badAsicMask0())
00972   , badAsicMask1(psanaobj.badAsicMask1())
00973   , asicMask(psanaobj.asicMask())
00974   , quadMask(psanaobj.quadMask())
00975 {
00976   for (size_t i = 0, len = 4; i != len; ++ i) {
00977     quads[i] = CsPad::ns_ConfigV1QuadReg_v0::dataset_data(psanaobj.quads(i));
00978   }
00979 }
00980 
00981 ns_ConfigV1_v0::dataset_config::~dataset_config()
00982 {
00983 }
00984 uint32_t ConfigV1_v0::concentratorVersion() const {
00985   if (not m_ds_config) read_ds_config();
00986   return uint32_t(m_ds_config->concentratorVersion);
00987 }
00988 uint32_t ConfigV1_v0::runDelay() const {
00989   if (not m_ds_config) read_ds_config();
00990   return uint32_t(m_ds_config->runDelay);
00991 }
00992 uint32_t ConfigV1_v0::eventCode() const {
00993   if (not m_ds_config) read_ds_config();
00994   return uint32_t(m_ds_config->eventCode);
00995 }
00996 uint32_t ConfigV1_v0::inactiveRunMode() const {
00997   if (not m_ds_config) read_ds_config();
00998   return uint32_t(m_ds_config->inactiveRunMode);
00999 }
01000 uint32_t ConfigV1_v0::activeRunMode() const {
01001   if (not m_ds_config) read_ds_config();
01002   return uint32_t(m_ds_config->activeRunMode);
01003 }
01004 uint32_t ConfigV1_v0::tdi() const {
01005   if (not m_ds_config) read_ds_config();
01006   return uint32_t(m_ds_config->testDataIndex);
01007 }
01008 uint32_t ConfigV1_v0::payloadSize() const {
01009   if (not m_ds_config) read_ds_config();
01010   return uint32_t(m_ds_config->payloadPerQuad);
01011 }
01012 uint32_t ConfigV1_v0::badAsicMask0() const {
01013   if (not m_ds_config) read_ds_config();
01014   return uint32_t(m_ds_config->badAsicMask0);
01015 }
01016 uint32_t ConfigV1_v0::badAsicMask1() const {
01017   if (not m_ds_config) read_ds_config();
01018   return uint32_t(m_ds_config->badAsicMask1);
01019 }
01020 uint32_t ConfigV1_v0::asicMask() const {
01021   if (not m_ds_config) read_ds_config();
01022   return uint32_t(m_ds_config->asicMask);
01023 }
01024 uint32_t ConfigV1_v0::quadMask() const {
01025   if (not m_ds_config) read_ds_config();
01026   return uint32_t(m_ds_config->quadMask);
01027 }
01028 const Psana::CsPad::ConfigV1QuadReg& ConfigV1_v0::quads(uint32_t i0) const {
01029   if (not m_ds_config) read_ds_config();
01030   if (m_ds_storage_config_quads.empty()) {
01031     unsigned shape[] = {MaxQuadsPerSensor};
01032     ndarray<ConfigV1QuadReg_v0, 1> tmparr(shape);
01033     for (int i = 0; i != 4; ++ i) {
01034       boost::shared_ptr<CsPad::ns_ConfigV1QuadReg_v0::dataset_data> ptr(m_ds_config, &m_ds_config->quads[i]);
01035       tmparr.begin()[i] = ConfigV1QuadReg_v0(ptr);
01036     }
01037     m_ds_storage_config_quads = tmparr;
01038   }
01039   return m_ds_storage_config_quads[i0];
01040 }
01041 uint32_t
01042 ConfigV1_v0::numAsicsRead() const{ 
01043 return (this->asicMask() & 0xf)==1 ? 4 : 16; 
01044 }
01045 uint32_t
01046 ConfigV1_v0::numQuads() const{ 
01047 return __builtin_popcount(this->quadMask()); 
01048 }
01049 uint32_t
01050 ConfigV1_v0::numSect() const{ 
01051 return this->numAsicsRead()/2; 
01052 }
01053 std::vector<int>
01054 ConfigV1_v0::quads_shape() const{ 
01055   int shape[] = { MaxQuadsPerSensor };
01056   return std::vector<int>(shape, shape+1); 
01057 }
01058 void ConfigV1_v0::read_ds_config() const {
01059   m_ds_config = hdf5pp::Utils::readGroup<CsPad::ns_ConfigV1_v0::dataset_config>(m_group, "config", m_idx);
01060 }
01061 
01062 void make_datasets_ConfigV1_v0(const Psana::CsPad::ConfigV1& obj, 
01063       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
01064 {
01065   {
01066     hdf5pp::Type dstype = CsPad::ns_ConfigV1_v0::dataset_config::stored_type();
01067     hdf5pp::Utils::createDataset(group, "config", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
01068   }
01069 }
01070 
01071 void store_ConfigV1_v0(const Psana::CsPad::ConfigV1* obj, hdf5pp::Group group, long index, bool append)
01072 {
01073   if (obj) {
01074     CsPad::ns_ConfigV1_v0::dataset_config ds_data(*obj);
01075     if (append) {
01076       hdf5pp::Utils::storeAt(group, "config", ds_data, index);
01077     } else {
01078       hdf5pp::Utils::storeScalar(group, "config", ds_data);
01079     }
01080   } else if (append) {
01081     hdf5pp::Utils::resizeDataset(group, "config", index < 0 ? index : index + 1);
01082   }
01083 }
01084 
01085 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::ConfigV1> > make_ConfigV1(int version, hdf5pp::Group group, hsize_t idx) {
01086   switch (version) {
01087   case 0:
01088     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::ConfigV1> >(boost::make_shared<ConfigV1_v0>(group, idx));
01089   default:
01090     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::ConfigV1> >(boost::shared_ptr<Psana::CsPad::ConfigV1>());
01091   }
01092 }
01093 
01094 void make_datasets(const Psana::CsPad::ConfigV1& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
01095                    int deflate, bool shuffle, int version)
01096 {
01097   if (version < 0) version = 0;
01098   group.createAttr<uint32_t>("_schemaVersion").store(version);
01099   switch (version) {
01100   case 0:
01101     make_datasets_ConfigV1_v0(obj, group, chunkPolicy, deflate, shuffle);
01102     break;
01103   default:
01104     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.ConfigV1", version);
01105   }
01106 }
01107 
01108 void store_ConfigV1(const Psana::CsPad::ConfigV1* obj, hdf5pp::Group group, long index, int version, bool append)
01109 {
01110   if (version < 0) version = 0;
01111   if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
01112   switch (version) {
01113   case 0:
01114     store_ConfigV1_v0(obj, group, index, append);
01115     break;
01116   default:
01117     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.ConfigV1", version);
01118   }
01119 }
01120 
01121 void store(const Psana::CsPad::ConfigV1& obj, hdf5pp::Group group, int version) 
01122 {
01123   store_ConfigV1(&obj, group, 0, version, false);
01124 }
01125 
01126 void store_at(const Psana::CsPad::ConfigV1* obj, hdf5pp::Group group, long index, int version)
01127 {
01128   store_ConfigV1(obj, group, index, version, true);
01129 }
01130 
01131 
01132 hdf5pp::Type ns_ConfigV2_v0_dataset_config_stored_type()
01133 {
01134   typedef ns_ConfigV2_v0::dataset_config DsType;
01135   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
01136   type.insert("concentratorVersion", offsetof(DsType, concentratorVersion), hdf5pp::TypeTraits<uint32_t>::stored_type());
01137   type.insert("runDelay", offsetof(DsType, runDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
01138   type.insert("eventCode", offsetof(DsType, eventCode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01139   type.insert("inactiveRunMode", offsetof(DsType, inactiveRunMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01140   type.insert("activeRunMode", offsetof(DsType, activeRunMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01141   type.insert("testDataIndex", offsetof(DsType, testDataIndex), hdf5pp::TypeTraits<uint32_t>::stored_type());
01142   type.insert("payloadPerQuad", offsetof(DsType, payloadPerQuad), hdf5pp::TypeTraits<uint32_t>::stored_type());
01143   type.insert("badAsicMask0", offsetof(DsType, badAsicMask0), hdf5pp::TypeTraits<uint32_t>::stored_type());
01144   type.insert("badAsicMask1", offsetof(DsType, badAsicMask1), hdf5pp::TypeTraits<uint32_t>::stored_type());
01145   type.insert("asicMask", offsetof(DsType, asicMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01146   type.insert("quadMask", offsetof(DsType, quadMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01147   type.insert("roiMask", offsetof(DsType, roiMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01148   hsize_t _array_type_quads_shape[] = { 4 };
01149   hdf5pp::ArrayType _array_type_quads = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ConfigV1QuadReg_v0::dataset_data>::stored_type(), 1, _array_type_quads_shape);
01150   type.insert("quads", offsetof(DsType, quads), _array_type_quads);
01151   hsize_t _array_type_sections_shape[] = { 4, 8 };
01152   hdf5pp::ArrayType _array_type_sections = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<int8_t>::stored_type(), 2, _array_type_sections_shape);
01153   type.insert("sections", offsetof(DsType, sections), _array_type_sections);
01154   return type;
01155 }
01156 
01157 hdf5pp::Type ns_ConfigV2_v0::dataset_config::stored_type()
01158 {
01159   static hdf5pp::Type type = ns_ConfigV2_v0_dataset_config_stored_type();
01160   return type;
01161 }
01162 
01163 hdf5pp::Type ns_ConfigV2_v0_dataset_config_native_type()
01164 {
01165   typedef ns_ConfigV2_v0::dataset_config DsType;
01166   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
01167   type.insert("concentratorVersion", offsetof(DsType, concentratorVersion), hdf5pp::TypeTraits<uint32_t>::native_type());
01168   type.insert("runDelay", offsetof(DsType, runDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
01169   type.insert("eventCode", offsetof(DsType, eventCode), hdf5pp::TypeTraits<uint32_t>::native_type());
01170   type.insert("inactiveRunMode", offsetof(DsType, inactiveRunMode), hdf5pp::TypeTraits<uint32_t>::native_type());
01171   type.insert("activeRunMode", offsetof(DsType, activeRunMode), hdf5pp::TypeTraits<uint32_t>::native_type());
01172   type.insert("testDataIndex", offsetof(DsType, testDataIndex), hdf5pp::TypeTraits<uint32_t>::native_type());
01173   type.insert("payloadPerQuad", offsetof(DsType, payloadPerQuad), hdf5pp::TypeTraits<uint32_t>::native_type());
01174   type.insert("badAsicMask0", offsetof(DsType, badAsicMask0), hdf5pp::TypeTraits<uint32_t>::native_type());
01175   type.insert("badAsicMask1", offsetof(DsType, badAsicMask1), hdf5pp::TypeTraits<uint32_t>::native_type());
01176   type.insert("asicMask", offsetof(DsType, asicMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01177   type.insert("quadMask", offsetof(DsType, quadMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01178   type.insert("roiMask", offsetof(DsType, roiMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01179   hsize_t _array_type_quads_shape[] = { 4 };
01180   hdf5pp::ArrayType _array_type_quads = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ConfigV1QuadReg_v0::dataset_data>::native_type(), 1, _array_type_quads_shape);
01181   type.insert("quads", offsetof(DsType, quads), _array_type_quads);
01182   hsize_t _array_type_sections_shape[] = { 4, 8 };
01183   hdf5pp::ArrayType _array_type_sections = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<int8_t>::native_type(), 2, _array_type_sections_shape);
01184   type.insert("sections", offsetof(DsType, sections), _array_type_sections);
01185   return type;
01186 }
01187 
01188 hdf5pp::Type ns_ConfigV2_v0::dataset_config::native_type()
01189 {
01190   static hdf5pp::Type type = ns_ConfigV2_v0_dataset_config_native_type();
01191   return type;
01192 }
01193 
01194 ns_ConfigV2_v0::dataset_config::dataset_config()
01195 {
01196 }
01197 
01198 ns_ConfigV2_v0::dataset_config::dataset_config(const Psana::CsPad::ConfigV2& psanaobj)
01199   : concentratorVersion(psanaobj.concentratorVersion())
01200   , runDelay(psanaobj.runDelay())
01201   , eventCode(psanaobj.eventCode())
01202   , inactiveRunMode(psanaobj.inactiveRunMode())
01203   , activeRunMode(psanaobj.activeRunMode())
01204   , testDataIndex(psanaobj.tdi())
01205   , payloadPerQuad(psanaobj.payloadSize())
01206   , badAsicMask0(psanaobj.badAsicMask0())
01207   , badAsicMask1(psanaobj.badAsicMask1())
01208   , asicMask(psanaobj.asicMask())
01209   , quadMask(psanaobj.quadMask())
01210   , roiMask(psanaobj.roiMasks())
01211 {
01212   for (size_t i = 0, len = 4; i != len; ++ i) {
01213     quads[i] = CsPad::ns_ConfigV1QuadReg_v0::dataset_data(psanaobj.quads(i));
01214   }
01215   init_attr_sections();
01216 }
01217 
01218 ns_ConfigV2_v0::dataset_config::~dataset_config()
01219 {
01220 }
01221 uint32_t ConfigV2_v0::concentratorVersion() const {
01222   if (not m_ds_config) read_ds_config();
01223   return uint32_t(m_ds_config->concentratorVersion);
01224 }
01225 uint32_t ConfigV2_v0::runDelay() const {
01226   if (not m_ds_config) read_ds_config();
01227   return uint32_t(m_ds_config->runDelay);
01228 }
01229 uint32_t ConfigV2_v0::eventCode() const {
01230   if (not m_ds_config) read_ds_config();
01231   return uint32_t(m_ds_config->eventCode);
01232 }
01233 uint32_t ConfigV2_v0::inactiveRunMode() const {
01234   if (not m_ds_config) read_ds_config();
01235   return uint32_t(m_ds_config->inactiveRunMode);
01236 }
01237 uint32_t ConfigV2_v0::activeRunMode() const {
01238   if (not m_ds_config) read_ds_config();
01239   return uint32_t(m_ds_config->activeRunMode);
01240 }
01241 uint32_t ConfigV2_v0::tdi() const {
01242   if (not m_ds_config) read_ds_config();
01243   return uint32_t(m_ds_config->testDataIndex);
01244 }
01245 uint32_t ConfigV2_v0::payloadSize() const {
01246   if (not m_ds_config) read_ds_config();
01247   return uint32_t(m_ds_config->payloadPerQuad);
01248 }
01249 uint32_t ConfigV2_v0::badAsicMask0() const {
01250   if (not m_ds_config) read_ds_config();
01251   return uint32_t(m_ds_config->badAsicMask0);
01252 }
01253 uint32_t ConfigV2_v0::badAsicMask1() const {
01254   if (not m_ds_config) read_ds_config();
01255   return uint32_t(m_ds_config->badAsicMask1);
01256 }
01257 uint32_t ConfigV2_v0::asicMask() const {
01258   if (not m_ds_config) read_ds_config();
01259   return uint32_t(m_ds_config->asicMask);
01260 }
01261 uint32_t ConfigV2_v0::quadMask() const {
01262   if (not m_ds_config) read_ds_config();
01263   return uint32_t(m_ds_config->quadMask);
01264 }
01265 uint32_t ConfigV2_v0::roiMasks() const {
01266   if (not m_ds_config) read_ds_config();
01267   return uint32_t(m_ds_config->roiMask);
01268 }
01269 const Psana::CsPad::ConfigV1QuadReg& ConfigV2_v0::quads(uint32_t i0) const {
01270   if (not m_ds_config) read_ds_config();
01271   if (m_ds_storage_config_quads.empty()) {
01272     unsigned shape[] = {MaxQuadsPerSensor};
01273     ndarray<ConfigV1QuadReg_v0, 1> tmparr(shape);
01274     for (int i = 0; i != 4; ++ i) {
01275       boost::shared_ptr<CsPad::ns_ConfigV1QuadReg_v0::dataset_data> ptr(m_ds_config, &m_ds_config->quads[i]);
01276       tmparr.begin()[i] = ConfigV1QuadReg_v0(ptr);
01277     }
01278     m_ds_storage_config_quads = tmparr;
01279   }
01280   return m_ds_storage_config_quads[i0];
01281 }
01282 uint32_t
01283 ConfigV2_v0::numAsicsRead() const{ 
01284 return (this->asicMask() & 0xf)==1 ? 4 : 16; 
01285 }
01286 uint32_t
01287 ConfigV2_v0::roiMask(uint32_t iq) const{ 
01288 return (this->roiMasks() >> (8*iq)) & 0xff; 
01289 }
01290 uint32_t
01291 ConfigV2_v0::numAsicsStored(uint32_t iq) const{ 
01292 return __builtin_popcount(this->roiMask(iq))*2; 
01293 }
01294 uint32_t
01295 ConfigV2_v0::numQuads() const{ 
01296 return __builtin_popcount(this->quadMask()); 
01297 }
01298 uint32_t
01299 ConfigV2_v0::numSect() const{ 
01300 return __builtin_popcount(this->roiMasks()); 
01301 }
01302 std::vector<int>
01303 ConfigV2_v0::quads_shape() const{ 
01304   int shape[] = { MaxQuadsPerSensor };
01305   return std::vector<int>(shape, shape+1); 
01306 }
01307 void ConfigV2_v0::read_ds_config() const {
01308   m_ds_config = hdf5pp::Utils::readGroup<CsPad::ns_ConfigV2_v0::dataset_config>(m_group, "config", m_idx);
01309 }
01310 
01311 void make_datasets_ConfigV2_v0(const Psana::CsPad::ConfigV2& obj, 
01312       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
01313 {
01314   {
01315     hdf5pp::Type dstype = CsPad::ns_ConfigV2_v0::dataset_config::stored_type();
01316     hdf5pp::Utils::createDataset(group, "config", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
01317   }
01318 }
01319 
01320 void store_ConfigV2_v0(const Psana::CsPad::ConfigV2* obj, hdf5pp::Group group, long index, bool append)
01321 {
01322   if (obj) {
01323     CsPad::ns_ConfigV2_v0::dataset_config ds_data(*obj);
01324     if (append) {
01325       hdf5pp::Utils::storeAt(group, "config", ds_data, index);
01326     } else {
01327       hdf5pp::Utils::storeScalar(group, "config", ds_data);
01328     }
01329   } else if (append) {
01330     hdf5pp::Utils::resizeDataset(group, "config", index < 0 ? index : index + 1);
01331   }
01332 }
01333 
01334 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::ConfigV2> > make_ConfigV2(int version, hdf5pp::Group group, hsize_t idx) {
01335   switch (version) {
01336   case 0:
01337     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::ConfigV2> >(boost::make_shared<ConfigV2_v0>(group, idx));
01338   default:
01339     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::ConfigV2> >(boost::shared_ptr<Psana::CsPad::ConfigV2>());
01340   }
01341 }
01342 
01343 void make_datasets(const Psana::CsPad::ConfigV2& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
01344                    int deflate, bool shuffle, int version)
01345 {
01346   if (version < 0) version = 0;
01347   group.createAttr<uint32_t>("_schemaVersion").store(version);
01348   switch (version) {
01349   case 0:
01350     make_datasets_ConfigV2_v0(obj, group, chunkPolicy, deflate, shuffle);
01351     break;
01352   default:
01353     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.ConfigV2", version);
01354   }
01355 }
01356 
01357 void store_ConfigV2(const Psana::CsPad::ConfigV2* obj, hdf5pp::Group group, long index, int version, bool append)
01358 {
01359   if (version < 0) version = 0;
01360   if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
01361   switch (version) {
01362   case 0:
01363     store_ConfigV2_v0(obj, group, index, append);
01364     break;
01365   default:
01366     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.ConfigV2", version);
01367   }
01368 }
01369 
01370 void store(const Psana::CsPad::ConfigV2& obj, hdf5pp::Group group, int version) 
01371 {
01372   store_ConfigV2(&obj, group, 0, version, false);
01373 }
01374 
01375 void store_at(const Psana::CsPad::ConfigV2* obj, hdf5pp::Group group, long index, int version)
01376 {
01377   store_ConfigV2(obj, group, index, version, true);
01378 }
01379 
01380 
01381 hdf5pp::Type ns_ConfigV3_v0_dataset_config_stored_type()
01382 {
01383   typedef ns_ConfigV3_v0::dataset_config DsType;
01384   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
01385   type.insert("concentratorVersion", offsetof(DsType, concentratorVersion), hdf5pp::TypeTraits<uint32_t>::stored_type());
01386   type.insert("runDelay", offsetof(DsType, runDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
01387   type.insert("eventCode", offsetof(DsType, eventCode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01388   type.insert("protectionEnable", offsetof(DsType, protectionEnable), hdf5pp::TypeTraits<uint32_t>::stored_type());
01389   type.insert("inactiveRunMode", offsetof(DsType, inactiveRunMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01390   type.insert("activeRunMode", offsetof(DsType, activeRunMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01391   type.insert("testDataIndex", offsetof(DsType, testDataIndex), hdf5pp::TypeTraits<uint32_t>::stored_type());
01392   type.insert("payloadPerQuad", offsetof(DsType, payloadPerQuad), hdf5pp::TypeTraits<uint32_t>::stored_type());
01393   type.insert("badAsicMask0", offsetof(DsType, badAsicMask0), hdf5pp::TypeTraits<uint32_t>::stored_type());
01394   type.insert("badAsicMask1", offsetof(DsType, badAsicMask1), hdf5pp::TypeTraits<uint32_t>::stored_type());
01395   type.insert("asicMask", offsetof(DsType, asicMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01396   type.insert("quadMask", offsetof(DsType, quadMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01397   type.insert("roiMask", offsetof(DsType, roiMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01398   hsize_t _array_type_protectionThresholds_shape[] = { 4 };
01399   hdf5pp::ArrayType _array_type_protectionThresholds = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ProtectionSystemThreshold_v0::dataset_data>::stored_type(), 1, _array_type_protectionThresholds_shape);
01400   type.insert("protectionThresholds", offsetof(DsType, protectionThresholds), _array_type_protectionThresholds);
01401   hsize_t _array_type_quads_shape[] = { 4 };
01402   hdf5pp::ArrayType _array_type_quads = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ConfigV1QuadReg_v0::dataset_data>::stored_type(), 1, _array_type_quads_shape);
01403   type.insert("quads", offsetof(DsType, quads), _array_type_quads);
01404   hsize_t _array_type_sections_shape[] = { 4, 8 };
01405   hdf5pp::ArrayType _array_type_sections = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<int8_t>::stored_type(), 2, _array_type_sections_shape);
01406   type.insert("sections", offsetof(DsType, sections), _array_type_sections);
01407   return type;
01408 }
01409 
01410 hdf5pp::Type ns_ConfigV3_v0::dataset_config::stored_type()
01411 {
01412   static hdf5pp::Type type = ns_ConfigV3_v0_dataset_config_stored_type();
01413   return type;
01414 }
01415 
01416 hdf5pp::Type ns_ConfigV3_v0_dataset_config_native_type()
01417 {
01418   typedef ns_ConfigV3_v0::dataset_config DsType;
01419   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
01420   type.insert("concentratorVersion", offsetof(DsType, concentratorVersion), hdf5pp::TypeTraits<uint32_t>::native_type());
01421   type.insert("runDelay", offsetof(DsType, runDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
01422   type.insert("eventCode", offsetof(DsType, eventCode), hdf5pp::TypeTraits<uint32_t>::native_type());
01423   type.insert("protectionEnable", offsetof(DsType, protectionEnable), hdf5pp::TypeTraits<uint32_t>::native_type());
01424   type.insert("inactiveRunMode", offsetof(DsType, inactiveRunMode), hdf5pp::TypeTraits<uint32_t>::native_type());
01425   type.insert("activeRunMode", offsetof(DsType, activeRunMode), hdf5pp::TypeTraits<uint32_t>::native_type());
01426   type.insert("testDataIndex", offsetof(DsType, testDataIndex), hdf5pp::TypeTraits<uint32_t>::native_type());
01427   type.insert("payloadPerQuad", offsetof(DsType, payloadPerQuad), hdf5pp::TypeTraits<uint32_t>::native_type());
01428   type.insert("badAsicMask0", offsetof(DsType, badAsicMask0), hdf5pp::TypeTraits<uint32_t>::native_type());
01429   type.insert("badAsicMask1", offsetof(DsType, badAsicMask1), hdf5pp::TypeTraits<uint32_t>::native_type());
01430   type.insert("asicMask", offsetof(DsType, asicMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01431   type.insert("quadMask", offsetof(DsType, quadMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01432   type.insert("roiMask", offsetof(DsType, roiMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01433   hsize_t _array_type_protectionThresholds_shape[] = { 4 };
01434   hdf5pp::ArrayType _array_type_protectionThresholds = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ProtectionSystemThreshold_v0::dataset_data>::native_type(), 1, _array_type_protectionThresholds_shape);
01435   type.insert("protectionThresholds", offsetof(DsType, protectionThresholds), _array_type_protectionThresholds);
01436   hsize_t _array_type_quads_shape[] = { 4 };
01437   hdf5pp::ArrayType _array_type_quads = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ConfigV1QuadReg_v0::dataset_data>::native_type(), 1, _array_type_quads_shape);
01438   type.insert("quads", offsetof(DsType, quads), _array_type_quads);
01439   hsize_t _array_type_sections_shape[] = { 4, 8 };
01440   hdf5pp::ArrayType _array_type_sections = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<int8_t>::native_type(), 2, _array_type_sections_shape);
01441   type.insert("sections", offsetof(DsType, sections), _array_type_sections);
01442   return type;
01443 }
01444 
01445 hdf5pp::Type ns_ConfigV3_v0::dataset_config::native_type()
01446 {
01447   static hdf5pp::Type type = ns_ConfigV3_v0_dataset_config_native_type();
01448   return type;
01449 }
01450 
01451 ns_ConfigV3_v0::dataset_config::dataset_config()
01452 {
01453 }
01454 
01455 ns_ConfigV3_v0::dataset_config::dataset_config(const Psana::CsPad::ConfigV3& psanaobj)
01456   : concentratorVersion(psanaobj.concentratorVersion())
01457   , runDelay(psanaobj.runDelay())
01458   , eventCode(psanaobj.eventCode())
01459   , protectionEnable(psanaobj.protectionEnable())
01460   , inactiveRunMode(psanaobj.inactiveRunMode())
01461   , activeRunMode(psanaobj.activeRunMode())
01462   , testDataIndex(psanaobj.tdi())
01463   , payloadPerQuad(psanaobj.payloadSize())
01464   , badAsicMask0(psanaobj.badAsicMask0())
01465   , badAsicMask1(psanaobj.badAsicMask1())
01466   , asicMask(psanaobj.asicMask())
01467   , quadMask(psanaobj.quadMask())
01468   , roiMask(psanaobj.roiMasks())
01469 {
01470   {
01471     const __typeof__(psanaobj.protectionThresholds())& arr = psanaobj.protectionThresholds();
01472     std::copy(arr.begin(), arr.begin()+4, protectionThresholds);
01473   }
01474   for (size_t i = 0, len = 4; i != len; ++ i) {
01475     quads[i] = CsPad::ns_ConfigV1QuadReg_v0::dataset_data(psanaobj.quads(i));
01476   }
01477   init_attr_sections();
01478 }
01479 
01480 ns_ConfigV3_v0::dataset_config::~dataset_config()
01481 {
01482 }
01483 uint32_t ConfigV3_v0::concentratorVersion() const {
01484   if (not m_ds_config) read_ds_config();
01485   return uint32_t(m_ds_config->concentratorVersion);
01486 }
01487 uint32_t ConfigV3_v0::runDelay() const {
01488   if (not m_ds_config) read_ds_config();
01489   return uint32_t(m_ds_config->runDelay);
01490 }
01491 uint32_t ConfigV3_v0::eventCode() const {
01492   if (not m_ds_config) read_ds_config();
01493   return uint32_t(m_ds_config->eventCode);
01494 }
01495 ndarray<const Psana::CsPad::ProtectionSystemThreshold, 1> ConfigV3_v0::protectionThresholds() const {
01496   if (not m_ds_config) read_ds_config();
01497   if (m_ds_storage_config_protectionThresholds.empty()) {
01498     unsigned shape[] = {MaxQuadsPerSensor};
01499     ndarray<Psana::CsPad::ProtectionSystemThreshold, 1> tmparr(shape);
01500     unsigned size = tmparr.size();
01501     ndarray<Psana::CsPad::ProtectionSystemThreshold, 1>::iterator it = tmparr.begin();
01502     for (unsigned i = 0; i != size; ++ i, ++ it) {
01503       *it = Psana::CsPad::ProtectionSystemThreshold(m_ds_config->protectionThresholds[i]);
01504     }
01505     m_ds_storage_config_protectionThresholds = tmparr;
01506   }
01507   return m_ds_storage_config_protectionThresholds;
01508 }
01509 uint32_t ConfigV3_v0::protectionEnable() const {
01510   if (not m_ds_config) read_ds_config();
01511   return uint32_t(m_ds_config->protectionEnable);
01512 }
01513 uint32_t ConfigV3_v0::inactiveRunMode() const {
01514   if (not m_ds_config) read_ds_config();
01515   return uint32_t(m_ds_config->inactiveRunMode);
01516 }
01517 uint32_t ConfigV3_v0::activeRunMode() const {
01518   if (not m_ds_config) read_ds_config();
01519   return uint32_t(m_ds_config->activeRunMode);
01520 }
01521 uint32_t ConfigV3_v0::tdi() const {
01522   if (not m_ds_config) read_ds_config();
01523   return uint32_t(m_ds_config->testDataIndex);
01524 }
01525 uint32_t ConfigV3_v0::payloadSize() const {
01526   if (not m_ds_config) read_ds_config();
01527   return uint32_t(m_ds_config->payloadPerQuad);
01528 }
01529 uint32_t ConfigV3_v0::badAsicMask0() const {
01530   if (not m_ds_config) read_ds_config();
01531   return uint32_t(m_ds_config->badAsicMask0);
01532 }
01533 uint32_t ConfigV3_v0::badAsicMask1() const {
01534   if (not m_ds_config) read_ds_config();
01535   return uint32_t(m_ds_config->badAsicMask1);
01536 }
01537 uint32_t ConfigV3_v0::asicMask() const {
01538   if (not m_ds_config) read_ds_config();
01539   return uint32_t(m_ds_config->asicMask);
01540 }
01541 uint32_t ConfigV3_v0::quadMask() const {
01542   if (not m_ds_config) read_ds_config();
01543   return uint32_t(m_ds_config->quadMask);
01544 }
01545 uint32_t ConfigV3_v0::roiMasks() const {
01546   if (not m_ds_config) read_ds_config();
01547   return uint32_t(m_ds_config->roiMask);
01548 }
01549 const Psana::CsPad::ConfigV1QuadReg& ConfigV3_v0::quads(uint32_t i0) const {
01550   if (not m_ds_config) read_ds_config();
01551   if (m_ds_storage_config_quads.empty()) {
01552     unsigned shape[] = {MaxQuadsPerSensor};
01553     ndarray<ConfigV1QuadReg_v0, 1> tmparr(shape);
01554     for (int i = 0; i != 4; ++ i) {
01555       boost::shared_ptr<CsPad::ns_ConfigV1QuadReg_v0::dataset_data> ptr(m_ds_config, &m_ds_config->quads[i]);
01556       tmparr.begin()[i] = ConfigV1QuadReg_v0(ptr);
01557     }
01558     m_ds_storage_config_quads = tmparr;
01559   }
01560   return m_ds_storage_config_quads[i0];
01561 }
01562 uint32_t
01563 ConfigV3_v0::numAsicsRead() const{ 
01564 return (this->asicMask() & 0xf)==1 ? 4 : 16; 
01565 }
01566 uint32_t
01567 ConfigV3_v0::roiMask(uint32_t iq) const{ 
01568 return (this->roiMasks() >> (8*iq)) & 0xff; 
01569 }
01570 uint32_t
01571 ConfigV3_v0::numAsicsStored(uint32_t iq) const{ 
01572 return __builtin_popcount(this->roiMask(iq))*2; 
01573 }
01574 uint32_t
01575 ConfigV3_v0::numQuads() const{ 
01576 return __builtin_popcount(this->quadMask()); 
01577 }
01578 uint32_t
01579 ConfigV3_v0::numSect() const{ 
01580 return __builtin_popcount(this->roiMasks()); 
01581 }
01582 std::vector<int>
01583 ConfigV3_v0::quads_shape() const{ 
01584   int shape[] = { MaxQuadsPerSensor };
01585   return std::vector<int>(shape, shape+1); 
01586 }
01587 void ConfigV3_v0::read_ds_config() const {
01588   m_ds_config = hdf5pp::Utils::readGroup<CsPad::ns_ConfigV3_v0::dataset_config>(m_group, "config", m_idx);
01589 }
01590 
01591 void make_datasets_ConfigV3_v0(const Psana::CsPad::ConfigV3& obj, 
01592       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
01593 {
01594   {
01595     hdf5pp::Type dstype = CsPad::ns_ConfigV3_v0::dataset_config::stored_type();
01596     hdf5pp::Utils::createDataset(group, "config", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
01597   }
01598 }
01599 
01600 void store_ConfigV3_v0(const Psana::CsPad::ConfigV3* obj, hdf5pp::Group group, long index, bool append)
01601 {
01602   if (obj) {
01603     CsPad::ns_ConfigV3_v0::dataset_config ds_data(*obj);
01604     if (append) {
01605       hdf5pp::Utils::storeAt(group, "config", ds_data, index);
01606     } else {
01607       hdf5pp::Utils::storeScalar(group, "config", ds_data);
01608     }
01609   } else if (append) {
01610     hdf5pp::Utils::resizeDataset(group, "config", index < 0 ? index : index + 1);
01611   }
01612 }
01613 
01614 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::ConfigV3> > make_ConfigV3(int version, hdf5pp::Group group, hsize_t idx) {
01615   switch (version) {
01616   case 0:
01617     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::ConfigV3> >(boost::make_shared<ConfigV3_v0>(group, idx));
01618   default:
01619     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::ConfigV3> >(boost::shared_ptr<Psana::CsPad::ConfigV3>());
01620   }
01621 }
01622 
01623 void make_datasets(const Psana::CsPad::ConfigV3& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
01624                    int deflate, bool shuffle, int version)
01625 {
01626   if (version < 0) version = 0;
01627   group.createAttr<uint32_t>("_schemaVersion").store(version);
01628   switch (version) {
01629   case 0:
01630     make_datasets_ConfigV3_v0(obj, group, chunkPolicy, deflate, shuffle);
01631     break;
01632   default:
01633     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.ConfigV3", version);
01634   }
01635 }
01636 
01637 void store_ConfigV3(const Psana::CsPad::ConfigV3* obj, hdf5pp::Group group, long index, int version, bool append)
01638 {
01639   if (version < 0) version = 0;
01640   if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
01641   switch (version) {
01642   case 0:
01643     store_ConfigV3_v0(obj, group, index, append);
01644     break;
01645   default:
01646     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.ConfigV3", version);
01647   }
01648 }
01649 
01650 void store(const Psana::CsPad::ConfigV3& obj, hdf5pp::Group group, int version) 
01651 {
01652   store_ConfigV3(&obj, group, 0, version, false);
01653 }
01654 
01655 void store_at(const Psana::CsPad::ConfigV3* obj, hdf5pp::Group group, long index, int version)
01656 {
01657   store_ConfigV3(obj, group, index, version, true);
01658 }
01659 
01660 
01661 hdf5pp::Type ns_ConfigV4_v0_dataset_config_stored_type()
01662 {
01663   typedef ns_ConfigV4_v0::dataset_config DsType;
01664   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
01665   type.insert("concentratorVersion", offsetof(DsType, concentratorVersion), hdf5pp::TypeTraits<uint32_t>::stored_type());
01666   type.insert("runDelay", offsetof(DsType, runDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
01667   type.insert("eventCode", offsetof(DsType, eventCode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01668   type.insert("protectionEnable", offsetof(DsType, protectionEnable), hdf5pp::TypeTraits<uint32_t>::stored_type());
01669   type.insert("inactiveRunMode", offsetof(DsType, inactiveRunMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01670   type.insert("activeRunMode", offsetof(DsType, activeRunMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01671   type.insert("testDataIndex", offsetof(DsType, testDataIndex), hdf5pp::TypeTraits<uint32_t>::stored_type());
01672   type.insert("payloadPerQuad", offsetof(DsType, payloadPerQuad), hdf5pp::TypeTraits<uint32_t>::stored_type());
01673   type.insert("badAsicMask0", offsetof(DsType, badAsicMask0), hdf5pp::TypeTraits<uint32_t>::stored_type());
01674   type.insert("badAsicMask1", offsetof(DsType, badAsicMask1), hdf5pp::TypeTraits<uint32_t>::stored_type());
01675   type.insert("asicMask", offsetof(DsType, asicMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01676   type.insert("quadMask", offsetof(DsType, quadMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01677   type.insert("roiMask", offsetof(DsType, roiMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01678   hsize_t _array_type_protectionThresholds_shape[] = { 4 };
01679   hdf5pp::ArrayType _array_type_protectionThresholds = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ProtectionSystemThreshold_v0::dataset_data>::stored_type(), 1, _array_type_protectionThresholds_shape);
01680   type.insert("protectionThresholds", offsetof(DsType, protectionThresholds), _array_type_protectionThresholds);
01681   hsize_t _array_type_quads_shape[] = { 4 };
01682   hdf5pp::ArrayType _array_type_quads = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ConfigV2QuadReg_v0::dataset_data>::stored_type(), 1, _array_type_quads_shape);
01683   type.insert("quads", offsetof(DsType, quads), _array_type_quads);
01684   hsize_t _array_type_sections_shape[] = { 4, 8 };
01685   hdf5pp::ArrayType _array_type_sections = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<int8_t>::stored_type(), 2, _array_type_sections_shape);
01686   type.insert("sections", offsetof(DsType, sections), _array_type_sections);
01687   return type;
01688 }
01689 
01690 hdf5pp::Type ns_ConfigV4_v0::dataset_config::stored_type()
01691 {
01692   static hdf5pp::Type type = ns_ConfigV4_v0_dataset_config_stored_type();
01693   return type;
01694 }
01695 
01696 hdf5pp::Type ns_ConfigV4_v0_dataset_config_native_type()
01697 {
01698   typedef ns_ConfigV4_v0::dataset_config DsType;
01699   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
01700   type.insert("concentratorVersion", offsetof(DsType, concentratorVersion), hdf5pp::TypeTraits<uint32_t>::native_type());
01701   type.insert("runDelay", offsetof(DsType, runDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
01702   type.insert("eventCode", offsetof(DsType, eventCode), hdf5pp::TypeTraits<uint32_t>::native_type());
01703   type.insert("protectionEnable", offsetof(DsType, protectionEnable), hdf5pp::TypeTraits<uint32_t>::native_type());
01704   type.insert("inactiveRunMode", offsetof(DsType, inactiveRunMode), hdf5pp::TypeTraits<uint32_t>::native_type());
01705   type.insert("activeRunMode", offsetof(DsType, activeRunMode), hdf5pp::TypeTraits<uint32_t>::native_type());
01706   type.insert("testDataIndex", offsetof(DsType, testDataIndex), hdf5pp::TypeTraits<uint32_t>::native_type());
01707   type.insert("payloadPerQuad", offsetof(DsType, payloadPerQuad), hdf5pp::TypeTraits<uint32_t>::native_type());
01708   type.insert("badAsicMask0", offsetof(DsType, badAsicMask0), hdf5pp::TypeTraits<uint32_t>::native_type());
01709   type.insert("badAsicMask1", offsetof(DsType, badAsicMask1), hdf5pp::TypeTraits<uint32_t>::native_type());
01710   type.insert("asicMask", offsetof(DsType, asicMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01711   type.insert("quadMask", offsetof(DsType, quadMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01712   type.insert("roiMask", offsetof(DsType, roiMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01713   hsize_t _array_type_protectionThresholds_shape[] = { 4 };
01714   hdf5pp::ArrayType _array_type_protectionThresholds = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ProtectionSystemThreshold_v0::dataset_data>::native_type(), 1, _array_type_protectionThresholds_shape);
01715   type.insert("protectionThresholds", offsetof(DsType, protectionThresholds), _array_type_protectionThresholds);
01716   hsize_t _array_type_quads_shape[] = { 4 };
01717   hdf5pp::ArrayType _array_type_quads = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ConfigV2QuadReg_v0::dataset_data>::native_type(), 1, _array_type_quads_shape);
01718   type.insert("quads", offsetof(DsType, quads), _array_type_quads);
01719   hsize_t _array_type_sections_shape[] = { 4, 8 };
01720   hdf5pp::ArrayType _array_type_sections = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<int8_t>::native_type(), 2, _array_type_sections_shape);
01721   type.insert("sections", offsetof(DsType, sections), _array_type_sections);
01722   return type;
01723 }
01724 
01725 hdf5pp::Type ns_ConfigV4_v0::dataset_config::native_type()
01726 {
01727   static hdf5pp::Type type = ns_ConfigV4_v0_dataset_config_native_type();
01728   return type;
01729 }
01730 
01731 ns_ConfigV4_v0::dataset_config::dataset_config()
01732 {
01733 }
01734 
01735 ns_ConfigV4_v0::dataset_config::dataset_config(const Psana::CsPad::ConfigV4& psanaobj)
01736   : concentratorVersion(psanaobj.concentratorVersion())
01737   , runDelay(psanaobj.runDelay())
01738   , eventCode(psanaobj.eventCode())
01739   , protectionEnable(psanaobj.protectionEnable())
01740   , inactiveRunMode(psanaobj.inactiveRunMode())
01741   , activeRunMode(psanaobj.activeRunMode())
01742   , testDataIndex(psanaobj.tdi())
01743   , payloadPerQuad(psanaobj.payloadSize())
01744   , badAsicMask0(psanaobj.badAsicMask0())
01745   , badAsicMask1(psanaobj.badAsicMask1())
01746   , asicMask(psanaobj.asicMask())
01747   , quadMask(psanaobj.quadMask())
01748   , roiMask(psanaobj.roiMasks())
01749 {
01750   {
01751     const __typeof__(psanaobj.protectionThresholds())& arr = psanaobj.protectionThresholds();
01752     std::copy(arr.begin(), arr.begin()+4, protectionThresholds);
01753   }
01754   for (size_t i = 0, len = 4; i != len; ++ i) {
01755     quads[i] = CsPad::ns_ConfigV2QuadReg_v0::dataset_data(psanaobj.quads(i));
01756   }
01757   init_attr_sections();
01758 }
01759 
01760 ns_ConfigV4_v0::dataset_config::~dataset_config()
01761 {
01762 }
01763 uint32_t ConfigV4_v0::concentratorVersion() const {
01764   if (not m_ds_config) read_ds_config();
01765   return uint32_t(m_ds_config->concentratorVersion);
01766 }
01767 uint32_t ConfigV4_v0::runDelay() const {
01768   if (not m_ds_config) read_ds_config();
01769   return uint32_t(m_ds_config->runDelay);
01770 }
01771 uint32_t ConfigV4_v0::eventCode() const {
01772   if (not m_ds_config) read_ds_config();
01773   return uint32_t(m_ds_config->eventCode);
01774 }
01775 ndarray<const Psana::CsPad::ProtectionSystemThreshold, 1> ConfigV4_v0::protectionThresholds() const {
01776   if (not m_ds_config) read_ds_config();
01777   if (m_ds_storage_config_protectionThresholds.empty()) {
01778     unsigned shape[] = {MaxQuadsPerSensor};
01779     ndarray<Psana::CsPad::ProtectionSystemThreshold, 1> tmparr(shape);
01780     unsigned size = tmparr.size();
01781     ndarray<Psana::CsPad::ProtectionSystemThreshold, 1>::iterator it = tmparr.begin();
01782     for (unsigned i = 0; i != size; ++ i, ++ it) {
01783       *it = Psana::CsPad::ProtectionSystemThreshold(m_ds_config->protectionThresholds[i]);
01784     }
01785     m_ds_storage_config_protectionThresholds = tmparr;
01786   }
01787   return m_ds_storage_config_protectionThresholds;
01788 }
01789 uint32_t ConfigV4_v0::protectionEnable() const {
01790   if (not m_ds_config) read_ds_config();
01791   return uint32_t(m_ds_config->protectionEnable);
01792 }
01793 uint32_t ConfigV4_v0::inactiveRunMode() const {
01794   if (not m_ds_config) read_ds_config();
01795   return uint32_t(m_ds_config->inactiveRunMode);
01796 }
01797 uint32_t ConfigV4_v0::activeRunMode() const {
01798   if (not m_ds_config) read_ds_config();
01799   return uint32_t(m_ds_config->activeRunMode);
01800 }
01801 uint32_t ConfigV4_v0::tdi() const {
01802   if (not m_ds_config) read_ds_config();
01803   return uint32_t(m_ds_config->testDataIndex);
01804 }
01805 uint32_t ConfigV4_v0::payloadSize() const {
01806   if (not m_ds_config) read_ds_config();
01807   return uint32_t(m_ds_config->payloadPerQuad);
01808 }
01809 uint32_t ConfigV4_v0::badAsicMask0() const {
01810   if (not m_ds_config) read_ds_config();
01811   return uint32_t(m_ds_config->badAsicMask0);
01812 }
01813 uint32_t ConfigV4_v0::badAsicMask1() const {
01814   if (not m_ds_config) read_ds_config();
01815   return uint32_t(m_ds_config->badAsicMask1);
01816 }
01817 uint32_t ConfigV4_v0::asicMask() const {
01818   if (not m_ds_config) read_ds_config();
01819   return uint32_t(m_ds_config->asicMask);
01820 }
01821 uint32_t ConfigV4_v0::quadMask() const {
01822   if (not m_ds_config) read_ds_config();
01823   return uint32_t(m_ds_config->quadMask);
01824 }
01825 uint32_t ConfigV4_v0::roiMasks() const {
01826   if (not m_ds_config) read_ds_config();
01827   return uint32_t(m_ds_config->roiMask);
01828 }
01829 const Psana::CsPad::ConfigV2QuadReg& ConfigV4_v0::quads(uint32_t i0) const {
01830   if (not m_ds_config) read_ds_config();
01831   if (m_ds_storage_config_quads.empty()) {
01832     unsigned shape[] = {MaxQuadsPerSensor};
01833     ndarray<ConfigV2QuadReg_v0, 1> tmparr(shape);
01834     for (int i = 0; i != 4; ++ i) {
01835       boost::shared_ptr<CsPad::ns_ConfigV2QuadReg_v0::dataset_data> ptr(m_ds_config, &m_ds_config->quads[i]);
01836       tmparr.begin()[i] = ConfigV2QuadReg_v0(ptr);
01837     }
01838     m_ds_storage_config_quads = tmparr;
01839   }
01840   return m_ds_storage_config_quads[i0];
01841 }
01842 uint32_t
01843 ConfigV4_v0::numAsicsRead() const{ 
01844 return (this->asicMask() & 0xf)==1 ? 4 : 16; 
01845 }
01846 uint32_t
01847 ConfigV4_v0::roiMask(uint32_t iq) const{ 
01848 return (this->roiMasks() >> (8*iq)) & 0xff; 
01849 }
01850 uint32_t
01851 ConfigV4_v0::numAsicsStored(uint32_t iq) const{ 
01852 return __builtin_popcount(this->roiMask(iq))*2; 
01853 }
01854 uint32_t
01855 ConfigV4_v0::numQuads() const{ 
01856 return __builtin_popcount(this->quadMask()); 
01857 }
01858 uint32_t
01859 ConfigV4_v0::numSect() const{ 
01860 return __builtin_popcount(this->roiMasks()); 
01861 }
01862 std::vector<int>
01863 ConfigV4_v0::quads_shape() const{ 
01864   int shape[] = { MaxQuadsPerSensor };
01865   return std::vector<int>(shape, shape+1); 
01866 }
01867 void ConfigV4_v0::read_ds_config() const {
01868   m_ds_config = hdf5pp::Utils::readGroup<CsPad::ns_ConfigV4_v0::dataset_config>(m_group, "config", m_idx);
01869 }
01870 
01871 void make_datasets_ConfigV4_v0(const Psana::CsPad::ConfigV4& obj, 
01872       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
01873 {
01874   {
01875     hdf5pp::Type dstype = CsPad::ns_ConfigV4_v0::dataset_config::stored_type();
01876     hdf5pp::Utils::createDataset(group, "config", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
01877   }
01878 }
01879 
01880 void store_ConfigV4_v0(const Psana::CsPad::ConfigV4* obj, hdf5pp::Group group, long index, bool append)
01881 {
01882   if (obj) {
01883     CsPad::ns_ConfigV4_v0::dataset_config ds_data(*obj);
01884     if (append) {
01885       hdf5pp::Utils::storeAt(group, "config", ds_data, index);
01886     } else {
01887       hdf5pp::Utils::storeScalar(group, "config", ds_data);
01888     }
01889   } else if (append) {
01890     hdf5pp::Utils::resizeDataset(group, "config", index < 0 ? index : index + 1);
01891   }
01892 }
01893 
01894 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::ConfigV4> > make_ConfigV4(int version, hdf5pp::Group group, hsize_t idx) {
01895   switch (version) {
01896   case 0:
01897     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::ConfigV4> >(boost::make_shared<ConfigV4_v0>(group, idx));
01898   default:
01899     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::ConfigV4> >(boost::shared_ptr<Psana::CsPad::ConfigV4>());
01900   }
01901 }
01902 
01903 void make_datasets(const Psana::CsPad::ConfigV4& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
01904                    int deflate, bool shuffle, int version)
01905 {
01906   if (version < 0) version = 0;
01907   group.createAttr<uint32_t>("_schemaVersion").store(version);
01908   switch (version) {
01909   case 0:
01910     make_datasets_ConfigV4_v0(obj, group, chunkPolicy, deflate, shuffle);
01911     break;
01912   default:
01913     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.ConfigV4", version);
01914   }
01915 }
01916 
01917 void store_ConfigV4(const Psana::CsPad::ConfigV4* obj, hdf5pp::Group group, long index, int version, bool append)
01918 {
01919   if (version < 0) version = 0;
01920   if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
01921   switch (version) {
01922   case 0:
01923     store_ConfigV4_v0(obj, group, index, append);
01924     break;
01925   default:
01926     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.ConfigV4", version);
01927   }
01928 }
01929 
01930 void store(const Psana::CsPad::ConfigV4& obj, hdf5pp::Group group, int version) 
01931 {
01932   store_ConfigV4(&obj, group, 0, version, false);
01933 }
01934 
01935 void store_at(const Psana::CsPad::ConfigV4* obj, hdf5pp::Group group, long index, int version)
01936 {
01937   store_ConfigV4(obj, group, index, version, true);
01938 }
01939 
01940 
01941 hdf5pp::Type ns_ConfigV5_v0_dataset_config_stored_type()
01942 {
01943   typedef ns_ConfigV5_v0::dataset_config DsType;
01944   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
01945   type.insert("concentratorVersion", offsetof(DsType, concentratorVersion), hdf5pp::TypeTraits<uint32_t>::stored_type());
01946   type.insert("runDelay", offsetof(DsType, runDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
01947   type.insert("eventCode", offsetof(DsType, eventCode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01948   type.insert("protectionEnable", offsetof(DsType, protectionEnable), hdf5pp::TypeTraits<uint32_t>::stored_type());
01949   type.insert("inactiveRunMode", offsetof(DsType, inactiveRunMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01950   type.insert("activeRunMode", offsetof(DsType, activeRunMode), hdf5pp::TypeTraits<uint32_t>::stored_type());
01951   type.insert("internalTriggerDelay", offsetof(DsType, internalTriggerDelay), hdf5pp::TypeTraits<uint32_t>::stored_type());
01952   type.insert("testDataIndex", offsetof(DsType, testDataIndex), hdf5pp::TypeTraits<uint32_t>::stored_type());
01953   type.insert("payloadPerQuad", offsetof(DsType, payloadPerQuad), hdf5pp::TypeTraits<uint32_t>::stored_type());
01954   type.insert("badAsicMask0", offsetof(DsType, badAsicMask0), hdf5pp::TypeTraits<uint32_t>::stored_type());
01955   type.insert("badAsicMask1", offsetof(DsType, badAsicMask1), hdf5pp::TypeTraits<uint32_t>::stored_type());
01956   type.insert("asicMask", offsetof(DsType, asicMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01957   type.insert("quadMask", offsetof(DsType, quadMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01958   type.insert("roiMask", offsetof(DsType, roiMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
01959   hsize_t _array_type_protectionThresholds_shape[] = { 4 };
01960   hdf5pp::ArrayType _array_type_protectionThresholds = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ProtectionSystemThreshold_v0::dataset_data>::stored_type(), 1, _array_type_protectionThresholds_shape);
01961   type.insert("protectionThresholds", offsetof(DsType, protectionThresholds), _array_type_protectionThresholds);
01962   hsize_t _array_type_quads_shape[] = { 4 };
01963   hdf5pp::ArrayType _array_type_quads = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ConfigV3QuadReg_v0::dataset_data>::stored_type(), 1, _array_type_quads_shape);
01964   type.insert("quads", offsetof(DsType, quads), _array_type_quads);
01965   hsize_t _array_type_sections_shape[] = { 4, 8 };
01966   hdf5pp::ArrayType _array_type_sections = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<int8_t>::stored_type(), 2, _array_type_sections_shape);
01967   type.insert("sections", offsetof(DsType, sections), _array_type_sections);
01968   return type;
01969 }
01970 
01971 hdf5pp::Type ns_ConfigV5_v0::dataset_config::stored_type()
01972 {
01973   static hdf5pp::Type type = ns_ConfigV5_v0_dataset_config_stored_type();
01974   return type;
01975 }
01976 
01977 hdf5pp::Type ns_ConfigV5_v0_dataset_config_native_type()
01978 {
01979   typedef ns_ConfigV5_v0::dataset_config DsType;
01980   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
01981   type.insert("concentratorVersion", offsetof(DsType, concentratorVersion), hdf5pp::TypeTraits<uint32_t>::native_type());
01982   type.insert("runDelay", offsetof(DsType, runDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
01983   type.insert("eventCode", offsetof(DsType, eventCode), hdf5pp::TypeTraits<uint32_t>::native_type());
01984   type.insert("protectionEnable", offsetof(DsType, protectionEnable), hdf5pp::TypeTraits<uint32_t>::native_type());
01985   type.insert("inactiveRunMode", offsetof(DsType, inactiveRunMode), hdf5pp::TypeTraits<uint32_t>::native_type());
01986   type.insert("activeRunMode", offsetof(DsType, activeRunMode), hdf5pp::TypeTraits<uint32_t>::native_type());
01987   type.insert("internalTriggerDelay", offsetof(DsType, internalTriggerDelay), hdf5pp::TypeTraits<uint32_t>::native_type());
01988   type.insert("testDataIndex", offsetof(DsType, testDataIndex), hdf5pp::TypeTraits<uint32_t>::native_type());
01989   type.insert("payloadPerQuad", offsetof(DsType, payloadPerQuad), hdf5pp::TypeTraits<uint32_t>::native_type());
01990   type.insert("badAsicMask0", offsetof(DsType, badAsicMask0), hdf5pp::TypeTraits<uint32_t>::native_type());
01991   type.insert("badAsicMask1", offsetof(DsType, badAsicMask1), hdf5pp::TypeTraits<uint32_t>::native_type());
01992   type.insert("asicMask", offsetof(DsType, asicMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01993   type.insert("quadMask", offsetof(DsType, quadMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01994   type.insert("roiMask", offsetof(DsType, roiMask), hdf5pp::TypeTraits<uint32_t>::native_type());
01995   hsize_t _array_type_protectionThresholds_shape[] = { 4 };
01996   hdf5pp::ArrayType _array_type_protectionThresholds = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ProtectionSystemThreshold_v0::dataset_data>::native_type(), 1, _array_type_protectionThresholds_shape);
01997   type.insert("protectionThresholds", offsetof(DsType, protectionThresholds), _array_type_protectionThresholds);
01998   hsize_t _array_type_quads_shape[] = { 4 };
01999   hdf5pp::ArrayType _array_type_quads = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<CsPad::ns_ConfigV3QuadReg_v0::dataset_data>::native_type(), 1, _array_type_quads_shape);
02000   type.insert("quads", offsetof(DsType, quads), _array_type_quads);
02001   hsize_t _array_type_sections_shape[] = { 4, 8 };
02002   hdf5pp::ArrayType _array_type_sections = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<int8_t>::native_type(), 2, _array_type_sections_shape);
02003   type.insert("sections", offsetof(DsType, sections), _array_type_sections);
02004   return type;
02005 }
02006 
02007 hdf5pp::Type ns_ConfigV5_v0::dataset_config::native_type()
02008 {
02009   static hdf5pp::Type type = ns_ConfigV5_v0_dataset_config_native_type();
02010   return type;
02011 }
02012 
02013 ns_ConfigV5_v0::dataset_config::dataset_config()
02014 {
02015 }
02016 
02017 ns_ConfigV5_v0::dataset_config::dataset_config(const Psana::CsPad::ConfigV5& psanaobj)
02018   : concentratorVersion(psanaobj.concentratorVersion())
02019   , runDelay(psanaobj.runDelay())
02020   , eventCode(psanaobj.eventCode())
02021   , protectionEnable(psanaobj.protectionEnable())
02022   , inactiveRunMode(psanaobj.inactiveRunMode())
02023   , activeRunMode(psanaobj.activeRunMode())
02024   , internalTriggerDelay(psanaobj.internalTriggerDelay())
02025   , testDataIndex(psanaobj.tdi())
02026   , payloadPerQuad(psanaobj.payloadSize())
02027   , badAsicMask0(psanaobj.badAsicMask0())
02028   , badAsicMask1(psanaobj.badAsicMask1())
02029   , asicMask(psanaobj.asicMask())
02030   , quadMask(psanaobj.quadMask())
02031   , roiMask(psanaobj.roiMasks())
02032 {
02033   {
02034     const __typeof__(psanaobj.protectionThresholds())& arr = psanaobj.protectionThresholds();
02035     std::copy(arr.begin(), arr.begin()+4, protectionThresholds);
02036   }
02037   for (size_t i = 0, len = 4; i != len; ++ i) {
02038     quads[i] = CsPad::ns_ConfigV3QuadReg_v0::dataset_data(psanaobj.quads(i));
02039   }
02040   init_attr_sections();
02041 }
02042 
02043 ns_ConfigV5_v0::dataset_config::~dataset_config()
02044 {
02045 }
02046 uint32_t ConfigV5_v0::concentratorVersion() const {
02047   if (not m_ds_config) read_ds_config();
02048   return uint32_t(m_ds_config->concentratorVersion);
02049 }
02050 uint32_t ConfigV5_v0::runDelay() const {
02051   if (not m_ds_config) read_ds_config();
02052   return uint32_t(m_ds_config->runDelay);
02053 }
02054 uint32_t ConfigV5_v0::eventCode() const {
02055   if (not m_ds_config) read_ds_config();
02056   return uint32_t(m_ds_config->eventCode);
02057 }
02058 ndarray<const Psana::CsPad::ProtectionSystemThreshold, 1> ConfigV5_v0::protectionThresholds() const {
02059   if (not m_ds_config) read_ds_config();
02060   if (m_ds_storage_config_protectionThresholds.empty()) {
02061     unsigned shape[] = {MaxQuadsPerSensor};
02062     ndarray<Psana::CsPad::ProtectionSystemThreshold, 1> tmparr(shape);
02063     unsigned size = tmparr.size();
02064     ndarray<Psana::CsPad::ProtectionSystemThreshold, 1>::iterator it = tmparr.begin();
02065     for (unsigned i = 0; i != size; ++ i, ++ it) {
02066       *it = Psana::CsPad::ProtectionSystemThreshold(m_ds_config->protectionThresholds[i]);
02067     }
02068     m_ds_storage_config_protectionThresholds = tmparr;
02069   }
02070   return m_ds_storage_config_protectionThresholds;
02071 }
02072 uint32_t ConfigV5_v0::protectionEnable() const {
02073   if (not m_ds_config) read_ds_config();
02074   return uint32_t(m_ds_config->protectionEnable);
02075 }
02076 uint32_t ConfigV5_v0::inactiveRunMode() const {
02077   if (not m_ds_config) read_ds_config();
02078   return uint32_t(m_ds_config->inactiveRunMode);
02079 }
02080 uint32_t ConfigV5_v0::activeRunMode() const {
02081   if (not m_ds_config) read_ds_config();
02082   return uint32_t(m_ds_config->activeRunMode);
02083 }
02084 uint32_t ConfigV5_v0::internalTriggerDelay() const {
02085   if (not m_ds_config) read_ds_config();
02086   return uint32_t(m_ds_config->internalTriggerDelay);
02087 }
02088 uint32_t ConfigV5_v0::tdi() const {
02089   if (not m_ds_config) read_ds_config();
02090   return uint32_t(m_ds_config->testDataIndex);
02091 }
02092 uint32_t ConfigV5_v0::payloadSize() const {
02093   if (not m_ds_config) read_ds_config();
02094   return uint32_t(m_ds_config->payloadPerQuad);
02095 }
02096 uint32_t ConfigV5_v0::badAsicMask0() const {
02097   if (not m_ds_config) read_ds_config();
02098   return uint32_t(m_ds_config->badAsicMask0);
02099 }
02100 uint32_t ConfigV5_v0::badAsicMask1() const {
02101   if (not m_ds_config) read_ds_config();
02102   return uint32_t(m_ds_config->badAsicMask1);
02103 }
02104 uint32_t ConfigV5_v0::asicMask() const {
02105   if (not m_ds_config) read_ds_config();
02106   return uint32_t(m_ds_config->asicMask);
02107 }
02108 uint32_t ConfigV5_v0::quadMask() const {
02109   if (not m_ds_config) read_ds_config();
02110   return uint32_t(m_ds_config->quadMask);
02111 }
02112 uint32_t ConfigV5_v0::roiMasks() const {
02113   if (not m_ds_config) read_ds_config();
02114   return uint32_t(m_ds_config->roiMask);
02115 }
02116 const Psana::CsPad::ConfigV3QuadReg& ConfigV5_v0::quads(uint32_t i0) const {
02117   if (not m_ds_config) read_ds_config();
02118   if (m_ds_storage_config_quads.empty()) {
02119     unsigned shape[] = {MaxQuadsPerSensor};
02120     ndarray<ConfigV3QuadReg_v0, 1> tmparr(shape);
02121     for (int i = 0; i != 4; ++ i) {
02122       boost::shared_ptr<CsPad::ns_ConfigV3QuadReg_v0::dataset_data> ptr(m_ds_config, &m_ds_config->quads[i]);
02123       tmparr.begin()[i] = ConfigV3QuadReg_v0(ptr);
02124     }
02125     m_ds_storage_config_quads = tmparr;
02126   }
02127   return m_ds_storage_config_quads[i0];
02128 }
02129 uint32_t
02130 ConfigV5_v0::numAsicsRead() const{ 
02131 return (this->asicMask() & 0xf)==1 ? 4 : 16; 
02132 }
02133 uint32_t
02134 ConfigV5_v0::roiMask(uint32_t iq) const{ 
02135 return (this->roiMasks() >> (8*iq)) & 0xff; 
02136 }
02137 uint32_t
02138 ConfigV5_v0::numAsicsStored(uint32_t iq) const{ 
02139 return __builtin_popcount(this->roiMask(iq))*2; 
02140 }
02141 uint32_t
02142 ConfigV5_v0::numQuads() const{ 
02143 return __builtin_popcount(this->quadMask()); 
02144 }
02145 uint32_t
02146 ConfigV5_v0::numSect() const{ 
02147 return __builtin_popcount(this->roiMasks()); 
02148 }
02149 std::vector<int>
02150 ConfigV5_v0::quads_shape() const{ 
02151   int shape[] = { MaxQuadsPerSensor };
02152   return std::vector<int>(shape, shape+1); 
02153 }
02154 void ConfigV5_v0::read_ds_config() const {
02155   m_ds_config = hdf5pp::Utils::readGroup<CsPad::ns_ConfigV5_v0::dataset_config>(m_group, "config", m_idx);
02156 }
02157 
02158 void make_datasets_ConfigV5_v0(const Psana::CsPad::ConfigV5& obj, 
02159       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
02160 {
02161   {
02162     hdf5pp::Type dstype = CsPad::ns_ConfigV5_v0::dataset_config::stored_type();
02163     hdf5pp::Utils::createDataset(group, "config", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
02164   }
02165 }
02166 
02167 void store_ConfigV5_v0(const Psana::CsPad::ConfigV5* obj, hdf5pp::Group group, long index, bool append)
02168 {
02169   if (obj) {
02170     CsPad::ns_ConfigV5_v0::dataset_config ds_data(*obj);
02171     if (append) {
02172       hdf5pp::Utils::storeAt(group, "config", ds_data, index);
02173     } else {
02174       hdf5pp::Utils::storeScalar(group, "config", ds_data);
02175     }
02176   } else if (append) {
02177     hdf5pp::Utils::resizeDataset(group, "config", index < 0 ? index : index + 1);
02178   }
02179 }
02180 
02181 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::ConfigV5> > make_ConfigV5(int version, hdf5pp::Group group, hsize_t idx) {
02182   switch (version) {
02183   case 0:
02184     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::ConfigV5> >(boost::make_shared<ConfigV5_v0>(group, idx));
02185   default:
02186     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::ConfigV5> >(boost::shared_ptr<Psana::CsPad::ConfigV5>());
02187   }
02188 }
02189 
02190 void make_datasets(const Psana::CsPad::ConfigV5& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
02191                    int deflate, bool shuffle, int version)
02192 {
02193   if (version < 0) version = 0;
02194   group.createAttr<uint32_t>("_schemaVersion").store(version);
02195   switch (version) {
02196   case 0:
02197     make_datasets_ConfigV5_v0(obj, group, chunkPolicy, deflate, shuffle);
02198     break;
02199   default:
02200     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.ConfigV5", version);
02201   }
02202 }
02203 
02204 void store_ConfigV5(const Psana::CsPad::ConfigV5* obj, hdf5pp::Group group, long index, int version, bool append)
02205 {
02206   if (version < 0) version = 0;
02207   if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
02208   switch (version) {
02209   case 0:
02210     store_ConfigV5_v0(obj, group, index, append);
02211     break;
02212   default:
02213     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.ConfigV5", version);
02214   }
02215 }
02216 
02217 void store(const Psana::CsPad::ConfigV5& obj, hdf5pp::Group group, int version) 
02218 {
02219   store_ConfigV5(&obj, group, 0, version, false);
02220 }
02221 
02222 void store_at(const Psana::CsPad::ConfigV5* obj, hdf5pp::Group group, long index, int version)
02223 {
02224   store_ConfigV5(obj, group, index, version, true);
02225 }
02226 
02227 
02228 hdf5pp::Type ns_ElementV1_v0_dataset_element_stored_type()
02229 {
02230   typedef ns_ElementV1_v0::dataset_element DsType;
02231   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
02232   type.insert("virtual_channel", offsetof(DsType, virtual_channel), hdf5pp::TypeTraits<uint32_t>::stored_type());
02233   type.insert("lane", offsetof(DsType, lane), hdf5pp::TypeTraits<uint32_t>::stored_type());
02234   type.insert("tid", offsetof(DsType, tid), hdf5pp::TypeTraits<uint32_t>::stored_type());
02235   type.insert("acq_count", offsetof(DsType, acq_count), hdf5pp::TypeTraits<uint32_t>::stored_type());
02236   type.insert("op_code", offsetof(DsType, op_code), hdf5pp::TypeTraits<uint32_t>::stored_type());
02237   type.insert("quad", offsetof(DsType, quad), hdf5pp::TypeTraits<uint32_t>::stored_type());
02238   type.insert("seq_count", offsetof(DsType, seq_count), hdf5pp::TypeTraits<uint32_t>::stored_type());
02239   type.insert("ticks", offsetof(DsType, ticks), hdf5pp::TypeTraits<uint32_t>::stored_type());
02240   type.insert("fiducials", offsetof(DsType, fiducials), hdf5pp::TypeTraits<uint32_t>::stored_type());
02241   type.insert("frame_type", offsetof(DsType, frame_type), hdf5pp::TypeTraits<uint32_t>::stored_type());
02242   type.insert("sectionMask", offsetof(DsType, sectionMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
02243   hsize_t _array_type_sb_temp_shape[] = { 4 };
02244   hdf5pp::ArrayType _array_type_sb_temp = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint16_t>::stored_type(), 1, _array_type_sb_temp_shape);
02245   type.insert("sb_temp", offsetof(DsType, sb_temp), _array_type_sb_temp);
02246   return type;
02247 }
02248 
02249 hdf5pp::Type ns_ElementV1_v0::dataset_element::stored_type()
02250 {
02251   static hdf5pp::Type type = ns_ElementV1_v0_dataset_element_stored_type();
02252   return type;
02253 }
02254 
02255 hdf5pp::Type ns_ElementV1_v0_dataset_element_native_type()
02256 {
02257   typedef ns_ElementV1_v0::dataset_element DsType;
02258   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
02259   type.insert("virtual_channel", offsetof(DsType, virtual_channel), hdf5pp::TypeTraits<uint32_t>::native_type());
02260   type.insert("lane", offsetof(DsType, lane), hdf5pp::TypeTraits<uint32_t>::native_type());
02261   type.insert("tid", offsetof(DsType, tid), hdf5pp::TypeTraits<uint32_t>::native_type());
02262   type.insert("acq_count", offsetof(DsType, acq_count), hdf5pp::TypeTraits<uint32_t>::native_type());
02263   type.insert("op_code", offsetof(DsType, op_code), hdf5pp::TypeTraits<uint32_t>::native_type());
02264   type.insert("quad", offsetof(DsType, quad), hdf5pp::TypeTraits<uint32_t>::native_type());
02265   type.insert("seq_count", offsetof(DsType, seq_count), hdf5pp::TypeTraits<uint32_t>::native_type());
02266   type.insert("ticks", offsetof(DsType, ticks), hdf5pp::TypeTraits<uint32_t>::native_type());
02267   type.insert("fiducials", offsetof(DsType, fiducials), hdf5pp::TypeTraits<uint32_t>::native_type());
02268   type.insert("frame_type", offsetof(DsType, frame_type), hdf5pp::TypeTraits<uint32_t>::native_type());
02269   type.insert("sectionMask", offsetof(DsType, sectionMask), hdf5pp::TypeTraits<uint32_t>::native_type());
02270   hsize_t _array_type_sb_temp_shape[] = { 4 };
02271   hdf5pp::ArrayType _array_type_sb_temp = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint16_t>::native_type(), 1, _array_type_sb_temp_shape);
02272   type.insert("sb_temp", offsetof(DsType, sb_temp), _array_type_sb_temp);
02273   return type;
02274 }
02275 
02276 hdf5pp::Type ns_ElementV1_v0::dataset_element::native_type()
02277 {
02278   static hdf5pp::Type type = ns_ElementV1_v0_dataset_element_native_type();
02279   return type;
02280 }
02281 
02282 ns_ElementV1_v0::dataset_element::dataset_element()
02283 {
02284 }
02285 
02286 ns_ElementV1_v0::dataset_element::dataset_element(const Psana::CsPad::ElementV1& psanaobj)
02287   : virtual_channel(psanaobj.virtual_channel())
02288   , lane(psanaobj.lane())
02289   , tid(psanaobj.tid())
02290   , acq_count(psanaobj.acq_count())
02291   , op_code(psanaobj.op_code())
02292   , quad(psanaobj.quad())
02293   , seq_count(psanaobj.seq_count())
02294   , ticks(psanaobj.ticks())
02295   , fiducials(psanaobj.fiducials())
02296   , frame_type(psanaobj.frame_type())
02297   , sectionMask(psanaobj.sectionMask())
02298 {
02299   {
02300     const __typeof__(psanaobj.sb_temp())& arr = psanaobj.sb_temp();
02301     std::copy(arr.begin(), arr.begin()+4, sb_temp);
02302   }
02303 }
02304 
02305 ns_ElementV1_v0::dataset_element::~dataset_element()
02306 {
02307 }
02308 template <typename Config>
02309 uint32_t ElementV1_v0<Config>::virtual_channel() const {
02310   if (not m_ds_element) read_ds_element();
02311   return uint32_t(m_ds_element->virtual_channel);
02312 }
02313 template <typename Config>
02314 uint32_t ElementV1_v0<Config>::lane() const {
02315   if (not m_ds_element) read_ds_element();
02316   return uint32_t(m_ds_element->lane);
02317 }
02318 template <typename Config>
02319 uint32_t ElementV1_v0<Config>::tid() const {
02320   if (not m_ds_element) read_ds_element();
02321   return uint32_t(m_ds_element->tid);
02322 }
02323 template <typename Config>
02324 uint32_t ElementV1_v0<Config>::acq_count() const {
02325   if (not m_ds_element) read_ds_element();
02326   return uint32_t(m_ds_element->acq_count);
02327 }
02328 template <typename Config>
02329 uint32_t ElementV1_v0<Config>::op_code() const {
02330   if (not m_ds_element) read_ds_element();
02331   return uint32_t(m_ds_element->op_code);
02332 }
02333 template <typename Config>
02334 uint32_t ElementV1_v0<Config>::quad() const {
02335   if (not m_ds_element) read_ds_element();
02336   return uint32_t(m_ds_element->quad);
02337 }
02338 template <typename Config>
02339 uint32_t ElementV1_v0<Config>::seq_count() const {
02340   if (not m_ds_element) read_ds_element();
02341   return uint32_t(m_ds_element->seq_count);
02342 }
02343 template <typename Config>
02344 uint32_t ElementV1_v0<Config>::ticks() const {
02345   if (not m_ds_element) read_ds_element();
02346   return uint32_t(m_ds_element->ticks);
02347 }
02348 template <typename Config>
02349 uint32_t ElementV1_v0<Config>::fiducials() const {
02350   if (not m_ds_element) read_ds_element();
02351   return uint32_t(m_ds_element->fiducials);
02352 }
02353 template <typename Config>
02354 ndarray<const uint16_t, 1> ElementV1_v0<Config>::sb_temp() const {
02355   if (not m_ds_element) read_ds_element();
02356   boost::shared_ptr<uint16_t> ptr(m_ds_element, m_ds_element->sb_temp);
02357   return make_ndarray(ptr, Nsbtemp);
02358 }
02359 template <typename Config>
02360 uint32_t ElementV1_v0<Config>::frame_type() const {
02361   if (not m_ds_element) read_ds_element();
02362   return uint32_t(m_ds_element->frame_type);
02363 }
02364 template <typename Config>
02365 ndarray<const int16_t, 3> ElementV1_v0<Config>::data() const {
02366   if (m_ds_data.empty()) read_ds_data();
02367   return m_ds_data;
02368 }
02369 template <typename Config>
02370 uint32_t ElementV1_v0<Config>::sectionMask() const {
02371   if (not m_ds_element) read_ds_element();
02372   return uint32_t(m_ds_element->sectionMask);
02373 }
02374 template <typename Config>
02375 float
02376 ElementV1_v0<Config>::common_mode(uint32_t section) const{ 
02377 return 0; 
02378 }
02379 template <typename Config>
02380 void ElementV1_v0<Config>::read_ds_element() const {
02381   m_ds_element = hdf5pp::Utils::readGroup<CsPad::ns_ElementV1_v0::dataset_element>(m_group, "element", m_idx);
02382 }
02383 template <typename Config>
02384 void ElementV1_v0<Config>::read_ds_data() const {
02385   m_ds_data = hdf5pp::Utils::readNdarray<int16_t, 3>(m_group, "data", m_idx);
02386 }
02387 template class ElementV1_v0<Psana::CsPad::ConfigV1>;
02388 template class ElementV1_v0<Psana::CsPad::ConfigV2>;
02389 template class ElementV1_v0<Psana::CsPad::ConfigV3>;
02390 template class ElementV1_v0<Psana::CsPad::ConfigV4>;
02391 template class ElementV1_v0<Psana::CsPad::ConfigV5>;
02392 
02393 void make_datasets_ElementV1_v0(const Psana::CsPad::ElementV1& obj, 
02394       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
02395 {
02396   {
02397     hdf5pp::Type dstype = CsPad::ns_ElementV1_v0::dataset_element::stored_type();
02398     hdf5pp::Utils::createDataset(group, "element", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
02399   }
02400   {
02401     typedef __typeof__(obj.data()) PsanaArray;
02402     const PsanaArray& psana_array = obj.data();
02403     hsize_t dims[3];
02404     std::copy(psana_array.shape(), psana_array.shape()+3, dims);
02405     hdf5pp::Type dstype = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<int16_t>::stored_type(), 3, dims);
02406     hdf5pp::Utils::createDataset(group, "data", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
02407   }
02408 }
02409 
02410 void store_ElementV1_v0(const Psana::CsPad::ElementV1* obj, hdf5pp::Group group, long index, bool append)
02411 {
02412   if (obj) {
02413     CsPad::ns_ElementV1_v0::dataset_element ds_data(*obj);
02414     if (append) {
02415       hdf5pp::Utils::storeAt(group, "element", ds_data, index);
02416     } else {
02417       hdf5pp::Utils::storeScalar(group, "element", ds_data);
02418     }
02419   } else if (append) {
02420     hdf5pp::Utils::resizeDataset(group, "element", index < 0 ? index : index + 1);
02421   }
02422   if (append) {
02423     if (obj) {
02424       hdf5pp::Utils::storeNDArrayAt(group, "data", obj->data(), index);
02425     } else {
02426       hdf5pp::Utils::resizeDataset(group, "data", index < 0 ? index : index + 1);
02427     }
02428   } else {
02429     hdf5pp::Utils::storeNDArray(group, "data", obj->data());
02430   }
02431 
02432 }
02433 
02434 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::DataV1> > make_DataV1(int version, hdf5pp::Group group, hsize_t idx, const boost::shared_ptr<Psana::CsPad::ConfigV1>& cfg) {
02435   switch (version) {
02436   case 0:
02437     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV1> >(boost::make_shared<DataV1_v0<Psana::CsPad::ConfigV1> >(group, idx, cfg));
02438   default:
02439     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV1> >(boost::shared_ptr<Psana::CsPad::DataV1>());
02440   }
02441 }
02442 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::DataV1> > make_DataV1(int version, hdf5pp::Group group, hsize_t idx, const boost::shared_ptr<Psana::CsPad::ConfigV2>& cfg) {
02443   switch (version) {
02444   case 0:
02445     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV1> >(boost::make_shared<DataV1_v0<Psana::CsPad::ConfigV2> >(group, idx, cfg));
02446   default:
02447     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV1> >(boost::shared_ptr<Psana::CsPad::DataV1>());
02448   }
02449 }
02450 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::DataV1> > make_DataV1(int version, hdf5pp::Group group, hsize_t idx, const boost::shared_ptr<Psana::CsPad::ConfigV3>& cfg) {
02451   switch (version) {
02452   case 0:
02453     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV1> >(boost::make_shared<DataV1_v0<Psana::CsPad::ConfigV3> >(group, idx, cfg));
02454   default:
02455     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV1> >(boost::shared_ptr<Psana::CsPad::DataV1>());
02456   }
02457 }
02458 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::DataV1> > make_DataV1(int version, hdf5pp::Group group, hsize_t idx, const boost::shared_ptr<Psana::CsPad::ConfigV4>& cfg) {
02459   switch (version) {
02460   case 0:
02461     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV1> >(boost::make_shared<DataV1_v0<Psana::CsPad::ConfigV4> >(group, idx, cfg));
02462   default:
02463     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV1> >(boost::shared_ptr<Psana::CsPad::DataV1>());
02464   }
02465 }
02466 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::DataV1> > make_DataV1(int version, hdf5pp::Group group, hsize_t idx, const boost::shared_ptr<Psana::CsPad::ConfigV5>& cfg) {
02467   switch (version) {
02468   case 0:
02469     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV1> >(boost::make_shared<DataV1_v0<Psana::CsPad::ConfigV5> >(group, idx, cfg));
02470   default:
02471     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV1> >(boost::shared_ptr<Psana::CsPad::DataV1>());
02472   }
02473 }
02474 
02475 void make_datasets(const Psana::CsPad::DataV1& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
02476                    int deflate, bool shuffle, int version)
02477 {
02478   if (version < 0) version = 0;
02479   group.createAttr<uint32_t>("_schemaVersion").store(version);
02480   switch (version) {
02481   case 0:
02482     make_datasets_DataV1_v0(obj, group, chunkPolicy, deflate, shuffle);
02483     break;
02484   default:
02485     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.DataV1", version);
02486   }
02487 }
02488 
02489 void store_DataV1(const Psana::CsPad::DataV1* obj, hdf5pp::Group group, long index, int version, bool append)
02490 {
02491   if (version < 0) version = 0;
02492   if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
02493   switch (version) {
02494   case 0:
02495     store_DataV1_v0(obj, group, index, append);
02496     break;
02497   default:
02498     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.DataV1", version);
02499   }
02500 }
02501 
02502 void store(const Psana::CsPad::DataV1& obj, hdf5pp::Group group, int version) 
02503 {
02504   store_DataV1(&obj, group, 0, version, false);
02505 }
02506 
02507 void store_at(const Psana::CsPad::DataV1* obj, hdf5pp::Group group, long index, int version)
02508 {
02509   store_DataV1(obj, group, index, version, true);
02510 }
02511 
02512 
02513 hdf5pp::Type ns_ElementV2_v0_dataset_element_stored_type()
02514 {
02515   typedef ns_ElementV2_v0::dataset_element DsType;
02516   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
02517   type.insert("virtual_channel", offsetof(DsType, virtual_channel), hdf5pp::TypeTraits<uint32_t>::stored_type());
02518   type.insert("lane", offsetof(DsType, lane), hdf5pp::TypeTraits<uint32_t>::stored_type());
02519   type.insert("tid", offsetof(DsType, tid), hdf5pp::TypeTraits<uint32_t>::stored_type());
02520   type.insert("acq_count", offsetof(DsType, acq_count), hdf5pp::TypeTraits<uint32_t>::stored_type());
02521   type.insert("op_code", offsetof(DsType, op_code), hdf5pp::TypeTraits<uint32_t>::stored_type());
02522   type.insert("quad", offsetof(DsType, quad), hdf5pp::TypeTraits<uint32_t>::stored_type());
02523   type.insert("seq_count", offsetof(DsType, seq_count), hdf5pp::TypeTraits<uint32_t>::stored_type());
02524   type.insert("ticks", offsetof(DsType, ticks), hdf5pp::TypeTraits<uint32_t>::stored_type());
02525   type.insert("fiducials", offsetof(DsType, fiducials), hdf5pp::TypeTraits<uint32_t>::stored_type());
02526   type.insert("frame_type", offsetof(DsType, frame_type), hdf5pp::TypeTraits<uint32_t>::stored_type());
02527   type.insert("sectionMask", offsetof(DsType, sectionMask), hdf5pp::TypeTraits<uint32_t>::stored_type());
02528   hsize_t _array_type_sb_temp_shape[] = { 4 };
02529   hdf5pp::ArrayType _array_type_sb_temp = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint16_t>::stored_type(), 1, _array_type_sb_temp_shape);
02530   type.insert("sb_temp", offsetof(DsType, sb_temp), _array_type_sb_temp);
02531   return type;
02532 }
02533 
02534 hdf5pp::Type ns_ElementV2_v0::dataset_element::stored_type()
02535 {
02536   static hdf5pp::Type type = ns_ElementV2_v0_dataset_element_stored_type();
02537   return type;
02538 }
02539 
02540 hdf5pp::Type ns_ElementV2_v0_dataset_element_native_type()
02541 {
02542   typedef ns_ElementV2_v0::dataset_element DsType;
02543   hdf5pp::CompoundType type = hdf5pp::CompoundType::compoundType<DsType>();
02544   type.insert("virtual_channel", offsetof(DsType, virtual_channel), hdf5pp::TypeTraits<uint32_t>::native_type());
02545   type.insert("lane", offsetof(DsType, lane), hdf5pp::TypeTraits<uint32_t>::native_type());
02546   type.insert("tid", offsetof(DsType, tid), hdf5pp::TypeTraits<uint32_t>::native_type());
02547   type.insert("acq_count", offsetof(DsType, acq_count), hdf5pp::TypeTraits<uint32_t>::native_type());
02548   type.insert("op_code", offsetof(DsType, op_code), hdf5pp::TypeTraits<uint32_t>::native_type());
02549   type.insert("quad", offsetof(DsType, quad), hdf5pp::TypeTraits<uint32_t>::native_type());
02550   type.insert("seq_count", offsetof(DsType, seq_count), hdf5pp::TypeTraits<uint32_t>::native_type());
02551   type.insert("ticks", offsetof(DsType, ticks), hdf5pp::TypeTraits<uint32_t>::native_type());
02552   type.insert("fiducials", offsetof(DsType, fiducials), hdf5pp::TypeTraits<uint32_t>::native_type());
02553   type.insert("frame_type", offsetof(DsType, frame_type), hdf5pp::TypeTraits<uint32_t>::native_type());
02554   type.insert("sectionMask", offsetof(DsType, sectionMask), hdf5pp::TypeTraits<uint32_t>::native_type());
02555   hsize_t _array_type_sb_temp_shape[] = { 4 };
02556   hdf5pp::ArrayType _array_type_sb_temp = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<uint16_t>::native_type(), 1, _array_type_sb_temp_shape);
02557   type.insert("sb_temp", offsetof(DsType, sb_temp), _array_type_sb_temp);
02558   return type;
02559 }
02560 
02561 hdf5pp::Type ns_ElementV2_v0::dataset_element::native_type()
02562 {
02563   static hdf5pp::Type type = ns_ElementV2_v0_dataset_element_native_type();
02564   return type;
02565 }
02566 
02567 ns_ElementV2_v0::dataset_element::dataset_element()
02568 {
02569 }
02570 
02571 ns_ElementV2_v0::dataset_element::dataset_element(const Psana::CsPad::ElementV2& psanaobj)
02572   : virtual_channel(psanaobj.virtual_channel())
02573   , lane(psanaobj.lane())
02574   , tid(psanaobj.tid())
02575   , acq_count(psanaobj.acq_count())
02576   , op_code(psanaobj.op_code())
02577   , quad(psanaobj.quad())
02578   , seq_count(psanaobj.seq_count())
02579   , ticks(psanaobj.ticks())
02580   , fiducials(psanaobj.fiducials())
02581   , frame_type(psanaobj.frame_type())
02582   , sectionMask(psanaobj.sectionMask())
02583 {
02584   {
02585     const __typeof__(psanaobj.sb_temp())& arr = psanaobj.sb_temp();
02586     std::copy(arr.begin(), arr.begin()+4, sb_temp);
02587   }
02588 }
02589 
02590 ns_ElementV2_v0::dataset_element::~dataset_element()
02591 {
02592 }
02593 template <typename Config>
02594 uint32_t ElementV2_v0<Config>::virtual_channel() const {
02595   if (not m_ds_element) read_ds_element();
02596   return uint32_t(m_ds_element->virtual_channel);
02597 }
02598 template <typename Config>
02599 uint32_t ElementV2_v0<Config>::lane() const {
02600   if (not m_ds_element) read_ds_element();
02601   return uint32_t(m_ds_element->lane);
02602 }
02603 template <typename Config>
02604 uint32_t ElementV2_v0<Config>::tid() const {
02605   if (not m_ds_element) read_ds_element();
02606   return uint32_t(m_ds_element->tid);
02607 }
02608 template <typename Config>
02609 uint32_t ElementV2_v0<Config>::acq_count() const {
02610   if (not m_ds_element) read_ds_element();
02611   return uint32_t(m_ds_element->acq_count);
02612 }
02613 template <typename Config>
02614 uint32_t ElementV2_v0<Config>::op_code() const {
02615   if (not m_ds_element) read_ds_element();
02616   return uint32_t(m_ds_element->op_code);
02617 }
02618 template <typename Config>
02619 uint32_t ElementV2_v0<Config>::quad() const {
02620   if (not m_ds_element) read_ds_element();
02621   return uint32_t(m_ds_element->quad);
02622 }
02623 template <typename Config>
02624 uint32_t ElementV2_v0<Config>::seq_count() const {
02625   if (not m_ds_element) read_ds_element();
02626   return uint32_t(m_ds_element->seq_count);
02627 }
02628 template <typename Config>
02629 uint32_t ElementV2_v0<Config>::ticks() const {
02630   if (not m_ds_element) read_ds_element();
02631   return uint32_t(m_ds_element->ticks);
02632 }
02633 template <typename Config>
02634 uint32_t ElementV2_v0<Config>::fiducials() const {
02635   if (not m_ds_element) read_ds_element();
02636   return uint32_t(m_ds_element->fiducials);
02637 }
02638 template <typename Config>
02639 ndarray<const uint16_t, 1> ElementV2_v0<Config>::sb_temp() const {
02640   if (not m_ds_element) read_ds_element();
02641   boost::shared_ptr<uint16_t> ptr(m_ds_element, m_ds_element->sb_temp);
02642   return make_ndarray(ptr, Nsbtemp);
02643 }
02644 template <typename Config>
02645 uint32_t ElementV2_v0<Config>::frame_type() const {
02646   if (not m_ds_element) read_ds_element();
02647   return uint32_t(m_ds_element->frame_type);
02648 }
02649 template <typename Config>
02650 ndarray<const int16_t, 3> ElementV2_v0<Config>::data() const {
02651   if (m_ds_data.empty()) read_ds_data();
02652   return m_ds_data;
02653 }
02654 template <typename Config>
02655 uint32_t ElementV2_v0<Config>::sectionMask() const {
02656   if (not m_ds_element) read_ds_element();
02657   return uint32_t(m_ds_element->sectionMask);
02658 }
02659 template <typename Config>
02660 float
02661 ElementV2_v0<Config>::common_mode(uint32_t section) const{ 
02662 return 0; 
02663 }
02664 template <typename Config>
02665 void ElementV2_v0<Config>::read_ds_element() const {
02666   m_ds_element = hdf5pp::Utils::readGroup<CsPad::ns_ElementV2_v0::dataset_element>(m_group, "element", m_idx);
02667 }
02668 template <typename Config>
02669 void ElementV2_v0<Config>::read_ds_data() const {
02670   m_ds_data = hdf5pp::Utils::readNdarray<int16_t, 3>(m_group, "data", m_idx);
02671 }
02672 template class ElementV2_v0<Psana::CsPad::ConfigV2>;
02673 template class ElementV2_v0<Psana::CsPad::ConfigV3>;
02674 template class ElementV2_v0<Psana::CsPad::ConfigV4>;
02675 template class ElementV2_v0<Psana::CsPad::ConfigV5>;
02676 
02677 void make_datasets_ElementV2_v0(const Psana::CsPad::ElementV2& obj, 
02678       hdf5pp::Group group, const ChunkPolicy& chunkPolicy, int deflate, bool shuffle)
02679 {
02680   {
02681     hdf5pp::Type dstype = CsPad::ns_ElementV2_v0::dataset_element::stored_type();
02682     hdf5pp::Utils::createDataset(group, "element", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
02683   }
02684   {
02685     typedef __typeof__(obj.data()) PsanaArray;
02686     const PsanaArray& psana_array = obj.data();
02687     hsize_t dims[3];
02688     std::copy(psana_array.shape(), psana_array.shape()+3, dims);
02689     hdf5pp::Type dstype = hdf5pp::ArrayType::arrayType(hdf5pp::TypeTraits<int16_t>::stored_type(), 3, dims);
02690     hdf5pp::Utils::createDataset(group, "data", dstype, chunkPolicy.chunkSize(dstype), chunkPolicy.chunkCacheSize(dstype), deflate, shuffle);    
02691   }
02692 }
02693 
02694 void store_ElementV2_v0(const Psana::CsPad::ElementV2* obj, hdf5pp::Group group, long index, bool append)
02695 {
02696   if (obj) {
02697     CsPad::ns_ElementV2_v0::dataset_element ds_data(*obj);
02698     if (append) {
02699       hdf5pp::Utils::storeAt(group, "element", ds_data, index);
02700     } else {
02701       hdf5pp::Utils::storeScalar(group, "element", ds_data);
02702     }
02703   } else if (append) {
02704     hdf5pp::Utils::resizeDataset(group, "element", index < 0 ? index : index + 1);
02705   }
02706   if (append) {
02707     if (obj) {
02708       hdf5pp::Utils::storeNDArrayAt(group, "data", obj->data(), index);
02709     } else {
02710       hdf5pp::Utils::resizeDataset(group, "data", index < 0 ? index : index + 1);
02711     }
02712   } else {
02713     hdf5pp::Utils::storeNDArray(group, "data", obj->data());
02714   }
02715 
02716 }
02717 
02718 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::DataV2> > make_DataV2(int version, hdf5pp::Group group, hsize_t idx, const boost::shared_ptr<Psana::CsPad::ConfigV2>& cfg) {
02719   switch (version) {
02720   case 0:
02721     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV2> >(boost::make_shared<DataV2_v0<Psana::CsPad::ConfigV2> >(group, idx, cfg));
02722   default:
02723     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV2> >(boost::shared_ptr<Psana::CsPad::DataV2>());
02724   }
02725 }
02726 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::DataV2> > make_DataV2(int version, hdf5pp::Group group, hsize_t idx, const boost::shared_ptr<Psana::CsPad::ConfigV3>& cfg) {
02727   switch (version) {
02728   case 0:
02729     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV2> >(boost::make_shared<DataV2_v0<Psana::CsPad::ConfigV3> >(group, idx, cfg));
02730   default:
02731     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV2> >(boost::shared_ptr<Psana::CsPad::DataV2>());
02732   }
02733 }
02734 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::DataV2> > make_DataV2(int version, hdf5pp::Group group, hsize_t idx, const boost::shared_ptr<Psana::CsPad::ConfigV4>& cfg) {
02735   switch (version) {
02736   case 0:
02737     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV2> >(boost::make_shared<DataV2_v0<Psana::CsPad::ConfigV4> >(group, idx, cfg));
02738   default:
02739     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV2> >(boost::shared_ptr<Psana::CsPad::DataV2>());
02740   }
02741 }
02742 boost::shared_ptr<PSEvt::Proxy<Psana::CsPad::DataV2> > make_DataV2(int version, hdf5pp::Group group, hsize_t idx, const boost::shared_ptr<Psana::CsPad::ConfigV5>& cfg) {
02743   switch (version) {
02744   case 0:
02745     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV2> >(boost::make_shared<DataV2_v0<Psana::CsPad::ConfigV5> >(group, idx, cfg));
02746   default:
02747     return boost::make_shared<PSEvt::DataProxy<Psana::CsPad::DataV2> >(boost::shared_ptr<Psana::CsPad::DataV2>());
02748   }
02749 }
02750 
02751 void make_datasets(const Psana::CsPad::DataV2& obj, hdf5pp::Group group, const ChunkPolicy& chunkPolicy,
02752                    int deflate, bool shuffle, int version)
02753 {
02754   if (version < 0) version = 0;
02755   group.createAttr<uint32_t>("_schemaVersion").store(version);
02756   switch (version) {
02757   case 0:
02758     make_datasets_DataV2_v0(obj, group, chunkPolicy, deflate, shuffle);
02759     break;
02760   default:
02761     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.DataV2", version);
02762   }
02763 }
02764 
02765 void store_DataV2(const Psana::CsPad::DataV2* obj, hdf5pp::Group group, long index, int version, bool append)
02766 {
02767   if (version < 0) version = 0;
02768   if (not append) group.createAttr<uint32_t>("_schemaVersion").store(version);
02769   switch (version) {
02770   case 0:
02771     store_DataV2_v0(obj, group, index, append);
02772     break;
02773   default:
02774     throw ExceptionSchemaVersion(ERR_LOC, "CsPad.DataV2", version);
02775   }
02776 }
02777 
02778 void store(const Psana::CsPad::DataV2& obj, hdf5pp::Group group, int version) 
02779 {
02780   store_DataV2(&obj, group, 0, version, false);
02781 }
02782 
02783 void store_at(const Psana::CsPad::DataV2* obj, hdf5pp::Group group, long index, int version)
02784 {
02785   store_DataV2(obj, group, index, version, true);
02786 }
02787 
02788 } // namespace CsPad
02789 } // namespace psddl_hdf2psana

Generated on 19 Dec 2016 for PSDMSoftware by  doxygen 1.4.7