ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
GlobalSim::EMB1CellsFromCaloCells Class Reference

#include <EMB1CellsFromCaloCells.h>

Inheritance diagram for GlobalSim::EMB1CellsFromCaloCells:
Collaboration diagram for GlobalSim::EMB1CellsFromCaloCells:

Public Member Functions

 EMB1CellsFromCaloCells (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~EMB1CellsFromCaloCells ()
 
virtual StatusCode initialize () override
 
virtual StatusCode cells (std::vector< const CaloCell * > &, const EventContext &) const override
 

Private Attributes

SG::ReadHandleKey< CaloCellContainerm_caloCellsKey
 
Gaudi::Property< bool > m_makeCaloCellContainerChecks
 

Detailed Description

Definition at line 15 of file Global/GlobalSimulation/src/GlobalAlgs/EMB1CellsFromCaloCells.h.

Constructor & Destructor Documentation

◆ EMB1CellsFromCaloCells()

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

Definition at line 9 of file Global/GlobalSimulation/src/GlobalAlgs/EMB1CellsFromCaloCells.cxx.

11  :
12  base_class(type, name, parent){
13  }

◆ ~EMB1CellsFromCaloCells()

virtual GlobalSim::EMB1CellsFromCaloCells::~EMB1CellsFromCaloCells ( )
inlinevirtual

Member Function Documentation

◆ cells()

StatusCode EMB1CellsFromCaloCells::cells ( std::vector< const CaloCell * > &  cells,
const EventContext &  ctx 
) const
overridevirtual

Definition at line 22 of file Global/GlobalSimulation/src/GlobalAlgs/EMB1CellsFromCaloCells.cxx.

23  {
24 
25  // Read in a container containing all CaloCells
26 
27  auto h_caloCells = SG::makeHandle(m_caloCellsKey, ctx);
28  CHECK(h_caloCells.isValid());
29 
30  const auto& allCaloCells = *h_caloCells;
31  ATH_MSG_DEBUG("allCaloCells size " << allCaloCells.size());
33  if(!allCaloCells.checkOrderedAndComplete()){
34  ATH_MSG_ERROR("CaloCellCollection fails checks");
35  return StatusCode::FAILURE;
36  }
37  }
38 
39 
40  // lambda to select EMB1 cells
41  auto EMB1_sel = [](const CaloCell* cell) {
42  return cell->caloDDE()->getSampling() == CaloCell_Base_ID::EMB1;
43  };
44 
45 
46  std::copy_if(allCaloCells.beginConstCalo(CaloCell_ID::LAREM),
47  allCaloCells.endConstCalo(CaloCell_ID::LAREM),
48  std::back_inserter(cells),
49  EMB1_sel);
50 
51 
52  return StatusCode::SUCCESS;
53  }

◆ initialize()

StatusCode EMB1CellsFromCaloCells::initialize ( )
overridevirtual

Definition at line 15 of file Global/GlobalSimulation/src/GlobalAlgs/EMB1CellsFromCaloCells.cxx.

15  {
17 
18  return StatusCode::SUCCESS;
19  }

Member Data Documentation

◆ m_caloCellsKey

SG::ReadHandleKey<CaloCellContainer> GlobalSim::EMB1CellsFromCaloCells::m_caloCellsKey
private
Initial value:
{
this, "caloCells", "SeedLessFS", "key to read in a CaloCell container"}

Definition at line 33 of file Global/GlobalSimulation/src/GlobalAlgs/EMB1CellsFromCaloCells.h.

◆ m_makeCaloCellContainerChecks

Gaudi::Property<bool> GlobalSim::EMB1CellsFromCaloCells::m_makeCaloCellContainerChecks
private
Initial value:
{
this,
"makeCaloCellContainerChecks",
true,
"flag to run checks on read-in CaloCellContainer"}

Definition at line 37 of file Global/GlobalSimulation/src/GlobalAlgs/EMB1CellsFromCaloCells.h.


The documentation for this class was generated from the following files:
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
GlobalSim::EMB1CellsFromCaloCells::m_caloCellsKey
SG::ReadHandleKey< CaloCellContainer > m_caloCellsKey
Definition: Global/GlobalSimulation/src/GlobalAlgs/EMB1CellsFromCaloCells.h:33
GlobalSim::EMB1CellsFromCaloCells::cells
virtual StatusCode cells(std::vector< const CaloCell * > &, const EventContext &) const override
Definition: Global/GlobalSimulation/src/GlobalAlgs/EMB1CellsFromCaloCells.cxx:22
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AnalysisUtils::copy_if
Out copy_if(In first, const In &last, Out res, const Pred &p)
Definition: IFilterUtils.h:30
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloCell_Base_ID::LAREM
@ LAREM
Definition: CaloCell_Base_ID.h:46
GlobalSim::EMB1CellsFromCaloCells::m_makeCaloCellContainerChecks
Gaudi::Property< bool > m_makeCaloCellContainerChecks
Definition: Global/GlobalSimulation/src/GlobalAlgs/EMB1CellsFromCaloCells.h:37