44 return StatusCode::SUCCESS;
53 const EventContext& ctx = Gaudi::Hive::currentContext();
57 bool gDataTowerFilled =
false;
60 if(!gDataTowerContainer.
isValid()) {
61 ATH_MSG_FATAL(
"Could not retrieve collection " << gDataTowerContainer.
key() );
62 return StatusCode::FAILURE;
64 gDataTowerFilled = !gDataTowerContainer->empty();
67 std::unique_ptr<gTowerContainer> local_gTowerContainerRaw = std::make_unique<gTowerContainer>();
73 if( gDataTowerFilled ) {
77 data_gTowerContainer = &gDataTowerContainer;
79 ATH_MSG_DEBUG(
"Collection used to build the gTower for simulation: " << (*data_gTowerContainer).key() <<
" with size: "<<(*data_gTowerContainer)->size() <<
". Expected towers 1152");
83 unsigned int TTID = my_gTower->gFEXtowerID();
86 int ID = local_gTowerContainerRaw->getIDfromFWID(TTID);
88 ATH_MSG_WARNING(
"Cannot find simulation ID from firmware ID - This gFexTower will be ignored. (Needs investigation). Please report this!" );
93 if( (targetTower = local_gTowerContainerRaw->findTower(
ID)) ) {
100 ATH_MSG_WARNING(
"Tower ID is officially unknown - it will be ignored. (Needs investigation). Please report this!" );
113 ATH_CHECK(gTowerContainerSG.
record(std::move( local_gTowerContainerRaw ) ) );
118 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
std::vector< Identifier > ID
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
virtual StatusCode initialize() override
ToolHandle< IgSuperCellTowerMapper > m_gSuperCellTowerMapperTool
SG::WriteHandleKey< LVL1::gTowerContainer > m_gTowerContainerSGKey
SG::ReadHandleKey< xAOD::gFexTowerContainer > m_gDataTowerKey
virtual StatusCode execute() override
gTowerMakerFromGfexTowers(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandle< IgTowerBuilder > m_gTowerBuilderTool
The gTower class is an interface object for gFEX trigger algorithms The purposes are twofold:
void setIsSaturated(char isSaturated)
Sets saturation flag.
void setTotalEt(int totEt)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
gFexTower_v1 gFexTower
Define the latest version of the TriggerTower class.