ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
LVL1::jFEXmetAlgo Class Reference

#include <jFEXmetAlgo.h>

Inheritance diagram for LVL1::jFEXmetAlgo:
Collaboration diagram for LVL1::jFEXmetAlgo:

Public Member Functions

 jFEXmetAlgo (const std::string &type, const std::string &name, const IInterface *parent)
 Constructors. More...
 
virtual StatusCode initialize () override
 standard Athena-Algorithm method More...
 
virtual StatusCode reset () override
 
virtual ~jFEXmetAlgo ()
 Destructor. More...
 
virtual StatusCode safetyTest () override
 
virtual void setup (int FPGA[FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width], int hemisphere) override
 
virtual void setup (int FPGA[FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width], int hemisphere) override
 
virtual void buildBarrelmet () override
 
virtual void buildFWDmet () override
 
virtual int GetMetXComponent () override
 
virtual int GetMetYComponent () override
 
virtual int getTTowerET (unsigned int TTID) override
 
virtual bool getjXESat () const override
 
virtual void setFPGAEnergy (std::unordered_map< int, std::vector< int > > et_map) override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

bool getTTowerSat (unsigned int TTID)
 
virtual void buildMetXComponent ()
 
virtual void buildMetYComponent ()
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< LVL1::jTowerContainerm_jTowerContainerKey {this, "MyjTowers", "jTowerContainer", "Input container for jTowers"}
 
SG::ReadHandle< jTowerContainerm_jTowerContainer
 
std::vector< std::vector< int > > m_FPGA
 
std::vector< std::vector< int > > m_FPGA_phi02
 
std::vector< std::vector< int > > m_FPGA_fcal
 
std::vector< long long > m_met
 
std::vector< float > m_met_angle
 
std::vector< long long > m_met_Xcoord
 
std::vector< long long > m_met_Ycoord
 
long long m_Totalmet_Xcoord = 0
 
long long m_Totalmet_Ycoord = 0
 
bool m_saturation = false
 
std::unordered_map< int, std::vector< int > > m_map_Etvalues
 
int m_hemisphere
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static constexpr unsigned int m_firmware_scale = (1 << 9)
 
static constexpr unsigned int m_firmware_bit_offset = 9
 

Detailed Description

Definition at line 30 of file jFEXmetAlgo.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ jFEXmetAlgo()

LVL1::jFEXmetAlgo::jFEXmetAlgo ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Constructors.

Definition at line 27 of file jFEXmetAlgo.cxx.

27  : AthAlgTool(type, name, parent) {
28  declareInterface<IjFEXmetAlgo>(this);
29 }

◆ ~jFEXmetAlgo()

LVL1::jFEXmetAlgo::~jFEXmetAlgo ( )
virtual

Destructor.

Definition at line 32 of file jFEXmetAlgo.cxx.

32  {
33 }

Member Function Documentation

◆ buildBarrelmet()

void LVL1::jFEXmetAlgo::buildBarrelmet ( )
overridevirtual

Implements LVL1::IjFEXmetAlgo.

Definition at line 108 of file jFEXmetAlgo.cxx.

109 {
110  ATH_MSG_DEBUG("---------------- jFEXmetAlgo::buildBarrelmet ----------------");
111 
114  m_met.clear();
115  m_met.resize(32,0);
116  m_met_angle.clear();
117  m_met_angle.resize(32,0);
118 
119  for(uint iphi=0;iphi<m_FPGA.size();iphi++){
120  for(uint ieta=0;ieta<m_FPGA[iphi].size();ieta++){
121  m_met[iphi]+=getTTowerET(m_FPGA[iphi][ieta]);
122  }
123  const LVL1::jTower * tmpTower = m_jTowerContainer->findTower(m_FPGA[iphi][0]);
124  m_met_angle[iphi]=tmpTower->centrephi_toPI();
125  }
128 }

◆ buildFWDmet()

void LVL1::jFEXmetAlgo::buildFWDmet ( )
overridevirtual

Implements LVL1::IjFEXmetAlgo.

Definition at line 131 of file jFEXmetAlgo.cxx.

