![]() |
Diana Software
|
average vector object More...
Public Member Functions | |
| QAverageVectorC () | |
| Default ctor. More... | |
| QAverageVectorC (const QAverageVectorC &orig) | |
| Copy ctor. More... | |
| QAverageVectorC (const Diana::QVectorC &orig) | |
| Construct from a QVectorC(). More... | |
| void | Clear () |
| Clear the attributes. More... | |
| void | SetNumEvents (int nEvents) |
| Set the number of events in the average. More... | |
| int | GetNumEvents () const |
| Get the number of events in the average. More... | |
| void | SetSourceRuns (const std::vector< int > &sourceRuns) |
| Set the list of source runs. More... | |
| std::vector< int > & | GetSourceRuns () |
| Get the list of source runs. More... | |
| const std::vector< int > & | GetSourceRuns () const |
| Get the list of source runs. More... | |
| QError | WriteOnStream (std::ostream &o) const |
| Write the object to a stream. More... | |
| QError | ReadFromStream (std::istream &ob) |
| Read the object from a stream. More... | |
| void | Dump (std::ostream &o) const |
| void | Print () const |
| Print vector to stdout. More... | |
| const QAverageVectorC & | operator= (const Diana::QVectorC &orig) |
| Assignment operator. More... | |
| const QAverageVectorC & | operator= (const QAverageVectorC &orig) |
| Assignment operator. More... | |
Public Attributes | |
| std::vector< int > | fSourceRuns |
| Add two average vectors. More... | |
| int | fNumEvents |
| The number of events contributing to this average. More... | |
Protected Member Functions | |
| QObjectDef (QAverageVectorC, 1) | |
average vector object
Contains average pulse or average nps, source runs and number of events.
Technical note: For some reason, the data attributes of this class are publicly accessible. They should not be, but will be left so for backward compatibility.
Definition at line 24 of file QAverageVectorC.hh.
| QAverageVectorC::QAverageVectorC | ( | ) |
Default ctor.
Definition at line 14 of file QAverageVectorC.cc.
| QAverageVectorC::QAverageVectorC | ( | const QAverageVectorC & | orig | ) |
Copy ctor.
Definition at line 17 of file QAverageVectorC.cc.
References fNumEvents, and fSourceRuns.
| QAverageVectorC::QAverageVectorC | ( | const Diana::QVectorC & | orig | ) |
Construct from a QVectorC().
Definition at line 24 of file QAverageVectorC.cc.
| void QAverageVectorC::Clear | ( | ) |
Clear the attributes.
Calls QVectorC::Clear() and frees all internal memory.
Definition at line 28 of file QAverageVectorC.cc.
References QVectorC::Clear(), fNumEvents, and fSourceRuns.
Referenced by operator=().
|
inline |
\breif Same as WriteOnStream().
Definition at line 81 of file QAverageVectorC.hh.
References WriteOnStream().
Referenced by Print().
|
inline |
Get the number of events in the average.
Definition at line 52 of file QAverageVectorC.hh.
References fNumEvents.
|
inline |
Get the list of source runs.
Definition at line 61 of file QAverageVectorC.hh.
References fSourceRuns.
|
inline |
Get the list of source runs.
Definition at line 65 of file QAverageVectorC.hh.
References fSourceRuns.
| const QAverageVectorC & QAverageVectorC::operator= | ( | const Diana::QVectorC & | orig | ) |
Assignment operator.
Clears the data and copies from the QVectorC orig.
Definition at line 155 of file QAverageVectorC.cc.
References Clear(), and QVectorC::operator=().
| const QAverageVectorC & QAverageVectorC::operator= | ( | const QAverageVectorC & | orig | ) |
Assignment operator.
Clears the data and copies from the orig.
Definition at line 161 of file QAverageVectorC.cc.
References Clear(), fNumEvents, fSourceRuns, and QVectorC::operator=().
|
inline |
|
protected |
| QError QAverageVectorC::ReadFromStream | ( | std::istream & | ob | ) |
Read the object from a stream.
Used for reading from txt files.
Definition at line 56 of file QAverageVectorC.cc.
References err, fNumEvents, fSourceRuns, QVectorC::operator=(), QERR_SUCCESS, QERR_UNKNOWN_ERR, and vec.
|
inline |
Set the number of events in the average.
Definition at line 48 of file QAverageVectorC.hh.
References fNumEvents.
Referenced by MNoiseFrequencyCoherence::Done().
|
inline |
Set the list of source runs.
Definition at line 56 of file QAverageVectorC.hh.
References fSourceRuns.
Referenced by MNoiseFrequencyCoherence::Done().
| QError QAverageVectorC::WriteOnStream | ( | std::ostream & | o | ) | const |
Write the object to a stream.
Used for writing to txt files.
Definition at line 35 of file QAverageVectorC.cc.
References err, fNumEvents, fSourceRuns, QERR_SUCCESS, and vec.
Referenced by Dump().
| int QAverageVectorC::fNumEvents |
The number of events contributing to this average.
Definition at line 115 of file QAverageVectorC.hh.
Referenced by Clear(), GetNumEvents(), operator=(), QAverageVectorC(), ReadFromStream(), SetNumEvents(), and WriteOnStream().
| std::vector<int> QAverageVectorC::fSourceRuns |
Add two average vectors.
This performs a weighted average of the two vectors.
Add two average vectors
This performs a weighted average of the two vectors.
The list of source runs
Definition at line 113 of file QAverageVectorC.hh.
Referenced by Clear(), GetSourceRuns(), operator=(), QAverageVectorC(), ReadFromStream(), SetSourceRuns(), and WriteOnStream().