...
 
Commits (31)
......@@ -6,70 +6,70 @@
url = git://git.epn-campus.eu/repositories/Sps.git
[submodule "third-party/Processlib"]
path = third-party/Processlib
url = git://git.epn-campus.eu/repositories/Processlib.git
url = git://github.com/esrf-bliss/Processlib.git
[submodule "camera/basler"]
path = camera/basler
url = git://git.epn-campus.eu/repositories/LimaCameraBasler
url = git://github.com/esrf-bliss/Lima-camera-basler
[submodule "applications/spec"]
path = applications/spec
url = git://git.epn-campus.eu/repositories/LimaSpec
url = git://github.com/esrf-bliss/Lima-spec
[submodule "camera/pco"]
path = camera/pco
url = git://git.epn-campus.eu/repositories/LimaCameraPco
url = git://github.com/esrf-bliss/Lima-camera-pco
[submodule "camera/pilatus"]
path = camera/pilatus
url = git://git.epn-campus.eu/repositories/LimaCameraPilatus
url = git://github.com/esrf-bliss/Lima-camera-pilatus
[submodule "applications/tango"]
path = applications/tango
url = git://git.epn-campus.eu/repositories/LimaTango
url = git://github.com/esrf-bliss/Lima-tango
[submodule "camera/maxipix"]
path = camera/maxipix
url = git://git.epn-campus.eu/repositories/LimaCameraMaxipix
url = git://github.com/esrf-bliss/Lima-camera-maxipix
[submodule "documentation"]
path = documentation
url = git://git.epn-campus.eu/repositories/LimaDocumentation
url = git://github.com/esrf-bliss/Lima-documentation
[submodule "camera/frelon"]
path = camera/frelon
url = git://git.epn-campus.eu/repositories/LimaCameraFrelon
url = git://github.com/esrf-bliss/Lima-camera-frelon
[submodule "camera/common/espia"]
path = camera/common/espia
url = git://git.epn-campus.eu/repositories/LimaCameraEspia
url = git://github.com/esrf-bliss/Lima-camera-common-espia
[submodule "applications/taco"]
path = applications/taco
url = git://git.epn-campus.eu/repositories/LimaTaco
url = git://github.com/esrf-bliss/Lima-taco
[submodule "third-party/yat"]
path = third-party/yat
url = git://git.epn-campus.eu/repositories/yat
[submodule "camera/prosilica"]
path = camera/prosilica
url = git://git.epn-campus.eu/repositories/LimaCameraProsilica
url = git://github.com/esrf-bliss/Lima-camera-prosilica
[submodule "camera/xpad"]
path = camera/xpad
url = git://git.epn-campus.eu/repositories/LimaCameraXpad
url = git://github.com/esrf-bliss/Lima-camera-xpad
[submodule "camera/marccd"]
path = camera/marccd
url = git://git.epn-campus.eu/repositories/LimaCameraMarCCD
url = git://github.com/esrf-bliss/Lima-camera-marccd
[submodule "camera/adsc"]
path = camera/adsc
url = git://git.epn-campus.eu/repositories/LimaCameraADSC
url = git://github.com/esrf-bliss/Lima-camera-adsc
[submodule "camera/roperscientific"]
path = camera/roperscientific
url = git://git.epn-campus.eu/repositories/LimaCameraRoperScientific
url = git://github.com/esrf-bliss/Lima-camera-roperscientific
[submodule "camera/mythen"]
path = camera/mythen
url = git://git.epn-campus.eu/repositories/LimaCameraMythen
url = git://github.com/esrf-bliss/Lima-camera-mythen
[submodule "camera/ueye"]
path = camera/ueye
url = git://git.epn-campus.eu/repositories/LimaCameraUeye
url = git://github.com/esrf-bliss/Lima-camera-ueye
[submodule "camera/perkinelmer"]
path = camera/perkinelmer
url = git://git.epn-campus.eu/repositories/LimaCameraPerkinElmer
url = git://github.com/esrf-bliss/Lima-camera-perkinelmer
[submodule "camera/andor"]
path = camera/andor
url = git://git.epn-campus.eu/repositories/LimaCameraAndor
url = git://github.com/esrf-bliss/Lima-camera-andor
[submodule "camera/photonicscience"]
path = camera/photonicscience
url = git://git.epn-campus.eu/repositories/LimaCameraPhotonicScience
url = git://github.com/esrf-bliss/Lima-camera-photonicscience
[submodule "third-party/CCfits"]
path = third-party/CCfits
url = git://git.epn-campus.eu/repositories/CCfits
......
This diff is collapsed.
Subproject commit 32cb7e05a12276d65aa7154b1978b2575a70d297
Subproject commit 28f28a7578fabb352c38d66180723ed9e8a4e6f0
Subproject commit abf42bc7b60fd61731facc46cb2ac23201414c11
Subproject commit e50b74fa3f09573ae7dfdc0367399c8c3a3142ab
Subproject commit a193a4806d285d45872826f20ff29a2977d391f2
Subproject commit e9f91efe53e260be36d1e5528979e19d37519f73
Subproject commit 8ecf062fab988b67afbe407d144e5286a227ccd6
Subproject commit 81640cf25b8fb3dc1afe4e76b52485b049a94654
Subproject commit 960fb2f819c53a193b48c046da34f48d0a555609
Subproject commit f06fb3541087605e4174bf2e80bf11b160be0db2
Subproject commit 4333f143fdc0b240b98cd81322df02ac52389aee
Subproject commit c791fe4dd44b628ac750cbc38b86f7178a258b43
Subproject commit 366dfc9e8119c3cf1718cf81cd32fe89305bbf79
Subproject commit 7254a9edc9cc53cc6817e303c4ee7aa193395fb9
Subproject commit 9289e83ded03168c9f67873845c9dc985a8d3354
Subproject commit a23f6c287730d75d41e1abcc64961322445401ed
Subproject commit 18fcc67425c0fbad7086474e64c88e24c90e8796
Subproject commit bc2040c816985ad576a1d65276b645d62babcfdd
Subproject commit 6e6395ba9520e14ffcf7e335981873642ec96dca
Subproject commit 1f7920ee154adcf56f93c454922e1c8b8cfa8f6d
Subproject commit 3194fc78f8c8962de7e58985b6fd778ce6e11368
Subproject commit 77a68b5b49acc3c7eaf3ca4f3b9bece404895081
Subproject commit ab571e46af955348b65e87d24150ace258aae79c
Subproject commit 554d007ff2204ab63b3aa9e39fa9e483c22ca39f
Subproject commit 598892c8ca7236f303ad1e1607656806f5708366
Subproject commit 69b0bf2c2d53f142ab02dc57b06bb4d9c90fcdb0
Subproject commit 38c0597d4b93701d793b12c11cce406053f64b4c
Subproject commit 8d163332e8de7e00e7338cd9828a6ad0fac864df
Subproject commit 445adcddef9cdcd36a51ef2c74d440f8be7f820f
Subproject commit 4f9984446624d38445a2efec20772bc52a272bdb
......@@ -59,15 +59,19 @@ sipRes = aReturnListPt;
SIP_PYOBJECT addOp(SoftOpId,const alias&,int stage);
%MethodCode
SoftOpInstance anInstance;
TRY
sipCpp->addOp(a0,*a1,a2,anInstance);
INSTANCE_2_SoftOp
CATCH
%End
void delOp(const alias&);
SIP_PYOBJECT getOpClass(const alias&) const;
%MethodCode
SoftOpInstance anInstance;
TRY
sipCpp->getOpClass(*a0,anInstance);
INSTANCE_2_SoftOp
CATCH
%End
void setEndLinkTaskCallback(TaskEventCallback *aCbk);
......@@ -115,5 +119,17 @@ INSTANCE_2_SoftOp
Py_INCREF(Py_None); \
sipRes = Py_None; \
}
#define TRY try \
{
#define CATCH \
} \
catch(Exception &exp) \
{ \
const std::string& tmpString = exp.getErrMsg(); \
const char *detail = tmpString.c_str(); \
PyErr_SetString(sipException_Exception, detail); \
return NULL; \
}
%End
};
......@@ -30,6 +30,7 @@ static SoftOpKey SoftOpTable[] = {
SoftOpKey(FLIP,"Flip"),
SoftOpKey(MASK,"Mask"),
SoftOpKey(ROICOUNTERS,"Roi counters"),
SoftOpKey(ROI2SPECTRUM,"Roi 2 spectrum"),
SoftOpKey(SOFTROI,"Software roi"),
SoftOpKey(USER_LINK_TASK,"User link task"),
SoftOpKey(USER_SINK_TASK,"User sink task"),
......@@ -136,6 +137,9 @@ void SoftOpExternalMgr::addOp(SoftOpId aSoftOpId,
newInstance.m_opt = new SoftOpMask();
newInstance.m_linkable = true;
break;
case ROI2SPECTRUM:
newInstance.m_opt = new SoftOpRoi2Spectrum();
break;
case SOFTROI:
newInstance.m_opt = new SoftOpSoftRoi();
newInstance.m_linkable = true;
......@@ -148,7 +152,7 @@ void SoftOpExternalMgr::addOp(SoftOpId aSoftOpId,
newInstance.m_opt = new SoftUserSinkTask();
break;
default:
throw LIMA_CTL_EXC(InvalidValue,"Not yet managed");
THROW_CTL_ERROR(InvalidValue) << "Not yet managed";
}
std::pair<Stage2Instance::iterator,bool> aResult =
m_stage2instance.insert(std::pair<stage,std::list<SoftOpInstance> >(aStage,std::list<SoftOpInstance>()));
......@@ -269,6 +273,7 @@ void SoftOpExternalMgr::_checkIfPossible(SoftOpId aSoftOpId,
case ROICOUNTERS:
case BPM:
case USER_SINK_TASK:
case ROI2SPECTRUM:
break; // always possible
case BACKGROUNDSUBSTRACTION:
case BINNING:
......@@ -280,7 +285,7 @@ void SoftOpExternalMgr::_checkIfPossible(SoftOpId aSoftOpId,
checkLinkable = true;
break;
default:
throw LIMA_CTL_EXC(InvalidValue,"Not yet managed");
THROW_CTL_ERROR(InvalidValue) << "Not yet managed";
}
DEB_TRACE() << DEB_VAR1(checkLinkable);
......@@ -298,7 +303,7 @@ void SoftOpExternalMgr::_checkIfPossible(SoftOpId aSoftOpId,
char buffer[256];
snprintf(buffer,sizeof(buffer),"%s task %s is already active on that level",
k->m_key.m_name,k->m_alias.c_str());
throw LIMA_CTL_EXC(Error,buffer);
THROW_CTL_ERROR(Error) << buffer;
}
}
}
......
......@@ -418,7 +418,7 @@ void SoftOpRoi2Spectrum::del(const std::list<int> &roiIds)
AutoMutex aLock(m_cond.mutex());
std::list<int>::iterator i = aTmpList.begin();
std::list<ManagerNCounter>::iterator k = m_manager_tasks.begin();
for(int index = 1;i != aTmpList.end() && k != m_manager_tasks.end();++i)
for(int index = 0;i != aTmpList.end() && k != m_manager_tasks.end();++i)
{
while(index != *i && k != m_manager_tasks.end())
++k,++index;
......@@ -456,7 +456,7 @@ void SoftOpRoi2Spectrum::getRoiMode(std::list<int> &aReturnList) const
void SoftOpRoi2Spectrum::setRoiMode(int roiId,int mode)
{
AutoMutex aLock(m_cond.mutex());
int rId = 1;
int rId = 0;
for(std::list<ManagerNCounter>::const_iterator i = m_manager_tasks.begin();
i != m_manager_tasks.end();++i,++rId)
{
......@@ -514,7 +514,7 @@ void SoftOpRoi2Spectrum::getBufferSize(int &size) const
void SoftOpRoi2Spectrum::readCounters(int from,std::list<RoiIdAndResults> &result) const
{
AutoMutex aLock(m_cond.mutex());
int roiIndex = 1;
int roiIndex = 0;
for(std::list<ManagerNCounter>::const_iterator i = m_manager_tasks.begin();
i != m_manager_tasks.end();++i,++roiIndex)
{
......@@ -527,7 +527,7 @@ void SoftOpRoi2Spectrum::readCounters(int from,std::list<RoiIdAndResults> &resul
void SoftOpRoi2Spectrum::createImage(int roiId,int &from,Data &aData) const
{
AutoMutex aLock(m_cond.mutex());
int roiIndex = 1;
int roiIndex = 0;
for(std::list<ManagerNCounter>::const_iterator i = m_manager_tasks.begin();
i != m_manager_tasks.end();++i,++roiIndex)
{
......
......@@ -426,10 +426,8 @@ void CtAccumulation::registerThresholdCallback(ThresholdCallback &cb)
m_cond.wait();
if(m_threshold_cb)
{
DEB_ERROR() << "ThresholdCallback already registered";
throw LIMA_CTL_EXC(InvalidValue, "ThresholdCallback already registered");
}
THROW_CTL_ERROR(InvalidValue) << "ThresholdCallback already registered";
m_threshold_cb = &cb;
}
......@@ -443,10 +441,8 @@ void CtAccumulation::unregisterThresholdCallback(ThresholdCallback &cb)
m_cond.wait();
if(m_threshold_cb != &cb)
{
DEB_ERROR() << "ThresholdCallback not registered";
throw LIMA_CTL_EXC(InvalidValue, "ThresholdCallback not registered");
}
THROW_CTL_ERROR(InvalidValue) << "ThresholdCallback not registered";
m_threshold_cb = NULL;
}
......
......@@ -28,13 +28,13 @@
{ \
DEB_ERROR() << "Specified " << DEB_VAR1(val) << " too short: " \
<< DEB_VAR1(m_valid_ranges.min_exp_time); \
throw LIMA_CTL_EXC(InvalidValue, "Exposure time too short"); \
THROW_CTL_ERROR(InvalidValue) << "Exposure time too short"; \
} \
else if (val > m_valid_ranges.max_exp_time) \
{ \
DEB_ERROR() << "Specified " << DEB_VAR1(val) << " too long: " \
<< DEB_VAR1(m_valid_ranges.max_exp_time); \
throw LIMA_CTL_EXC(InvalidValue, "Exposure time too long"); \
THROW_CTL_ERROR(InvalidValue) << "Exposure time too long"; \
}
using namespace lima;
......@@ -70,7 +70,7 @@ CtAcquisition::CtAcquisition(HwInterface *hw) :
DEB_CONSTRUCTOR();
if (!hw->getHwCtrlObj(m_hw_sync))
throw LIMA_CTL_EXC(Error, "Cannot get hardware sync object");
THROW_CTL_ERROR(Error) << "Cannot get hardware sync object";
m_valid_ranges_cb = new _ValidRangesCallback(*this);
m_hw_sync->getValidRanges(m_valid_ranges);
......@@ -480,7 +480,7 @@ void CtAcquisition::setLatencyTime(double lat_time)
if (lat_time < m_valid_ranges.min_lat_time)
lat_time = m_valid_ranges.min_lat_time;
if (lat_time > m_valid_ranges.max_lat_time)
throw LIMA_CTL_EXC(InvalidValue, "Latency time too long");
THROW_CTL_ERROR(InvalidValue) << "Latency time too long";
m_inpars.latencyTime= lat_time;
}
......
......@@ -58,7 +58,7 @@ CtBuffer::CtBuffer(HwInterface *hw)
DEB_CONSTRUCTOR();
if (!hw->getHwCtrlObj(m_hw_buffer))
throw LIMA_CTL_EXC(Error, "Cannot get hardware buffer object");
THROW_CTL_ERROR(Error) << "Cannot get hardware buffer object";
m_hw_buffer_cb = m_hw_buffer->getBufferCallback();
if(m_hw_buffer_cb)
......@@ -151,7 +151,7 @@ void CtBuffer:: setMaxMemory(short max_memory)
DEB_PARAM() << DEB_VAR1(max_memory);
if ((max_memory<1)||(max_memory>100))
throw LIMA_CTL_EXC(InvalidValue, "Max memory usage between 1 and 100");
THROW_CTL_ERROR(InvalidValue) << "Max memory usage between 1 and 100";
m_pars.maxMemory= max_memory;
}
......
......@@ -201,10 +201,10 @@ void CtControl::prepareAcq()
getStatus(aStatus);
if(aStatus.AcquisitionStatus == AcqRunning)
throw LIMA_CTL_EXC(Error,"Acquisition not finished");
THROW_CTL_ERROR(Error) << "Acquisition not finished";
if(aStatus.AcquisitionStatus == AcqConfig)
throw LIMA_CTL_EXC(Error,"Configuration not finished");
THROW_CTL_ERROR(Error) << "Configuration not finished";
resetStatus(false);
......@@ -288,7 +288,7 @@ void CtControl::startAcq()
DEB_MEMBER_FUNCT();
if (!m_ready)
throw LIMA_CTL_EXC(Error, "Run prepareAcq before starting acquisition");
THROW_CTL_ERROR(Error) << "Run prepareAcq before starting acquisition";
m_running = true;
TrigMode trigMode;
m_ct_acq->getTriggerMode(trigMode);
......@@ -301,7 +301,7 @@ void CtControl::startAcq()
HwInterface::Status hwStatus;
m_hw->getStatus(hwStatus);
if(hwStatus.det != DetIdle)
throw LIMA_CTL_EXC(Error, "Try to restart before detector is ready");
THROW_CTL_ERROR(Error) << "Try to restart before detector is ready";
//m_ready = false after the last image is triggerred
int nbFrames4Acq;
......@@ -443,9 +443,9 @@ void CtControl::ReadImage(Data &aReturnData,long frameNumber,
else
{
if(frameNumber < m_status.ImageCounters.LastImageReady - m_images_buffer_size)
throw LIMA_CTL_EXC(Error,"Frame no more available");
THROW_CTL_ERROR(Error) << "Frame no more available";
else
throw LIMA_CTL_EXC(Error,"Frame not available yet");
THROW_CTL_ERROR(Error) << "Frame not available yet";
}
}
else
......@@ -479,9 +479,9 @@ void CtControl::ReadBaseImage(Data &aReturnData,long frameNumber,
if (frameNumber < 0) {
frameNumber = lastFrame - (readBlockLen - 1);
if (frameNumber < 0)
throw LIMA_CTL_EXC(Error, "Frame(s) not available yet");
THROW_CTL_ERROR(Error) << "Frame(s) not available yet";
} else if (frameNumber + readBlockLen - 1 > lastFrame)
throw LIMA_CTL_EXC(Error, "Frame(s) not available yet");
THROW_CTL_ERROR(Error) << "Frame(s) not available yet";
aLock.unlock();
m_ct_buffer->getFrame(aReturnData,frameNumber,readBlockLen);
......@@ -491,7 +491,7 @@ void CtControl::ReadBaseImage(Data &aReturnData,long frameNumber,
int roiHeight = img_dim.getSize().getHeight() * readBlockLen;
if((roiWidth * roiHeight) >
(aReturnData.dimensions[0] * aReturnData.dimensions[1]))
throw LIMA_CTL_EXC(Error, "Roi dim > HwBuffer dim");
THROW_CTL_ERROR(Error) << "Roi dim > HwBuffer dim";
aReturnData.dimensions[0] = roiWidth;
aReturnData.dimensions[1] = roiHeight;
......@@ -733,7 +733,7 @@ void CtControl::registerImageStatusCallback(ImageStatusCallback& cb)
if (m_img_status_cb) {
DEB_ERROR() << "ImageStatusCallback already registered";
throw LIMA_CTL_EXC(InvalidValue, "ImageStatusCallback already registered");
THROW_CTL_ERROR(InvalidValue) << "ImageStatusCallback already registered";
}
cb.setImageStatusCallbackGen(this);
......@@ -747,7 +747,7 @@ void CtControl::unregisterImageStatusCallback(ImageStatusCallback& cb)
if (m_img_status_cb != &cb) {
DEB_ERROR() << "ImageStatusCallback not registered";
throw LIMA_CTL_EXC(InvalidValue, "ImageStatusCallback not registered");
THROW_CTL_ERROR(InvalidValue) << "ImageStatusCallback not registered";
}
m_img_status_cb = NULL;
......
......@@ -92,9 +92,9 @@ void CtSwBinRoiFlip::setRoi(const Roi& roi)
DEB_PARAM() << DEB_VAR1(roi);
if (roi.isEmpty())
throw LIMA_CTL_EXC(InvalidValue, "Software roi is empty");
THROW_CTL_ERROR(InvalidValue) << "Software roi is empty";
if (!m_max_roi.containsRoi(roi))
throw LIMA_CTL_EXC(InvalidValue, "Roi out of limts");
THROW_CTL_ERROR(InvalidValue) << "Roi out of limts";
m_roi= roi;
}
......@@ -241,24 +241,40 @@ void CtHwBinRoiFlip::setBin(Bin& bin, bool round)
if (!m_has_bin) {
if (!round)
throw LIMA_CTL_EXC(NotSupported, "No hardware binning available");
THROW_CTL_ERROR(NotSupported) << "No hardware binning available";
}
else {
Bin set_bin= bin;
if (!set_bin.isOne())
m_hw_bin->checkBin(set_bin);
if ((!round)&&(set_bin!=bin))
throw LIMA_CTL_EXC(InvalidValue, "Given hardware binning not possible");
THROW_CTL_ERROR(InvalidValue) << "Given hardware binning not possible";
if (set_bin != m_bin) {
Bin old_bin = m_bin;
Roi old_roi = m_set_roi;
Roi old_max_roi = m_max_roi;
if (!m_set_roi.isEmpty())
m_set_roi= m_set_roi.getUnbinned(m_bin);
m_hw_bin->setBin(set_bin);
m_bin= set_bin;
if (!m_bin.isOne() && !m_set_roi.isEmpty())
m_set_roi= m_set_roi.getBinned(m_bin);
m_max_roi.setSize(m_max_size / m_bin);
_updateSize();
try
{
_updateSize();
}
catch(Exception &exc)
{
m_bin = old_bin;
m_set_roi = old_roi;
m_max_roi = old_max_roi;
m_hw_bin->setBin(m_bin);
throw exc;
}
}
bin= set_bin;
}
......@@ -270,20 +286,21 @@ void CtHwBinRoiFlip::setRoi(Roi& roi, bool round)
DEB_PARAM() << DEB_VAR2(roi,round);
if (roi.isEmpty())
throw LIMA_CTL_EXC(InvalidValue, "Hardware roi is empty");
THROW_CTL_ERROR(InvalidValue) << "Hardware roi is empty";
if (!m_max_roi.containsRoi(roi))
throw LIMA_CTL_EXC(InvalidValue, "Roi out of limts");
THROW_CTL_ERROR(InvalidValue) << "Roi out of limts";
if (!m_has_roi) {
if (!round)
throw LIMA_CTL_EXC(NotSupported, "No hardware roi available");
THROW_CTL_ERROR(NotSupported) << "No hardware roi available";
}
else {
Roi real_roi;
m_hw_roi->checkRoi(roi, real_roi);
if ((!round)&&(real_roi!=roi))
throw LIMA_CTL_EXC(InvalidValue, "Given hardware roi not possible");
THROW_CTL_ERROR(InvalidValue) << "Given hardware roi not possible";
if (roi != m_set_roi) {
m_hw_roi->setRoi(roi);
m_set_roi= roi;
_updateSize();
}
......@@ -302,7 +319,7 @@ void CtHwBinRoiFlip::setFlip(Flip& flip, bool mandatory)
if (!m_has_flip)
{
if (mandatory)
throw LIMA_CTL_EXC(NotSupported, "No hardware flip available");
THROW_CTL_ERROR(NotSupported) << "No hardware flip available";
}
else
{
......@@ -310,10 +327,12 @@ void CtHwBinRoiFlip::setFlip(Flip& flip, bool mandatory)
if (set_flip.x || set_flip.y)
m_hw_flip->checkFlip(set_flip);
if (mandatory && set_flip != flip)
throw LIMA_CTL_EXC(InvalidValue, "Given hardware flip not possible");
THROW_CTL_ERROR(InvalidValue) << "Given hardware flip not possible";
if (set_flip != m_flip)
{
m_hw_flip->setFlip(set_flip);
m_flip = set_flip;
}
flip = set_flip;
}
}
......@@ -404,7 +423,7 @@ CtImage::CtImage(HwInterface *hw,CtControl &ct)
DEB_CONSTRUCTOR();
if (!hw->getHwCtrlObj(m_hw_det))
throw LIMA_CTL_EXC(Error, "Cannot get detector info object");
THROW_CTL_ERROR(Error) << "Cannot get detector info object";
m_hw_det->getMaxImageSize(m_max_size);
m_hw_det->getCurrImageType(m_img_type);
......
......@@ -124,8 +124,8 @@ void CtSaving::Parameters::checkValid() const
#ifdef WITH_CBF_SAVING
case CBFFormat :
if(framesPerFile > 1)
throw LIMA_CTL_EXC(InvalidValue, "CBF file format does not support "
"multi frame per file");
THROW_CTL_ERROR(InvalidValue) << "CBF file format does not support "
"multi frame per file";
break;
#endif
#ifndef __unix
......
......@@ -117,13 +117,13 @@ public:
if(_fillHeader(aData,m_header,cbf))
{
cbf_free_handle(cbf);
throw LIMA_CTL_EXC(Error,"Something went wrong during CBF header filling");
THROW_CTL_ERROR(Error) << "Something went wrong during CBF header filling";
}
if(_fillData(aData,cbf))
{
cbf_free_handle(cbf);
throw LIMA_CTL_EXC(Error,"Something went wrong during CBF data filling");
THROW_CTL_ERROR(Error) << "Something went wrong during CBF data filling";
}
m_container._setHandle(aData.frameNumber,cbf);
}
......@@ -250,7 +250,7 @@ void SaveContainerCbf::_writeFile(Data &aData,
CtSaving::FileFormat)
{
if(_writeCbfData(aData))
throw LIMA_CTL_EXC(Error,"Something went wrong during CBF data writing");
THROW_CTL_ERROR(Error) << "Something went wrong during CBF data writing";
}
void SaveContainerCbf::_clear()
......
......@@ -136,7 +136,7 @@ void SaveContainerFits::_writeFile(Data &aData,
bitpixName = "DOUBLE_IMG";
break;
default:
throw LIMA_CTL_EXC(Error, "Can't determine bitpix");
THROW_CTL_ERROR(Error) << "Can't determine bitpix";
}
DEB_TRACE() << "SaveContainerFits::_writeFile(): used bitpix: " << bitpixName << "(" << bitpix << ")";
......@@ -154,7 +154,7 @@ void SaveContainerFits::_writeFile(Data &aData,
}catch(CCfits::FITS::CantCreate)
{
throw LIMA_CTL_EXC(Error, "Can't create FITS file");
THROW_CTL_ERROR(Error) << "Can't create FITS file";
}
delete naxes;
......
......@@ -153,12 +153,12 @@ void SaveContainerNxs::_writeFile(Data &aData,
my_error<<ex.errors[i].desc;
}
DEB_TRACE()<<my_error.str();
throw LIMA_CTL_EXC(Error,my_error.str());
THROW_CTL_ERROR(Error) << my_error.str();
}
catch(...)
{
DEB_TRACE()<<"SaveContainerNxs::_writeFile() - catch UNKNOWN Exception";
throw LIMA_CTL_EXC(Error,"SaveContainerNxs::_writeFile() - catch UNKNOWN Exception");
THROW_CTL_ERROR(Error) << "SaveContainerNxs::_writeFile() - catch UNKNOWN Exception";
}
}
......
......@@ -30,7 +30,7 @@ using namespace lima;
if(m_has_shutter)\
func; \
else\
throw LIMA_CTL_EXC(Error, "No shutter capability");
THROW_CTL_ERROR(Error) << "No shutter capability";
CtShutter::CtShutter(HwInterface *hw)
{
......
......@@ -316,6 +316,7 @@ void CtVideo::getParameters(Parameters &pars) const
void CtVideo::_setLive(bool liveFlag)
{
DEB_MEMBER_FUNCT();
AutoMutex aLock(m_cond.mutex());
while(m_stopping_live) m_cond.wait();
......@@ -326,7 +327,7 @@ void CtVideo::_setLive(bool liveFlag)
CtControl::Status status;
m_ct.getStatus(status);
if(liveFlag && status.AcquisitionStatus != AcqReady)
throw LIMA_CTL_EXC(Error, "Can't set live mode if an acquisition is running");
THROW_CTL_ERROR(Error) << "Can't set live mode if an acquisition is running";
_apply_params(aLock,liveFlag);
......@@ -385,10 +386,11 @@ void CtVideo::getExposure(double &anExposure) const
void CtVideo::setGain(double aGain)
{
DEB_MEMBER_FUNCT();
if(!m_has_video)
throw LIMA_CTL_EXC(Error,"Can't change the gain on Scientific camera");
THROW_CTL_ERROR(Error) << "Can't change the gain on Scientific camera";
if(aGain < 0. || aGain > 1.)
throw LIMA_CTL_EXC(InvalidValue,"Gain should be between 0. and 1.");
THROW_CTL_ERROR(InvalidValue) << "Gain should be between 0. and 1.";
AutoMutex aLock(m_cond.mutex());
m_pars.gain = aGain,m_pars_modify_mask |= PARMODIFYMASK_GAIN;
......@@ -471,7 +473,7 @@ void CtVideo::registerImageCallback(ImageCallback &cb)
if(m_image_callback)
{
DEB_ERROR() << "ImageCallback already registered";
throw LIMA_CTL_EXC(InvalidValue, "ImageCallback already registered");
THROW_CTL_ERROR(InvalidValue) << "ImageCallback already registered";
}
m_image_callback = &cb;
......@@ -486,7 +488,7 @@ void CtVideo::unregisterImageCallback(ImageCallback &cb)
if(m_image_callback != &cb)
{
DEB_ERROR() << "ImageCallback not registered";
throw LIMA_CTL_EXC(InvalidValue, "ImageCallback not registered");
THROW_CTL_ERROR(InvalidValue) << "ImageCallback not registered";
}
m_image_callback = NULL;
......@@ -522,8 +524,7 @@ void CtVideo::getSupportedVideoMode(std::list<VideoMode> &modeList)
case Bpp32S:
modeList.push_back(Y32); break;
default:
DEB_ERROR() << "Image type not yet managed";
throw LIMA_CTL_EXC(Error, "Image type not yet managed");
THROW_CTL_ERROR(Error) << "Image type not yet managed";
}
}
}
......
......@@ -61,12 +61,7 @@ GLOB_PYTHON_ENV = \(os.environ\['LIMA_LINK_STRICT_VERSION'\][ \t]*=[ \t]*\)
GLOB_PYTHON_INIT_SED = "s/$(GLOB_PYTHON_ENV)'[A-Z]\+'/\1$(ENV_LINK_STRICT_VER)/"
CORE_VERSION_NAME = common/VERSION
install_core_dep = \
(diff $(CORE_VERSION_NAME) $(1)/python/CORE_VERSION > /dev/null 2>&1 || \
(echo "* Manually updating $(1)/python/CORE_VERSION from" \
"$(CORE_VERSION_NAME)" && \
cp $(CORE_VERSION_NAME) $(1)/python/CORE_VERSION)) && \
cp $(1)/python/CORE_VERSION $(2)
install_core_dep = cp $(CORE_VERSION_NAME) $(1)/CORE_VERSION
ifneq ($(COMPILE_CORE), 0)
INSTALL_CORE_DIR = $(INSTALL_PLAT_DIR)/Core
......@@ -81,12 +76,7 @@ INSTALL_SIMU_VDIR = $(INSTALL_SIMU_DIR)/v$(SIMU_FULL_VERSION)
endif
ESPIA_VERSION_NAME = camera/common/espia/VERSION
install_espia_dep = \
(diff $(ESPIA_VERSION_NAME) $(1)/python/ESPIA_VERSION > /dev/null 2>&1 || \
(echo "* Manually updating $(1)/python/ESPIA_VERSION from" \
"$(ESPIA_VERSION_NAME)" && \
cp $(ESPIA_VERSION_NAME) $(1)/python/ESPIA_VERSION)) && \
cp $(1)/python/ESPIA_VERSION $(2)
install_espia_dep = cp $(ESPIA_VERSION_NAME) $(1)/ESPIA_VERSION
ifneq ($(COMPILE_ESPIA), 0)
INSTALL_ESPIA_DIR = $(INSTALL_PLAT_DIR)/Espia
......@@ -235,7 +225,7 @@ endif
ifneq ($(COMPILE_SIMULATOR), 0)
mkdir -p $(INSTALL_SIMU_VDIR)
cp camera/simulator/python/__init__.py $(INSTALL_SIMU_DIR)
$(call install_core_dep,camera/simulator,$(INSTALL_SIMU_VDIR))
$(call install_core_dep,$(INSTALL_SIMU_VDIR))
rm -rf $(INSTALL_LIB_DIR)/liblimasimulator.so*
cp -d build/liblimasimulator.so* $(INSTALL_LIB_DIR)
cp sip/simulator/limasimulator.so $(INSTALL_SIMU_VDIR)
......@@ -244,7 +234,7 @@ endif
ifneq ($(COMPILE_ESPIA), 0)
mkdir -p $(INSTALL_ESPIA_VDIR)
cp camera/common/espia/python/__init__.py $(INSTALL_ESPIA_DIR)
$(call install_core_dep,camera/common/espia,$(INSTALL_ESPIA_VDIR))
$(call install_core_dep,$(INSTALL_ESPIA_VDIR))
rm -rf $(INSTALL_LIB_DIR)/liblimaespia.so*
cp -d build/liblimaespia.so* $(INSTALL_LIB_DIR)
cp sip/espia/limaespia.so $(INSTALL_ESPIA_VDIR)
......@@ -253,7 +243,7 @@ endif
ifneq ($(COMPILE_FRELON), 0)
mkdir -p $(INSTALL_FRELON_VDIR)
cp camera/frelon/python/__init__.py $(INSTALL_FRELON_DIR)
$(call install_espia_dep,camera/frelon,$(INSTALL_FRELON_VDIR))
$(call install_espia_dep,$(INSTALL_FRELON_VDIR))
rm -rf $(INSTALL_LIB_DIR)/liblimafrelon.so*
cp -d build/liblimafrelon.so* $(INSTALL_LIB_DIR)
cp sip/frelon/limafrelon.so $(INSTALL_FRELON_VDIR)
......@@ -263,7 +253,7 @@ endif
ifneq ($(COMPILE_MAXIPIX), 0)
mkdir -p $(INSTALL_MAXIPIX_VDIR)
cp camera/maxipix/python/__init__.py $(INSTALL_MAXIPIX_DIR)
$(call install_espia_dep,camera/maxipix,$(INSTALL_MAXIPIX_VDIR))
$(call install_espia_dep,$(INSTALL_MAXIPIX_VDIR))
rm -rf $(INSTALL_LIB_DIR)/liblimamaxipix.so*
cp -d build/liblimamaxipix.so* $(INSTALL_LIB_DIR)
cp sip/maxipix/limamaxipix.so $(INSTALL_MAXIPIX_VDIR)
......@@ -273,14 +263,14 @@ endif
ifneq ($(COMPILE_PILATUS), 0)
mkdir -p $(INSTALL_PILATUS_VDIR)
cp camera/pilatus/python/__init__.py $(INSTALL_PILATUS_DIR)
$(call install_core_dep,camera/pilatus,$(INSTALL_PILATUS_VDIR))
$(call install_core_dep,$(INSTALL_PILATUS_VDIR))
cp camera/pilatus/python/*.py $(INSTALL_PILATUS_VDIR)
cp camera/pilatus/include/*.h $(INSTALL_INCLUDE_DIR)
endif
ifneq ($(COMPILE_BASLER), 0)
mkdir -p $(INSTALL_BASLER_VDIR)
cp camera/basler/python/__init__.py $(INSTALL_BASLER_DIR)
$(call install_core_dep,camera/basler,$(INSTALL_BASLER_VDIR))
$(call install_core_dep,$(INSTALL_BASLER_VDIR))
rm -rf $(INSTALL_LIB_DIR)/liblimabasler.so*
cp -d build/liblimabasler.so* $(INSTALL_LIB_DIR)
cp sip/basler/limabasler.so $(INSTALL_BASLER_VDIR)
......@@ -289,7 +279,7 @@ endif
ifneq ($(COMPILE_PROSILICA), 0)
mkdir -p $(INSTALL_PROSILICA_VDIR)
cp camera/prosilica/python/__init__.py $(INSTALL_PROSILICA_DIR)
$(call install_core_dep,camera/prosilica,$(INSTALL_PROSILICA_VDIR))
$(call install_core_dep,$(INSTALL_PROSILICA_VDIR))
rm -rf $(INSTALL_LIB_DIR)/liblimaprosilica.so*
rm -rf $(INSTALL_LIB_DIR)/libPvAPI.so
cp -d build/liblimaprosilica.so* $(INSTALL_LIB_DIR)
......@@ -313,7 +303,7 @@ endif
ifneq ($(COMPILE_ROPERSCIENTIFIC), 0)
mkdir -p $(INSTALL_ROPERSCIENTIFIC_VDIR)
cp camera/roperscientific/python/__init__.py $(INSTALL_ROPERSCIENTIFIC_DIR)
$(call install_core_dep,camera/roperscientific,$(INSTALL_ROPERSCIENTIFIC_VDIR))
$(call install_core_dep,$(INSTALL_ROPERSCIENTIFIC_VDIR))
rm -rf $(INSTALL_LIB_DIR)/liblimaroperscientific.so*
cp -d build/liblimaroperscientific.so* $(INSTALL_LIB_DIR)
cp sip/roperscientific/limaroperscientific.so $(INSTALL_ROPERSCIENTIFIC_VDIR)
......@@ -323,7 +313,7 @@ endif
ifneq ($(COMPILE_ADSC), 0)
mkdir -p $(INSTALL_ADSC_VDIR)
cp camera/adsc/python/__init__.py $(INSTALL_ADSC_DIR)
$(call install_core_dep,camera/adsc,$(INSTALL_ADSC_VDIR))
$(call install_core_dep,$(INSTALL_ADSC_VDIR))
rm -rf $(INSTALL_LIB_DIR)/liblimaadsc.so*
cp -d build/liblimaadsc.so* $(INSTALL_LIB_DIR)
cp sip/adsc/limaadsc.so $(INSTALL_ADSC_VDIR)
......@@ -335,7 +325,7 @@ endif
ifneq ($(COMPILE_MYTHEN), 0)
mkdir -p $(INSTALL_MYTHEN_VDIR)
cp camera/mythen/python/__init__.py $(INSTALL_MYTHEN_DIR)
$(call install_core_dep,camera/mythen,$(INSTALL_MYTHEN_VDIR))
$(call install_core_dep,$(INSTALL_MYTHEN_VDIR))
rm -rf $(INSTALL_LIB_DIR)/liblimamythen.so*
cp -d build/liblimamythen.so* $(INSTALL_LIB_DIR)
cp sip/mythen/limamythen.so $(INSTALL_MYTHEN_VDIR)
......@@ -345,7 +335,7 @@ endif
ifneq ($(COMPILE_UEYE), 0)
mkdir -p $(INSTALL_UEYE_VDIR)
cp camera/ueye/python/__init__.py $(INSTALL_UEYE_DIR)
$(call install_core_dep,camera/ueye,$(INSTALL_UEYE_VDIR))
$(call install_core_dep,$(INSTALL_UEYE_VDIR))
cp camera/ueye/python/CORE_VERSION
rm -rf $(INSTALL_LIB_DIR)/liblimaueye.so*
cp -d build/liblimaueye.so* $(INSTALL_LIB_DIR)
......@@ -355,7 +345,7 @@ endif
ifneq ($(COMPILE_ANDOR), 0)
mkdir -p $(INSTALL_ANDOR_VDIR)
cp camera/andor/python/__init__.py $(INSTALL_ANDOR_DIR)
$(call install_core_dep,camera/andor,$(INSTALL_ANDOR_VDIR))
$(call install_core_dep,$(INSTALL_ANDOR_VDIR))
rm -rf $(INSTALL_LIB_DIR)/liblimaandor.so*
cp -d build/liblimaandor.so* $(INSTALL_LIB_DIR)
cp sip/andor/limaandor.so $(INSTALL_ANDOR_VDIR)
......@@ -365,7 +355,7 @@ endif
ifneq ($(COMPILE_XPAD), 0)
mkdir -p $(INSTALL_XPAD_VDIR)
cp camera/xpad/python/__init__.py $(INSTALL_XPAD_DIR)
$(call install_core_dep,camera/xpad,$(INSTALL_XPAD_VDIR))
$(call install_core_dep,$(INSTALL_XPAD_VDIR))
rm -rf $(INSTALL_LIB_DIR)/liblimaxpad.so*
cp -d build/liblimaxpad.so* $(INSTALL_LIB_DIR)
cp sip/xpad/limaxpad.so $(INSTALL_XPAD_VDIR)
......
Subproject commit cc6d35b74aa0128ed2fba6b6016338f10fdbd92c
Subproject commit 9e260eba6f52bd0118eeed3f26733dcdf80e7b35