132 {
133  ATH_MSG_DEBUG("---------------- jFEXmetAlgo::buildFWDmet ----------------");
134 
137 
138  //Granularity of phi = 0.1
139  m_met.clear();
140  m_met.resize(m_FPGA.size(),0);
141  m_met_angle.clear();
142  m_met_angle.resize(m_FPGA.size(),0);
143 
144  for(uint iphi=0;iphi<m_FPGA.size();iphi++){
145  for(uint ieta=0;ieta<m_FPGA[iphi].size();ieta++){
146  m_met[iphi]+=getTTowerET(m_FPGA[iphi][ieta]);
147  }
148  const LVL1::jTower * tmpTower = m_jTowerContainer->findTower(m_FPGA[iphi][0]);
149  m_met_angle[iphi]=tmpTower->centrephi_toPI();
150  }
153 
154  //Granularity of phi = 0.2
155  m_met.clear();
156  m_met.resize(m_FPGA_phi02.size(),0);
157  m_met_angle.clear();
158  m_met_angle.resize(m_FPGA_phi02.size(),0);
159 
160  for(uint iphi=0;iphi<m_FPGA_phi02.size();iphi++){
161  for(uint ieta=0;ieta<m_FPGA_phi02[iphi].size();ieta++){
162  m_met[iphi]+=getTTowerET(m_FPGA_phi02[iphi][ieta]);
163  }
164  const LVL1::jTower * tmpTower = m_jTowerContainer->findTower(m_FPGA_phi02[iphi][0]);
165  m_met_angle[iphi]=tmpTower->centrephi_toPI();
166  }
169 
170  //Granularity of phi = 0.4
171  m_met.clear();
172  m_met.resize(m_FPGA_fcal.size(),0);
173  m_met_angle.clear();
174  m_met_angle.resize(m_FPGA_fcal.size(),0);
175 
176  for(uint iphi=0;iphi<m_FPGA_fcal.size();iphi++){
177  for(uint ieta=0;ieta<m_FPGA_fcal[iphi].size();ieta++){
178  m_met[iphi]+=getTTowerET(m_FPGA_fcal[iphi][ieta]);
179  }
180  const LVL1::jTower * tmpTower = m_jTowerContainer->findTower(m_FPGA_fcal[iphi][0]);
181  m_met_angle[iphi]=(static_cast<int>(tmpTower->iPhi()/4))*(M_PI/8) + M_PI/16;
182  }
185 
186 }

◆ buildMetXComponent()

void LVL1::jFEXmetAlgo::buildMetXComponent ( )
privatevirtual

Definition at line 189 of file jFEXmetAlgo.cxx.

190 {
191 
192  m_met_Xcoord.clear();
193  m_met_Xcoord.resize(m_met.size(),0);
194  //computing the X and Y component of MET
195 
196  for(uint iphi=0;iphi<m_met.size();iphi++){
198  m_met_Xcoord[iphi]= m_met[iphi]*cos;
199  }
200 
201  //Summing all X coordinate
202  for(auto met_val : m_met_Xcoord){
203  m_Totalmet_Xcoord += met_val;
204  }
205 }

◆ buildMetYComponent()

void LVL1::jFEXmetAlgo::buildMetYComponent ( )
privatevirtual

Definition at line 214 of file jFEXmetAlgo.cxx.

