10 #include "CLHEP/Matrix/GenMatrix.h"
11 #include "CLHEP/Matrix/Matrix.h"
12 #include "CLHEP/Matrix/Vector.h"
25 int numRow = saveMe->num_row();
26 int numCol = saveMe->num_col();
29 outputFile << numRow <<
'\t' << numCol <<
'\n';
32 for (
int row = 0; row < numRow; ++row) {
36 outputFile << (*saveMe)[row][
col] <<
'\t';
49 int numRow = saveMe->num_row();
50 int numCol = saveMe->num_col();
53 outputFile << numRow <<
'\t' << numCol <<
'\n';
61 typedef std::vector<CLHEP::HepGenMatrix *>::const_iterator const_iterator;
70 outputFile << (*saveMe.begin())->num_row() <<
'\t' << (*saveMe.begin())->num_col() <<
'\n';
73 for (const_iterator it = saveMe.begin(); it != saveMe.end(); ++it) {
89 assert(numRow == matrix.num_row());
90 assert(numCol == matrix.num_col());
93 for (
int row = 0; row < numRow; ++row) {
95 input >> matrix[row][
col];
112 std::cerr <<
"file: " << inputFileName << std::endl;
122 CLHEP::HepGenMatrix *
matrix;
124 matrix =
new CLHEP::HepMatrix(numRow, numCol, 0);
126 matrix =
new CLHEP::HepVector(numRow, 0);
149 std::vector<CLHEP::HepGenMatrix *> *matrixVector =
new std::vector<CLHEP::HepGenMatrix *>(numElem);
152 for (
int i = 0;
i < numElem; ++
i) {
154 CLHEP::HepGenMatrix *
matrix;
158 matrix =
new CLHEP::HepMatrix(numRow, numCol, 0);
160 matrix =
new CLHEP::HepVector(numRow, 0);
188 std::vector<CLHEP::HepMatrix> matrixVector(numElem, CLHEP::HepMatrix(numRow, numCol, 0));
191 for (
int i = 0;
i < numElem; ++
i) {
int saveMatrix(std::string outputFileName, const CLHEP::HepGenMatrix *saveMe)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
static std::string const input
std::vector< CLHEP::HepGenMatrix * > * getMatrixVector(std::string inputFileName)
bool touch(std::string inputFileName)
CLHEP::HepGenMatrix * getMatrix(std::string inputFileName)
std::istream & operator>>(std::istream &input, CLHEP::HepGenMatrix &matrix)
int saveMatrixVector(std::string outputFileName, const std::vector< CLHEP::HepGenMatrix * > &saveMe)
std::vector< CLHEP::HepMatrix > getConcreteMatrixVector(std::string inputFileName)