ATLAS Offline Software
Loading...
Searching...
No Matches
VP1CaloCellController.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef VP1CALOSYSTEMS_VP1CALOCELLCONTROLLER_H
6#define VP1CALOSYSTEMS_VP1CALOCELLCONTROLLER_H
7
10#include "GaudiKernel/SystemOfUnits.h"
11#include <QByteArray>
12#include <QString>
13#include <map>
14
15class TileRawChannel;
17class TileHWID;
18class TileInfo;
20
21//class QwtPlot; // FIXME:You have to compile Qwt with Qt5. LCG's Qwt is compiled with Qt4 only...
22class QLabel;
23class SoGroup;
24
25//------------------------------------------
26// Class VP1CaloCellController
27//------------------------------------------
28//
29// Implementation of the VP1Controller mechanism for VP1CaloCellSystem
30//
31
33{
34 Q_OBJECT
35
36 public:
38 virtual ~VP1CaloCellController();
39
41 int currentSettingsVersion() const;
43
44 //To put at start of the system scenegraph:
45 SoGroup* drawOptions() const;
46
47 // -------------- Digits display ----------------
48 // We need these pointers for displaying Tile Pulse
49 void initTilePulse(const TileHWID* tile_hw_id,
50 const TileInfo* tile_info,
51 const TileCablingService* tile_cabling);
52
53 // If digits cannot be displayed by whatever reason, then hide both of the digit forms and say they have no data
55
56 // Delete digit forms and set pointers to 0
57 void DeleteDigitForms();
58
59 // Enable/disable Digits checkbox
60 void EnableDigitsCheckbox(bool enable);
61
62 void displayLArDigits(int n_samples,
63 std::vector<short> samples,
64 std::vector<std::string>& msg);
65
66 void displayTileDigits(int n_samples,
67 std::vector<float> samples1,
68 std::vector<float> samples2,
69 std::vector<std::string>& msg);
70
71 void displayTileDigits(int n_samples,
72 std::vector<float> samples,
73 std::vector<std::string>& msg);
74
75 void displayTilePulse(const TileRawChannel* rawchannel1,
76 const TileRawChannel* rawchannel2,
77 const TileRawChannelContainer* rawchannel_cont,
78 size_t digitsize);
79
80 void displayTilePulse(const TileRawChannel* rawchannel,
81 const TileRawChannelContainer* rawchannel_cont,
82 size_t digitsize);
83
84 // -------------- Digits display ----------------
85
86 // Return material by separator type
88
90 QPair<bool,double> scale() const; //The bool indicates if it is logscale(true) or linear scale(false).
92 bool showDigits() const;
93 bool showVolumeOutLines() const;
94 bool energyModeEt() const;
96
97 signals:
99 void scaleChanged(const QPair<bool,double>&);
101 void showDigitsChanged(const bool&);
105
106 private:
107 class Imp;
109
113
114 //For verbose output:
115 template <class T> static QString toString( const T& t ) { return VP1Controller::toString(t); }//unhide base methods
116 static QString toString(const VP1CCIntervalMap& m) { return "VP1CCIntervalMap of size "+QString::number(m.count()); }
117 static QString toString(const QPair<bool,double>& par) { return "<"+QString(par.first?"log":"linear")+", "+QString::number(par.second/(Gaudi::Units::cm/Gaudi::Units::GeV))+" cm/GeV>"; }
118 static QString toString(const VP1CC_GlobalCuts& cuts) { return "VP1CC global cuts: sideA=" + QString(cuts.sideA?"True":"False") + ", sideC=" + QString(cuts.sideC?"True":"False") + ", allowedEta=" + VP1Controller::toString(cuts.allowedEta) + ", allowedPhi=" + VP1Controller::toString(cuts.allowedEta); }
119
120// // FIXME:You have to compile Qwt with Qt5. LCG's Qwt is compiled with Qt4 only...
121// void DrawTileDigits(QwtPlot* plot,
122// int n_samples,
123// std::vector<float> samples);
124
125// // FIXME:You have to compile Qwt with Qt5. LCG's Qwt is compiled with Qt4 only...
126// void DrawTilePulse(QwtPlot* plot,
127// QLabel* gainlabel,
128// const TileRawChannel* rawchannel,
129// const TileRawChannelContainer* rawchannel_cont,
130// size_t digitsize);
131
132 private Q_SLOTS:
140
142 void changeMode();
143};
144
145#endif
VP1CC_SeparatorTypes
QMap< VP1CC_SelectionTypes, VP1CCIntervalPair > VP1CCIntervalMap
Helper class for TileCal online (hardware) identifiers.
Definition TileHWID.h:49
VP1CC_GlobalCuts globalCuts() const
static QString toString(const QPair< bool, double > &par)
void possibleChange_globalCuts()
void possibleChange_energyModeEt()
void selectionIntervalsChanged(const VP1CCIntervalMap &)
const TileCablingService * m_tile_cabling
static QString toString(const VP1CC_GlobalCuts &cuts)
void possibleChange_selectionMbts()
void energyModeEtChanged(bool)
SoMaterial * GetMaterial(VP1CC_SeparatorTypes type)
void EnableDigitsCheckbox(bool enable)
void displayTileDigits(int n_samples, std::vector< float > samples1, std::vector< float > samples2, std::vector< std::string > &msg)
void showDigitsChanged(const bool &)
void displayLArDigits(int n_samples, std::vector< short > samples, std::vector< std::string > &msg)
void possibleChange_showDigits()
void initTilePulse(const TileHWID *tile_hw_id, const TileInfo *tile_info, const TileCablingService *tile_cabling)
VP1CCIntervalMap selectionIntervals() const
static QString toString(const T &t)
void globalCutsChanged(const VP1CC_GlobalCuts &)
void possibleChange_showVolumeOutLines()
void showVolumeOutLinesChanged(bool)
void scaleChanged(const QPair< bool, double > &)
VP1Interval selectionMbts() const
QPair< bool, double > scale() const
static QString toString(const VP1CCIntervalMap &m)
void actualRestoreSettings(VP1Deserialise &)
void actualSaveSettings(VP1Serialise &) const
void possibleChange_selectionIntervals()
void displayTilePulse(const TileRawChannel *rawchannel1, const TileRawChannel *rawchannel2, const TileRawChannelContainer *rawchannel_cont, size_t digitsize)
void selectionMbtsChanged(const VP1Interval &)
VP1CaloCellController(IVP1System *sys)
static QString toString(const T &par)
VP1Controller(IVP1System *sys, const QString &classname)
MsgStream & msg
Definition testRead.cxx:32