using only the slsDetector class

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@391 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi 2012-01-17 13:47:20 +00:00
parent 58d4673087
commit 590e611afc
2 changed files with 38 additions and 46 deletions

View File

@ -1,6 +1,7 @@
CFLAGS= -DC_ONLY
#FLAGS=-DVERBOSE
INCLUDES= -I../slsDetectorSoftware/commonFiles -I../slsDetectorSoftware/slsDetector -I ../slsDetectorSoftware/MySocketTCP -I../slsDetectorSoftware/mythenDetector -I../slsDetectorSoftware/gotthardDetector -I../slsDetectorSoftware/usersFunctions
INCLUDES= -I../slsDetectorSoftware/commonFiles -I../slsDetectorSoftware/slsDetector -I ../slsDetectorSoftware/MySocketTCP -I../slsDetectorSoftware/usersFunctions
#-I../slsDetectorSoftware/mythenDetector -I../slsDetectorSoftware/gotthardDetector
#LIBS=-L../TMythenDetector/bin/ -L$(QTDIR)/lib
LIBS= -L$(QTDIR)/lib -L../slsDetectorSoftware/
LDFLAG=-lSlsDetector -lpthread

View File

@ -1,13 +1,7 @@
#include <iostream>
#include <string>
#ifdef MYTHEN_DET
#include "mythenDetector.h"
#endif
#ifdef GOTTHARD_DET
#include "gotthardDetector.h"
#endif
#include "slsDetector.h"
#include <stdlib.h>
@ -17,54 +11,54 @@ int main(int argc, char *argv[])
{
int id=0;
char *c;
string answer;
int action;
#ifdef MYTHEN_DET
mythenDetector *myDetector;
slsDetector *myDetector;
#ifdef READOUT
action=mythenDetector::READOUT_ACTION;
action=slsDetector::READOUT_ACTION;
#elif PUT
action=mythenDetector::PUT_ACTION;
action=slsDetector::PUT_ACTION;
#elif GET
action=mythenDetector::GET_ACTION;
#endif
action=slsDetector::GET_ACTION;
#endif
#ifdef GOTTHARD_DET
gotthardDetector *myDetector;
#ifdef READOUT
action=gotthardDetector::READOUT_ACTION;
#elif PUT
action=gotthardDetector::PUT_ACTION;
#elif GET
action=gotthardDetector::GET_ACTION;
#endif
#endif
if (argc>1 && sscanf(argv[1],"%d",&id)){
detectorType t;
#ifdef MYTHEN_DET
#ifndef PICASSOD
myDetector=new mythenDetector(id);
t=MYTHEN;
#else
myDetector=new mythenDetector(id,PICASSO);
#endif
#endif
#ifdef GOTTHARD_DET
myDetector=new gotthardDetector(id);
t=PICASSO;
#endif;
#elif GOTTHARD_DET
t=GOTTHARD;
#else
t=GENERIC;
#endif
if (argc>1 && sscanf(argv[1],"%d",&id)){
myDetector=new slsDetector(t,id);
} else {
cout << "Wrong usage - should be: "<< argv[0] << " id";
cout << "(:channel arg)" << endl;
#ifdef MYTHEN_DET
cout << mythenDetector::helpLine(action);
#endif
#ifdef GOTTHARD_DET
cout << gotthardDetector::helpLine(action);
#endif
cout << slsDetector::helpLine(action);
cout << endl;
return -1;
}
@ -75,12 +69,9 @@ int main(int argc, char *argv[])
if (argc<3) {
cout << "Wrong usage - should be: "<< argv[0] << " id";
cout << ":channel arg" << endl;
#ifdef MYTHEN_DET
cout << mythenDetector::helpLine(action);
#endif
#ifdef GOTTHARD_DET
cout << gotthardDetector::helpLine(action);
#endif
cout << slsDetector::helpLine(action);
cout << endl;
return -1;
}