ATLAS Offline Software
VP1CaloCellSystem.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 #include "VP1Base/VP1Serialise.h"
12 #include "VP1Base/VP1Deserialise.h"
14 
15 #include <QBuffer>
16 #include <QByteArray>
17 #include <QString>
18 #include <QMessageBox>
19 
20 #include <Inventor/SoPath.h>
21 #include <Inventor/nodes/SoSeparator.h>
22 #include <Inventor/nodes/SoMaterial.h>
23 
24 #include "CaloDetDescr/CaloDetDescrElement.h"
26 
27 #include "CaloIdentifier/TileID.h"
31 
32 
33 #include "StoreGate/StoreGateSvc.h"
36 
37 #include <map>
38 #include <vector>
39 #include <sstream>
40 
41 #include "GaudiKernel/ISvcLocator.h"
42 #include "GaudiKernel/Bootstrap.h"
43 #include "GaudiKernel/IToolSvc.h"
52 
53 // MBTS
57 #include <stdexcept>
58 
59 
60 // -------------------- Clockwork -------------------------------
62 {
63 public:
64  Clockwork();
65  ~Clockwork();
66  Clockwork(const Clockwork&) = delete;
67  Clockwork& operator=(const Clockwork&) = delete;
68 
69  // -------------- Methods ------------------
70  // Called at the beginning of every event
71  // Creates new manager objects and stores them into
72  void BuildCellManagers();
73 
74  // Called at the beginning of every event after BuildCellManagers().
75  // Iterates over Calo Cells in the SG container, builds VP1CC objects
76  // and stores the pointers into appropriate Manager(s)
77  void FillManagers();
78 
79  // Special situation with Tile Raw Channel keys in SG. They have to be searched in a special order
80  // The order is hardwired unfortunately and may vary in time...
81  std::string SearchTileRawchanKeys(const std::vector<std::string>& inputKeys);
82 
83  // -------------- Data members ----------------
85 
86  //--------------------------------------------------------------
87  //
88  // Section: Flags
89  //
90 
91  bool noCalo{false}; // If Calo has been switched off don't show anything
92  bool noLArDigitsGlobal{false}; // Are we able to show LAr digits at all?
93  bool noLArDigitsEvent{false}; // Are we able to show LAr digits for this event?
94  bool noTileDigitsGlobal{false}; // Are we able to show Tile digits at all?
95  bool noTileDigitsEvent{false}; // Are we able to show Tile digits for this event?
96 
97  bool modeSimple{true}; // Which mode (simple/expert) is used for LAr
98 
99  //--------------------------------------------------------------
100  //
101  // Section: DetStore objects: managers, ID helpers
102  //
103 
104  // Manager
106 
107  // ID helpers
108  const CaloCell_ID* calo_id{nullptr};
109  const TileID* tile_id{nullptr};
110  const TileHWID* tile_hw_id{nullptr};
111 
112  //--------------------------------------------------------------
113  //
114  // Section: Tools, Services
115  //
116 
117  const TileInfo* tile_info{nullptr};
119  const LArOnlineID* lar_onlineID{nullptr};
121 
122  //--------------------------------------------------------------
123  //
124  // Section: StoreGate containers
125  //
126 
127  const CaloCellContainer* calocells{nullptr};
128  const LArDigitContainer* lar_digits{nullptr};
131 
132  //--------------------------------------------------------------
133  //
134  // Section: Maps of VP1CaloCellManager-s
135  //
136 
138 
139  //--------------------------------------------------------------
140  //
141  // Section: MBTS
142  //
143 
145 
146  //--------------------------------------------------------------
147  //
148  // Section: Maps
149  //
150 
151  // Map of VP1CaloCell objects by their 3D objects
153 
154  // Separator helper map
156 
157  // Set of keys for the above map
159 };
160 
162 : mbtsHelper(new VP1MbtsHelper(false))
163 {
164  // Initialize set of available separator types besides MBTS
179 }
180 
182 {
183  if(mbtsHelper) delete mbtsHelper;
184 }
185 
187 {
188  // Populate cell_managers map
189  cell_managers[VP1CC_SelTypeEMB0] = new VP1CaloCellManager(VP1CC_SelTypeEMB0,&node2ccMap,
190  controller->energyModeEt(),controller->scale(),
191  controller->showVolumeOutLines(),controller->globalCuts());
192  cell_managers[VP1CC_SelTypeEMB1] = new VP1CaloCellManager(VP1CC_SelTypeEMB1,&node2ccMap,
193  controller->energyModeEt(),controller->scale(),
194  controller->showVolumeOutLines(),controller->globalCuts());
195  cell_managers[VP1CC_SelTypeEMB2] = new VP1CaloCellManager(VP1CC_SelTypeEMB2,&node2ccMap,
196  controller->energyModeEt(),controller->scale(),
197  controller->showVolumeOutLines(),controller->globalCuts());
198  cell_managers[VP1CC_SelTypeEMB3] = new VP1CaloCellManager(VP1CC_SelTypeEMB3,&node2ccMap,
199  controller->energyModeEt(),controller->scale(),
200  controller->showVolumeOutLines(),controller->globalCuts());
201  cell_managers[VP1CC_SelTypeEMEC0] = new VP1CaloCellManager(VP1CC_SelTypeEMEC0,&node2ccMap,
202  controller->energyModeEt(),controller->scale(),
203  controller->showVolumeOutLines(),controller->globalCuts());
204  cell_managers[VP1CC_SelTypeEMEC1] = new VP1CaloCellManager(VP1CC_SelTypeEMEC1,&node2ccMap,
205  controller->energyModeEt(),controller->scale(),
206  controller->showVolumeOutLines(),controller->globalCuts());
207  cell_managers[VP1CC_SelTypeEMEC2] = new VP1CaloCellManager(VP1CC_SelTypeEMEC2,&node2ccMap,
208  controller->energyModeEt(),controller->scale(),
209  controller->showVolumeOutLines(),controller->globalCuts());
210  cell_managers[VP1CC_SelTypeEMEC3] = new VP1CaloCellManager(VP1CC_SelTypeEMEC3,&node2ccMap,
211  controller->energyModeEt(),controller->scale(),
212  controller->showVolumeOutLines(),controller->globalCuts());
213  cell_managers[VP1CC_SelTypeHEC0] = new VP1CaloCellManager(VP1CC_SelTypeHEC0,&node2ccMap,
214  controller->energyModeEt(),controller->scale(),
215  controller->showVolumeOutLines(),controller->globalCuts());
216  cell_managers[VP1CC_SelTypeHEC1] = new VP1CaloCellManager(VP1CC_SelTypeHEC1,&node2ccMap,
217  controller->energyModeEt(),controller->scale(),
218  controller->showVolumeOutLines(),controller->globalCuts());
219  cell_managers[VP1CC_SelTypeHEC2] = new VP1CaloCellManager(VP1CC_SelTypeHEC2,&node2ccMap,
220  controller->energyModeEt(),controller->scale(),
221  controller->showVolumeOutLines(),controller->globalCuts());
222  cell_managers[VP1CC_SelTypeHEC3] = new VP1CaloCellManager(VP1CC_SelTypeHEC3,&node2ccMap,
223  controller->energyModeEt(),controller->scale(),
224  controller->showVolumeOutLines(),controller->globalCuts());
225  cell_managers[VP1CC_SelTypeFCAL1] = new VP1CaloCellManager(VP1CC_SelTypeFCAL1,&node2ccMap,
226  controller->energyModeEt(),controller->scale(),
227  controller->showVolumeOutLines(),controller->globalCuts());
228  cell_managers[VP1CC_SelTypeFCAL2] = new VP1CaloCellManager(VP1CC_SelTypeFCAL2,&node2ccMap,
229  controller->energyModeEt(),controller->scale(),
230  controller->showVolumeOutLines(),controller->globalCuts());
231  cell_managers[VP1CC_SelTypeFCAL3] = new VP1CaloCellManager(VP1CC_SelTypeFCAL3,&node2ccMap,
232  controller->energyModeEt(),controller->scale(),
233  controller->showVolumeOutLines(),controller->globalCuts());
234  cell_managers[VP1CC_SelTypeTileB] = new VP1CaloCellManager(VP1CC_SelTypeTileB,&node2ccMap,
235  controller->energyModeEt(),controller->scale(),
236  controller->showVolumeOutLines(),controller->globalCuts());
237  cell_managers[VP1CC_SelTypeTileEC] = new VP1CaloCellManager(VP1CC_SelTypeTileEC,&node2ccMap,
238  controller->energyModeEt(),controller->scale(),
239  controller->showVolumeOutLines(),controller->globalCuts());
240  cell_managers[VP1CC_SelTypeTileCrack] = new VP1CaloCellManager(VP1CC_SelTypeTileCrack,&node2ccMap,
241  controller->energyModeEt(),controller->scale(),
242  controller->showVolumeOutLines(),controller->globalCuts());
243 
244  // Connect controller signals to manager slots
245  for(VP1CCManagerContainer::iterator it=cell_managers.begin(); it!=cell_managers.end(); ++it) {
246  connect(controller,SIGNAL(selectionIntervalsChanged(VP1CCIntervalMap)),
247  it->second,SLOT(selectionUpdated(VP1CCIntervalMap)));
248  connect(controller,SIGNAL(scaleChanged(QPair<bool,double>)),
249  it->second,SLOT(scaleUpdated(QPair<bool,double>)));
250  connect(controller,SIGNAL(showVolumeOutLinesChanged(bool)),
251  it->second,SLOT(outlineUpdated(bool)));
252  connect(controller,SIGNAL(globalCutsChanged(VP1CC_GlobalCuts)),
253  it->second,SLOT(globalCutsUpdated(VP1CC_GlobalCuts)));
254  connect(controller->customTourEditor(),SIGNAL(clipVolumeRadiusChanged(double)),
255  it->second,SLOT(clipVolumeRadiusChanged(double)));
256  }
257 }
258 
260 {
261  // For events with no Calo Cells do nothing
262  if(!calocells) return;
263 
264  for(const CaloCell* cell : *calocells) {
265 
266  // for each cell:
267  // 1. determine its type
268  // 2. build VP1CaloCell of appropriate type
269  // 3. add it to the appropriate manager
270  try {
271  if(calo_id->is_em_barrel(cell->ID())) {
272  // ------- EMB ----------
273  VP1CC_LArEMB* embCC = new VP1CC_LArEMB(cell,&sepHelperMap);
274 
275  switch(calo_id->sampling(cell->ID())) {
276  case 0: {
277  cell_managers[VP1CC_SelTypeEMB0]->add(embCC);
278  break;
279  }
280  case 1: {
281  cell_managers[VP1CC_SelTypeEMB1]->add(embCC);
282  break;
283  }
284  case 2: {
285  cell_managers[VP1CC_SelTypeEMB2]->add(embCC);
286  break;
287  }
288  case 3: {
289  cell_managers[VP1CC_SelTypeEMB3]->add(embCC);
290  break;
291  }
292  default: { //unknown case, tidy up
293  delete embCC; embCC=nullptr;
294  break;
295  }
296  }
297  // ------- EMB ----------
298  }
299  else if(calo_id->is_em_endcap(cell->ID()) || calo_id->is_hec(cell->ID())) {
300  VP1CC_LArEMECHEC* emechecCC = new VP1CC_LArEMECHEC(cell,calo_id,&sepHelperMap);
301 
302  if(calo_id->is_em_endcap(cell->ID())) {
303  // ------- EMEC ----------
304  switch(calo_id->sampling(cell->ID())) {
305  case 0: {
306  cell_managers[VP1CC_SelTypeEMEC0]->add(emechecCC);
307  break;
308  }
309  case 1: {
310  cell_managers[VP1CC_SelTypeEMEC1]->add(emechecCC);
311  break;
312  }
313  case 2: {
314  cell_managers[VP1CC_SelTypeEMEC2]->add(emechecCC);
315  break;
316  }
317  case 3: {
318  cell_managers[VP1CC_SelTypeEMEC3]->add(emechecCC);
319  break;
320  }
321  default: { //unknown case, tidy up
322  delete emechecCC; emechecCC=nullptr;
323  break;
324  }
325  }
326  // ------- EMEC ----------
327  } else {
328  // ------- HEC ----------
329  switch(calo_id->sampling(cell->ID())) {
330  case 0: {
331  cell_managers[VP1CC_SelTypeHEC0]->add(emechecCC);
332  break;
333  }
334  case 1: {
335  cell_managers[VP1CC_SelTypeHEC1]->add(emechecCC);
336  break;
337  }
338  case 2: {
339  cell_managers[VP1CC_SelTypeHEC2]->add(emechecCC);
340  break;
341  }
342  case 3: {
343  cell_managers[VP1CC_SelTypeHEC3]->add(emechecCC);
344  break;
345  }
346  default: { //unknown case, tidy up
347  delete emechecCC; emechecCC=nullptr;
348  break;
349  }
350  }
351  // ------- EMEC ----------
352  }
353  }
354  else if(calo_id->is_fcal(cell->ID())) {
355  // ------- FCAL ----------
356  VP1CC_LArFCAL* fcalCC = new VP1CC_LArFCAL(cell,&sepHelperMap);
357 
358  switch(calo_id->sampling(cell->ID())) {
359  case 1: {
360  cell_managers[VP1CC_SelTypeFCAL1]->add(fcalCC);
361  break;
362  }
363  case 2: {
364  cell_managers[VP1CC_SelTypeFCAL2]->add(fcalCC);
365  break;
366  }
367  case 3: {
368  cell_managers[VP1CC_SelTypeFCAL3]->add(fcalCC);
369  break;
370  }
371  default: { //unknown case, tidy up
372  delete fcalCC; fcalCC=nullptr;
373  break;
374  }
375  }
376  // ------- FCAL ----------
377  }
378  else if(!calo_id->is_tile_gapscin(cell->ID())) {
379  // ------- Tile Barrel EC ----------
380  VP1CC_TileBarEc* tileCC = new VP1CC_TileBarEc(cell,tile_id,&sepHelperMap);
381 
382  if(calo_id->is_tile_barrel(cell->ID()))
383  cell_managers[VP1CC_SelTypeTileB]->add(tileCC);
384  else
385  cell_managers[VP1CC_SelTypeTileEC]->add(tileCC);
386  }
387  else if(calo_id->is_tile_gapscin(cell->ID())) {
388  // ------- Tile Crack ----------
389  VP1CC_TileCrack* tilecrackCC = new VP1CC_TileCrack(cell,tile_id,&sepHelperMap);
390 
391  cell_managers[VP1CC_SelTypeTileCrack]->add(tilecrackCC);
392  }
393  }
394  catch(std::runtime_error& err) {
395  // --- do nothing for now
396  std::cout << "RunTime exception caught! --> " << err.what() << std::endl;
397  }
398  } // iterate over cells
399 }
400 
401 std::string VP1CaloCellSystem::Clockwork::SearchTileRawchanKeys(const std::vector<std::string>& inputKeys)
402 {
403  // Search order
404  std::vector<std::string> searchOrder;
405  searchOrder.push_back("TileRawChannelOpt2");
406  searchOrder.push_back("TileRawChannelOpt");
407  searchOrder.push_back("TileRawChannelFixed");
408  searchOrder.push_back("TileRawChannelFitCool");
409  searchOrder.push_back("TileRawChannelFit");
410  searchOrder.push_back("TileRawChannelCnt");
411  searchOrder.push_back("TileRawChannelFlt");
412 
413  for(size_t i=0; i<searchOrder.size(); ++i) {
414  std::string searchString = searchOrder[i];
415  for(size_t ii=0; ii<inputKeys.size(); ++ii)
416  if(inputKeys[ii]==searchString)
417  return searchString;
418  }
419  // No keys found from Search Order, return empty string
420  return std::string("");
421 }
422 
423 // -------------------- Clockwork -------------------------------
424 
425 
426 
427 // ---------------------- System ----------------------------
428 
430 :IVP13DSystemSimple("Cells","Display energy of CaloCell objects","tsulaia@mail.cern.ch or rbianchi@cern.ch"),
432 {
433 }
434 
436 {
437  delete m_clockwork;
438 }
439 
441 {
442  // Standard stuff
444 
445  // Connect controller signals to various slots
446  // Energy mode
447  connect(m_clockwork->controller,SIGNAL(energyModeEtChanged(bool)),
448  this,SLOT(energyMode()));
449 
450  // Mbts
452  connect(m_clockwork->controller,SIGNAL(selectionMbtsChanged(VP1Interval)),
453  m_clockwork->mbtsHelper,SLOT(selectionUpdated(VP1Interval)));
454  connect(m_clockwork->controller,SIGNAL(showVolumeOutLinesChanged(bool)),
455  m_clockwork->mbtsHelper,SLOT(outlineUpdate(bool)));
457  std::cout <<" Connecting to CVRC" <<std::endl;
458  connect(m_clockwork->controller->customTourEditor(),SIGNAL(clipVolumeRadiusChanged(double)),
459  m_clockwork->mbtsHelper,SLOT(clipVolumeRadiusChanged(double)));
460  }
461  return m_clockwork->controller;
462 }
463 
465 {
466  // Make sure we can use required custom 3D objects:
468 
469  // ------------- DD Managers and ID Helpers -------------
471  if(status.isFailure() || m_clockwork->tile_dd_man==nullptr) {
472  m_clockwork->noCalo = true;
473  messageDebug("Unable to retrieve Tile DD Manager");
474  return;
475  }
476 
477  status = detstore->retrieve(m_clockwork->calo_id,"CaloCell_ID");
478  if(status.isFailure() || m_clockwork->calo_id==nullptr) {
479  m_clockwork->noCalo = true;
480  messageDebug("0 pointer to Calo ID Helper");
481  return;
482  }
483 
485  if(m_clockwork->tile_id ==nullptr) {
486  m_clockwork->noCalo = true;
487  messageDebug("0 pointer to Tile ID Helper");
488  return;
489  }
490 
491  status = detstore->retrieve(m_clockwork->tile_hw_id);
492  if(status.isFailure() || m_clockwork->tile_hw_id==nullptr) {
493  messageDebug("Unable to retrieve Tile HWID");
494  m_clockwork->tile_hw_id = nullptr;
496  }
497  // ------------- DD Managers and ID Helpers -------------
498 
499 
500  // ------------- Tools/Services -------------
501  status = detstore->retrieve(m_clockwork->tile_info,"TileInfo");
502  if(status.isFailure() || m_clockwork->tile_info==nullptr) {
503  messageDebug("Unable to retrieve Tile Info");
504  m_clockwork->tile_info = nullptr;
506  }
507 
509  if(m_clockwork->tile_cabling==nullptr) {
510  messageDebug("0 pointer to TileCabling");
512  }
513 
514  status = detstore->retrieve(m_clockwork->lar_onlineID,"LArOnlineID");
515  if (status.isFailure() || m_clockwork->lar_onlineID == nullptr) {
516  messageDebug("Failed to retrieve LAr online ID");
517  m_clockwork->lar_onlineID = nullptr;
518  }
519 
520 
521  status = toolSvc()->retrieveTool("CaloBadChanTool",m_clockwork->calo_badchannel);
522  if (status.isFailure() || m_clockwork->calo_badchannel == nullptr) {
523  messageDebug("Failed to locate Calo Bad Channel Tool");
524  m_clockwork->calo_badchannel = nullptr;
525  }
526 
527  // Pass retrieved pointers to the controller (for Tile Pulse display)
531  // ------------- Tools/Services -------------
532 
533 
534  // -------------- MBTS ----------------
535  try {
536  m_clockwork->mbtsHelper->systemcreate(detstore);
537  } catch(std::runtime_error& err) {
538  message (err.what());
539  }
540  // -------------- MBTS ----------------
541 }
542 
544 {
545  // Clear node 2 CC map
546  m_clockwork->node2ccMap.clear();
547 
548  // Delete Cell Managers and clear the map
550  for(; it!=m_clockwork->cell_managers.end(); ++it)
551  if(it->second) delete it->second;
552 
553  m_clockwork->cell_managers.clear();
554  m_clockwork->calocells = 0;
555 
556  // delete separator helpers and clear the separator helper map
558  for(; itSepHelper!= m_clockwork->sepHelperMap.end(); ++itSepHelper)
559  if(itSepHelper->second) delete itSepHelper->second;
560  m_clockwork->sepHelperMap.clear();
561 
562  // MBTS
564 }
565 
567 {
568  messageDebug("VP1CaloCellSystem::systemuncreate()...");
570 }
571 
573 {
574  if(m_clockwork->noCalo) return;
575 
576  root->addChild(m_clockwork->controller->drawOptions());
577 
578  // Iterators for SG keys
579  std::vector<std::string>::const_iterator firstKey, lastKey;
580 
581  // ---------------- Retrieve calo cells from SG ---------------------
582  // Check for SG keys
583  std::vector<std::string> strCaloCellKeys;
584  sg->keys<CaloCellContainer>(strCaloCellKeys);
585  firstKey = strCaloCellKeys.begin();
586  lastKey = strCaloCellKeys.end();
587 
588 
589  if(firstKey!=lastKey) {
590  // Some keys found
591  std::string keyCaloCell = *firstKey;
592  StatusCode status = sg->retrieve(m_clockwork->calocells,keyCaloCell);
593  if(status.isSuccess() && m_clockwork->calocells!=0) {
594  // Build a basis for the scene graph
595  // 1. Create one Separator and one Material for each member of VP1CC_SeparatorTypes
596  // 2. Also create Separator Helper objects
598  for(; itSepType!=m_clockwork->sepTypes.end(); ++itSepType) {
599  SoSeparator* childSep = new SoSeparator();
600  VP1ExtraSepLayerHelper* sepHelper = new VP1ExtraSepLayerHelper(childSep);
601 
602  root->addChild(m_clockwork->controller->GetMaterial(*itSepType));
603  root->addChild(childSep);
604 
605  m_clockwork->sepHelperMap[*itSepType] = sepHelper;
606  }
607 
608  setupEnergyMode();
609 
610  } else
611  message("Unable to retrieve Calo Cells from Store Gate for this event");
612 
613  while(++firstKey!=lastKey)
614  messageDebug("Another Calo Cell collection found in the SG with key = " + QString((*firstKey).c_str()));
615  } else
616  message("No Calo Cells in Store Gate for this event"); // No keys found
617 
618  // ---------------- Retrieve calo cells from SG ---------------------
619 
620  // -------------------------- Digits ---------------------------------
625 
626 
627  /*
628  if(m_clockwork->calo_badchannel == 0)
629  m_clockwork->mainController->chbxEnableBadChannels->setEnabled(false);
630  else
631  m_clockwork->mainController->chbxEnableBadChannels->setEnabled(true);
632  */
633 
635  // Get keys for LArDigitContainers in the Store Gate
636  // If we have more than one container then it means we have All and/or Thinned and/or IIC -> use All if available, otherwise use Thinned
637  std::vector<std::string> strLArDigitKeys;
638  sg->keys<LArDigitContainer>(strLArDigitKeys);
639  firstKey = strLArDigitKeys.begin();
640  lastKey = strLArDigitKeys.end();
641 
642  if(firstKey==lastKey){
643  message("No LAr Digits in Store Gate for this event");
645  } else {
646  std::string strLArDigitKeys(""), tagThinned(""), tagIIC(""), tagFirstOther("");
647 
648  for(;firstKey!=lastKey;++firstKey) {
649  if((*firstKey).find("Thinned")!=std::string::npos)
650  tagThinned = *firstKey;
651  else if((*firstKey).find("IIC")!=std::string::npos)
652  tagIIC = *firstKey;
653  else if(tagFirstOther=="")
654  tagFirstOther = *firstKey;
655  }
656 
657  if(tagFirstOther!="")
658  strLArDigitKeys = tagFirstOther;
659  else if(tagThinned!="")
660  strLArDigitKeys = tagThinned;
661  else
662  strLArDigitKeys = tagIIC;
663 
664  QString mess = QString("Retrieving LArDigitContainer with the key ") + QString(strLArDigitKeys.c_str());
665  messageDebug(mess);
666 
667  StatusCode status = sg->retrieve(m_clockwork->lar_digits,strLArDigitKeys);
668 
669  if(status.isSuccess() && m_clockwork->lar_digits != 0) {
671  std::ostringstream numLarDigits;
672  numLarDigits << m_clockwork->lar_digits->size();
673  message("Number of LAr digits for this event " + QString(numLarDigits.str().c_str()));
674  } else {
675  message("Unable to retrieve LAr digits from Store Gate for this event");
676  m_clockwork->lar_digits = 0;
678  }
679  } // LArDigits found in the SG
680  }
681 
683  // Get keys for TileDigitContainers in the Store Gate
684  // If we have more than one container then use the first one and issue a warning message
685  std::vector<std::string> strTileDigitKeys;
686  sg->keys<TileDigitsContainer>(strTileDigitKeys);
687  firstKey = strTileDigitKeys.begin();
688  lastKey = strTileDigitKeys.end();
689 
690  if(firstKey==lastKey){
691  message("No Tile Digits in Store Gate for this event");
693  } else {
694  std::string keyTileDigits = *firstKey;
695  StatusCode status = sg->retrieve(m_clockwork->tile_digits,keyTileDigits);
696 
697  if(status.isFailure() || m_clockwork->tile_digits==0){
698  message("Unable to retrieve Tile digits from Store Gate for this event");
701  } else {
703 
704  // ------------ Tile Raw Channels (pulses) ------------------
705  std::vector<std::string> strTileRawchanKeys;
706  sg->keys<TileRawChannelContainer>(strTileRawchanKeys);
707  firstKey = strTileRawchanKeys.begin();
708  lastKey = strTileRawchanKeys.end();
709 
710  if(firstKey==lastKey) {
711  message("No Tile Raw Channels in Store Gate for this event");
713  } else {
714  std::string keyTileRawChan = m_clockwork->SearchTileRawchanKeys(strTileRawchanKeys);
715 
716  // If no keys found from the specified order then just try the fisr one
717  if(keyTileRawChan=="")
718  keyTileRawChan = *firstKey;
719 
720  QString mess = QString("Retrieving Tile Raw Channels with the key ") + QString(keyTileRawChan.c_str());
721  messageDebug(mess);
722 
723  status = sg->retrieve(m_clockwork->tile_rawchannel,keyTileRawChan);
724  if(status.isFailure() || m_clockwork->tile_rawchannel==0) {
725  message("Unable to retrieve Tile raw channels from Store Gate for this event");
727  }
728  }
729  } // Digits retrieved successfully
730  } // Digit container keys found in SG
731  } // Tile digits
732 
733  // -------------------------- Digits ---------------------------------
734 
735  // -------------------------- MBTS ---------------------------------
736  // -- material
738 
739  // -- separator
740  SoSeparator* mbtsSeparator = new SoSeparator;
741  root->addChild(mbtsSeparator);
742  try {
743  m_clockwork->mbtsHelper->buildEventSceneGraph(sg,mbtsSeparator);
745  } catch(std::runtime_error& err) {
746  message (err.what());
747  }
748  // -------------------------- MBTS ---------------------------------
749  messageDebug("end of buildEventSceneGraph()");
750 }
751 
752 void VP1CaloCellSystem::userPickedNode(SoNode* pickedNode, SoPath *pickedPath)
753 {
754  messageDebug("VP1CaloCellSystem::userPickedNode()");
755 
756  SoNode* tail = pickedPath->getTail();
757 
758  // Find the VP1CC object which correspond to the selected 3D object
760 
761  if(itNode2CC!=m_clockwork->node2ccMap.end()){
762  // VP1CC object found.
763 
764  SG::ReadCondHandleKey<LArOnOffIdMapping> cablingKey ("LArOnOffIdMap");
765  cablingKey.initialize().ignore();
767 
768  std::string channel_string = "";
769  if ( cabling.isValid() && m_clockwork->lar_onlineID ) {
770  VP1CC_LAr* larCC = dynamic_cast<VP1CC_LAr*>((*itNode2CC).second);
771  if(larCC) {
772  Identifier cellOffline = larCC->getID();
773 
774  std::ostringstream idstring;
775  if ( m_clockwork->calo_id->is_em(cellOffline) || m_clockwork->calo_id->is_hec(cellOffline) ) {
776  idstring <<"(b_ec=" << m_clockwork->calo_id->pos_neg(cellOffline) << ", samp="
777  << m_clockwork->calo_id->sampling(cellOffline) << ", reg="
778  << m_clockwork->calo_id->region(cellOffline) << ", eta="
779  << m_clockwork->calo_id->eta(cellOffline) << ", phi="
780  << m_clockwork->calo_id->phi(cellOffline) << ") ";
781  }
782  else if ( m_clockwork->calo_id->is_fcal(cellOffline) ) {
783  idstring <<"(pos_neg=" << m_clockwork->calo_id->pos_neg(cellOffline) << ",mod="
784  << m_clockwork->calo_id->sampling(cellOffline) << ",eta="
785  << m_clockwork->calo_id->eta(cellOffline) << ",phi="
786  << m_clockwork->calo_id->phi(cellOffline) << ") ";
787  }
788  channel_string = idstring.str();
789 
790  HWIdentifier hwId;
791  try {
792  hwId = cabling->createSignalChannelID(cellOffline);
793  } catch(LArID_Exception&) {
794  message("LArID Exception caught while creating signal channel id");
796  return;
797  }
798  channel_string += m_clockwork->lar_onlineID->channel_name(hwId);
799  }
800  }
801 
802  // Print information to the log window
803  std::vector<std::string> msg;
804  try {
805  msg = (*itNode2CC).second->ToString(m_clockwork->calo_id, channel_string);
806  } catch(std::runtime_error& err) {
807  message(err.what());
808  return;
809  }
810 
811  for(unsigned int ii=0; ii<msg.size(); ++ii)
812  message((msg[ii]).c_str());
813 
814  // Digits
816 
817  messageDebug("showDigits() is checked...");
818 
819 
820  // ---------------------- LAr -------------------------
821  VP1CC_LAr* larCC = dynamic_cast<VP1CC_LAr*>((*itNode2CC).second);
822  if(larCC) {
823  messageDebug("LAr node selected");
825  Identifier cellOffline = larCC->getID();
826  HWIdentifier hwId;
827  try {
828  hwId = cabling->createSignalChannelID(cellOffline);
829  } catch(LArID_Exception& e) {
830  message("EXCEPTION!! LArIDException caught while creating signal channel id!!");
832  return;
833  }
834 
836  for(;itLArDig!=m_clockwork->lar_digits->end(); ++itLArDig) {
837  if((*itLArDig)->hardwareID()==hwId) {
838 
839  message("displaying LAr digits...");
840 
841  try {
842  m_clockwork->controller->displayLArDigits( (*itLArDig)->nsamples(),
843  (*itLArDig)->samples(),
844  msg);
845  } catch (std::exception& e) {
846  message("Exception caught!!");
847  std::cout << "ERROR!!! Exception caught! --> " << e.what() << std::endl;
848  QString title = "ERROR!!! Exception caught!";
849  QString mex = "While displaying LAr digits, an exception has been caught!\n\nException details:\n\n" + QString::fromStdString(e.what());
850  messageDebug("Clearing the DigitForm and returning...");
852  messageDebug("Displaying the QMessageBox...");
853  QWidget* widget = 0; // the message box will be parentless
854  QMessageBox::warning( widget, title,
855  mex,
856  QMessageBox::Ok,
857  QMessageBox::Ok
858  );
859  messageDebug("Box shown. Returning...");
860  return;
861  }
862  messageDebug("Ok. Returning...");
863  return;
864  } // we found the digit container
865  } // loop over digit containers
866 
867  // if not found the right cell and thus if not returning, we arrive here...
868  message("Unable to find digits for the selected cell");
869  } else {
870  message("LAr digit display not available");
871  }
872 
873  // Since we are here, hide digits widgets
874  messageDebug("LAr. Clearing digits form...");
876  messageDebug("Cleared. Returning...");
877  return;
878  }// we are in LAr CC
879 
880 
881  // ------------- Tile Barrel & End Cap ------------------
882  VP1CC_TileBarEc* tileCC = dynamic_cast<VP1CC_TileBarEc*>((*itNode2CC).second);
883  if(tileCC) {
884  messageDebug("Tile Barrel & End Cap");
886  int frag1, channel1, frag2, channel2;
887  if((tileCC->GetFragChannel(m_clockwork->tile_hw_id,false,frag1,channel1)==0) &&
888  (tileCC->GetFragChannel(m_clockwork->tile_hw_id,true,frag2,channel2)==0)) {
889 
890  // ----------------- Plot digits -------------------
891  const TileDigits* digits1 = 0;
893 
894  // loop over Tile digits
895  for(;itTileDig!=m_clockwork->tile_digits->end();++itTileDig) {
896  if((*itTileDig)->size() >0 && (*itTileDig)->identify()==frag1) {
897  messageDebug("Baa");
898  digits1 = (**itTileDig)[channel1];
899 
900  // search for another container when we are in D0
901  const TileDigits* digits2 = 0;
902  if(channel2==channel1) {
903  itTileDig = m_clockwork->tile_digits->begin();
904 
905  for(;itTileDig!=m_clockwork->tile_digits->end();++itTileDig) {
906  if((*itTileDig)->size() >0 && (*itTileDig)->identify()==frag2) {
907  digits2 = (**itTileDig)[channel2];
908  break;
909  }
910  }
911  } else { // D0
912  messageDebug("CCC");
913  digits2 = (**itTileDig)[channel2];
914  }
915 
916  if(digits2==0) {
917  messageDebug("DDD");
918  message("Unable to find digits for the PMT 1");
920  return;
921  }
922  messageDebug("Displaying Tile digits...");
924  digits1->samples(),
925  digits2->samples(),
926  msg);
927  break;
928  } // found digits 1
929  } // loop over tile digits
930 
931 
932  if(digits1==0) {
933  message("Unable to find digits for the PMT 0");
935  return;
936  }
937  // ----------------- Plot digits -------------------
938 
939  // ---------------- Plot pulse --------------------
940  messageDebug("Tile BB & EC plot pulse");
942  const TileRawChannel* rawchannel1 = 0;
943  // loop over Tile channels
944  for(;itTileRawCh!=m_clockwork->tile_rawchannel->end();++itTileRawCh) {
945 
946  if((*itTileRawCh)->size()>0 && (*itTileRawCh)->identify()==frag1) {
947  rawchannel1 = (**itTileRawCh)[channel1];
948 
949  // find Raw Channel 2
950  const TileRawChannel* rawchannel2 = 0;
951  if(channel2==channel1) {
952  messageDebug("channel2==_channel1");
953  // D0
954  itTileRawCh = m_clockwork->tile_rawchannel->begin();
955  for(;itTileRawCh!=m_clockwork->tile_rawchannel->end();++itTileRawCh)
956  if((*itTileRawCh)->size()>0 && (*itTileRawCh)->identify()==frag2) {
957  messageDebug("Get channel2...");
958  //the following value is never used, gets immediately overwritten after the
959  // break from loop
960  //rawchannel2 = (**itTileRawCh)[channel2];
961  break;
962  }
963  } else{
964  messageDebug("channel2!=_channel1. Get channel2...");
965  }
966  rawchannel2 = (**itTileRawCh)[channel2];
967 
968  if(rawchannel2==0) {
969  message("Unable to get raw channel for PMT1");
970  break;
971  }
972 
973  messageDebug("Displaying Tile pulse...");
974  std::cout << "debug vars :" << rawchannel1 << " - " << rawchannel2 << std::endl;
975  std::cout << m_clockwork->tile_rawchannel << std::endl;
976  std::cout << digits1->samples().size() << std::endl;
977 
978  // note: the controller is the VP1CaloCellController class
979  try {
980  m_clockwork->controller->displayTilePulse(rawchannel1,rawchannel2,m_clockwork->tile_rawchannel,digits1->samples().size());
981  } catch (TileCalib::InvalidRawChanUnit& e) {
982  message("Exception caught!!");
983  std::cout << "ERROR!!! Exception caught from Tile! --> " << e.what() << std::endl;
984  QString title = "ERROR!!! Exception caught!";
985  QString mex = "While displaying Tile Pulse, an exception has been caught!\n\nException details:\n\n" + QString::fromStdString(e.what());
986  messageDebug("Clearing the DigitForm and returning...");
988  messageDebug("Displaying the QMessageBox...");
989  QWidget* widget = 0; // the message box will be parentless
990  QMessageBox::warning( widget, title,
991  mex,
992  QMessageBox::Ok,
993  // | QMessageBox::Discard
994  // | QMessageBox::Cancel,
995  QMessageBox::Ok
996  );
997  messageDebug("Returning...");
998  return;
999  }
1000  messageDebug("Displayed Tile pulse.");
1001  break;
1002  }
1003  }
1004 
1005  if(rawchannel1==0) {
1006  message("Unable to get raw channel for PMT0");
1007  }
1008  // ---------------- Plot pulse --------------------
1009  messageDebug("Returning...");
1010  return;
1011  }
1012  message("Unable to get drawer and channel IDs");
1013  } else
1014  message("Tile digit display not available");
1015 
1016 
1017  messageDebug("clearing...");
1019  messageDebug("cleared. Return...");
1020  return;
1021  }
1022 
1023  // -------------------------- Tile Crack ------------------------------
1024 
1025  VP1CC_TileCrack* tileCrack = dynamic_cast<VP1CC_TileCrack*>((*itNode2CC).second);
1026  if(tileCrack) {
1027  messageDebug("Tile Crack");
1029  int frag, channel;
1030  if(tileCrack->GetFragChannel(m_clockwork->tile_hw_id,false,frag,channel)==0) {
1031  // ----------------- Plot digits -------------------
1032  const TileDigits* digits = 0;
1034  for(;itTileDig!=m_clockwork->tile_digits->end();++itTileDig) {
1035  if((*itTileDig)->size() >0 && (*itTileDig)->identify()==frag) {
1036  digits = (**itTileDig)[channel];
1037 
1039  digits->samples(),
1040  msg);
1041  break;
1042  }
1043  }
1044  if(digits==0) {
1045  message("Unable to find digits");
1047  return;
1048  }
1049  // ----------------- Plot digits -------------------
1050 
1051  // ---------------- Plot pulse --------------------
1053  const TileRawChannel* rawchannel = 0;
1054  for(;itTileRawCh!=m_clockwork->tile_rawchannel->end();++itTileRawCh) {
1055  messageDebug("Tile Crack plot pulse");
1056  if((*itTileRawCh)->size()>0 && (*itTileRawCh)->identify()==frag) {
1057  rawchannel = (**itTileRawCh)[channel];
1059  }
1060  }
1061  if(rawchannel==0)
1062  message("Unable to get raw channel");
1063  // ---------------- Plot pulse --------------------
1064  return;
1065  }
1066  message("Unable to get drawer and channel ID");
1067  } else
1068  message("Tile digit display not available");
1069 
1071 
1072  return;
1073  }
1074 
1075  }// show digits
1076  return;
1077  }// Find node in the VP1CC map
1078 
1079  messageDebug("out of the big loop on nodes...");
1080 
1081  // Maybe MBTS has been selected?
1082  std::vector<std::string> msg = m_clockwork->mbtsHelper->userPickedNode(pickedNode);
1083  for(unsigned int ii=0; ii<msg.size(); ++ii)
1084  message((msg[ii]).c_str());
1085 }
1086 
1088 {
1089  VP1Serialise serialise(0/*version*/,this);
1091 
1093 
1095 
1096  serialise.disableUnsavedChecks();
1097  return serialise.result();
1098 }
1099 
1101 {
1102  VP1Deserialise state(ba,this);
1103 
1104  if (state.version()!=0) {
1105  message("Warning: State data in .vp1 file is in wrong format - ignoring!");
1106  return;
1107  }
1109 
1110  IVP13DSystemSimple::restoreFromState(state.restoreByteArray());
1111 
1112  m_clockwork->controller->restoreSettings(state.restoreByteArray());
1113 
1114  state.disableUnrestoredChecks();
1115 }
1116 
1118 {
1119  // Remove objects from 3D scene
1120  while(m_clockwork->node2ccMap.begin()!=m_clockwork->node2ccMap.end()) {
1121  VP1CC_SoNode2CCMap::iterator it_node2cc = m_clockwork->node2ccMap.begin();
1122  it_node2cc->second->remove3DObjects(&m_clockwork->node2ccMap);
1123  }
1124 
1125  // Clear node 2 CC map
1126  m_clockwork->node2ccMap.clear();
1127 
1128  // Delete Cell Managers and clear the map
1130  for(; it_ccman!=m_clockwork->cell_managers.end(); ++it_ccman)
1131  if(it_ccman->second) delete it_ccman->second;
1132 
1133  m_clockwork->cell_managers.clear();
1134 
1135  // Setup new managers from scratch in the new energy mode
1136  setupEnergyMode();
1137 }
1138 
1140 {
1141  // Prepare Separator Helpers for large changes
1143  for(;itSepHelp != m_clockwork->sepHelperMap.end(); ++itSepHelp)
1144  itSepHelp->second->largeChangesBegin();
1145 
1146  // Create Managers
1148 
1149  // Assign Cells to Managers
1151 
1152  // Update scene with initial values of controller objects
1155  for(; it!=m_clockwork->cell_managers.end(); ++it)
1156  it->second->selectionUpdated(intervals);
1157 
1158  // Large changes over
1159  itSepHelp = m_clockwork->sepHelperMap.begin();
1160  for(;itSepHelp != m_clockwork->sepHelperMap.end(); ++itSepHelp)
1161  itSepHelp->second->largeChangesEnd();
1162 
1163  updateGUI();
1164 }
VP1CC_SelTypeTileB
@ VP1CC_SelTypeTileB
Definition: VP1CaloCells.h:83
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1Serialise.h
VP1CaloCell::getID
Identifier getID()
Definition: VP1CaloCells.cxx:53
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
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
VP1CaloCellController::ClearHideDigitForms
void ClearHideDigitForms()
Definition: VP1CaloCellController.cxx:842
VP1CaloCellSystem::systemuncreate
void systemuncreate()
Definition: VP1CaloCellSystem.cxx:566
VP1CC_TileBarEc::GetFragChannel
int GetFragChannel(const TileHWID *tile_hw_id, bool up, int &frag, int &channel)
Definition: VP1CaloCells.cxx:574
VP1CaloCellSystem::Clockwork::noCalo
bool noCalo
Definition: VP1CaloCellSystem.cxx:91
VP1CaloCellController::displayTilePulse
void displayTilePulse(const TileRawChannel *rawchannel1, const TileRawChannel *rawchannel2, const TileRawChannelContainer *rawchannel_cont, size_t digitsize)
Definition: VP1CaloCellController.cxx:1016
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
VP1CaloCellController.h
VP1Deserialise.h
VP1Serialise
Definition: VP1Serialise.h:45
IVP13DSystemSimple
Definition: IVP13DSystemSimple.h:24
VP1CaloCellController::DeleteDigitForms
void DeleteDigitForms()
Definition: VP1CaloCellController.cxx:851
CaloCell_Base_ID::region
int region(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
VP1MbtsHelper::refreshGraph
void refreshGraph(const VP1Interval &interval)
Definition: VP1MbtsHelper.cxx:311
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
VP1CaloCellController::GetMaterial
SoMaterial * GetMaterial(VP1CC_SeparatorTypes type)
Definition: VP1CaloCellController.cxx:1067
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
VP1CC_LAr
Definition: VP1CaloCells.h:212
VP1CC_SelTypeFCAL1
@ VP1CC_SelTypeFCAL1
Definition: VP1CaloCells.h:80
VP1CC_SepTileNegativeUp
@ VP1CC_SepTileNegativeUp
Definition: VP1CaloCells.h:102
VP1CC_LArEMB
Definition: VP1CaloCells.h:230
RoiUtil::serialise
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors
Definition: RoiSerialise.cxx:45
TileCablingService::getInstance
static const TileCablingService * getInstance()
get pointer to service instance
Definition: TileCablingService.cxx:24
VP1CC_LArEMECHEC
Definition: VP1CaloCells.h:250
VP1CC_TileCrack::GetFragChannel
int GetFragChannel(const TileHWID *tile_hw_id, bool up, int &frag, int &channel)
Definition: VP1CaloCells.cxx:844
VP1CC_SeparatorTypesSet
std::set< VP1CC_SeparatorTypes > VP1CC_SeparatorTypesSet
Definition: VP1CaloCells.h:112
VP1CC_SepTilePositiveNeg
@ VP1CC_SepTilePositiveNeg
Definition: VP1CaloCells.h:101
VP1CC_SepTilePositiveUp
@ VP1CC_SepTilePositiveUp
Definition: VP1CaloCells.h:99
tail
std::string tail(std::string s, const std::string &pattern)
tail of a string
Definition: computils.cxx:300
VP1MaterialButton.h
VP1CC_SepLArFCALPos
@ VP1CC_SepLArFCALPos
Definition: VP1CaloCells.h:94
VP1CaloCellSystem::Clockwork::lar_onlineID
const LArOnlineID * lar_onlineID
Definition: VP1CaloCellSystem.cxx:119
VP1ExtraSepLayerHelper.h
TileCalib::InvalidRawChanUnit
Signals invalid use of TileRawChannelUnit.
Definition: TileCalorimeter/TileConditions/TileConditions/Exception.h:20
VP1CaloCellController::initTilePulse
void initTilePulse(const TileHWID *tile_hw_id, const TileInfo *tile_info, const TileCablingService *tile_cabling)
Definition: VP1CaloCellController.cxx:833
VP1CaloCellSystem::Clockwork::calo_badchannel
const ICaloBadChanTool * calo_badchannel
Definition: VP1CaloCellSystem.cxx:120
CaloCell_Base_ID::pos_neg
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
VP1CaloCellSystem::VP1CaloCellSystem
VP1CaloCellSystem()
Definition: VP1CaloCellSystem.cxx:429
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
skel.it
it
Definition: skel.GENtoEVGEN.py:396
VP1CaloCellManager.h
VP1CaloCellController
Definition: VP1CaloCellController.h:33
TileDigits::NtimeSamples
int NtimeSamples(void) const
Definition: TileDigits.h:62
VP1CaloCellController::selectionMbts
VP1Interval selectionMbts() const
Definition: VP1CaloCellController.cxx:1142
VP1CaloCellSystem::Clockwork::controller
VP1CaloCellController * controller
Definition: VP1CaloCellSystem.cxx:84
VP1CaloCellController::displayLArDigits
void displayLArDigits(int n_samples, std::vector< short > samples, std::vector< std::string > &msg)
Definition: VP1CaloCellController.cxx:888
TileInfo.h
VP1CC_TileBarEc
Definition: VP1CaloCells.h:314
VP1CC_SepLArEMBPos
@ VP1CC_SepLArEMBPos
Definition: VP1CaloCells.h:91
VP1CC_GlobalCuts
Definition: VP1CaloCells.h:47
VP1CaloCellSystem::Clockwork::tile_rawchannel
const TileRawChannelContainer * tile_rawchannel
Definition: VP1CaloCellSystem.cxx:130
sendEI_SPB.root
root
Definition: sendEI_SPB.py:34
VP1CC_SelTypeEMEC3
@ VP1CC_SelTypeEMEC3
Definition: VP1CaloCells.h:75
TileInfo
Definition: TileInfo.h:49
StoreGateSvc::keys
void keys(std::vector< std::string > &vkeys, bool includeAlias=false, bool onlyValid=true) const
provide list of all StoreGate keys associated with an object.
VP1CaloCellSystem::Clockwork::SearchTileRawchanKeys
std::string SearchTileRawchanKeys(const std::vector< std::string > &inputKeys)
Definition: VP1CaloCellSystem.cxx:401
TileDigitsContainer
Definition: TileDigitsContainer.h:13
VP1MbtsHelper::systemerase
void systemerase()
Definition: VP1MbtsHelper.cxx:295
VP1CCIntervalMap
QMap< VP1CC_SelectionTypes, VP1CCIntervalPair > VP1CCIntervalMap
Definition: VP1CaloCells.h:119
VP1CC_SepTileNegativeDown
@ VP1CC_SepTileNegativeDown
Definition: VP1CaloCells.h:103
HWIdentifier
Definition: HWIdentifier.h:13
VP1CaloCellSystem::Clockwork::Clockwork
Clockwork()
Definition: VP1CaloCellSystem.cxx:161
VP1Controller::saveSettings
QByteArray saveSettings() const
Definition: VP1Controller.cxx:405
CaloCell_Base_ID::is_hec
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
ReadCondHandle.h
VP1CaloCellSystem::Clockwork::noTileDigitsEvent
bool noTileDigitsEvent
Definition: VP1CaloCellSystem.cxx:95
VP1CC_SelTypeEMB2
@ VP1CC_SelTypeEMB2
Definition: VP1CaloCells.h:70
TileID.h
VP1CaloCellSystem::Clockwork::tile_hw_id
const TileHWID * tile_hw_id
Definition: VP1CaloCellSystem.cxx:110
TileDetDescrManager.h
VP1CC_SelTypeHEC1
@ VP1CC_SelTypeHEC1
Definition: VP1CaloCells.h:77
IVP1System::state
State state() const
Definition: IVP1System.cxx:129
VP1CaloCellSystem::Clockwork::noLArDigitsGlobal
bool noLArDigitsGlobal
Definition: VP1CaloCellSystem.cxx:92
IVP1System::saveState
virtual QByteArray saveState()
Definition: IVP1System.cxx:294
VP1CaloCellSystem::Clockwork::tile_dd_man
const TileDetDescrManager * tile_dd_man
Definition: VP1CaloCellSystem.cxx:105
VP1CaloCells.h
StoreGateSvc::retrieve
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
VP1QtInventorUtils.h
TileRawChannelContainer.h
VP1CustomTourEditor.h
SoGenericBox::initClass
static void initClass()
Definition: SoGenericBox.cxx:62
VP1CaloCellSystem::Clockwork::tile_digits
const TileDigitsContainer * tile_digits
Definition: VP1CaloCellSystem.cxx:129
VP1Controller::customTourEditor
static VP1CustomTourEditor * customTourEditor()
Definition: VP1Controller.h:61
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
VP1CaloCellSystem::Clockwork::BuildCellManagers
void BuildCellManagers()
Definition: VP1CaloCellSystem.cxx:186
VP1CaloCellSystem::saveState
QByteArray saveState()
Definition: VP1CaloCellSystem.cxx:1087
VP1CaloCellSystem::restoreFromState
void restoreFromState(QByteArray ba)
Definition: VP1CaloCellSystem.cxx:1100
VP1CC_LArFCAL
Definition: VP1CaloCells.h:273
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
CaloCell_Base_ID::is_em
bool is_em(const Identifier id) const
test if the id belongs to LArEM
VP1CaloCellSystem::Clockwork::modeSimple
bool modeSimple
Definition: VP1CaloCellSystem.cxx:97
VP1MbtsHelper::buildEventSceneGraph
void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)
Definition: VP1MbtsHelper.cxx:274
LArOnOffIdMapping.h
TileHWID.h
VP1ExtraSepLayerHelper
Definition: VP1ExtraSepLayerHelper.h:22
VP1Controller::restoreSettings
void restoreSettings(QByteArray)
Definition: VP1Controller.cxx:387
VP1CaloCellSystem::Clockwork::sepHelperMap
VP1CC_SeparatorMap sepHelperMap
Definition: VP1CaloCellSystem.cxx:155
TileCablingService.h
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
VP1CaloCellSystem::Clockwork::sepTypes
VP1CC_SeparatorTypesSet sepTypes
Definition: VP1CaloCellSystem.cxx:158
lumiFormat.i
int i
Definition: lumiFormat.py:85
TileDetDescrManager
Definition: TileDetDescrManager.h:33
VP1CC_SepTileNegativePos
@ VP1CC_SepTileNegativePos
Definition: VP1CaloCells.h:104
CaloCell_Base_ID::is_fcal
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
TileDigitsContainer.h
VP1CaloCellController::drawOptions
SoGroup * drawOptions() const
Definition: VP1CaloCellController.cxx:828
CaloCell_Base_ID::sampling
int sampling(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
VP1CaloCellSystem.h
ICaloBadChanTool.h
VP1MbtsHelper.h
covarianceTool.title
title
Definition: covarianceTool.py:542
calibdata.exception
exception
Definition: calibdata.py:496
VP1MbtsHelper::systemcreate
void systemcreate(StoreGateSvc *detstore)
Definition: VP1MbtsHelper.cxx:67
TileRawChannel
Definition: TileRawChannel.h:35
CaloCell_Base_ID::eta
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
VP1CaloCellSystem::Clockwork::noTileDigitsGlobal
bool noTileDigitsGlobal
Definition: VP1CaloCellSystem.cxx:94
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition: IdentifiableContainerMT.h:242
VP1CC_SelTypeHEC2
@ VP1CC_SelTypeHEC2
Definition: VP1CaloCells.h:78
VP1CaloCellSystem::Clockwork::cell_managers
VP1CCManagerContainer cell_managers
Definition: VP1CaloCellSystem.cxx:137
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
VP1CaloCellController::showDigits
bool showDigits() const
Definition: VP1CaloCellController.cxx:1154
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:82
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition: IdentifiableContainerMT.h:236
IVP13DSystemSimple::ensureBuildController
void ensureBuildController()
Definition: IVP13DSystemSimple.cxx:90
VP1CaloCellSystem::Clockwork::noLArDigitsEvent
bool noLArDigitsEvent
Definition: VP1CaloCellSystem.cxx:93
VP1CaloCellSystem::Clockwork::Clockwork
Clockwork(const Clockwork &)=delete
VP1CC_SelTypeHEC3
@ VP1CC_SelTypeHEC3
Definition: VP1CaloCells.h:79
TileCablingService
Definition: TileCablingService.h:23
VP1CaloCellSystem::Clockwork::tile_id
const TileID * tile_id
Definition: VP1CaloCellSystem.cxx:109
VP1CC_SepLArFCALNeg
@ VP1CC_SepLArFCALNeg
Definition: VP1CaloCells.h:98
VP1Deserialise
Definition: VP1Deserialise.h:44
ICaloBadChanTool
Definition: ICaloBadChanTool.h:15
TileDigits::samples
const std::vector< float > & samples() const
Definition: TileDigits.h:58
VP1CaloCellSystem::Clockwork::FillManagers
void FillManagers()
Definition: VP1CaloCellSystem.cxx:259
VP1CaloCellSystem::buildController
QWidget * buildController()
Definition: VP1CaloCellSystem.cxx:440
ReadCondHandleKey.h
VP1CaloCellSystem::Clockwork::calo_id
const CaloCell_ID * calo_id
Definition: VP1CaloCellSystem.cxx:108
VP1CaloCellManager
Definition: VP1CaloCellManager.h:39
VP1CC_SeparatorMap
std::map< VP1CC_SeparatorTypes, VP1ExtraSepLayerHelper *, std::less< VP1CC_SeparatorTypes > > VP1CC_SeparatorMap
Definition: VP1CaloCells.h:109
VP1CaloCellSystem::Clockwork::operator=
Clockwork & operator=(const Clockwork &)=delete
IVP1System::channel
IVP1ChannelWidget * channel() const
Definition: IVP1System.cxx:275
VP1CaloCellSystem::m_clockwork
Clockwork * m_clockwork
Definition: VP1CaloCellSystem.h:34
VP1MbtsHelper::setController
void setController(VP1CaloCellController *)
Definition: VP1MbtsHelper.cxx:324
IVP1System::messageDebug
void messageDebug(const QString &) const
Definition: IVP1System.cxx:347
TileDigits
Definition: TileDigits.h:30
VP1CC_SelTypeFCAL3
@ VP1CC_SelTypeFCAL3
Definition: VP1CaloCells.h:82
VP1CC_SelTypeHEC0
@ VP1CC_SelTypeHEC0
Definition: VP1CaloCells.h:76
VP1CC_SelTypeEMB1
@ VP1CC_SelTypeEMB1
Definition: VP1CaloCells.h:69
VP1CaloCellSystem::Clockwork::~Clockwork
~Clockwork()
Definition: VP1CaloCellSystem.cxx:181
VP1CaloCellSystem::energyMode
void energyMode()
Definition: VP1CaloCellSystem.cxx:1117
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
LArOnlineID
Definition: LArOnlineID.h:20
VP1CC_SelTypeFCAL2
@ VP1CC_SelTypeFCAL2
Definition: VP1CaloCells.h:81
CaloCell_Base_ID::phi
int phi(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
LArDigitContainer.h
VP1CaloCellController::EnableDigitsCheckbox
void EnableDigitsCheckbox(bool enable)
Definition: VP1CaloCellController.cxx:883
CaloCellContainer.h
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
VP1CC_SepTilePositiveDown
@ VP1CC_SepTilePositiveDown
Definition: VP1CaloCells.h:100
VP1CC_SelTypeTileEC
@ VP1CC_SelTypeTileEC
Definition: VP1CaloCells.h:84
VP1CaloCellSystem::systemerase
void systemerase()
Definition: VP1CaloCellSystem.cxx:543
VP1CC_SepLArHECNeg
@ VP1CC_SepLArHECNeg
Definition: VP1CaloCells.h:97
VP1CaloCellSystem::systemcreate
void systemcreate(StoreGateSvc *detstore)
Definition: VP1CaloCellSystem.cxx:464
VP1CC_SepLArEMECNeg
@ VP1CC_SepLArEMECNeg
Definition: VP1CaloCells.h:96
IVP1System::toolSvc
IToolSvc * toolSvc() const
Definition: IVP1System.cxx:330
VP1CaloCellSystem::~VP1CaloCellSystem
~VP1CaloCellSystem()
Definition: VP1CaloCellSystem.cxx:435
VP1MbtsHelper::userPickedNode
std::vector< std::string > userPickedNode(SoNode *pickedNode)
Definition: VP1MbtsHelper.cxx:335
VP1CC_SelTypeEMEC0
@ VP1CC_SelTypeEMEC0
Definition: VP1CaloCells.h:72
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
SG::ReadCondHandleKey< LArOnOffIdMapping >
IVP13DSystemSimple::updateGUI
void updateGUI()
Definition: IVP13DSystemSimple.h:89
VP1Interval
Definition: VP1Interval.h:23
VP1CaloCellSystem::Clockwork
Definition: VP1CaloCellSystem.cxx:62
VP1CaloCellSystem::userPickedNode
void userPickedNode(SoNode *pickedNode, SoPath *pickedPath)
Definition: VP1CaloCellSystem.cxx:752
VP1CaloCellSystem::Clockwork::tile_info
const TileInfo * tile_info
Definition: VP1CaloCellSystem.cxx:117
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
VP1CC_TileCrack
Definition: VP1CaloCells.h:351
VP1CaloCellController::selectionIntervals
VP1CCIntervalMap selectionIntervals() const
Definition: VP1CaloCellController.cxx:1076
VP1CaloCellSystem::setupEnergyMode
void setupEnergyMode()
Definition: VP1CaloCellSystem.cxx:1139
VP1CC_SepMBTS
@ VP1CC_SepMBTS
Definition: VP1CaloCells.h:105
VP1MbtsHelper
Definition: VP1MbtsHelper.h:19
LArDigitContainer
Container class for LArDigit.
Definition: LArDigitContainer.h:24
VP1CC_SepLArEMBNeg
@ VP1CC_SepLArEMBNeg
Definition: VP1CaloCells.h:95
VP1CC_SepLArEMECPos
@ VP1CC_SepLArEMECPos
Definition: VP1CaloCells.h:92
Exception.h
merge.status
status
Definition: merge.py:17
VP1CC_SepLArHECPos
@ VP1CC_SepLArHECPos
Definition: VP1CaloCells.h:93
VP1CaloCellSystem::Clockwork::tile_cabling
const TileCablingService * tile_cabling
Definition: VP1CaloCellSystem.cxx:118
LArOnlineID_Base::channel_name
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
Definition: LArOnlineID_Base.cxx:219
VP1CC_SelTypeEMB0
@ VP1CC_SelTypeEMB0
Definition: VP1CaloCells.h:68
VP1CaloCellSystem::Clockwork::node2ccMap
VP1CC_SoNode2CCMap node2ccMap
Definition: VP1CaloCellSystem.cxx:152
StoreGateSvc.h
VP1CaloCellSystem::Clockwork::calocells
const CaloCellContainer * calocells
Definition: VP1CaloCellSystem.cxx:127
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
VP1CC_SelTypeEMB3
@ VP1CC_SelTypeEMB3
Definition: VP1CaloCells.h:71
VP1CaloCellSystem::Clockwork::mbtsHelper
VP1MbtsHelper * mbtsHelper
Definition: VP1CaloCellSystem.cxx:144
VP1CaloCellSystem::Clockwork::lar_digits
const LArDigitContainer * lar_digits
Definition: VP1CaloCellSystem.cxx:128
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
LArID_Exception
Exception class for LAr Identifiers.
Definition: LArID_Exception.h:20
SoGenericBox.h
VP1CC_SelTypeTileCrack
@ VP1CC_SelTypeTileCrack
Definition: VP1CaloCells.h:85
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
VP1CC_SelTypeEMEC2
@ VP1CC_SelTypeEMEC2
Definition: VP1CaloCells.h:74
LArOnlineID.h
VP1CCManagerContainer
std::map< VP1CC_SelectionTypes, VP1CaloCellManager *, std::less< VP1CC_SelectionTypes > > VP1CCManagerContainer
Definition: VP1CaloCellManager.h:100
IVP1System::restoreFromState
virtual void restoreFromState(QByteArray)
Definition: IVP1System.cxx:302
VP1CC_SoNode2CCMap
std::map< SoNode *, VP1CaloCell *, std::less< SoNode * > > VP1CC_SoNode2CCMap
Definition: VP1CaloCells.h:156
TileDetDescrManager::get_id
const TileID * get_id() const
Definition: TileDetDescrManager.h:172
VP1CaloCellSystem::buildEventSceneGraph
void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)
Definition: VP1CaloCellSystem.cxx:572
VP1CC_SelTypeEMEC1
@ VP1CC_SelTypeEMEC1
Definition: VP1CaloCells.h:73
Identifier
Definition: IdentifierFieldParser.cxx:14