ATLAS Offline Software
CaloCellFastCopyTool.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 /*
8  * CaloCellFastCopyTool.h
9  *
10  * Created on: Oct 7, 2013
11  *
12  */
13 
14 #ifndef CALOREC_CALOCELLFASTCOPYTOOL_H_
15 #define CALOREC_CALOCELLFASTCOPYTOOL_H_
16 
37 // Athena includes
40 
41 // Calo includes
45 
46 #include <vector>
47 
48 // Forward declaration
49 class CaloCell_ID;
50 
51 
53  : public extends<AthAlgTool,ICaloCellMakerTool, ICaloConstCellMakerTool>
54 {
55  public:
56  using base_class::base_class;
57 
58  virtual StatusCode initialize() override;
59  virtual StatusCode process (CaloCellContainer* theCellContainer,
60  const EventContext& ctx) const override;
61  virtual StatusCode process (CaloConstCellContainer* theCellContainer,
62  const EventContext& ctx) const override;
63 
64 
65 private:
67  CaloConstCellContainer* destCont) const;
69  CaloConstCellContainer* destCont) const;
71  CaloConstCellContainer* destCont) const;
73  CaloConstCellContainer* destCont) const;
74 
75 
76  template <class CONTAINER>
78  CONTAINER* destCont) const;
79  template <class CONTAINER>
81  CONTAINER* destCont) const;
82 
83  template <class CONTAINER>
85  CONTAINER* destCont) const;
86  template <class CONTAINER>
88  CONTAINER* destCont) const;
89 
91  CaloCellContainer* destCont) const;
93  CaloConstCellContainer* destCont) const;
94 
96  Gaudi::Property<bool> m_avoidDuplicates{this, "AvoidDuplicates", false};
97  Gaudi::Property<bool> m_isFindCellFast{this, "IsFindCellFast", false};
99  const CaloCell_ID* m_caloID = nullptr;
100 
101  Gaudi::Property<std::vector<std::string> > m_acceptedSampleNames{this, "includeSamplings", {}};
102  std::vector<CaloCell_ID::SUBCALO> m_acceptedCalos;
103 
104  // Calo cell hashes
105  std::vector<IdentifierHash> m_acceptedCellHashes;
106  std::vector<bool> m_cellsToBeCopied;
107 };
108 
109 #endif /* CALOREC_CALOCELLFASTCOPYTOOL_H_ */
CaloCellFastCopyTool::m_acceptedCalos
std::vector< CaloCell_ID::SUBCALO > m_acceptedCalos
Definition: CaloCellFastCopyTool.h:102
CaloCellFastCopyTool::cloneAvoidingDuplicatesFindCellIsFast
StatusCode cloneAvoidingDuplicatesFindCellIsFast(const CaloCellContainer *srcCont, CONTAINER *destCont) const
Definition: CaloCellFastCopyTool.cxx:229
CaloCellFastCopyTool::m_isFindCellFast
Gaudi::Property< bool > m_isFindCellFast
Definition: CaloCellFastCopyTool.h:97
CaloCellFastCopyTool::m_acceptedCellHashes
std::vector< IdentifierHash > m_acceptedCellHashes
Definition: CaloCellFastCopyTool.h:105
CaloCellFastCopyTool::dispatchCopyConst
StatusCode dispatchCopyConst(const CaloCellContainer *srcCont, CaloConstCellContainer *destCont) const
Definition: CaloCellFastCopyTool.cxx:334
CaloCellFastCopyTool::m_srcCellContainerKey
SG::ReadHandleKey< CaloCellContainer > m_srcCellContainerKey
Definition: CaloCellFastCopyTool.h:95
ICaloConstCellMakerTool.h
Operate on pointers to const CaloCell.
CaloCellFastCopyTool::dispatchCopy
StatusCode dispatchCopy(const CaloCellContainer *srcCont, CaloCellContainer *destCont) const
Definition: CaloCellFastCopyTool.cxx:300
CaloCellFastCopyTool::m_hashMax
IdentifierHash m_hashMax
Definition: CaloCellFastCopyTool.h:98
SG::ReadHandleKey< CaloCellContainer >
CaloCellFastCopyTool::m_cellsToBeCopied
std::vector< bool > m_cellsToBeCopied
Definition: CaloCellFastCopyTool.h:106
CaloCell_ID.h
CaloCellFastCopyTool::m_acceptedSampleNames
Gaudi::Property< std::vector< std::string > > m_acceptedSampleNames
Definition: CaloCellFastCopyTool.h:101
CaloCellFastCopyTool::m_caloID
const CaloCell_ID * m_caloID
Pointer to CaloID helper.
Definition: CaloCellFastCopyTool.h:99
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloCellFastCopyTool::viewAvoidingDuplicatesFindCellIsNotFast
StatusCode viewAvoidingDuplicatesFindCellIsNotFast(const CaloCellContainer *srcCont, CaloConstCellContainer *destCont) const
Definition: CaloCellFastCopyTool.cxx:186
CaloCellFastCopyTool::viewAvoidingDuplicatesFindCellIsFast
StatusCode viewAvoidingDuplicatesFindCellIsFast(const CaloCellContainer *srcCont, CaloConstCellContainer *destCont) const
Definition: CaloCellFastCopyTool.cxx:144
AthAlgTool.h
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
CaloCellFastCopyTool::initialize
virtual StatusCode initialize() override
Definition: CaloCellFastCopyTool.cxx:31
CaloCellFastCopyTool::cloneNotAvoidingDuplicatesFindCellIsNotFast
StatusCode cloneNotAvoidingDuplicatesFindCellIsNotFast(const CaloCellContainer *srcCont, CONTAINER *destCont) const
Definition: CaloCellFastCopyTool.cxx:255
CaloCellFastCopyTool::process
virtual StatusCode process(CaloCellContainer *theCellContainer, const EventContext &ctx) const override
Definition: CaloCellFastCopyTool.cxx:93
CaloCellFastCopyTool::cloneAvoidingDuplicatesFindCellIsNotFast
StatusCode cloneAvoidingDuplicatesFindCellIsNotFast(const CaloCellContainer *srcCont, CONTAINER *destCont) const
Definition: CaloCellFastCopyTool.cxx:275
CaloCellFastCopyTool::viewNotAvoidingDuplicatesFindCellIsNotFast
StatusCode viewNotAvoidingDuplicatesFindCellIsNotFast(const CaloCellContainer *srcCont, CaloConstCellContainer *destCont) const
Definition: CaloCellFastCopyTool.cxx:168
IdentifierHash.h
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
CaloCellFastCopyTool::viewNotAvoidingDuplicatesFindCellIsFast
StatusCode viewNotAvoidingDuplicatesFindCellIsFast(const CaloCellContainer *srcCont, CaloConstCellContainer *destCont) const
Definition: CaloCellFastCopyTool.cxx:128
ICaloCellMakerTool.h
CaloConstCellContainer
CaloCellContainer that can accept const cell pointers.
Definition: CaloConstCellContainer.h:45
CaloCellFastCopyTool
Concrete tool for coping Calo cells.
Definition: CaloCellFastCopyTool.h:54
CaloCellFastCopyTool::cloneNotAvoidingDuplicatesFindCellIsFast
StatusCode cloneNotAvoidingDuplicatesFindCellIsFast(const CaloCellContainer *srcCont, CONTAINER *destCont) const
Definition: CaloCellFastCopyTool.cxx:212
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
CaloCellFastCopyTool::m_avoidDuplicates
Gaudi::Property< bool > m_avoidDuplicates
Definition: CaloCellFastCopyTool.h:96