6#include "ui_hvlegocontrollerform.h"
10#include <Inventor/nodes/SoSwitch.h>
11#include <Inventor/nodes/SoSeparator.h>
12#include <Inventor/nodes/SoTranslation.h>
23#define MAX_OBJECTS_PER_TECHNOLOGY 3000
53 :
IVP13DSystemSimple(
"HVLego",
"Display the readout in an eta-phi view",
"boudreau@pitt.edu"),
66 QWidget* controller =
new QWidget(0);
67 Ui::frmHVLegoController ui;
68 ui.setupUi(controller);
72 controller->setEnabled(
false);
76 m_clockwork->checkBoxNamesMap.insert(ui.chbxEMB,
"EMB");
77 m_clockwork->checkBoxNamesMap.insert(ui.chbxEMEC,
"EMEC");
80 for(QCheckBox* cb :
m_clockwork->checkBoxNamesMap.keys())
99 for (
int i=0;i<3;i++) {
104 for (
int i=0;i<4;i++) {
132 message(
"ERROR: Cannot access LArElectrodeID");
137 for (e=begin;e!=end;++e) {
139 std::cout << elecId->
detector(*e) <<
' '
140 << elecId->
zside(*e) <<
' '
141 << elecId->module(*e) <<
' '
142 << elecId->
hv_phi(*e) <<
' '
143 << elecId->
hv_eta(*e) <<
' '
144 << elecId->
gap(*e) <<
' '
164 QCheckBox* cb =
dynamic_cast<QCheckBox*
>(sender());
165 if(cb &&
m_clockwork->checkBoxNamesMap.contains(cb))
168 QString swName =
m_clockwork->checkBoxNamesMap[cb];
176 sw->whichChild = SO_SWITCH_ALL;
179 sw->whichChild = SO_SWITCH_NONE;
196 QMapIterator<QString,QCheckBox*> it(
m_clockwork->checkBoxMap);
197 QMap<QString,bool> checkboxstate;
198 while (it.hasNext()) {
200 checkboxstate.insert(it.key(),it.value()->isChecked());
201 serialise.widgetHandled(it.value());
203 serialise.save(checkboxstate);
206 return serialise.result();
212 if (
state.version()==0) {
213 message(
"Warning: State data in .vp1 file has obsolete format - ignoring!");
216 if (
state.version()!=1) {
217 message(
"Warning: State data in .vp1 file is in wrong format - ignoring!");
224 QMap<QString,bool> checkboxstate(
state.restore<QMap<QString,bool> >());
225 QMapIterator<QString,QCheckBox*> it(
m_clockwork->checkBoxMap);
226 while (it.hasNext()) {
228 state.widgetHandled(it.value());
229 if (checkboxstate.contains(it.key())) {
230 bool checked = checkboxstate.value(it.key());
231 if (it.value()->isChecked()!=checked)
232 it.value()->setChecked(checked);
IVP13DSystemSimple(const QString &name, const QString &information, const QString &contact_info)
void ensureBuildController()
virtual void restoreFromState(QByteArray)
QWidget * controllerWidget()
void message(const QString &) const
virtual QByteArray saveState()
Helper for the Liquid Argon Calorimeter cell at the electrode level.
std::vector< HWIdentifier >::const_iterator electrode_begin() const
Return an iterator pointing to a collection of electrode identifiers.
int hv_eta(const HWIdentifier id) const
Return an integer corresponding to the high volatge eta sector of an hardware electrode identifier.
int zside(const HWIdentifier id) const
Return an integer corresponding to the side of an hardware electrode identifier.
int gap(const HWIdentifier id) const
Return an integer corresponding to the cell gap of an hardware electrode identifier.
std::vector< HWIdentifier >::const_iterator electrode_end() const
int electrode(const HWIdentifier id) const
Return an integer corresponding to the electrode number of an hardware electrode identifier.
int detector(const HWIdentifier id) const
Return an integer corresponding to the detector of an hardware electrode identifier.
int hv_phi(const HWIdentifier id) const
Return an integer corresponding to the high voltage phi sector of an hardware electrode identifier.
The Athena Transient Store API.
QMap< QString, QCheckBox * > checkBoxMap
QMap< QString, SoSwitch * > switchMap
QMap< QCheckBox *, QString > checkBoxNamesMap
void systemcreate(StoreGateSvc *detstore)
QWidget * buildController()
void buildPermanentSceneGraph(StoreGateSvc *detstore, SoSeparator *root)
void userPickedNode(SoNode *pickedNode, SoPath *pickedPath)
void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)
void restoreFromState(QByteArray ba)
static bool hasTileGeometry()
static bool hasLArGeometry()
static void ensureInit(IVP1System *)