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)
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] ;
145 CLHEP::HepGenMatrix *
160 CLHEP::HepGenMatrix *
matrix ;
162 matrix =
new CLHEP::HepMatrix (numRow, numCol, 0) ;
164 matrix =
new CLHEP::HepVector (numRow, 0) ;
172 std::vector<CLHEP::HepGenMatrix*> *
190 std::vector<CLHEP::HepGenMatrix*>* matrixVector =
191 new std::vector<CLHEP::HepGenMatrix*> (numElem) ;
194 for (
int i=0 ;
i<numElem ; ++
i)
197 CLHEP::HepGenMatrix *
matrix ;
201 matrix =
new CLHEP::HepMatrix (numRow, numCol, 0) ;
203 matrix =
new CLHEP::HepVector (numRow, 0) ;
212 return matrixVector ;
216 std::vector<CLHEP::HepMatrix>
234 std::vector<CLHEP::HepMatrix> matrixVector (
236 CLHEP::HepMatrix (numRow,numCol,0)
240 for (
int i=0 ;
i<numElem ; ++
i)
248 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)
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)