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 21 of file Global/GlobalSimulation/src/GlobalAlgs/EMB1CellsFromCaloCells.cxx.

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

◆ initialize()

StatusCode EMB1CellsFromCaloCells::initialize ( )
overridevirtual

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

15  {
17  return StatusCode::SUCCESS;
18  }

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 36 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
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
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:21
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:274
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
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloCell_Base_ID::LAREM
@ LAREM
Definition: CaloCell_Base_ID.h:43
GlobalSim::EMB1CellsFromCaloCells::m_makeCaloCellContainerChecks
Gaudi::Property< bool > m_makeCaloCellContainerChecks
Definition: Global/GlobalSimulation/src/GlobalAlgs/EMB1CellsFromCaloCells.h:36