|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   10                                                        const std::string& 
name,
 
   20     return StatusCode::FAILURE;
 
   23   return StatusCode::SUCCESS;
 
   31   return StatusCode::SUCCESS;
 
   38     return StatusCode::RECOVERABLE;
 
   46     return StatusCode::RECOVERABLE;
 
   53     for (
auto& fakeRoI : fragment) {
 
   54       const char* 
const delim = 
", ";
 
   55       std::ostringstream debugPassedTresholdIDs;
 
   56       std::copy(fakeRoI.passedThresholdIDs.begin(),
 
   57                 fakeRoI.passedThresholdIDs.end(),
 
   58                 std::ostream_iterator<std::string>(debugPassedTresholdIDs, delim));
 
   63                     ", PassedThresholdIDs: " + debugPassedTresholdIDs.str());
 
   67   return StatusCode::SUCCESS;
 
   72   const char* whiteSpaceChars = 
" \t\n\r\f\v";
 
   73   auto rtrim = [whiteSpaceChars](std::string& 
s) { 
s.erase(
s.find_last_not_of(whiteSpaceChars) + 1); };
 
   74   auto ltrim = [whiteSpaceChars](std::string& 
s) { 
s.erase(0, 
s.find_first_not_of(whiteSpaceChars)); };
 
   75   auto trim = [&rtrim, <rim](std::string& 
s) { ltrim(
s); rtrim(
s); };
 
   77   std::vector<std::vector<RoIsUnpackingEmulationTool::FakeRoI>> 
result;
 
   78   unsigned lineNumber = 0;
 
   83     throw std::invalid_argument(
"File " + 
m_inputFilename + 
"does not exists or is corrupted");
 
   88     if (
line.empty()) {
continue;}
 
   93     throw std::invalid_argument(
"File " + 
m_inputFilename + 
" does not contain any RoI");
 
  100 std::vector<RoIsUnpackingEmulationTool::FakeRoI>
 
  102   std::vector<RoIsUnpackingEmulationTool::FakeRoI> 
result;
 
  104   std::stringstream inputLine(
line);
 
  107   while (getline(inputLine, roi, 
';'))  {
 
  112     if (roi.find (
',') != std::string::npos) {
 
  123   std::stringstream inputRoi(roi);
 
  124   std::string roiElement;
 
  125   unsigned roiElementNumber = 0;
 
  127   std::vector<std::function<void(
const std::string&)>> fillResultFunctors;
 
  128   fillResultFunctors.emplace_back([&](
const std::string& 
eta) { 
result.eta = stod(
eta); });
 
  129   fillResultFunctors.emplace_back([&](
const std::string& 
phi) { 
result.phi = stod(
phi); });
 
  130   fillResultFunctors.emplace_back([&](
const std::string& word) { 
result.roIWord = stoul(word); });
 
  131   fillResultFunctors.emplace_back([&](
const std::string& passedThresholdID) {
 
  132     result.passedThresholdIDs.push_back(passedThresholdID); });
 
  134   while (getline(inputRoi, roiElement, 
','))        {
 
  135     if (roiElementNumber > 2) { roiElementNumber = 3; }
 
  139       fillResultFunctors[roiElementNumber++](roiElement);
 
  142       throw std::invalid_argument(
"Exception encountered while parsing line " + 
std::to_string(lineNumber) +
 
  162     ATH_MSG_ERROR(
"No input dataset found. Cannot decode RoI emulation");
 
  163     return StatusCode::FAILURE;
 
  169   for (
auto& roi : FakeRoIs) {
 
  171     trigRoIs->
push_back( std::make_unique<TrigRoiDescriptor>(
 
  176     ATH_MSG_DEBUG( 
"RoI word: 0x" << MSG::hex << std::setw(8) << roIWord << MSG::dec );
 
  180     std::vector<TrigCompositeUtils::DecisionID> passedThresholdIDs;
 
  182     for ( 
const auto& 
th: roi.passedThresholdIDs ) {
 
  183       ATH_MSG_DEBUG( 
"Passed Threshold " << 
th << 
" enabling respective chains " );
 
  190     decision->setDetail( 
"thresholds", passedThresholdIDs );
 
  193   for ( 
auto roi: *trigRoIs ) {
 
  194     ATH_MSG_DEBUG(
"RoI Eta: " << roi->eta() << 
" Phi: " << roi->phi() << 
" RoIWord: " << roi->roiWord());
 
  197   return StatusCode::SUCCESS;
 
  
Scalar phi() const
phi method
Class holding the LVL1 RoIB result build by the RoIBuilder.
Decision * newDecisionIn(DecisionContainer *dc, const std::string &name)
Helper method to create a Decision object, place it in the container and return a pointer to it.
Scalar eta() const
pseudorapidity method
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::string to_string(const SectorProjector proj)
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
@ u
Enums for curvilinear frames.
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
SG::WriteHandle< CONT > createAndStoreNoAux(const SG::WriteHandleKey< CONT > &key, const EventContext &ctx)
Creates and right away records the Container CONT with the key.
const std::string & initialRoIString()
const std::string & hltSeedingNodeName()
setTeId setLumiBlock setRoiId setRoiSubsystem roiNumber
value_type push_back(value_type pElem)
Add an element to the end of the collection.
#define ATH_MSG_WARNING(x)
std::set< HLT::Identifier > IDSet
void trim(std::string &input)
size_type size() const noexcept
Returns the number of elements in the collection.