ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
LArFCalTowerBuilderTool Class Reference

special tower builder for FCal More...

#include <LArFCalTowerBuilderTool.h>

Inheritance diagram for LArFCalTowerBuilderTool:
Collaboration diagram for LArFCalTowerBuilderTool:

Public Member Functions

 LArFCalTowerBuilderTool (const LArFCalTowerBuilderTool &)=delete
 
LArFCalTowerBuilderTooloperator= (const LArFCalTowerBuilderTool &)=delete
 
 LArFCalTowerBuilderTool (const std::string &name, const std::string &type, const IInterface *parent)
 AlgTool constructor. More...
 
virtual ~LArFCalTowerBuilderTool ()
 
virtual StatusCode execute (const EventContext &ctx, CaloTowerContainer *theContainer, const CaloCellContainer *theCell=0, const CaloTowerSeg::SubSeg *subseg=0) const override
 Run tower building and add results to the tower container. More...
 
virtual StatusCode execute (const EventContext &ctx, CaloTowerContainer *theContainer) override
 Run tower building and add results to the tower container. More...
 
virtual StatusCode initialize ATLAS_NOT_THREAD_SAFE () override
 common initialization More...
 
virtual void setTowerSeg (const CaloTowerSeg &theTowerSeg) override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

const CaloTowerSegtowerSeg () const
 Return the tower segmentation. More...
 
const CaloCellContainergetCells () const
 Retrieve cells from StoreGate. More...
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

SG::ReadHandleKey< CaloCellContainerm_cellContainerName
 
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey {this,"CaloDetDescrManager","CaloDetDescrManager"}
 

Private Types

typedef LArFCalTowerStore::tower_iterator tower_iterator
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

virtual StatusCode initializeTool () override
 
void addTower (const tower_iterator &t, const ElementLink< CaloCellContainer > &cellsEL, CaloTower *tower) const
 
void iterateFull (CaloTowerContainer *towers, const ElementLink< CaloCellContainer > &cellsEL) const
 
void iterateSubSeg (CaloTowerContainer *towers, const ElementLink< CaloCellContainer > &cellsEL, const CaloTowerSeg::SubSeg *subseg) const
 
StatusCode rebuildLookup (const EventContext &ctx)
 Rebuild the cell lookup table. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

double m_minEt
 
const CaloCell_IDm_cellIdHelper
 
const LArFCAL_IDm_larFCalId
 
LArFCalTowerStore m_cellStore
 
std::mutex m_cellStoreMutex
 
std::atomic_bool m_cellStoreInit {false}
 
CaloTowerSeg m_theTowerSeg
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static const CaloCell_ID::SUBCALO m_caloIndex = CaloCell_ID::LARFCAL
 

Detailed Description

special tower builder for FCal

LArFCalTowerBuilderTool is FCal specific. It first produces "mini-cells", which are FCal cell fragments defining the overlap between the (eta,phi) tower grid and the rectangular FCal cell. These mini-cells are then collected onto the tower grid.

Author
Peter Loch loch@.nosp@m.phsy.nosp@m.ics.a.nosp@m.rizo.nosp@m.na.ed.nosp@m.u
Date
April 30, 2004 - first implementation

Definition at line 35 of file LArFCalTowerBuilderTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ tower_iterator

Definition at line 71 of file LArFCalTowerBuilderTool.h.

Constructor & Destructor Documentation

◆ LArFCalTowerBuilderTool() [1/2]

LArFCalTowerBuilderTool::LArFCalTowerBuilderTool ( const LArFCalTowerBuilderTool )
delete

◆ LArFCalTowerBuilderTool() [2/2]

LArFCalTowerBuilderTool::LArFCalTowerBuilderTool ( const std::string &  name,
const std::string &  type,
const IInterface *  parent 
)

AlgTool constructor.

Definition at line 26 of file LArFCalTowerBuilderTool.cxx.

30  , m_minEt(0.)
31  , m_cellIdHelper(nullptr)
32  , m_larFCalId(nullptr)
33 {
34  // Et cut for minicells
35  declareProperty("MinimumEt",m_minEt);
36 }

◆ ~LArFCalTowerBuilderTool()

LArFCalTowerBuilderTool::~LArFCalTowerBuilderTool ( )
virtual

Definition at line 38 of file LArFCalTowerBuilderTool.cxx.

38  {
39 }

Member Function Documentation

◆ addTower()

void LArFCalTowerBuilderTool::addTower ( const tower_iterator t,
const ElementLink< CaloCellContainer > &  cellsEL,
CaloTower tower 
) const
inlineprivate

Definition at line 62 of file LArFCalTowerBuilderTool.cxx.

