mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@233 951219d9-93cf-4727-9268-0efd64621fa3
55 lines
1.2 KiB
C++
55 lines
1.2 KiB
C++
#ifndef ENCALLOGCLASS_H
|
|
#define ENCALLOGCLASS_H
|
|
|
|
#include <iostream>
|
|
#include <fstream>
|
|
#include "slsDetectorCommand.h"
|
|
#include "slsDetectorUtils.h"
|
|
#include "sls_detector_defs.h"
|
|
|
|
using namespace std;
|
|
|
|
class enCalLogClass {
|
|
|
|
|
|
public:
|
|
|
|
|
|
enCalLogClass(slsDetectorUtils *det){ \
|
|
char cmd[1000];
|
|
char *argv[2]; \
|
|
argv[0]=cmd; \
|
|
sprintf(cmd,"_%d.encal",det->getFileIndex()); \
|
|
outfile.open(string(det->getFilePath()+string("/")+det->getFileName()+string(cmd)).c_str()); \
|
|
myDet=new slsDetectorCommand(det); \
|
|
strcpy(cmd,"settings"); \
|
|
outfile << myDet->executeLine(1,argv,slsDetectorDefs::GET_ACTION) << endl; \
|
|
strcpy(cmd,"nmod"); \
|
|
outfile << myDet->executeLine(1,argv,slsDetectorDefs::GET_ACTION) << endl; \
|
|
for (int im=0; im<det->setNumberOfModules(); im++) { \
|
|
sprintf(cmd,"modulenumber:%d",im); \
|
|
outfile << myDet->executeLine(1,argv,slsDetectorDefs::GET_ACTION) << endl; \
|
|
}; \
|
|
};
|
|
|
|
~enCalLogClass(){delete myDet; outfile.close();};
|
|
|
|
int addStep(double threshold, string fname) {outfile << threshold << " " << fname << endl; return 0;};
|
|
|
|
|
|
|
|
private:
|
|
|
|
slsDetectorCommand *myDet;
|
|
ofstream outfile;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|