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

Generated on 19 Dec 2016 for PSDMSoftware by  doxygen 1.4.7