CMS 3D CMS Logo

matrixSaver.h
Go to the documentation of this file.
1 
7 #ifndef __CINT__
8 #ifndef matrixSaver_h
9 #define matrixSaver_h
10 
11 //#include <memory>
12 #include <vector>
13 
14 #include <string>
15 #include <fstream>
16 #include <iostream>
17 
18 #include "CLHEP/Matrix/GenMatrix.h"
19 #include "CLHEP/Matrix/Matrix.h"
20 #include "CLHEP/Matrix/Vector.h"
21 
22 class matrixSaver {
23 public:
24  matrixSaver();
25  ~matrixSaver();
26 
27  int saveMatrix(std::string outputFileName, const CLHEP::HepGenMatrix* saveMe);
28 
29  int saveMatrixVector(std::string outputFileName, const std::vector<CLHEP::HepGenMatrix*>& saveMe);
30 
32 
33  CLHEP::HepGenMatrix* getMatrix(std::string inputFileName);
34 
35  std::vector<CLHEP::HepGenMatrix*>* getMatrixVector(std::string inputFileName);
36 
37  std::vector<CLHEP::HepMatrix> getConcreteMatrixVector(std::string inputFileName);
38 
39 private:
40 };
41 
42 std::istream& operator>>(std::istream& input, CLHEP::HepGenMatrix& matrix);
43 
44 std::ostream& operator<<(std::ostream& outputFile, const CLHEP::HepGenMatrix& saveMe);
45 
46 #endif
47 #endif
int saveMatrix(std::string outputFileName, const CLHEP::HepGenMatrix *saveMe)
Definition: matrixSaver.cc:44
int saveMatrixVector(std::string outputFileName, const std::vector< CLHEP::HepGenMatrix *> &saveMe)
Definition: matrixSaver.cc:60
static std::string const input
Definition: EdmProvDump.cc:47
std::vector< CLHEP::HepGenMatrix * > * getMatrixVector(std::string inputFileName)
Definition: matrixSaver.cc:133
std::ostream & operator<<(std::ostream &outputFile, const CLHEP::HepGenMatrix &saveMe)
save (read) CLHEP::HepMatrix to (from) text files
Definition: matrixSaver.h:22
bool touch(std::string inputFileName)
Definition: matrixSaver.cc:103
CLHEP::HepGenMatrix * getMatrix(std::string inputFileName)
Definition: matrixSaver.cc:108
std::istream & operator>>(std::istream &input, CLHEP::HepGenMatrix &matrix)
Definition: matrixSaver.cc:80
std::vector< CLHEP::HepMatrix > getConcreteMatrixVector(std::string inputFileName)
Definition: matrixSaver.cc:172