Skip to content
Snippets Groups Projects

Implement new Region Selector conditions algorithm and flesh out the new RegSelTool class

Closed Mark Sutton requested to merge sutt/athena:master-rstool into master

The new approach to provide an individual RegSelTool for each subdetector makes use of the detector cabling information becoming conditions data.

The new RegSelCondAlg is a conditions algorithm that depends - in the first instance - on the pixel cabling conditions data, as a proof of concept, and adds the RS lookup table as conditions data.

The new RegSelTool that has a dependence on the RS lookup table conditions data. This is all to effectively replicate the Run 2 begin run functionality but with the new conditions handling in MT.

A subsequent request consisting of the configuration code needed to use these classes is currently being developed.

This is a first proof of principle implementation - once it is all working correctly any remaining issues will be fixed - remove redundant comments, add tables for other detector subcomponents etc, rather than allow these issues to act as a distraction at this point.

Edited by Mark Sutton

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
35 35 PrintHashId = True,
36 36 PrintTable = False)
37 37 ToolSvc += PixelRegionSelectorTable
  • This line, which creates a public tool, can be deleted.

    As for the comment just below, since the RegSelTool only contains a few bytes of private data, the overhead of instantiating many of them is very small. The actual payload is stored in the conditions store and shared by all instances.

  • Please register or sign in to reply
  • 1
  • 13
    14 #include "InDetReadoutGeometry/SiDetectorElementCollection.h"
    15 #include "InDetReadoutGeometry/SiDetectorElement.h"
    16
    17 #include "InDetIdentifier/SCT_ID.h"
    18 #include "InDetIdentifier/PixelID.h"
    19
    20
    21
    22 SiRegSelCondAlg::SiRegSelCondAlg(const std::string& name, ISvcLocator* pSvcLocator):
    23 AthReentrantAlgorithm( name, pSvcLocator ),
    24 m_managerName(""),
    25 m_printTable(false),
    26 m_sctCablingToolInc("SCT_CablingToolInc")
    27 {
    28 declareProperty("PrintTable", m_printTable=false);
    • I suppose this code has been copied from elsewhere, but I will still make some comments with regards to coding style/recommendations.

      For new code, it's much easier to declare the properties in the header file. E.g.

      Gaudi::Property<bool> m_printTable{this, "PrintTable", false};

      This also has the advantage that they appear in the same place as the Handle property declarations.

      Edited by Frank Winklmeier
    • Please register or sign in to reply
  • 22 SiRegSelCondAlg::SiRegSelCondAlg(const std::string& name, ISvcLocator* pSvcLocator):
    23 AthReentrantAlgorithm( name, pSvcLocator ),
    24 m_managerName(""),
    25 m_printTable(false),
    26 m_sctCablingToolInc("SCT_CablingToolInc")
    27 {
    28 declareProperty("PrintTable", m_printTable=false);
    29 declareProperty("ManagerName", m_managerName);
    30 }
    31
    32
    33
    34
    35 StatusCode SiRegSelCondAlg::initialize()
    36 {
    37 ATH_MSG_INFO("SiRegSelCondAlg::initialize() -- enter -- ");
  • 39 ATH_MSG_INFO("SiRegSelCondAlg::initialize() -- exit -- ");
    40
    41 return StatusCode::SUCCESS;
    42 }
    43
    44
    45
    46
    47 StatusCode SiRegSelCondAlg::execute(const EventContext& ctx) const
    48 {
    49 ATH_MSG_DEBUG("SiRegSelCondAlg::execute() -- enter -- ");
    50
    51
    52 /// do stuff here ...
    53
    54 if ( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << "Creating region selector table" << endmsg;
  • 47 StatusCode SiRegSelCondAlg::execute(const EventContext& ctx) const
    48 {
    49 ATH_MSG_DEBUG("SiRegSelCondAlg::execute() -- enter -- ");
    50
    51
    52 /// do stuff here ...
    53
    54 if ( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << "Creating region selector table" << endmsg;
    55
    56 StatusCode sc;
    57
    58 // Retrieve manager
    59 const InDetDD::SiDetectorManager* manager;
    60 sc=detStore()->retrieve( manager, m_managerName );
    61
    62 if ( sc.isFailure() ) {
  • 65 } else {
    66 if ( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << "Manager found" << endmsg;
    67 }
    68
    69
    70 /// only really want this if this is the pixel setup
    71 /// as such, if we want to set this up inside an if statment,
    72 /// as we need it outside, we will nee to create it via a
    73 /// pointer - how unpleasant. Will leave it as is here
    74
    75 SG::ReadCondHandle<PixelCablingCondData> pixCabling( m_condCablingKey, ctx );
    76
    77 EventIDRange id_range;
    78
    79 if (!manager->isPixel()) { // SCT
    80 if (m_sctCablingToolInc.retrieve().isFailure()) {
  • 1 /** emacs: this is -*- c++ -*- **/
  • 169 }
    170 }
    171
    172 msg(MSG::INFO) << " initialising new map " << endmsg;
    173
    174 rd->initialise();
    175
    176 // write out new new LUT to a file if need be
    177 if ( m_printTable ) {
    178 if ( manager->isPixel() ) rd->write("RegSelLUT_Pixel");
    179 else rd->write("RegSelLUT_SCT");
    180 }
    181
    182 /// record LUT cond data
    183
    184 if (!manager->isPixel()) {
  • Please resolve discussions.

    Magdalena (L1 shifter)

  • Mark Sutton added 1 commit

    added 1 commit

    • cc4f9f34 - Add missing PixRegSelTool header

    Compare with previous version

  • This merge request affects 3 packages:

    • DetectorDescription/IRegionSelector
    • DetectorDescription/RegionSelector
    • InnerDetector/InDetDetDescr/InDetRegionSelector

    Adding @sutt ,@goetz ,@sroe ,@nkoehler ,@rbianchi as watchers

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading