44 return StatusCode::SUCCESS;
56 bool gDataTowerFilled =
false;
59 if(!gDataTowerContainer.
isValid()) {
60 ATH_MSG_FATAL(
"Could not retrieve collection " << gDataTowerContainer.
key() );
61 return StatusCode::FAILURE;
63 gDataTowerFilled = !gDataTowerContainer->empty();
66 std::unique_ptr<gTowerContainer> local_gTowerContainerRaw = std::make_unique<gTowerContainer>();
72 if( gDataTowerFilled ) {
76 data_gTowerContainer = &gDataTowerContainer;
78 ATH_MSG_DEBUG(
"Collection used to build the gTower for simulation: " << (*data_gTowerContainer).key() <<
" with size: "<<(*data_gTowerContainer)->size() <<
". Expected towers 1152");
82 unsigned int TTID = my_gTower->gFEXtowerID();
85 int ID = local_gTowerContainerRaw->getIDfromFWID(TTID);
87 ATH_MSG_WARNING(
"Cannot find simulation ID from firmware ID - This gFexTower will be ignored. (Needs investigation). Please report this!" );
92 if( (targetTower = local_gTowerContainerRaw->findTower(ID)) ) {
99 ATH_MSG_WARNING(
"Tower ID is officially unknown - it will be ignored. (Needs investigation). Please report this!" );
112 ATH_CHECK(gTowerContainerSG.
record(std::move( local_gTowerContainerRaw ) ) );
117 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual StatusCode initialize() override
ToolHandle< IgSuperCellTowerMapper > m_gSuperCellTowerMapperTool
SG::WriteHandleKey< LVL1::gTowerContainer > m_gTowerContainerSGKey
SG::ReadHandleKey< xAOD::gFexTowerContainer > m_gDataTowerKey
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
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.