/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 00002 // ************************************************************************** 00003 // * * 00004 // * ! ! ! A T T E N T I O N ! ! ! * 00005 // * * 00006 // * This file was created automatically by GaudiObjDesc, please do not * 00007 // * delete it or edit it by hand. * 00008 // * * 00009 // * If you want to change this file, first change the corresponding * 00010 // * xml-file and rerun the tools from GaudiObjDesc (or run make if you * 00011 // * are using it from inside a Gaudi-package). * 00012 // * * 00013 // ************************************************************************** 00014 00015 #ifndef UserData_UserIntArray_H 00016 #define UserData_UserIntArray_H 1 00017 00018 // Include files 00019 #include "Event/UserData.h" 00020 #include "GaudiKernel/boost_allocator.h" 00021 #include "GaudiKernel/SerializeSTL.h" 00022 #include <vector> 00023 #include <ostream> 00024 00025 // Forward declarations 00026 00027 namespace DayaBay 00028 { 00029 00030 // Forward declarations 00031 using GaudiUtils::operator<<; 00032 00033 00043 class UserIntArray: public UserData 00044 { 00045 public: 00046 00048 UserIntArray(const std::string& name, 00049 const std::vector<int>& value) : UserData(name), 00050 m_value(value) {} 00051 00053 UserIntArray() : m_value() {} 00054 00056 virtual ~UserIntArray(); 00057 00059 virtual std::ostream& fillStream(std::ostream& s) const; 00060 00062 virtual UserData::DataType type() const; 00063 00066 const std::vector<int>& value() const; 00067 00070 void setValue(const std::vector<int>& value); 00071 00072 00073 #ifndef GOD_NOALLOC 00074 00075 static void* operator new ( size_t size ) 00076 { 00077 return ( sizeof(UserIntArray) == size ? 00078 boost::singleton_pool<UserIntArray, sizeof(UserIntArray)>::malloc() : 00079 ::operator new(size) ); 00080 } 00081 00085 static void* operator new ( size_t size, void* pObj ) 00086 { 00087 return ::operator new (size,pObj); 00088 } 00089 00091 static void operator delete ( void* p ) 00092 { 00093 boost::singleton_pool<UserIntArray, sizeof(UserIntArray)>::is_from(p) ? 00094 boost::singleton_pool<UserIntArray, sizeof(UserIntArray)>::free(p) : 00095 ::operator delete(p); 00096 } 00097 00100 static void operator delete ( void* p, void* pObj ) 00101 { 00102 ::operator delete (p, pObj); 00103 } 00104 #endif 00105 protected: 00106 00107 private: 00108 00109 std::vector<int> m_value; 00110 00111 }; // class UserIntArray 00112 00113 inline std::ostream& operator<< (std::ostream& str, const UserIntArray& obj) 00114 { 00115 return obj.fillStream(str); 00116 } 00117 00118 } // namespace DayaBay; 00119 00120 // ----------------------------------------------------------------------------- 00121 // end of class 00122 // ----------------------------------------------------------------------------- 00123 00124 // Including forward declarations 00125 00126 inline std::ostream& DayaBay::UserIntArray::fillStream(std::ostream& s) const 00127 { 00128 UserData::fillStream(s); 00129 s << "{ " << "value : " << m_value << std::endl << " }"; 00130 return s; 00131 } 00132 00133 00134 inline const std::vector<int>& DayaBay::UserIntArray::value() const 00135 { 00136 return m_value; 00137 } 00138 00139 inline void DayaBay::UserIntArray::setValue(const std::vector<int>& value) 00140 { 00141 m_value = value; 00142 } 00143 00144 inline DayaBay::UserData::DataType DayaBay::UserIntArray::type() const 00145 { 00146 return DayaBay::UserData::IntArray; 00147 } 00148 00149 00150 #endif ///UserData_UserIntArray_H