5 using std::stringstream;
12 using namespace Diana;
40 const QVector
vec = *
this;
41 err =
vec.WriteOnStream(o);
45 o<<
"fSourceRuns.size"<<
"\t"<<
fSourceRuns.size()<<endl;
50 o<<
"fSourceRuns["<<j<<
"]"<<
"\t"<<
fSourceRuns[j]<<
"\t"<< endl;
67 err =
vec.ReadFromStream(ob);
73 ob.seekg(std::ios::beg);
81 if(tag ==
"fNumEvents") sline >> numev;
82 }
while(tag !=
"fNumEvents");
84 if(tag !=
"fNumEvents") {
86 err.SetDescription(
"Expected tag fNumEvents");
93 if(tag !=
"fSourceRuns.size") {
95 err.SetDescription(
"Expected tag fSourceRuns.size");
101 for(Int_t i=0; i<size; i++) {
103 snprintf(s,50,
"fSourceRuns[%d]",i);
106 err.SetDescription(
"Expected tag fSourceRuns");
QObjectImp(QAverageVector)
int fNumEvents
The number of events contributing to this average.
const QAverageVector & operator=(const Diana::QVector &orig)
Assignment operator.
QError WriteOnStream(std::ostream &o) const
Write the object to a stream.
QError ReadFromStream(std::istream &ob)
Read the object from a stream.
QAverageVector()
Default ctor.
void Clear()
Clear the attributes.
std::vector< int > fSourceRuns
Add two average vectors.
error class with error type and description
virtual void Clear()
clear the vector
const QVector & operator=(const QVector &orig)
copy the content from another QVector
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...