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
matrixSaver::saveMatrix
int saveMatrix(std::string outputFileName, const CLHEP::HepGenMatrix *saveMe)
Definition: matrixSaver.cc:44
input
static const std::string input
Definition: EdmProvDump.cc:48
makeMuonMisalignmentScenario.matrix
list matrix
Definition: makeMuonMisalignmentScenario.py:141
operator<<
std::ostream & operator<<(std::ostream &outputFile, const CLHEP::HepGenMatrix &saveMe)
matrixSaver::saveMatrixVector
int saveMatrixVector(std::string outputFileName, const std::vector< CLHEP::HepGenMatrix * > &saveMe)
Definition: matrixSaver.cc:60
download_sqlite_cfg.outputFile
outputFile
Definition: download_sqlite_cfg.py:5
InefficientDoubleROC.inputFileName
inputFileName
Definition: InefficientDoubleROC.py:437
reco_skim_cfg_mod.outputFileName
outputFileName
Definition: reco_skim_cfg_mod.py:15
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
matrixSaver::matrixSaver
matrixSaver()
Definition: matrixSaver.cc:16
matrixSaver
save (read) CLHEP::HepMatrix to (from) text files
Definition: matrixSaver.h:22
matrixSaver::touch
bool touch(std::string inputFileName)
Definition: matrixSaver.cc:103
matrixSaver::getMatrix
CLHEP::HepGenMatrix * getMatrix(std::string inputFileName)
Definition: matrixSaver.cc:108
matrixSaver::~matrixSaver
~matrixSaver()
Definition: matrixSaver.cc:20
operator>>
std::istream & operator>>(std::istream &input, CLHEP::HepGenMatrix &matrix)
Definition: matrixSaver.cc:80
matrixSaver::getMatrixVector
std::vector< CLHEP::HepGenMatrix * > * getMatrixVector(std::string inputFileName)
Definition: matrixSaver.cc:133
matrixSaver::getConcreteMatrixVector
std::vector< CLHEP::HepMatrix > getConcreteMatrixVector(std::string inputFileName)
Definition: matrixSaver.cc:172