65 {
68  // here get needed size of this vector and use it to reserve tower size.
69  int ts= m_cellStore.towerSize(t);
70  double wsumE = tower->getBasicEnergy(); // this is not 0 since some towers already have cells from other calos.
71  const CaloCellContainer* cells = cellsEL.getDataPtr();
72  for (; firstC != lastC; ++firstC) {
73 
74  unsigned int ci = firstC->first;
75  double weightC = firstC->second;
76  int cndx = cells->findIndex(ci);
77  const CaloCell* cellPtr = nullptr;
78  if (cndx >= 0)
79  cellPtr = (*cells)[cndx];
80  // get weights
81  if (cellPtr) {
82  wsumE += weightC * cellPtr->e(); // Summ up weighted energies .
83  tower->addUniqueCellNoKine(cellsEL, cndx, weightC, ts); // add cells to tower.
84  }
85  }
86  tower->setE(wsumE); // update tower kinematics.
87 }

◆ ATLAS_NOT_THREAD_SAFE()

virtual StatusCode initialize CaloTowerBuilderToolBase::ATLAS_NOT_THREAD_SAFE ( )
overridevirtualinherited

common initialization

Implements ICaloTowerBuilderToolBase.

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute() [1/2]

StatusCode LArFCalTowerBuilderTool::execute ( const EventContext &  ctx,
CaloTowerContainer theContainer 
)
overridevirtual

Run tower building and add results to the tower container.

Parameters
ctxThe current event context.
theContainerThe tower container to fill.

If the segmentation hasn't been set, take it from the tower container. This is for use by converters.

Implements CaloTowerBuilderToolBase.

Definition at line 190 of file LArFCalTowerBuilderTool.cxx.

192 {
193  if (m_cellStore.size() == 0) {
194  setTowerSeg (theContainer->towerseg());
195  ATH_CHECK( rebuildLookup(ctx) );
196  }
197 
198  return execute (ctx, theContainer, nullptr, nullptr);
199 }

◆ execute() [2/2]

StatusCode LArFCalTowerBuilderTool::execute ( const EventContext &  ctx,
CaloTowerContainer theContainer,
const CaloCellContainer theCell = 0,
const CaloTowerSeg::SubSeg subseg = 0 
) const
overridevirtual

Run tower building and add results to the tower container.

If a cell container is provided, use that; otherwise, fetch from SG (the key is given by a job property). If subseg is provided, then we do the building only within the rectangular region that it describes. The segmentation of the tower container must match the region over which we're running the tower building.

Parameters
ctxThe current event context.
theContainerThe tower container to fill.
theCellThe cell container to read. If null, we fetch from SG.
subsegIf provided, run tower building only within this window. The tower container segmentation must match.

Implements CaloTowerBuilderToolBase.

Definition at line 128 of file LArFCalTowerBuilderTool.cxx.

