ATLAS Offline Software
RoIROD.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 /***************************************************************************
5  RoIROD.h - description
6  -------------------
7  begin : Mon Jul 28 2014
8  email : Alan.Watson@CERN.CH
9  ***************************************************************************/
10 
11 
12 #ifndef TRIGT1CALOSIM_ROIROD_H
13 #define TRIGT1CALOSIM_ROIROD_H
14 
15 // STL
16 #include <string>
17 #include <vector>
18 
19 //Athena
21 #include "GaudiKernel/ServiceHandle.h"
25 
26 // Specifics
29 
30 // Inputs
33 #include "TrigT1CaloEvent/CMXRoI.h"
34 
38 namespace LVL1 {
39 
40 //RoIROD class declaration
48 class RoIROD : public AthReentrantAlgorithm
49 {
54  typedef std::unique_ptr<t_SlinkContainer> t_SlinkPtr;
55 
56  public:
57  //-------------------------
58 
59  RoIROD( const std::string& name, ISvcLocator* pSvcLocator ) ;
60  virtual ~RoIROD();
61 
62 
63  //------------------------------------------------------
64  // Methods used by Athena to run the algorithm
65  //------------------------------------------------------
66 
67  virtual StatusCode initialize() override;
68  virtual StatusCode execute(const EventContext& ctx) const override;
69  virtual StatusCode finalize() override;
70 
71 private: // Private methods
73  void addHeader (t_SlinkContainer& slink,
74  unsigned int subDetID,
75  unsigned int moduleId,
76  const EventContext& ctx) const;
78  void addTail (t_SlinkContainer& slink,
79  unsigned int numberOfDataWords) const;
83  const EventContext& ctx) const;
87  const EventContext& ctx) const;
92  std::unique_ptr<LVL1CTP::SlinkWord> getWord(unsigned int tword) const;
93 
96 
97 private: // Private attributes
99  { this, "EmTauRoILocation", TrigT1CaloDefs::CPMTobRoILocation, "" };
101  { this, "JetRoILocation", TrigT1CaloDefs::JEMTobRoILocation, "" };
103  { this, "EnergyRoILocation", TrigT1CaloDefs::CMXRoILocation, "" };
104 
105  std::string m_emTauSlinkLocation ;
107  { this, "EmTauSlinkKeys", {}, "" };
108 
109  std::string m_jepSlinkLocation ;
111  { this, "JEPSlinkKeys", {}, "" };
112 };
113 
114 } // end of namespace bracket
115 
116 
117 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
LVL1::RoIROD::m_energyRoILocation
SG::ReadHandleKey< t_EnergyRoIContainer > m_energyRoILocation
Definition: RoIROD.h:113
LVL1::RoIROD::m_jepSlinkLocation
std::string m_jepSlinkLocation
Definition: RoIROD.h:119
LVL1::RoIROD::m_jepSlinkKeys
SG::WriteHandleKeyArray< t_SlinkContainer > m_jepSlinkKeys
Definition: RoIROD.h:121
LVL1::RoIROD::addTail
void addTail(t_SlinkContainer &slink, unsigned int numberOfDataWords) const
add Slink tail
Definition: RoIROD.cxx:181
LVL1::RoIROD::t_EnergyRoIContainer
CMXRoI t_EnergyRoIContainer
Definition: RoIROD.h:62
LVL1::RoIROD::initialize
virtual StatusCode initialize() override
Definition: RoIROD.cxx:44
LVL1::TrigT1CaloDefs::CMXRoILocation
static const std::string CMXRoILocation
Definition: TrigT1CaloDefs.h:59
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
LVL1::TrigT1CaloDefs::JEMTobRoILocation
static const std::string JEMTobRoILocation
Definition: TrigT1CaloDefs.h:63
LVL1::TrigT1CaloDefs::numOfJEPRoIRODs
static const unsigned int numOfJEPRoIRODs
Definition: TrigT1CaloDefs.h:225
LVL1::RoIROD::RoIROD
RoIROD(const std::string &name, ISvcLocator *pSvcLocator)
Definition: RoIROD.cxx:25
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
LVL1::RoIROD::addHeader
void addHeader(t_SlinkContainer &slink, unsigned int subDetID, unsigned int moduleId, const EventContext &ctx) const
adds slink header
Definition: RoIROD.cxx:163
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
LVL1::RoIROD::dumpSlinks
void dumpSlinks(t_SlinkPtr CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs]) const
prints out the Slink info.
Definition: RoIROD.cxx:236
LVL1::RoIROD::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: RoIROD.cxx:82
LVL1::RoIROD::t_SlinkContainer
DataVector< LVL1CTP::SlinkWord > t_SlinkContainer
Definition: RoIROD.h:63
LVL1::RoIROD::t_jemTobRoIContainer
DataVector< LVL1::JEMTobRoI > t_jemTobRoIContainer
Definition: RoIROD.h:61
LVL1::RoIROD::~RoIROD
virtual ~RoIROD()
Definition: RoIROD.cxx:36
CPMTobRoI_ClassDEF.h
xAOD::CMXRoI
CMXRoI_v1 CMXRoI
Define the latest version of the CMXRoI class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CMXRoI.h:14
LVL1::RoIROD::saveSlinkObjects
StatusCode saveSlinkObjects(t_SlinkPtr CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs], t_SlinkPtr jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs], const EventContext &ctx) const
save Slink Objects to SG
Definition: RoIROD.cxx:195
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JEMTobRoI_ClassDEF.h
LVL1::RoIROD::m_emTauRoILocation
SG::ReadHandleKey< t_cpmTobRoIContainer > m_emTauRoILocation
Definition: RoIROD.h:109
SlinkWord.h
LVL1::RoIROD::t_SlinkPtr
std::unique_ptr< t_SlinkContainer > t_SlinkPtr
Definition: RoIROD.h:64
DataVector< LVL1::CPMTobRoI >
TrigConf::name
Definition: HLTChainList.h:35
LVL1::RoIROD::getWord
std::unique_ptr< LVL1CTP::SlinkWord > getWord(unsigned int tword) const
creates a new SlinkWord object with the passed word, and returns a pointer.
Definition: RoIROD.cxx:229
AthReentrantAlgorithm.h
LVL1::RoIROD::finalize
virtual StatusCode finalize() override
Definition: RoIROD.cxx:70
CMXRoI.h
LVL1::RoIROD::m_emTauSlinkLocation
std::string m_emTauSlinkLocation
Definition: RoIROD.h:115
WriteHandleKeyArray.h
LVL1::RoIROD::t_cpmTobRoIContainer
DataVector< LVL1::CPMTobRoI > t_cpmTobRoIContainer
Definition: RoIROD.h:60
LVL1::RoIROD::m_JetRoILocation
SG::ReadHandleKey< t_jemTobRoIContainer > m_JetRoILocation
Definition: RoIROD.h:111
LVL1::RoIROD::formSlinkObjects
void formSlinkObjects(t_SlinkPtr CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs], t_SlinkPtr jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs], const EventContext &ctx) const
get ROIwords and form Slink words from them, adding header and tail.
Definition: RoIROD.cxx:101
TrigT1CaloDefs.h
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
LVL1::TrigT1CaloDefs::CPMTobRoILocation
static const std::string CPMTobRoILocation
Definition: TrigT1CaloDefs.h:61
LVL1::TrigT1CaloDefs::numOfCPRoIRODs
static const unsigned int numOfCPRoIRODs
Definition: TrigT1CaloDefs.h:224
LVL1::RoIROD::m_emTauSlinkKeys
SG::WriteHandleKeyArray< t_SlinkContainer > m_emTauSlinkKeys
Definition: RoIROD.h:117
LVL1::RoIROD::assignVectors
void assignVectors(t_SlinkPtr CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs], t_SlinkPtr jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs]) const
Create the object vectors to be stored in SG and clear mult vectors.
Definition: RoIROD.cxx:214