ATLAS Offline Software
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 
15 class TileRawChannel;
17 class TileHWID;
18 class TileInfo;
19 class TileCablingService;
20 
21 //class QwtPlot; // FIXME:You have to compile Qwt with Qt5. LCG's Qwt is compiled with Qt4 only...
22 class QLabel;
23 class 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;
42  void actualSaveSettings(VP1Serialise&) 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
54  void ClearHideDigitForms();
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).
91  VP1Interval selectionMbts() const;
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;
108  Imp * m_d;
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 
141  void enableUpperThreshold();
142  void changeMode();
143 };
144 
145 #endif
VP1CaloCellController::possibleChange_showVolumeOutLines
void possibleChange_showVolumeOutLines()
VP1CaloCellController::displayTileDigits
void displayTileDigits(int n_samples, std::vector< float > samples1, std::vector< float > samples2, std::vector< std::string > &msg)
Definition: VP1CaloCellController.cxx:953
TileRawChannelContainer
Definition: TileRawChannelContainer.h:13
VP1CaloCellController::ClearHideDigitForms
void ClearHideDigitForms()
Definition: VP1CaloCellController.cxx:842
VP1CaloCellController::actualSaveSettings
void actualSaveSettings(VP1Serialise &) const
Definition: VP1CaloCellController.cxx:714
VP1CaloCellController::displayTilePulse
void displayTilePulse(const TileRawChannel *rawchannel1, const TileRawChannel *rawchannel2, const TileRawChannelContainer *rawchannel_cont, size_t digitsize)
Definition: VP1CaloCellController.cxx:1016
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
VP1Controller::toString
static QString toString(const T &par)
Definition: VP1Controller.h:138
VP1Serialise
Definition: VP1Serialise.h:45
VP1CaloCellController::DeleteDigitForms
void DeleteDigitForms()
Definition: VP1CaloCellController.cxx:851
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
VP1CaloCellController::possibleChange_showDigits
void possibleChange_showDigits()
VP1CaloCellController::GetMaterial
SoMaterial * GetMaterial(VP1CC_SeparatorTypes type)
Definition: VP1CaloCellController.cxx:1067
VP1CaloCellController::m_tile_cabling
const TileCablingService * m_tile_cabling
Definition: VP1CaloCellController.h:112
VP1CaloCellController::m_tile_hw_id
const TileHWID * m_tile_hw_id
Definition: VP1CaloCellController.h:110
VP1CaloCellController::toString
static QString toString(const T &t)
Definition: VP1CaloCellController.h:115
VP1CaloCellController::initTilePulse
void initTilePulse(const TileHWID *tile_hw_id, const TileInfo *tile_info, const TileCablingService *tile_cabling)
Definition: VP1CaloCellController.cxx:833
VP1CaloCellController::toString
static QString toString(const VP1CCIntervalMap &m)
Definition: VP1CaloCellController.h:116
VP1CaloCellController::possibleChange_globalCuts
void possibleChange_globalCuts()
VP1CaloCellController::showDigitsChanged
void showDigitsChanged(const bool &)
VP1CaloCellController
Definition: VP1CaloCellController.h:33
VP1CaloCellController::selectionMbts
VP1Interval selectionMbts() const
Definition: VP1CaloCellController.cxx:1142
VP1CaloCellController::displayLArDigits
void displayLArDigits(int n_samples, std::vector< short > samples, std::vector< std::string > &msg)
Definition: VP1CaloCellController.cxx:888
VP1CC_GlobalCuts
Definition: VP1CaloCells.h:47
VP1CaloCellController::possibleChange_selectionIntervals
void possibleChange_selectionIntervals()
TileInfo
Definition: TileInfo.h:49
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
VP1CCIntervalMap
QMap< VP1CC_SelectionTypes, VP1CCIntervalPair > VP1CCIntervalMap
Definition: VP1CaloCells.h:119
VP1CaloCellController::showVolumeOutLinesChanged
void showVolumeOutLinesChanged(bool)
VP1CaloCellController::selectionMbtsChanged
void selectionMbtsChanged(const VP1Interval &)
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
VP1CaloCellController::possibleChange_selectionMbts
void possibleChange_selectionMbts()
VP1CaloCells.h
VP1CaloCellController::toString
static QString toString(const QPair< bool, double > &par)
Definition: VP1CaloCellController.h:117
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
IVP1System
Definition: IVP1System.h:36
VP1CaloCellController::possibleChange_scale
void possibleChange_scale()
VP1CaloCellController::actualRestoreSettings
void actualRestoreSettings(VP1Deserialise &)
Definition: VP1CaloCellController.cxx:578
VP1CaloCellController::changeMode
void changeMode()
Definition: VP1CaloCellController.cxx:1318
VP1CaloCellController::drawOptions
SoGroup * drawOptions() const
Definition: VP1CaloCellController.cxx:828
VP1CaloCellController::globalCutsChanged
void globalCutsChanged(const VP1CC_GlobalCuts &)
TileRawChannel
Definition: TileRawChannel.h:35
plotBeamSpotVert.cuts
string cuts
Definition: plotBeamSpotVert.py:93
VP1CaloCellController::showDigits
bool showDigits() const
Definition: VP1CaloCellController.cxx:1154
TileCablingService
Definition: TileCablingService.h:23
VP1Deserialise
Definition: VP1Deserialise.h:44
python.L1.Config.LegacyTopoMergerMap.signals
signals
Definition: LegacyTopoMergerMap.py:13
VP1CaloCellController::currentSettingsVersion
int currentSettingsVersion() const
Definition: VP1CaloCellController.cxx:709
VP1Controller
Definition: VP1Controller.h:45
VP1CaloCellController::m_d
Imp * m_d
Definition: VP1CaloCellController.h:107
VP1CaloCellController::toString
static QString toString(const VP1CC_GlobalCuts &cuts)
Definition: VP1CaloCellController.h:118
python.selection.number
number
Definition: selection.py:20
VP1CaloCellController::scaleChanged
void scaleChanged(const QPair< bool, double > &)
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
VP1CaloCellController::possibleChange_energyModeEt
void possibleChange_energyModeEt()
VP1CaloCellController::energyModeEtChanged
void energyModeEtChanged(bool)
VP1CaloCellController::enableUpperThreshold
void enableUpperThreshold()
Definition: VP1CaloCellController.cxx:1302
VP1CaloCellController::EnableDigitsCheckbox
void EnableDigitsCheckbox(bool enable)
Definition: VP1CaloCellController.cxx:883
VP1Interval
Definition: VP1Interval.h:23
VP1CaloCellController::selectionIntervals
VP1CCIntervalMap selectionIntervals() const
Definition: VP1CaloCellController.cxx:1076
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
VP1CaloCellController::scale
QPair< bool, double > scale() const
Definition: VP1CaloCellController.cxx:1136
VP1CaloCellController::Imp
Definition: VP1CaloCellController.cxx:47
VP1CaloCellController::energyModeEt
bool energyModeEt() const
Definition: VP1CaloCellController.cxx:1164
VP1CaloCellController::m_tile_info
const TileInfo * m_tile_info
Definition: VP1CaloCellController.h:111
VP1Controller.h
VP1CaloCellController::VP1CaloCellController
VP1CaloCellController(IVP1System *sys)
Definition: VP1CaloCellController.cxx:91
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
VP1CC_SeparatorTypes
VP1CC_SeparatorTypes
Definition: VP1CaloCells.h:90
VP1CaloCellController::showVolumeOutLines
bool showVolumeOutLines() const
Definition: VP1CaloCellController.cxx:1159
VP1CaloCellController::globalCuts
VP1CC_GlobalCuts globalCuts() const
Definition: VP1CaloCellController.cxx:1169
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
VP1CaloCellController::selectionIntervalsChanged
void selectionIntervalsChanged(const VP1CCIntervalMap &)
VP1CaloCellController::~VP1CaloCellController
virtual ~VP1CaloCellController()
Definition: VP1CaloCellController.cxx:562