5 using std::stringstream;
12 using namespace Diana;
40 const QVectorC
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(QAverageVectorC)
void Clear()
Clear the attributes.
const QAverageVectorC & operator=(const Diana::QVectorC &orig)
Assignment operator.
QError WriteOnStream(std::ostream &o) const
Write the object to a stream.
QAverageVectorC()
Default ctor.
QError ReadFromStream(std::istream &ob)
Read the object from a stream.
std::vector< int > fSourceRuns
Add two average vectors.
int fNumEvents
The number of events contributing to this average.
error class with error type and description
const QVectorC & operator=(const QVectorC &orig)
copy the content of another vector
void Clear()
clear the vector
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...