RemoteDPPContext.cpp 2.46 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * 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 "RemoteDPPContext.h"

namespace npp {

using namespace std;
24
using namespace lstdpp128;
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

const std::string RemoteDPPContext::TYPE = "remote_dpp_context";

RemoteDPPContext::RemoteDPPContext(const std::string& name) :
	ExperimentController(name) {

	acquisitionController.init(this, "acquisition_controller");
}

RemoteDPPContext::~RemoteDPPContext() {
}

void RemoteDPPContext::postConfiguration() {

	// Warning: we suppose that the list mode block is ordered like the ADC controllers
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//	releaseListModeContext(listModeContext);
//
//	int32 nbCrates = 0;
//
//	for (int32 adc = 0; adc < acquisitionController->nbAdcControllers(); ++adc) {
//		int32 crate = acquisitionController->adcController[adc]->crateNumber();
//		if (crate >= nbCrates) {
//			nbCrates = crate + 1;
//		}
//	}
//
//	listModeContext.crateBoard.nbCrates = nbCrates;
//	listModeContext.crateBoard.crates = new Crate[nbCrates];
//
//	for (int32 crate = 0; crate < nbCrates; ++crate) {
//		int32 nbBoards = 0;
//
//		for (int32 board = 0; board < acquisitionController->nbAdcControllers(); ++board) {
//			if (board >= nbBoards) {
//				nbBoards = board + 1;
//			}
//		}
//
//		listModeContext.crateBoard.crates[crate].nbBoards = nbBoards;
//		listModeContext.crateBoard.crates[crate].boards = new Board[nbBoards];
//
//		for (int32 board = 0; board < acquisitionController->nbAdcControllers(); ++board) {
//			listModeContext.crateBoard.crates[0].boards[board].boardType = (BoardType)acquisitionController->adcController[board]->cardType();
//			listModeContext.crateBoard.crates[0].boards[board].crate = crate;
//			listModeContext.crateBoard.crates[0].boards[board].eventType = 0;
//			listModeContext.crateBoard.crates[0].boards[board].nbChannels = acquisitionController->adcController[board]->nbChannels();
//		}
//	}

//	cout << "DPP context" << endl;
//	cout << listModeContext << endl;
76
77
78
79
}

}