Commit 33f27dae authored by Andrea Orlat's avatar Andrea Orlat
Browse files

addressed issue 255, implemented support for the external tool, named...

addressed issue 255, implemented support for the external tool, named Finalizer in order to enalbe data archiving
parent 4a40809c
Loading
Loading
Loading
Loading
+13 −12
Original line number Diff line number Diff line
@@ -120,33 +120,34 @@ module Management {
		
		/**
		 * When this method is called the DataReceiver should prepare to start a new scan.
		 * @prm extra parameters to allow the scan preparation
		 * @thorw ComponentErrors::ComponentErrorsEx
		 * @thorw ManagementErrors::ManagementErrorsEx
		 * @thorw CORBA::SystemExcpetion
		 * @param extra parameters to allow the scan preparation
		 * @throw ComponentErrors::ComponentErrorsEx
		 * @throw ManagementErrors::ManagementErrorsEx
		 * @throw CORBA::SystemExcpetion
		 * @return the name of the folder containing the currently processed scan
		 */
		void startScan(in TScanSetup prm) raises (ComponentErrors::ComponentErrorsEx,ManagementErrors::ManagementErrorsEx);
		string startScan(in TScanSetup prm) raises (ComponentErrors::ComponentErrorsEx,ManagementErrors::ManagementErrorsEx);
		
		/**
		 * When required it can be used to pass extra configuration to the data receiver.
		 * @param layout  sequence of strings that contains the extra configuration
		 * @thorw ComponentErrors::ComponentErrorsEx
		 * @thorw ManagementErrors::ManagementErrorsEx
		 * @thorw CORBA::SystemExcpetion
		 * @throw ComponentErrors::ComponentErrorsEx
		 * @throw ManagementErrors::ManagementErrorsEx
		 * @throw CORBA::SystemExcpetion
		 */
		void setScanLayout(in ACS::stringSeq layout) raises (ComponentErrors::ComponentErrorsEx,ManagementErrors::ManagementErrorsEx);
		
		/**
		 * When this method is called the DataReceiver should prepare to close the current scan.
		 * @thorw ComponentErrors::ComponentErrorsEx
		 * @thorw ManagementErrors::ManagementErrorsEx
		 * @thorw CORBA::SystemExcpetion
		 * @throw ComponentErrors::ComponentErrorsEx
		 * @throw ManagementErrors::ManagementErrorsEx
		 * @throw CORBA::SystemExcpetion
		 */
		void stopScan() raises (ComponentErrors::ComponentErrorsEx,ManagementErrors::ManagementErrorsEx);
		
		/**
		 * When this method is called the DataReceiver should prepare to start a new subscan.
		 * @prm extra parameters to allow the subscan preparation
		 * @param extra parameters to allow the subscan preparation
		 * @throw ComponentErrors::ComponentErrorsEx
		 * @throw ManagementErrors::ManagementErrorsEx
		 * @throw CORBA::SystemExcpetion
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ class CalibrationToolImpl : public virtual BulkDataReceiverImpl<CalibrationTool_
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ManagementErrors::ManagementErrorsEx
	 */
	virtual void startScan(const Management::TScanSetup & prm) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ManagementErrors::ManagementErrorsEx);
	virtual char *startScan(const Management::TScanSetup & prm) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ManagementErrors::ManagementErrorsEx);

    /**
	 * called to give extra information about scan layout. Not used by this component.
+5 −1
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ void CalibrationToolImpl::aboutToAbort()
	delete m_data;
}

void CalibrationToolImpl::startScan(const Management::TScanSetup & prm) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ManagementErrors::ManagementErrorsEx)
char *CalibrationToolImpl::startScan(const Management::TScanSetup & prm) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ManagementErrors::ManagementErrorsEx)
{
	//CSecAreaResourceWrapper<CalibrationTool_private::CDataCollection> data=m_dataWrapper->Get();
	bool rec,inc;
@@ -224,6 +224,10 @@ void CalibrationToolImpl::startScan(const Management::TScanSetup & prm) throw (C
		throw impl.getComponentErrorsEx();
	}
	ACS_LOG(LM_FULL_INFO,"CalibrationToolImpl::startScan()",(LM_DEBUG,"START_SCAN_ISSUED"));
	IRA::CString file;
	IRA::CString path;
	m_data->getFileName(file,path);
	return CORBA::string_dup((const char *)path);
}

char * CalibrationToolImpl::startSubScan(const ::Management::TSubScanSetup & prm) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ManagementErrors::ManagementErrorsEx)
+2 −1
Original line number Diff line number Diff line
@@ -140,8 +140,9 @@ class FitsWriterImpl : public virtual BulkDataReceiverImpl<FitsWriter_private::R
	 * @throw CORBA::SystemException
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ManagementErrors::ManagementErrorsEx
	 * @return the path that will contain the files of the current scan
	 */
	virtual void startScan(const Management::TScanSetup & prm) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ManagementErrors::ManagementErrorsEx);
	virtual char *startScan(const Management::TScanSetup & prm) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ManagementErrors::ManagementErrorsEx);

	/**
	 * called to give extra information about scan layout. Not used by this component.
+0 −12
Original line number Diff line number Diff line
@@ -451,9 +451,6 @@ void CEngineThread::runLoop()
		return;
	}
	if (m_data->isStart() && m_data->isReady() &&  m_data->isScanHeaderReady() && m_data->isSubScanHeaderReady()) { // //main headers are already saved and file has to be opened
		//*****************************************************************************************
		ACS_LOG(LM_FULL_INFO,"CEngineThread::runLoop()",(LM_NOTICE,"LETS BEGIN SUBSCAN %ld!",m_data->getSubScanID()));
		//************************* ADDDED FOR DEBUGGING NoData/Roach Could be deleted ****************
		if (!m_fileOpened) {
			m_data->setStatus(Management::MNG_OK);
			// create the file and save main headers
@@ -472,9 +469,6 @@ void CEngineThread::runLoop()
			//let's create the summary file, it should be created before the first subscan of the scan.......
			// the the summary will be valid for the duration of all the subscans.....
			if (!m_summaryOpened) {
				///**********************************************************************************
				ACS_LOG(LM_FULL_INFO,"CEngineThread::runLoop()",(LM_NOTICE,"CREO SUMMARY"));
				///******************* DEBUG ********************************************************
			 	TIMEVALUE currentUT;
				IRA::CDateTime now;
				TIMEDIFFERENCE currentLST;
@@ -505,9 +499,6 @@ void CEngineThread::runLoop()
				m_summaryOpened=true;
				ACS_LOG(LM_FULL_INFO, "CEngineThread::runLoop()",(LM_NOTICE,"SUMMARY_OPENED"));
			}
			///**********************************************************************************
			ACS_LOG(LM_FULL_INFO,"CEngineThread::runLoop()",(LM_NOTICE,"CREO IL FILE"));
			///******************* DEBUG ********************************
			m_file = new CFitsWriter();
			m_file->setBasePath("");
			m_file->setFileName((const char *)m_data->getFileName());
@@ -519,9 +510,6 @@ void CEngineThread::runLoop()
				m_data->setStatus(Management::MNG_FAILURE);
			}
			else {
				//*****************************************************************************************
				ACS_LOG(LM_FULL_INFO,"CEngineThread::runLoop()",(LM_NOTICE,"OUTPUT_FILE_CREATED_NOW"));
				//************************* ADDDED FOR DEBUGGING NoData/Roach Could be deleted ****************
				m_fileOpened=true;
				m_data->startRunnigStage();
				//get data from receivers boss
Loading