00001 #ifndef CSPAD_MOD_DATAPROXYT_H
00002 #define CSPAD_MOD_DATAPROXYT_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "PSEvt/Proxy.h"
00021
00022
00023
00024
00025 #include "cspad_mod/DataT.h"
00026 #include "cspad_mod/ElementT.h"
00027 #include "psddl_psana/cspad.ddl.h"
00028 #include "PSEnv/EnvObjectStore.h"
00029 #include "PSEvt/EventKey.h"
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 namespace cspad_mod {
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 template <typename DataType, typename ElemType>
00057 class DataProxyT : public PSEvt::Proxy<typename DataType::IfaceType> {
00058 public:
00059
00060 typedef typename DataType::IfaceType DataIfaceType;
00061 typedef typename ElemType::IfaceType ElemIfaceType;
00062
00063
00064 DataProxyT (const PSEvt::EventKey& key, PSEnv::EnvObjectStore& calibStore) ;
00065
00066
00067 virtual ~DataProxyT () ;
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 virtual boost::shared_ptr<DataIfaceType>
00078 getTypedImpl(PSEvt::ProxyDictI* dict, const Pds::Src& source, const std::string& key);
00079
00080 protected:
00081
00082 private:
00083
00084
00085 PSEvt::EventKey m_key;
00086 PSEnv::EnvObjectStore& m_calibStore;
00087 boost::shared_ptr<DataType> m_data;
00088
00089 };
00090
00091 typedef DataProxyT<cspad_mod::DataV1, cspad_mod::ElementV1> DataProxyV1;
00092 typedef DataProxyT<cspad_mod::DataV2, cspad_mod::ElementV2> DataProxyV2;
00093
00094 }
00095
00096 #endif // CSPAD_MOD_DATAPROXYT_H