|
Go to the documentation of this file. 1 #ifndef NPSTAT_INMEMORYNTUPLE_HH_
2 #define NPSTAT_INMEMORYNTUPLE_HH_
36 const char* ntTitle = 0)
37 : AbsNtuple<T>(colNames, ntTitle), ncols_(colNames.size()) {}
45 inline unsigned long nRows() const { return data_.size()/ncols_;}
51 void fill( const T* values, unsigned long lenValues);
59 void fill( const T& v0, const T& v1);
60 void fill( const T& v0, const T& v1, const T& v2);
61 void fill( const T& v0, const T& v1, const T& v2, const T& v3);
62 void fill( const T& v0, const T& v1, const T& v2, const T& v3,
64 void fill( const T& v0, const T& v1, const T& v2, const T& v3,
65 const T& v4, const T& v5);
66 void fill( const T& v0, const T& v1, const T& v2, const T& v3,
67 const T& v4, const T& v5, const T& v6);
68 void fill( const T& v0, const T& v1, const T& v2, const T& v3,
69 const T& v4, const T& v5, const T& v6, const T& v7);
70 void fill( const T& v0, const T& v1, const T& v2, const T& v3,
71 const T& v4, const T& v5, const T& v6, const T& v7,
73 void fill( const T& v0, const T& v1, const T& v2, const T& v3,
74 const T& v4, const T& v5, const T& v6, const T& v7,
75 const T& v8, const T& v9);
79 inline T operator()( const unsigned long r, const unsigned long c) const
80 { return data_[r*ncols_ + c];}
83 inline T at( const unsigned long r, const unsigned long c) const
86 throw std::out_of_range( "In npstat::InMemoryNtuple::at: "
87 "column number is out of range");
88 return data_.at(r*ncols_ + c);
92 inline void clear() {data_.clear();}
99 T* buf, unsigned long lenBuf) const;
106 T* buf, unsigned long lenBuf) const;
110 virtual gs::ClassId classId() const { return gs::ClassId(* this);}
111 bool write(std::ostream&) const;
114 static const char* classname();
115 static inline unsigned version() { return 1;}
116 static InMemoryNtuple* read( const gs::ClassId& id, std::istream& in);
127 std::vector<T> data_;
128 unsigned long ncols_;
132 #include "npstat/stat/InMemoryNtuple.icc"
Interface definition for homogeneous ntuples (point clouds)
Definition: AbsNtuple.hh:39
const std::vector< std::string > & columnNames() const Definition: AbsNtuple.hh:77
const std::string & title() const Definition: AbsNtuple.hh:62
Definition: InMemoryNtuple.hh:26
void clear() Definition: InMemoryNtuple.hh:92
virtual gs::ClassId classId() const Definition: InMemoryNtuple.hh:110
T operator()(const unsigned long r, const unsigned long c) const Definition: InMemoryNtuple.hh:79
unsigned long nRows() const Definition: InMemoryNtuple.hh:45
void fill(const T *values, unsigned long lenValues)
void columnContents(const Column &c, T *buf, unsigned long lenBuf) const
void rowContents(unsigned long row, T *buf, unsigned long lenBuf) const
virtual bool isEqual(const AbsNtuple< T > &other) const Definition: InMemoryNtuple.hh:119
T at(const unsigned long r, const unsigned long c) const Definition: InMemoryNtuple.hh:83
InMemoryNtuple(const std::vector< std::string > &colNames, const char *ntTitle=0) Definition: InMemoryNtuple.hh:35
Definition: AbsArrayProjector.hh:14
|