ATLAS Offline Software
RoIsUnpackingEmulationTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef HLTSEEDING_ROISUNPACKINGEMULATIONTOOL_H
5 #define HLTSEEDING_ROISUNPACKINGEMULATIONTOOL_H
6 
8 
9 #include <string>
10 
12  public:
13  RoIsUnpackingEmulationTool( const std::string& type,
14  const std::string& name,
15  const IInterface* parent );
16 
18  virtual StatusCode unpack(const EventContext& ctx,
19  const ROIB::RoIBResult& roib,
20  const HLT::IDSet& activeChains) const override;
21 
22  virtual StatusCode initialize() override;
23  virtual StatusCode start() override;
24 
25  private:
28  Gaudi::Property<float> m_roIWidth{
29  "RoIWidth", 0.1, "Size of RoI in eta/ phi"};
30 
31  Gaudi::Property<std::string> m_inputFilename{
32  this, "InputFilename", "RoIEmulation.dat", "FakeROI input filename"};
33 
34  Gaudi::Property<std::string> m_thresholdPrefix{
35  this, "ThresholdPrefix", "EM",
36  "Activate chains that are seed from threshold that have this prefix in the name"};
38 
41  struct FakeRoI {
42  double eta;
43  double phi;
45  std::vector<std::string> passedThresholdIDs;
46  };
47 
49  std::vector<std::vector<FakeRoI>> parseInputFile();
50  static std::vector<FakeRoI> parseInputFileLine(const std::string& line, unsigned lineNumber);
51  static FakeRoI parseInputRoI(const std::string& roi, unsigned lineNumber, unsigned roiNumber);
52  std::vector<std::vector<RoIsUnpackingEmulationTool::FakeRoI>> m_inputData;
53  unsigned m_currentRowNumber{0};
55 };
56 
57 #endif //> !HLTSEEDING_ROISUNPACKINGEMULATIONTOOL_H
RoIsUnpackingToolBase.h
RoIsUnpackingEmulationTool::parseInputRoI
static FakeRoI parseInputRoI(const std::string &roi, unsigned lineNumber, unsigned roiNumber)
Definition: RoIsUnpackingEmulationTool.cxx:121
RoIsUnpackingEmulationTool::m_inputData
std::vector< std::vector< RoIsUnpackingEmulationTool::FakeRoI > > m_inputData
Definition: RoIsUnpackingEmulationTool.h:52
checkFileSG.line
line
Definition: checkFileSG.py:75
RoIsUnpackingToolBase
Base class for RoI unpackers.
Definition: RoIsUnpackingToolBase.h:32
ROIB::RoIBResult
Class holding the LVL1 RoIB result build by the RoIBuilder.
Definition: RoIBResult.h:47
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
RoIsUnpackingEmulationTool::readEmulatedData
StatusCode readEmulatedData()
Definition: RoIsUnpackingEmulationTool.cxx:35
RoIsUnpackingEmulationTool::m_roIWidth
Gaudi::Property< float > m_roIWidth
Definition: RoIsUnpackingEmulationTool.h:28
RoIsUnpackingEmulationTool::m_currentRowNumber
unsigned m_currentRowNumber
Definition: RoIsUnpackingEmulationTool.h:53
RoIsUnpackingEmulationTool::FakeRoI
Definition: RoIsUnpackingEmulationTool.h:41
RoIsUnpackingEmulationTool::initialize
virtual StatusCode initialize() override
Definition: RoIsUnpackingEmulationTool.cxx:15
RoIsUnpackingEmulationTool::FakeRoI::roIWord
uint32_t roIWord
Definition: RoIsUnpackingEmulationTool.h:44
RoIsUnpackingEmulationTool::FakeRoI::phi
double phi
Definition: RoIsUnpackingEmulationTool.h:43
RoIsUnpackingToolBase::unpack
virtual StatusCode unpack(const EventContext &, const ROIB::RoIBResult &, const HLT::IDSet &) const override
Definition: RoIsUnpackingToolBase.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
RoIsUnpackingEmulationTool::m_thresholdPrefix
Gaudi::Property< std::string > m_thresholdPrefix
Definition: RoIsUnpackingEmulationTool.h:34
test_pyathena.parent
parent
Definition: test_pyathena.py:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
RoIsUnpackingEmulationTool::FakeRoI::eta
double eta
Definition: RoIsUnpackingEmulationTool.h:42
xAOD::roiNumber
setTeId setLumiBlock setRoiId setRoiSubsystem roiNumber
Definition: L2StandAloneMuon_v1.cxx:339
RoIsUnpackingEmulationTool::parseInputFile
std::vector< std::vector< FakeRoI > > parseInputFile()
Definition: RoIsUnpackingEmulationTool.cxx:71
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
RoIsUnpackingEmulationTool::unpack
virtual StatusCode unpack(const EventContext &ctx, const ROIB::RoIBResult &roib, const HLT::IDSet &activeChains) const override
Definition: RoIsUnpackingEmulationTool.cxx:151
HLT::IDSet
std::set< HLT::Identifier > IDSet
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:63
RoIsUnpackingEmulationTool::start
virtual StatusCode start() override
Definition: RoIsUnpackingEmulationTool.cxx:27
RoIsUnpackingEmulationTool::m_inputFilename
Gaudi::Property< std::string > m_inputFilename
Definition: RoIsUnpackingEmulationTool.h:31
RoIsUnpackingEmulationTool::parseInputFileLine
static std::vector< FakeRoI > parseInputFileLine(const std::string &line, unsigned lineNumber)
Definition: RoIsUnpackingEmulationTool.cxx:101
RoIsUnpackingEmulationTool::FakeRoI::passedThresholdIDs
std::vector< std::string > passedThresholdIDs
Definition: RoIsUnpackingEmulationTool.h:45
RoIsUnpackingEmulationTool::RoIsUnpackingEmulationTool
RoIsUnpackingEmulationTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: RoIsUnpackingEmulationTool.cxx:9
RoIsUnpackingEmulationTool
Definition: RoIsUnpackingEmulationTool.h:11