Commit b433b320 authored by legoc's avatar legoc

Merge branch 'V3.2_191'

parents 5624a7fd 9b357b53
......@@ -1346,5 +1346,7 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject>
To compile and install the modules:
./build.sh
cd build
make mod
To compile and install the modules:
./build.sh
cd build
make mod
......@@ -33,6 +33,7 @@ using namespace boost;
#include <sstream>
#include <iostream>
#include <cmath>
#include <ctime>
using namespace std;
......@@ -726,6 +727,11 @@ void Count::start() {
gateStart();
m_GateStarting = false;
// Set time absolute from midnight
time_t now = ::time(nullptr);
tm *ltm = localtime(&now);
timeabs.update(ltm->tm_hour * 3600 + ltm->tm_min * 60 + ltm->tm_sec);
if (isStopped() == true) {
break;
}
......@@ -999,20 +1005,20 @@ void Count::logCount() {
if (BaseLogProperties::useMainSampleTemp() == true) {
logStream << " TT: " << logMainSampleTemperature();
sstitle << " TT ";
ssvalues << " " << logMainSampleTemperature();
//sstitle << " TT ";
//ssvalues << " " << logMainSampleTemperature();
}
if (BaseLogProperties::useSecSampleTemp() == true) {
logStream << " TT2: " << logSecondarySampleTemperature();
sstitle << " TT2 ";
ssvalues << " " << logSecondarySampleTemperature();
//sstitle << " TT2 ";
//ssvalues << " " << logSecondarySampleTemperature();
}
if (BaseLogProperties::useMagField() == true) {
logStream << " MAG: " << logMagneticField();
sstitle << " MAG ";
ssvalues << " " << logMagneticField();
//sstitle << " MAG ";
//ssvalues << " " << logMagneticField();
}
} else if (logStyle() == DIFF_LOG_STYLE) {
......
......@@ -35,7 +35,7 @@ void CountProperties::init(const std::string& name) {
currentTotalReps.init(this, NOSAVE | SPY, "currenttotalrepetition", "ActualRepet");
currentLocalReps.init(this, NOSAVE | SPY, "currentlocalrepetition", "ActualRepaint");
saveData.init(this, SAVE, "savedata");
statusMessage.init(this, NOSAVE, "status_message");
statusMessage.init(this, NOSAVE | SPY, "status_message");
logStyle.init(this, SAVE, "log_style");
logTitle.init(this, NOSAVE, "log_title");
logValues.init(this, NOSAVE, "log_values");
......@@ -62,6 +62,7 @@ void CountProperties::init(const std::string& name) {
subtitle.init(this, SAVE, "subtitle");
allowUserPreset.init(this, SAVE, "allow_user_preset");
time.init(this, SAVE | SPY, "actual_time", "wanted_time", "Time");
time1.init(this, NOSAVE, "actual_time_1", "wanted_time_1", "Time1");
time10.init(this, NOSAVE, "actual_time_10", "wanted_time_10", "Time10");
time100.init(this, NOSAVE, "actual_time_100", "wanted_time_100", "Time100");
time1000.init(this, NOSAVE, "actual_time_1000", "wanted_time_1000", "Time1000");
......@@ -76,6 +77,7 @@ void CountProperties::init(const std::string& name) {
actualMaster.init(this, NOSAVE, "actual_master");
inhibitTime.init(this, NOSAVE, "inhibit_time");
acquisitionMode.init(this, NOSAVE, "acquisition_mode");
timeabs.init(this, NOSAVE, "timeabs");
enableListMode.init(this, SAVE, "enable_listmode");
useListMode.init(this, SAVE, "use_listmode");
......
......@@ -75,6 +75,7 @@ public:
// Gate
Property<float64, SETPOINT> time;
Property<float64, SETPOINT> time1;
Property<float64, SETPOINT> time10;
Property<float64, SETPOINT> time100;
Property<float64, SETPOINT> time1000;
......@@ -89,6 +90,7 @@ public:
Property<float64> actualMaster; //! actual master time, counts, counts2....
Property<float64> inhibitTime;
Property<int32> acquisitionMode;
Property<int32> timeabs;
Property<bool> enableListMode;
Property<bool> useListMode;
......
......@@ -197,7 +197,7 @@ public:
Property<std::string> day; //! Day property
Property<std::string> time; //! Day property
Property<int32> numor; //! Data numor property
Property<std::string> experimentNumber; //! Experiment number property name
Property<std::string> experimentNumber; //! Experiment number property name aka proposal code
Property<std::string> cycleId; // current cycle id (format YY + index)
Property<std::string> cycleName; // current cycle id (format YY + index)
Property<std::string> year; // current year (format YYYY)
......@@ -352,6 +352,9 @@ private:
void writeMailingListToFile();
// Notifies by sending an email to the mailing list the start of the proposal.
void sendMailChangeOfProposal();
time_t m_LastTime; //! Last data saved time
bool m_FileOpen; //! Data file is opened
bool m_FileReady; //! Data file is ready
......@@ -399,6 +402,7 @@ private:
static const std::string histo_path;
std::string m_testMode;
std::string m_mockMode;
};
}
......
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
#include "KineticExternalCount.h"
using namespace std;
namespace acquisition {
const string KineticExternalCount::TYPE = "kineticexternal_acquisition";
/*
* Constructor
*/
KineticExternalCount::KineticExternalCount(const std::string& name) :
Count(name) {
registerFunction(TYPE);
nbSlices.init(this, SAVE, "nb_slices" , "wanted_nb_slices" , "NbSlices" );
}
/*
* postConfiguration
*/
void KineticExternalCount::postConfiguration() {
Count::postConfiguration();
m_KineticExternalAcquisitionControllers.resize(nDetectors());
for (int32 i = 0; i < nDetectors(); ++i) {
m_KineticExternalAcquisitionControllers[i].copy(acquisitionControllers[i]);
}
/*registerUpdater(m_KineticAcquisitionControllers[0]->time, &KineticExternalCount::updateActualTime, this);
registerUpdater(m_KineticAcquisitionControllers[0]->timeSetPoint, &KineticExternalCount::updateTimeSetPoint, this);
registerUpdater(m_KineticAcquisitionControllers[0]->nbRepaint, &KineticExternalCount::updateNbRepaint, this);*/
}
/*
* computeEstimatedValue
*/
float64 KineticExternalCount::computeEstimatedValue(float64 sum) const {
float64 finalsum = 0;
// Calculate estimated time
return finalsum;
}
/*
* updateActualTime
*/
void KineticExternalCount::updateActualTime() {
if (m_Counting) {
if ((m_UseMasterAcq == true) || (m_UseMpda == true)) {
time = m_KineticExternalAcquisitionControllers[0]->time();
}
else {
}
actualMaster.update(time() * 10);
time10 = time() * 10;
time100 = time() * 100;
time1000 = time() * 1000;
calculateRemaining(m_TimeSetPointSecond);
Count::updateActualTime(time());
}
}
/*
* updateTimeSetPoint
void KineticExternalCount::updateTimeSetPoint() {
m_TimeSetPointSecond = m_KineticAcquisitionControllers[0]->timeSetPoint();
time.setpoint = m_TimeSetPointSecond;
}
* updateNbRepaint
void KineticExternalCount::updateNbRepaint() {
currentLocalReps = m_KineticAcquisitionControllers[0]->nbRepaint();
}
*/
/*
* logIntro
*/
void KineticExternalCount::logIntro(std::stringstream& astream) {
/* astream << slicesFile();
if (localReps() > 1) {