10 #include "CLHEP/Matrix/GenMatrix.h"
11 #include "CLHEP/Matrix/Matrix.h"
12 #include "CLHEP/Matrix/Vector.h"
30 const CLHEP::HepGenMatrix *saveMe)
33 int numRow = saveMe->num_row () ;
34 int numCol = saveMe->num_col () ;
37 outputFile << numRow <<
'\t'
41 for (
int row=0 ; row<numRow ; ++row)
45 assert (row < numRow) ;
46 assert (
col < numCol) ;
47 outputFile << (*saveMe)[row][
col] <<
'\t' ;
59 const CLHEP::HepGenMatrix *saveMe)
65 int numRow = saveMe->num_row () ;
66 int numCol = saveMe->num_col () ;
81 const std::vector<CLHEP::HepGenMatrix *> &saveMe)
83 typedef std::vector<CLHEP::HepGenMatrix*>::const_iterator const_iterator ;
95 << (*saveMe.begin ())->num_col ()
99 for (const_iterator it = saveMe.begin () ;
100 it != saveMe.end () ;
121 assert ( numRow == matrix.num_row () ) ;
122 assert ( numCol == matrix.num_col () ) ;
125 for (
int row=0 ; row<numRow ; ++row)
129 input >> matrix[row][
col] ;
130 assert (
col*row < numRow*numCol) ;
146 CLHEP::HepGenMatrix *
161 CLHEP::HepGenMatrix *
matrix ;
163 matrix =
new CLHEP::HepMatrix (numRow, numCol, 0) ;
165 matrix =
new CLHEP::HepVector (numRow, 0) ;
173 std::vector<CLHEP::HepGenMatrix*> *
191 std::vector<CLHEP::HepGenMatrix*>* matrixVector =
192 new std::vector<CLHEP::HepGenMatrix*> (numElem) ;
195 for (
int i=0 ;
i<numElem ; ++
i)
198 CLHEP::HepGenMatrix *
matrix ;
202 matrix =
new CLHEP::HepMatrix (numRow, numCol, 0) ;
204 matrix =
new CLHEP::HepVector (numRow, 0) ;
213 return matrixVector ;
217 std::vector<CLHEP::HepMatrix>
235 std::vector<CLHEP::HepMatrix> matrixVector (
237 CLHEP::HepMatrix (numRow,numCol,0)
241 for (
int i=0 ;
i<numElem ; ++
i)
249 return matrixVector ;
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)
int 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)