132 {
133 
134  //Init internal structure m_cellStore on first invocation
135  //Alignment updates are not taken into account!
136  if (m_cellStoreInit.load() == false) {
137  //Aquire mutex before writing to m_cellStore
138  std::scoped_lock guard(m_cellStoreMutex);
139  //cast alway const-ness, acceptable since this is protected by a mutex
141  ATH_CHECK( thisNC->rebuildLookup(ctx) );
142  m_cellStoreInit.store(true);
143  }
144 
145 
146  if (m_cellStore.size() == 0) {
147  ATH_MSG_ERROR("Cell store not initialized.");
148  return StatusCode::FAILURE;
149  }
150 
151  // retrieve cells
152  if (!theCells) {
153  theCells = getCells();
154  if (!theCells) {
155  return StatusCode::SUCCESS;
156  }
157  }
158 
159  // check if any FCal in container
160  if ( theCells->nCellsCalo(m_caloIndex) == 0 ){
161  ATH_MSG_DEBUG( "no FCal cells in CaloCellContainer, skip tool!" );
162  return StatusCode::SUCCESS;
163  }
164 
166  // Map Cells on Towers //
168 
169  // register this calorimeter
170  theTowers->setCalo(m_caloIndex);
171 
172  const ElementLink<CaloCellContainer> cellsEL (*theCells, 0, ctx);
173  if (subseg)
174  iterateSubSeg (theTowers, cellsEL, subseg);
175  else
176  iterateFull (theTowers, cellsEL);
177 
178  return StatusCode::SUCCESS;
179 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getCells()

const CaloCellContainer * CaloTowerBuilderToolBase::getCells ( ) const
protectedinherited

Retrieve cells from StoreGate.

Definition at line 59 of file CaloTowerBuilderToolBase.cxx.

60 {
61  const CaloCellContainer* cells = nullptr;
62  if (!m_cellContainerName.key().empty()) {
64  if (!cells) {
65  ATH_MSG_WARNING("no CaloCellContainer with key <"
66  << m_cellContainerName.key() << "> found, skip tool!");
67 
68  }
69  }
70  return cells;
71 }

◆ initializeTool()

StatusCode LArFCalTowerBuilderTool::initializeTool ( )
overrideprivatevirtual

Implements CaloTowerBuilderToolBase.

Definition at line 45 of file LArFCalTowerBuilderTool.cxx.

45  {
46  ATH_CHECK( detStore()->retrieve (m_cellIdHelper, "CaloCell_ID") );
48 
49  // ignore other input!
50  ATH_MSG_INFO( "CaloTowerBuilder for the FCal initiated" );
51 
52  return StatusCode::SUCCESS;
53 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& ICaloTowerBuilderToolBase::interfaceID ( )
inlinestaticinherited

Definition at line 71 of file ICaloTowerBuilderToolBase.h.

71  {
72  static const InterfaceID IID("ICaloTowerBuilderToolBase", 1 , 0);
73  return IID;
74  }

◆ iterateFull()

void LArFCalTowerBuilderTool::iterateFull ( CaloTowerContainer towers,
const ElementLink< CaloCellContainer > &  cellsEL 
) const
inlineprivate

Definition at line 92 of file LArFCalTowerBuilderTool.cxx.

94 {
95  size_t sz = towers->size();
96  assert(m_cellStore.size() == sz);
97  tower_iterator tower_it = m_cellStore.towers();
98 
99  for (unsigned int t = 0; t < sz; ++t, ++tower_it) {
100  CaloTower* aTower = towers->getTower(t);
101  addTower (tower_it, cellsEL, aTower);
102  }
103 }

◆ iterateSubSeg()

void LArFCalTowerBuilderTool::iterateSubSeg ( CaloTowerContainer towers,
const ElementLink< CaloCellContainer > &  cellsEL,
const CaloTowerSeg::SubSeg subseg 
) const
inlineprivate

Definition at line 108 of file LArFCalTowerBuilderTool.cxx.

111 {
112  size_t sz = towers->size();
113  assert(subseg->size() == sz);
115 
116  for (unsigned int t = 0; t < sz; ++t, ++tower_it) {
117  CaloTower* aTower = towers->getTower(tower_it.itower());
118  addTower (tower_it, cellsEL, aTower);
119  }
120 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ operator=()

LArFCalTowerBuilderTool& LArFCalTowerBuilderTool::operator= ( const LArFCalTowerBuilderTool )
delete

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ rebuildLookup()

StatusCode LArFCalTowerBuilderTool::rebuildLookup ( const EventContext &  ctx)
private

Rebuild the cell lookup table.

Definition at line 206 of file LArFCalTowerBuilderTool.cxx.

207 {
208  ATH_MSG_DEBUG("Building lookup table");
210  const CaloDetDescrManager* theManager = *caloMgrHandle;
211  CaloTowerContainer theTowers (towerSeg());
213  *theManager,
214  &theTowers) )
215  {
216  return StatusCode::SUCCESS;
217  }
218  return StatusCode::FAILURE;
219 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setTowerSeg()

void CaloTowerBuilderToolBase::setTowerSeg ( const CaloTowerSeg theTowerSeg)
overridevirtualinherited

Implements ICaloTowerBuilderToolBase.

Definition at line 37 of file CaloTowerBuilderToolBase.cxx.

37  {
38 
39  ATH_MSG_DEBUG(" in CaloTowerBuilderToolBase::setTowerSeg ");
40  m_theTowerSeg = theTowerSeg;
41  ATH_MSG_DEBUG(" neta,nphi,etamin,etamax " << theTowerSeg.neta()
42  << " " << theTowerSeg.nphi() << " " << theTowerSeg.etamin()
43  << " " << theTowerSeg.etamax());
44 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ towerSeg()

const CaloTowerSeg & CaloTowerBuilderToolBase::towerSeg ( ) const
protectedinherited

Return the tower segmentation.

Definition at line 50 of file CaloTowerBuilderToolBase.cxx.

51 {
52  return m_theTowerSeg;
53 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_caloIndex

CaloCell_ID::SUBCALO const LArFCalTowerBuilderTool::m_caloIndex = CaloCell_ID::LARFCAL
staticprivate

Definition at line 90 of file LArFCalTowerBuilderTool.h.

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> CaloTowerBuilderToolBase::m_caloMgrKey {this,"CaloDetDescrManager","CaloDetDescrManager"}
protectedinherited

Definition at line 95 of file CaloTowerBuilderToolBase.h.

◆ m_cellContainerName

SG::ReadHandleKey<CaloCellContainer> CaloTowerBuilderToolBase::m_cellContainerName
protectedinherited

Definition at line 92 of file CaloTowerBuilderToolBase.h.

◆ m_cellIdHelper

const CaloCell_ID* LArFCalTowerBuilderTool::m_cellIdHelper
private

Definition at line 92 of file LArFCalTowerBuilderTool.h.

◆ m_cellStore

LArFCalTowerStore LArFCalTowerBuilderTool::m_cellStore
private

Definition at line 95 of file LArFCalTowerBuilderTool.h.

◆ m_cellStoreInit

std::atomic_bool LArFCalTowerBuilderTool::m_cellStoreInit {false}
mutableprivate

Definition at line 97 of file LArFCalTowerBuilderTool.h.

◆ m_cellStoreMutex

std::mutex LArFCalTowerBuilderTool::m_cellStoreMutex
mutableprivate

Definition at line 96 of file LArFCalTowerBuilderTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_larFCalId

const LArFCAL_ID* LArFCalTowerBuilderTool::m_larFCalId
private

Definition at line 93 of file LArFCalTowerBuilderTool.h.

◆ m_minEt

double LArFCalTowerBuilderTool::m_minEt
private

Definition at line 67 of file LArFCalTowerBuilderTool.h.

◆ m_theTowerSeg

CaloTowerSeg CaloTowerBuilderToolBase::m_theTowerSeg
privateinherited

Definition at line 99 of file CaloTowerBuilderToolBase.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LArFCalTowerStore::cell_iterator
tower_data_t::const_iterator cell_iterator
Definition: LArFCalTowerStore.h:41
CaloTowerSeg::SubSegIterator
Iterator over a rectangular window of towers.
Definition: CaloTowerSeg.h:337
RunTileCalibRec.cells
cells
Definition: RunTileCalibRec.py:271
fitman.sz
sz
Definition: fitman.py:527
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArFCalTowerBuilderTool::iterateFull
void iterateFull(CaloTowerContainer *towers, const ElementLink< CaloCellContainer > &cellsEL) const
Definition: LArFCalTowerBuilderTool.cxx:92
LArFCalTowerStore::size
size_t size() const
size of internal data store
Definition: LArFCalTowerStore.h:80
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArFCalTowerBuilderTool::rebuildLookup
StatusCode rebuildLookup(const EventContext &ctx)
Rebuild the cell lookup table.
Definition: LArFCalTowerBuilderTool.cxx:206
CaloTowerBuilderToolBase::m_theTowerSeg
CaloTowerSeg m_theTowerSeg
Definition: CaloTowerBuilderToolBase.h:99
LArFCalTowerStore::towers
tower_iterator towers() const
Definition: LArFCalTowerStore.h:53
LArFCalTowerBuilderTool::m_cellIdHelper
const CaloCell_ID * m_cellIdHelper
Definition: LArFCalTowerBuilderTool.h:92
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
CaloCell::e
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition: CaloCell.h:317
CaloTowerSeg::neta
index_t neta() const
Retrieve number of bins.
Definition: CaloTowerSeg.h:423
CaloTowerBuilderToolBase::getCells
const CaloCellContainer * getCells() const
Retrieve cells from StoreGate.
Definition: CaloTowerBuilderToolBase.cxx:59
LArFCalTowerStore::lastCellofTower
cell_iterator lastCellofTower(tower_iterator t) const
Definition: LArFCalTowerStore.h:71
LArFCalTowerBuilderTool::tower_iterator
LArFCalTowerStore::tower_iterator tower_iterator
Definition: LArFCalTowerBuilderTool.h:71
LArFCalTowerBuilderTool::m_minEt
double m_minEt
Definition: LArFCalTowerBuilderTool.h:67
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
LArFCalTowerStore::firstCellofTower
cell_iterator firstCellofTower(tower_iterator t) const
iterators: cells
Definition: LArFCalTowerStore.h:70
CaloEnergyCluster::addUniqueCellNoKine
void addUniqueCellNoKine(const CaloCellContainer *theContainer, index_type theIndex, double weight, size_t size_hint=0)
Add a cell (very fast)
Definition: CaloEnergyCluster.cxx:125
CaloTowerSeg::nphi
index_t nphi() const
Retrieve number of bins.
Definition: CaloTowerSeg.h:428
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
LArFCalTowerBuilderTool::m_larFCalId
const LArFCAL_ID * m_larFCalId
Definition: LArFCalTowerBuilderTool.h:93
CaloTowerContainer
Storable container class for CaloTower.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:77
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CaloTowerBuilderToolBase::towerSeg
const CaloTowerSeg & towerSeg() const
Return the tower segmentation.
Definition: CaloTowerBuilderToolBase.cxx:50
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloTowerSeg::SubSegIterator::itower
size_t itower() const
The tower index to which the iterator is referring.
Definition: CaloTowerSeg.h:710
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
LArFCalTowerBuilderTool::m_caloIndex
static const CaloCell_ID::SUBCALO m_caloIndex
Definition: LArFCalTowerBuilderTool.h:90
LArFCalTowerBuilderTool::m_cellStore
LArFCalTowerStore m_cellStore
Definition: LArFCalTowerBuilderTool.h:95
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
CaloTower
Data class for calorimeter cell towers.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTower.h:55
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CaloTowerSeg::etamax
double etamax() const
Retrieve upper boundary value range.
Definition: CaloTowerSeg.h:448
CaloTowerContainer::towerseg
const CaloTowerSeg & towerseg() const
Return a copy of the attached CaloTowerSeg.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:591
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
LArFCalTowerStore::towerSize
unsigned int towerSize(tower_iterator t) const
Definition: LArFCalTowerStore.h:72
CaloTowerBuilderToolBase::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: CaloTowerBuilderToolBase.h:95
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
LArFCalTowerBuilderTool::m_cellStoreInit
std::atomic_bool m_cellStoreInit
Definition: LArFCalTowerBuilderTool.h:97
CaloTowerSeg::etamin
double etamin() const
Retrieve lower boundary value range.
Definition: CaloTowerSeg.h:443
LArFCalTowerBuilderTool::m_cellStoreMutex
std::mutex m_cellStoreMutex
Definition: LArFCalTowerBuilderTool.h:96
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
RunTileMonitoring.towers
towers
Definition: RunTileMonitoring.py:133
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArFCalTowerBuilderTool
special tower builder for FCal
Definition: LArFCalTowerBuilderTool.h:36
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloTowerBuilderToolBase::m_cellContainerName
SG::ReadHandleKey< CaloCellContainer > m_cellContainerName
Definition: CaloTowerBuilderToolBase.h:92
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
P4EEtaPhiM::setE
virtual void setE(double theE)
set energy data member
Definition: P4EEtaPhiM.h:114
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
CaloTowerBuilderToolBase::CaloTowerBuilderToolBase
CaloTowerBuilderToolBase(const std::string &name, const std::string &type, const IInterface *parent)
AlgTool constructor.
Definition: CaloTowerBuilderToolBase.cxx:14
LArFCalTowerBuilderTool::addTower
void addTower(const tower_iterator &t, const ElementLink< CaloCellContainer > &cellsEL, CaloTower *tower) const
Definition: LArFCalTowerBuilderTool.cxx:62
CaloTowerSeg::SubSeg::size
size_t size() const
The number of towers in this window.
Definition: CaloTowerSeg.h:591
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
python.CaloScaleNoiseConfig.ts
ts
Definition: CaloScaleNoiseConfig.py:86
SG::get
const T * get(const ReadHandleKey< T > &key)
Convenience function to retrieve an object given a ReadHandleKey.
LArFCalTowerBuilderTool::execute
virtual StatusCode execute(const EventContext &ctx, CaloTowerContainer *theContainer, const CaloCellContainer *theCell=0, const CaloTowerSeg::SubSeg *subseg=0) const override
Run tower building and add results to the tower container.
Definition: LArFCalTowerBuilderTool.cxx:128
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
CaloTowerBuilderToolBase::setTowerSeg
virtual void setTowerSeg(const CaloTowerSeg &theTowerSeg) override
Definition: CaloTowerBuilderToolBase.cxx:37
CaloCell_ID::fcal_idHelper
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
Definition: CaloCell_ID.h:75
fitman.k
k
Definition: fitman.py:528
LArFCalTowerStore::buildLookUp
bool buildLookUp(const CaloCell_ID &cellIdHelper, const CaloDetDescrManager &theManager, CaloTowerContainer *theTowers)
setup trigger
Definition: LArFCalTowerStore.cxx:67
CaloTower::getBasicEnergy
virtual double getBasicEnergy() const override
Basic signal getter.
Definition: CaloTower.cxx:51
LArFCalTowerBuilderTool::iterateSubSeg
void iterateSubSeg(CaloTowerContainer *towers, const ElementLink< CaloCellContainer > &cellsEL, const CaloTowerSeg::SubSeg *subseg) const
Definition: LArFCalTowerBuilderTool.cxx:108