|
ATLAS Offline Software
|
#include <GainDecorator.h>
|
| GainDecorator (const std::string &t, const std::string &n, const IInterface *p) |
|
| ~GainDecorator () |
|
StatusCode | initialize () |
|
StatusCode | finalize () |
|
virtual StatusCode | addBranches () const |
| Pass the thinning service
More...
|
|
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 |
|
|
SG::ReadHandleKey< xAOD::EgammaContainer > | m_SGKey_photons { this, "SGKey_photons", "", "SG key of photon container" } |
|
SG::ReadHandleKey< xAOD::EgammaContainer > | m_SGKey_electrons |
|
std::string | m_decorationPattern |
|
std::map< int, std::string > | m_gainNames |
|
std::vector< unsigned int > | m_layers |
|
std::map< std::pair< int, int >, std::string > | m_names_E |
|
std::map< std::pair< int, int >, std::string > | m_names_rnoW |
|
std::map< std::pair< int, int >, std::string > | m_names_nCells |
|
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > | m_SGKey_photons_decorations |
|
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > | m_SGKey_electrons_decorations |
|
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 |
|
Definition at line 27 of file GainDecorator.h.
◆ StoreGateSvc_t
◆ GainDecorator()
DerivationFramework::GainDecorator::GainDecorator |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
Definition at line 22 of file GainDecorator.cxx.
27 declareInterface<DerivationFramework::IAugmentationTool>(
this);
41 std::string(
"{layer}").size(),
44 name.find(
"{gain}"), std::string(
"{gain}").size(), kv.second);
45 std::string name_E(
name), name_rnoW(
name), name_nCells(
name);
46 name_E.replace(name_E.find(
"{info}"), std::string(
"{info}").size(),
"E");
47 name_rnoW.replace(name_rnoW.find(
"{info}"), std::string(
"{info}").size(),
"rnoW");
49 name_nCells.find(
"{info}"), std::string(
"{info}").size(),
"nCells");
51 std::pair<int, int>
key(kv.first,
layer);
58 ATH_MSG_DEBUG(
"Decorating (layer, gain): " << kv.first <<
" " << kv.second);
61 ATH_MSG_DEBUG(
"Decorating (layer, gain): " << kv.first <<
" " << kv.second);
◆ ~GainDecorator()
DerivationFramework::GainDecorator::~GainDecorator |
( |
| ) |
|
|
default |
◆ addBranches()
StatusCode DerivationFramework::GainDecorator::addBranches |
( |
| ) |
const |
|
virtual |
Pass the thinning service
Implements DerivationFramework::IAugmentationTool.
Definition at line 130 of file GainDecorator.cxx.
132 const EventContext& ctx = Gaudi::Hive::currentContext();
143 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
145 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
147 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, char>>
152 std::pair<int, int>
key(kv.first,
layer);
153 decorations_E.emplace_back(
156 decorations_rnoW.emplace_back(
159 decorations_nCells.emplace_back(
167 for (
const auto*
photon : *importedPhotons) {
173 std::pair<int, int>
key(kv.first,
layer);
174 decorations_E[
i](*photon) =
res.E[
key];
175 decorations_rnoW[
i](*photon) =
177 decorations_nCells[
i](*photon) =
res.nCells[
key];
194 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
196 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
198 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, char>>
203 std::pair<int, int>
key(kv.first,
layer);
204 decorations_E.emplace_back(
207 decorations_rnoW.emplace_back(
210 decorations_nCells.emplace_back(
218 for (
const auto*
electron : *importedElectrons) {
224 std::pair<int, int>
key(kv.first,
layer);
225 decorations_E[
i](*electron) =
res.E[
key];
226 decorations_rnoW[
i](*electron) =
228 decorations_nCells[
i](*electron) =
res.nCells[
key];
235 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ decorateObject()
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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
◆ finalize()
StatusCode DerivationFramework::GainDecorator::finalize |
( |
| ) |
|
◆ getLayer()
int DerivationFramework::GainDecorator::getLayer |
( |
const CaloCell * |
cell | ) |
|
|
static |
◆ initialize()
StatusCode DerivationFramework::GainDecorator::initialize |
( |
| ) |
|
Definition at line 70 of file GainDecorator.cxx.
75 ATH_MSG_FATAL(
"No e-gamma collection provided for thinning. At least one "
76 "egamma collection (photons/electrons) must be provided!");
77 return StatusCode::FAILURE;
87 std::pair<int, int>
key(kv.first,
layer);
106 std::pair<int, int>
key(kv.first,
layer);
118 return StatusCode::SUCCESS;
◆ inputHandles()
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& DerivationFramework::IAugmentationTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool interface methods.
Definition at line 31 of file IAugmentationTool.h.
31 {
return IID_IAugmentationTool; }
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_decorationPattern
std::string DerivationFramework::GainDecorator::m_decorationPattern |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_gainNames
std::map<int, std::string> DerivationFramework::GainDecorator::m_gainNames |
|
private |
◆ m_layers
std::vector<unsigned int> DerivationFramework::GainDecorator::m_layers |
|
private |
◆ m_names_E
std::map<std::pair<int, int>, std::string> DerivationFramework::GainDecorator::m_names_E |
|
private |
◆ m_names_nCells
std::map<std::pair<int, int>, std::string> DerivationFramework::GainDecorator::m_names_nCells |
|
private |
◆ m_names_rnoW
std::map<std::pair<int, int>, std::string> DerivationFramework::GainDecorator::m_names_rnoW |
|
private |
◆ m_SGKey_electrons
Initial value:{
this,
"SGKey_electrons",
"",
"SG key of electron container"
}
Definition at line 52 of file GainDecorator.h.
◆ m_SGKey_electrons_decorations
Initial value:{
this,
"SGKey_electrons_decorations_noConf",
{},
"SG keys for electrons decorations not really configurable"
}
Definition at line 77 of file GainDecorator.h.
◆ m_SGKey_photons
◆ m_SGKey_photons_decorations
Initial value:{
this,
"SGKey_photons_decorations_noConf",
{},
"SG keys for photon decorations not really configurable"
}
Definition at line 69 of file GainDecorator.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
xAOD::ElectronContainer * electronContainer
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_electrons_decorations
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const_iterator begin() const
const begin method
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::map< std::pair< int, int >, std::string > m_names_E
#define ATH_MSG_VERBOSE(x)
virtual void setOwner(IDataHandleHolder *o)=0
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
std::map< std::pair< int, int >, std::string > m_names_rnoW
static int getLayer(const CaloCell *cell)
std::string m_decorationPattern
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_photons
std::pair< std::vector< unsigned int >, bool > res
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
xAOD::PhotonContainer * photonContainer
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::map< std::pair< int, int >, std::string > m_names_nCells
std::map< int, std::string > m_gainNames
std::string to_string(const DetectorType &type)
const_iterator end() const
const end method
Data object for each calorimeter readout cell.
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_electrons
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< unsigned int > m_layers
const_iterator to loop over cells belonging to a cluster
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
calculation decorateObject(const xAOD::Egamma *&egamma) const