|
ATLAS Offline Software
|
Go to the documentation of this file.
57 ATH_MSG_INFO(
"=======================================" );
58 ATH_MSG_INFO(
"Constructor for Phase1 MUCTPI_AthTool." );
59 ATH_MSG_INFO(
"=======================================" );
65 ATH_MSG_INFO(
"=======================================" );
66 ATH_MSG_INFO(
"Initialisation for Phase1 MUCTPI_AthTool" );
67 ATH_MSG_INFO(
"=======================================" );
92 return StatusCode::FAILURE;
103 ATH_MSG_INFO(
"Initializing L1Topo decoding with the following inputs");
112 if (topo_errors.size())
114 std::stringstream
err;
115 err <<
"Couldn't initialize L1Topo eta/phi encoding/decoding:\n";
116 for (
unsigned i=0;
i<topo_errors.size();
i++)
err << topo_errors[
i] <<
"\n";
118 return StatusCode::FAILURE;
135 ATH_MSG_DEBUG(
"Full path to XML LUT file: " << fullFileName );
139 msp.configureOverlapRemoval(fullFileName);
145 <<
"Wrong overlap strategy name specified: \""
147 return StatusCode::FAILURE;
164 return StatusCode::SUCCESS;
169 ATH_MSG_INFO(
"=======================================" );
171 ATH_MSG_INFO(
"=======================================" );
173 ATH_MSG_INFO(
"initialize(): use L1 trigger menu from detector store" );
181 if (!msp.configurePtEncoding())
184 <<
"Couldn't configure pt encoding in MuonSectorProcessor " << msp.getSide();
185 return StatusCode::FAILURE;
189 return StatusCode::SUCCESS;
219 bool gotRPCInput(
false );
223 ATH_MSG_WARNING(
"Cannot retrieve RPC L1Muctpi object from StoreGate!" );
226 ATH_MSG_DEBUG(
"Retrieved RPC Lvl1MuCTPIInput object from StoreGate" );
233 bool gotTGCInput(
false );
237 ATH_MSG_WARNING(
"Cannot retrieve TGC L1Muctpi object from StoreGate!" );
240 ATH_MSG_DEBUG(
"Retrieved TGC Lvl1MuCTPIInput object from StoreGate" );
247 if( ! ( gotRPCInput && gotTGCInput ) ) {
248 ATH_MSG_WARNING(
"No input received from the RPC or TGC sector logic simulation" );
249 return StatusCode::SUCCESS;
252 mergedInput.
merge( *dHandleRPC );
253 mergedInput.
merge( *dHandleTGC );
265 REPORT_ERROR( StatusCode::FAILURE ) <<
"Error while processing MUCTPI data: " << ret;
266 return StatusCode::FAILURE;
296 return StatusCode::SUCCESS;
338 return StatusCode::SUCCESS;
371 return StatusCode::SUCCESS;
381 std::advance(xAODRoIsKeyIt, bcidOffset+2);
383 ATH_CHECK(xAODRoIs.record(std::make_unique<xAOD::MuonRoIContainer>(),
384 std::make_unique<xAOD::MuonRoIAuxContainer>()));
385 ATH_MSG_DEBUG(
"Recorded MuonRoIContainer with key " << xAODRoIs.key());
389 std::advance(l1topoKeyIt, bcidOffset+2);
395 ATH_MSG_DEBUG(
"L1Topo output recorded to StoreGate with key " << l1topo.
key());
396 ATH_MSG_DEBUG(
"No results for BCID offset " << bcidOffset <<
" - recorded empty outputs");
397 return StatusCode::SUCCESS;
403 const std::vector<unsigned int>& ctpData =
results->get().ctp_words;
404 if (ctpData.empty()) {
405 ATH_MSG_ERROR(
"TriggerProcessor didn't provide correct CTP data");
406 return StatusCode::FAILURE;
410 ATH_CHECK(muctpi_ctp.
record(std::make_unique<LVL1::MuCTPICTP>(ctpData)));
411 ATH_MSG_DEBUG(
"CTP word recorded to StoreGate with key " << muctpi_ctp.
key());
416 xAODRoIs->push_back(std::make_unique<xAOD::MuonRoI>());
430 ATH_MSG_ERROR(
"Failed to determine Sector ID from RoI word 0x" << std::hex <<
data.dataWord << std::dec);
431 return StatusCode::FAILURE;
436 xAODRoIs->back()->initialize(
data.dataWord, roiData.
eta(), roiData.
phi(), maxThrInfo.first, maxThrInfo.second, 0);
440 ATH_CHECK(l1topo.
record(std::make_unique<LVL1::MuCTPIL1Topo>(
results->get().l1topoData.getCandidates())));
442 ATH_MSG_DEBUG(
"L1Topo output recorded to StoreGate with key " << l1topo.
key());
444 return StatusCode::SUCCESS;
char data[hepevt_bytes_allocation_ATLAS]
#define REPORT_ERROR(SC)
Report an error.
std::string processData(LVL1MUONIF::Lvl1MuCTPIInputPhase1 *input, MUCTPIResults &results, int bcid) const
void setMenu(const TrigConf::L1Menu *l1menu)
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
void setBcidOffset(int bcidOffset)
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
TriggerProcessor & getTriggerProcessor()
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
constexpr SubsysID getSubsysID(uint32_t word)
Decode the subsys ID from RoI candidate word.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
std::vector< std::string > configureTopo(const std::string &barrelFileName, const std::string &ecfFileName, const std::string &side0LUTFileName, const std::string &side1LUTFileName)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
const_pointer_type ptr()
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
void setTrigTool(LVL1::TrigThresholdDecisionTool &tool)
MuonSectorProcessors & getMuonSectorProcessors()