#ifndef ANGCALLOGCLASS_H #define ANGCALLOGCLASS_H #include #include #ifdef __CINT__ #define MYROOT #endif #ifndef MYROOT #include "slsDetectorCommand.h" #include "slsDetectorUtils.h" #include "sls_detector_defs.h" #endif using namespace std; class angCalLogClass { public: #ifndef MYROOT angCalLogClass(slsDetectorUtils *det){ createVars(); char cmd[1000]; \ char *argv[2]; \ argv[0]=cmd; \ sprintf(cmd,"_%d.angcal",det->getFileIndex()); \ outfile.open(string(det->getFilePath()+string("/")+det->getFileName()+string(cmd)).c_str()); \ myDet=new slsDetectorCommand(det); \ if (outfile.is_open()) { \ for (int iv=0; ivexecuteLine(1,argv,slsDetectorDefs::GET_ACTION) << endl; \ }; \ }; \ }; ~angCalLogClass(){delete myDet; outfile.close();}; #else angCalLogClass() { createVars(); }; ~angCalLogClass(){}; #endif int addStep(double pos, string fname) {outfile << pos << " " << fname << endl; return 0;}; // int readHeader(ifstream &infile, int &maxmod, int &nmod, int &chanspermod, char *angconvfile, double &globaloff, double &fineoff, int &angdir, char *ffdir, char *fffile, char *badfile ) { \ nmod=0; chanspermod=0; globaloff=0; fineoff=0; angdir=1; \ strcpy(angconvfile,"none"); strcpy(ffdir,"none"); strcpy(fffile,"none"); strcpy(badfile,"none"); \ char line[1000], myvar[100], myarg[100]; \ float v; \ for (int iv=0; iv