215 {
216 
217  m_met_Ycoord.clear();
218  m_met_Ycoord.resize(m_met.size(),0);
219  //computing the X and Y component of MET
220  for(uint iphi=0;iphi<m_met.size();iphi++){
222  m_met_Ycoord[iphi]= m_met[iphi]*sin;
223  }
224 
225  //Summing all Y coordinate
226  for(auto met_val : m_met_Ycoord){
227  m_Totalmet_Ycoord += met_val;
228  }
229 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getjXESat()

bool LVL1::jFEXmetAlgo::getjXESat ( ) const
overridevirtual

Implements LVL1::IjFEXmetAlgo.

Definition at line 252 of file jFEXmetAlgo.cxx.

252  {
253  return m_saturation;
254 }

◆ GetMetXComponent()

int LVL1::jFEXmetAlgo::GetMetXComponent ( )
overridevirtual

Implements LVL1::IjFEXmetAlgo.

Definition at line 208 of file jFEXmetAlgo.cxx.

209 {
211 }

◆ GetMetYComponent()

int LVL1::jFEXmetAlgo::GetMetYComponent ( )
overridevirtual

Implements LVL1::IjFEXmetAlgo.

Definition at line 232 of file jFEXmetAlgo.cxx.

233 {
235 }

◆ getTTowerET()

int LVL1::jFEXmetAlgo::getTTowerET ( unsigned int  TTID)
overridevirtual

Implements LVL1::IjFEXmetAlgo.

Definition at line 238 of file jFEXmetAlgo.cxx.

238  {
239  if(TTID == 0) {
240  return 0;
241  }
242 
243  if(m_map_Etvalues.find(TTID) != m_map_Etvalues.end()) {
244  return m_map_Etvalues[TTID][1];
245  }
246 
247  //we shouldn't arrive here
248  return 0;
249 
250 }

◆ getTTowerSat()

bool LVL1::jFEXmetAlgo::getTTowerSat ( unsigned int  TTID)
private

Definition at line 257 of file jFEXmetAlgo.cxx.

257  {
258  if(TTID == 0) {
259  return false;
260  }
261 
262  const LVL1::jTower * tmpTower = m_jTowerContainer->findTower(TTID);
263  return tmpTower->getTowerSat();
264 }

◆ initialize()

StatusCode LVL1::jFEXmetAlgo::initialize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 35 of file jFEXmetAlgo.cxx.

35  {
37  return StatusCode::SUCCESS;
38 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & LVL1::IjFEXmetAlgo::interfaceID ( )
inlinestaticinherited

Definition at line 41 of file IjFEXmetAlgo.h.

42 {
43  return IID_IjFEXmetAlgo;
44 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ reset()

StatusCode LVL1::jFEXmetAlgo::reset ( )
overridevirtual

Implements LVL1::IjFEXmetAlgo.

Definition at line 51 of file jFEXmetAlgo.cxx.

51  {
52  m_FPGA.clear();
53  m_FPGA_phi02.clear();
54  m_FPGA_fcal.clear();
55  return StatusCode::SUCCESS;
56 }

◆ safetyTest()

StatusCode LVL1::jFEXmetAlgo::safetyTest ( )
overridevirtual

Implements LVL1::IjFEXmetAlgo.

Definition at line 41 of file jFEXmetAlgo.cxx.

41  {
42 
44  if(!m_jTowerContainer.isValid()) {
45  ATH_MSG_ERROR("Could not retrieve jTowerContainer " << m_jTowerContainerKey.key());
46  return StatusCode::FAILURE;
47  }
48  return StatusCode::SUCCESS;
49 }

◆ setFPGAEnergy()

void LVL1::jFEXmetAlgo::setFPGAEnergy ( std::unordered_map< int, std::vector< int > >  et_map)
overridevirtual

Implements LVL1::IjFEXmetAlgo.

Definition at line 267 of file jFEXmetAlgo.cxx.

267  {
268  m_map_Etvalues=et_map;
269 }

◆ setup() [1/2]

void LVL1::jFEXmetAlgo::setup ( int  FPGA[FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_thin_algoSpace_width],
int  hemisphere 
)
overridevirtual

Implements LVL1::IjFEXmetAlgo.

Definition at line 59 of file jFEXmetAlgo.cxx.

59  {
60 
61  ATH_MSG_DEBUG("---------------- jFEXmetAlgo::setup ----------------");
62 
63  m_hemisphere = hemisphere;
64  m_saturation = false;
65 
67  for(int iphi=0;iphi<FEXAlgoSpaceDefs::jFEX_algoSpace_height;iphi++){
68  for(int ieta=8;ieta<16;ieta++){
69  m_FPGA[iphi].push_back(FPGA[iphi][ieta]);
70  m_saturation = m_saturation || getTTowerSat(FPGA[iphi][ieta]);
71  }
72  }
73 }

◆ setup() [2/2]

void LVL1::jFEXmetAlgo::setup ( int  FPGA[FEXAlgoSpaceDefs::jFEX_algoSpace_height][FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width],
int  hemisphere 
)
overridevirtual

Implements LVL1::IjFEXmetAlgo.

Definition at line 76 of file jFEXmetAlgo.cxx.

76  {
77 
78  ATH_MSG_DEBUG("---------------- jFEXmetAlgo::setup ----------------");
79 
80  m_hemisphere = hemisphere;
81  m_saturation = false;
82 
84  for(int iphi=0;iphi<FEXAlgoSpaceDefs::jFEX_algoSpace_height;iphi++){
85  for(int ieta=8;ieta<17;ieta++){
86  m_FPGA[iphi].push_back(FPGA[iphi][ieta]);
87  m_saturation = m_saturation || getTTowerSat(FPGA[iphi][ieta]);
88  }
89  }
90  m_FPGA_phi02.resize(16);
91  for(int iphi=0;iphi<16;iphi++){
92  for(int ieta=17;ieta<21;ieta++){
93  m_FPGA_phi02[iphi].push_back(FPGA[iphi][ieta]);
94  m_saturation = m_saturation || getTTowerSat(FPGA[iphi][ieta]);
95  }
96  }
97  m_FPGA_fcal.resize(8);
98  for(int iphi=0;iphi<8;iphi++){
99  for(int ieta=21;ieta<FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width;ieta++){
100  m_FPGA_fcal[iphi].push_back(FPGA[iphi][ieta]);
101  m_saturation = m_saturation || getTTowerSat(FPGA[iphi][ieta]);
102  }
103  }
104 
105 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_firmware_bit_offset

constexpr unsigned int LVL1::jFEXmetAlgo::m_firmware_bit_offset = 9
staticconstexprprivate

Definition at line 79 of file jFEXmetAlgo.h.

◆ m_firmware_scale

constexpr unsigned int LVL1::jFEXmetAlgo::m_firmware_scale = (1 << 9)
staticconstexprprivate

Definition at line 78 of file jFEXmetAlgo.h.

◆ m_FPGA

std::vector<std::vector<int> > LVL1::jFEXmetAlgo::m_FPGA
private

Definition at line 61 of file jFEXmetAlgo.h.

◆ m_FPGA_fcal

std::vector<std::vector<int> > LVL1::jFEXmetAlgo::m_FPGA_fcal
private

Definition at line 63 of file jFEXmetAlgo.h.

◆ m_FPGA_phi02

std::vector<std::vector<int> > LVL1::jFEXmetAlgo::m_FPGA_phi02
private

Definition at line 62 of file jFEXmetAlgo.h.

◆ m_hemisphere

int LVL1::jFEXmetAlgo::m_hemisphere
private

Definition at line 83 of file jFEXmetAlgo.h.

◆ m_jTowerContainer

SG::ReadHandle<jTowerContainer> LVL1::jFEXmetAlgo::m_jTowerContainer
private

Definition at line 59 of file jFEXmetAlgo.h.

◆ m_jTowerContainerKey

SG::ReadHandleKey<LVL1::jTowerContainer> LVL1::jFEXmetAlgo::m_jTowerContainerKey {this, "MyjTowers", "jTowerContainer", "Input container for jTowers"}
private

Definition at line 58 of file jFEXmetAlgo.h.

◆ m_map_Etvalues

std::unordered_map<int,std::vector<int> > LVL1::jFEXmetAlgo::m_map_Etvalues
private

Definition at line 81 of file jFEXmetAlgo.h.

◆ m_met

std::vector<long long> LVL1::jFEXmetAlgo::m_met
private

Definition at line 64 of file jFEXmetAlgo.h.

◆ m_met_angle

std::vector<float> LVL1::jFEXmetAlgo::m_met_angle
private

Definition at line 65 of file jFEXmetAlgo.h.

◆ m_met_Xcoord

std::vector<long long> LVL1::jFEXmetAlgo::m_met_Xcoord
private

Definition at line 66 of file jFEXmetAlgo.h.

◆ m_met_Ycoord

std::vector<long long> LVL1::jFEXmetAlgo::m_met_Ycoord
private

Definition at line 67 of file jFEXmetAlgo.h.

◆ m_saturation

bool LVL1::jFEXmetAlgo::m_saturation = false
private

Definition at line 72 of file jFEXmetAlgo.h.

◆ m_Totalmet_Xcoord

long long LVL1::jFEXmetAlgo::m_Totalmet_Xcoord = 0
private

Definition at line 68 of file jFEXmetAlgo.h.

◆ m_Totalmet_Ycoord

long long LVL1::jFEXmetAlgo::m_Totalmet_Ycoord = 0
private

Definition at line 69 of file jFEXmetAlgo.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
LVL1::jFEXmetAlgo::m_hemisphere
int m_hemisphere
Definition: jFEXmetAlgo.h:83
LVL1::jFEXmetAlgo::getTTowerET
virtual int getTTowerET(unsigned int TTID) override
Definition: jFEXmetAlgo.cxx:238
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1::jFEXmetAlgo::m_firmware_scale
static constexpr unsigned int m_firmware_scale
Definition: jFEXmetAlgo.h:78
LVL1::jTower::centrephi_toPI
float centrephi_toPI() const
Definition: jTower.h:85
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
M_PI
#define M_PI
Definition: ActiveFraction.h:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LVL1::jFEXmetAlgo::getTTowerSat
bool getTTowerSat(unsigned int TTID)
Definition: jFEXmetAlgo.cxx:257
LVL1::jFEXmetAlgo::m_firmware_bit_offset
static constexpr unsigned int m_firmware_bit_offset
Definition: jFEXmetAlgo.h:79
LVL1::FEXAlgoSpaceDefs::jFEX_algoSpace_height
constexpr static int jFEX_algoSpace_height
Definition: FEXAlgoSpaceDefs.h:27
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
LVL1::jFEXmetAlgo::m_FPGA_phi02
std::vector< std::vector< int > > m_FPGA_phi02
Definition: jFEXmetAlgo.h:62
LVL1::jFEXmetAlgo::m_met
std::vector< long long > m_met
Definition: jFEXmetAlgo.h:64
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
LVL1::jFEXmetAlgo::m_saturation
bool m_saturation
Definition: jFEXmetAlgo.h:72
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
LVL1::jTower::getTowerSat
bool getTowerSat() const
Definition: jTower.h:65
LVL1::jFEXmetAlgo::m_Totalmet_Xcoord
long long m_Totalmet_Xcoord
Definition: jFEXmetAlgo.h:68
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
LVL1::jFEXmetAlgo::buildMetYComponent
virtual void buildMetYComponent()
Definition: jFEXmetAlgo.cxx:214
LVL1::FEXAlgoSpaceDefs::jFEX_wide_algoSpace_width
constexpr static int jFEX_wide_algoSpace_width
Definition: FEXAlgoSpaceDefs.h:25
LVL1::jFEXmetAlgo::m_FPGA
std::vector< std::vector< int > > m_FPGA
Definition: jFEXmetAlgo.h:61
LVL1::jFEXmetAlgo::m_met_Ycoord
std::vector< long long > m_met_Ycoord
Definition: jFEXmetAlgo.h:67
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::jFEXmetAlgo::m_jTowerContainerKey
SG::ReadHandleKey< LVL1::jTowerContainer > m_jTowerContainerKey
Definition: jFEXmetAlgo.h:58
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::jTower::iPhi
int iPhi() const
Return global phi index.
Definition: jTower.cxx:174
LVL1::jFEXmetAlgo::m_jTowerContainer
SG::ReadHandle< jTowerContainer > m_jTowerContainer
Definition: jFEXmetAlgo.h:59
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
LVL1::jFEXmetAlgo::m_Totalmet_Ycoord
long long m_Totalmet_Ycoord
Definition: jFEXmetAlgo.h:69
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LVL1::jFEXmetAlgo::m_met_Xcoord
std::vector< long long > m_met_Xcoord
Definition: jFEXmetAlgo.h:66
LVL1::jFEXmetAlgo::buildMetXComponent
virtual void buildMetXComponent()
Definition: jFEXmetAlgo.cxx:189
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::jFEXmetAlgo::m_FPGA_fcal
std::vector< std::vector< int > > m_FPGA_fcal
Definition: jFEXmetAlgo.h:63
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
LVL1::jTower
The jTower class is an interface object for jFEX trigger algorithms The purposes are twofold:
Definition: jTower.h:40
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LVL1::jFEXmetAlgo::m_met_angle
std::vector< float > m_met_angle
Definition: jFEXmetAlgo.h:65
LVL1::gFEX::FPGA
FPGA
Definition: GTowerHelpers.h:17
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
LVL1::jFEXmetAlgo::m_map_Etvalues
std::unordered_map< int, std::vector< int > > m_map_Etvalues
Definition: jFEXmetAlgo.h:81
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528