#include <vector>
#include <string>
#include <fstream>
#include <iostream>
#include "CLHEP/Matrix/GenMatrix.h"
#include "CLHEP/Matrix/Matrix.h"
#include "CLHEP/Matrix/Vector.h"
Go to the source code of this file.
Classes |
class | matrixSaver |
| save (read) CLHEP::HepMatrix to (from) text files More...
|
Functions |
std::ostream & | operator<< (std::ostream &outputFile, const CLHEP::HepGenMatrix &saveMe) |
std::istream & | operator>> (std::istream &input, CLHEP::HepGenMatrix &matrix) |
Function Documentation
std::ostream& operator<< |
( |
std::ostream & |
outputFile, |
|
|
const CLHEP::HepGenMatrix & |
saveMe |
|
) |
| |
std::istream& operator>> |
( |
std::istream & |
input, |
|
|
CLHEP::HepGenMatrix & |
matrix |
|
) |
| |
Definition at line 111 of file matrixSaver.cc.
References collect_tpl::input.
{
int numRow = 0 ;
int numCol = 0 ;
input >> numRow ;
input >> numCol ;
assert ( numRow == matrix.num_row () ) ;
assert ( numCol == matrix.num_col () ) ;
for (int row=0 ; row<numRow ; ++row)
{
for (int col=0 ; col<numCol ; ++col)
{
input >> matrix[row][col] ;
assert (col*row < numRow*numCol) ;
}
}
return input ;
}