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

The eFEXSim class defines the structure of a single eFEX Its purpose is: More...

#include <eFEXSim.h>

Inheritance diagram for LVL1::eFEXSim:
Collaboration diagram for LVL1::eFEXSim:

Public Member Functions

 eFEXSim (const std::string &type, const std::string &name, const IInterface *parent)
 Constructors. More...
 
virtual ~eFEXSim ()
 Destructor. More...
 
virtual StatusCode initialize () override
 standard Athena-Algorithm method More...
 
virtual StatusCode finalize () override
 standard Athena-Algorithm method More...
 
virtual void init (int id) override
 
virtual void reset () override
 
virtual void execute () override
 
virtual int ID () const override
 
virtual void SetTowersAndCells_SG (int tmp[10][18]) override
 
virtual StatusCode NewExecute (int tmp[10][18], eFEXOutputCollection *inputOutputCollection) override
 
virtual std::vector< std::unique_ptr< eFEXegTOB > > getEmTOBs () override
 
virtual std::vector< std::unique_ptr< eFEXtauTOB > > getTauHeuristicTOBs () override
 
virtual std::vector< std::unique_ptr< eFEXtauTOB > > getTauBDTTOBs () 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

std::vector< std::unique_ptr< eFEXtauTOB > > getTauTOBs (std::vector< std::vector< std::unique_ptr< eFEXtauTOB >> > &tauTobObjects)
 
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

int m_id
 Internal data. More...
 
int m_eTowersIDs [10][18]
 
CaloCellContainer m_sCellsCollection
 
std::vector< eFEXFPGA * > m_eFEXFPGACollection
 
std::vector< std::vector< std::unique_ptr< eFEXegTOB > > > m_emTobObjects
 
std::vector< std::vector< std::unique_ptr< eFEXtauTOB > > > m_tauHeuristicTobObjects
 
std::vector< std::vector< std::unique_ptr< eFEXtauTOB > > > m_tauBDTTobObjects
 
ToolHandle< IeFEXFPGAm_eFEXFPGATool {this, "eFEXFPGATool", "LVL1::eFEXFPGA", "Tool that simulates the FPGA hardware"}
 
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
 

Detailed Description

The eFEXSim class defines the structure of a single eFEX Its purpose is:

Definition at line 32 of file eFEXSim.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

◆ eFEXSim()

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

Constructors.

Definition at line 19 of file eFEXSim.cxx.

19  :
21  {
22  declareInterface<IeFEXSim>(this);
23  }

◆ ~eFEXSim()

LVL1::eFEXSim::~eFEXSim ( )
virtual

Destructor.

Definition at line 63 of file eFEXSim.cxx.

64  {
65  }

Member Function Documentation

◆ 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; }

◆ execute()

void LVL1::eFEXSim::execute ( )
overridevirtual

Implements LVL1::IeFEXSim.

Definition at line 67 of file eFEXSim.cxx.

67  {
68 
69  }

◆ 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

◆ finalize()

StatusCode LVL1::eFEXSim::finalize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 36 of file eFEXSim.cxx.

37  {
38  return StatusCode::SUCCESS;
39  }

◆ getEmTOBs()

std::vector< std::unique_ptr< eFEXegTOB > > LVL1::eFEXSim::getEmTOBs ( )
overridevirtual

Implements LVL1::IeFEXSim.

Definition at line 151 of file eFEXSim.cxx.

152 {
153 
154  std::vector<std::unique_ptr<eFEXegTOB>> tobsSort;
155  //bool first = true;
156 
157  // concatonate tobs from the fpgas
158  // As we're using unique_ptrs here we have to move rather than copy
159  for(auto &j : m_emTobObjects){
160  for (auto &k : j) {
161  tobsSort.push_back(std::move(k));
162  }
163  }
164 
165  ATH_MSG_DEBUG("number of tobs: " <<tobsSort.size() << " in eFEX: " << m_id);
166 
167  // Moving all TOB sorting to eFEXSysSim to allow xTOB generation
168  // Keep this just in case a more subtle need is discovered
169  /*
170  // sort the tobs from the fpgas by their et (last 12 bits of 32 bit word)
171  std::sort (tobsSort.begin(), tobsSort.end(), TOBetSort<eFEXegTOB>);
172 
173  // return the 6 highest ET TOBs from the efex
174  if (tobsSort.size() > 6) tobsSort.resize(6);
175  */
176  return tobsSort;
177 }

◆ getTauBDTTOBs()

std::vector< std::unique_ptr< eFEXtauTOB > > LVL1::eFEXSim::getTauBDTTOBs ( )
overridevirtual

Implements LVL1::IeFEXSim.

Definition at line 212 of file eFEXSim.cxx.

213 {
215 }

◆ getTauHeuristicTOBs()

std::vector< std::unique_ptr< eFEXtauTOB > > LVL1::eFEXSim::getTauHeuristicTOBs ( )
overridevirtual

Implements LVL1::IeFEXSim.

Definition at line 207 of file eFEXSim.cxx.

208 {
210 }

◆ getTauTOBs()

std::vector< std::unique_ptr< eFEXtauTOB > > LVL1::eFEXSim::getTauTOBs ( std::vector< std::vector< std::unique_ptr< eFEXtauTOB >> > &  tauTobObjects)
private

Definition at line 180 of file eFEXSim.cxx.

181 {
182 
183  std::vector<std::unique_ptr<eFEXtauTOB>> tobsSort;
184 
185  // concatenate tobs from the fpgas
186  // As we're using unique_ptrs here we have to move rather than copy
187  for( auto &j : tauTobObjects ){
188  for (auto &k : j) {
189  tobsSort.push_back(std::move(k));
190  }
191  }
192 
193  ATH_MSG_DEBUG("number of tau tobs: " << tobsSort.size() << " in eFEX: " << m_id);
194 
195  // Moving all TOB sorting to eFEXSysSim to allow xTOB generation
196  // Keep this just in case a more subtle need is discovered
197  /*
198  // sort the tobs from the fpgas by their et (last 12 bits of 32 bit word)
199  std::sort( tobsSort.begin(), tobsSort.end(), TOBetSort<eFEXtauTOB>);
200 
201  // return the tob 6 highest ET TOBs from the efex
202  if (tobsSort.size() > 6) tobsSort.resize(6);
203  */
204  return tobsSort;
205 }

◆ ID()

virtual int LVL1::eFEXSim::ID ( ) const
inlineoverridevirtual

Implements LVL1::IeFEXSim.

Definition at line 53 of file eFEXSim.h.

53 {return m_id;}

◆ init()

void LVL1::eFEXSim::init ( int  id)
overridevirtual

Implements LVL1::IeFEXSim.

Definition at line 57 of file eFEXSim.cxx.

58  {
59  m_id = id;
60  }

◆ initialize()

StatusCode LVL1::eFEXSim::initialize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 28 of file eFEXSim.cxx.

29  {
30  ATH_CHECK( m_eFEXFPGATool.retrieve() );
31  return StatusCode::SUCCESS;
32  }

◆ 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::IeFEXSim::interfaceID ( )
inlinestaticinherited

Definition at line 52 of file IeFEXSim.h.

53  {
54  return IID_IeFEXSim;
55  }

◆ 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  }

◆ NewExecute()

StatusCode LVL1::eFEXSim::NewExecute ( int  tmp[10][18],
eFEXOutputCollection inputOutputCollection 
)
overridevirtual

Implements LVL1::IeFEXSim.

Definition at line 71 of file eFEXSim.cxx.

71  {
72  m_emTobObjects.clear();
74  m_tauBDTTobObjects.clear();
75 
76  std::copy(&tmp_eTowersIDs_subset[0][0], &tmp_eTowersIDs_subset[0][0]+(10*18),&m_eTowersIDs[0][0]);
77 
78  int tmp_eTowersIDs_subset_FPGA[10][6];
79 
80 
81  //FPGA 0----------------------------------------------------------------------------------------------------------------------------------------------
82  memset(tmp_eTowersIDs_subset_FPGA, 0, sizeof tmp_eTowersIDs_subset_FPGA);
83  for (int myrow = 0; myrow<10; myrow++){
84  for (int mycol = 0; mycol<6; mycol++){
85  tmp_eTowersIDs_subset_FPGA[myrow][mycol] = tmp_eTowersIDs_subset[myrow][mycol];
86  }
87  }
88  ATH_CHECK(m_eFEXFPGATool->init(0, m_id));
89  m_eFEXFPGATool->SetTowersAndCells_SG(tmp_eTowersIDs_subset_FPGA);
90  ATH_CHECK(m_eFEXFPGATool->execute(inputOutputCollection));
91  m_emTobObjects.push_back(m_eFEXFPGATool->getEmTOBs());
92  m_tauHeuristicTobObjects.push_back(m_eFEXFPGATool->getTauHeuristicTOBs());
93  m_tauBDTTobObjects.push_back(m_eFEXFPGATool->getTauBDTTOBs());
94  m_eFEXFPGATool->reset();
95  //FPGA 0----------------------------------------------------------------------------------------------------------------------------------------------
96 
97  //FPGA 1----------------------------------------------------------------------------------------------------------------------------------------------
98  memset(tmp_eTowersIDs_subset_FPGA, 0, sizeof tmp_eTowersIDs_subset_FPGA);
99  for (int myrow = 0; myrow<10; myrow++){
100  for (int mycol = 4; mycol<10; mycol++){
101  tmp_eTowersIDs_subset_FPGA[myrow][mycol-4] = tmp_eTowersIDs_subset[myrow][mycol];
102  }
103  }
104  ATH_CHECK(m_eFEXFPGATool->init(1, m_id));
105  m_eFEXFPGATool->SetTowersAndCells_SG(tmp_eTowersIDs_subset_FPGA);
106  ATH_CHECK(m_eFEXFPGATool->execute(inputOutputCollection));
107  m_emTobObjects.push_back(m_eFEXFPGATool->getEmTOBs());
108  m_tauHeuristicTobObjects.push_back(m_eFEXFPGATool->getTauHeuristicTOBs());
109  m_tauBDTTobObjects.push_back(m_eFEXFPGATool->getTauBDTTOBs());
110  m_eFEXFPGATool->reset();
111  //FPGA 1----------------------------------------------------------------------------------------------------------------------------------------------
112 
113 
114  //FPGA 2----------------------------------------------------------------------------------------------------------------------------------------------
115  memset(tmp_eTowersIDs_subset_FPGA, 0, sizeof tmp_eTowersIDs_subset_FPGA);
116  for (int myrow = 0; myrow<10; myrow++){
117  for (int mycol = 8; mycol<14; mycol++){
118  tmp_eTowersIDs_subset_FPGA[myrow][mycol-8] = tmp_eTowersIDs_subset[myrow][mycol];
119  }
120  }
121  ATH_CHECK(m_eFEXFPGATool->init(2, m_id));
122  m_eFEXFPGATool->SetTowersAndCells_SG(tmp_eTowersIDs_subset_FPGA);
123  ATH_CHECK(m_eFEXFPGATool->execute(inputOutputCollection));
124  m_emTobObjects.push_back(m_eFEXFPGATool->getEmTOBs());
125  m_tauHeuristicTobObjects.push_back(m_eFEXFPGATool->getTauHeuristicTOBs());
126  m_tauBDTTobObjects.push_back(m_eFEXFPGATool->getTauBDTTOBs());
127  m_eFEXFPGATool->reset();
128  //FPGA 2----------------------------------------------------------------------------------------------------------------------------------------------
129 
130  //FPGA 3----------------------------------------------------------------------------------------------------------------------------------------------
131  memset(tmp_eTowersIDs_subset_FPGA, 0, sizeof tmp_eTowersIDs_subset_FPGA);
132  for (int myrow = 0; myrow<10; myrow++){
133  for (int mycol = 12; mycol<18; mycol++){
134  tmp_eTowersIDs_subset_FPGA[myrow][mycol-12] = tmp_eTowersIDs_subset[myrow][mycol];
135  }
136  }
137  ATH_CHECK(m_eFEXFPGATool->init(3, m_id));
138  m_eFEXFPGATool->SetTowersAndCells_SG(tmp_eTowersIDs_subset_FPGA);
139  ATH_CHECK(m_eFEXFPGATool->execute(inputOutputCollection));
140  m_emTobObjects.push_back(m_eFEXFPGATool->getEmTOBs());
141  m_tauHeuristicTobObjects.push_back(m_eFEXFPGATool->getTauHeuristicTOBs());
142  m_tauBDTTobObjects.push_back(m_eFEXFPGATool->getTauBDTTOBs());
143  m_eFEXFPGATool->reset();
144  //FPGA 3----------------------------------------------------------------------------------------------------------------------------------------------
145 
146  return StatusCode::SUCCESS;
147 
148 }

◆ 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()

void LVL1::eFEXSim::reset ( )
overridevirtual

Implements LVL1::IeFEXSim.

Definition at line 42 of file eFEXSim.cxx.

43  {
44  int rows = sizeof m_eTowersIDs / sizeof m_eTowersIDs[0];
45  int cols = sizeof m_eTowersIDs[0] / sizeof m_eTowersIDs[0][0];
46 
47  m_id = -1;
48  m_eFEXFPGACollection.clear();
49  for (int i=0; i<rows; i++){
50  for (int j=0; j<cols; j++){
51  m_eTowersIDs[i][j] = 0;
52  }
53  }
54 
55  }

◆ SetTowersAndCells_SG()

void LVL1::eFEXSim::SetTowersAndCells_SG ( int  tmp[10][18])
overridevirtual

Implements LVL1::IeFEXSim.

Definition at line 217 of file eFEXSim.cxx.

217  { // METHOD USING ONLY IDS
218 
219  std::copy(&tmp_eTowersIDs_subset[0][0], &tmp_eTowersIDs_subset[0][0]+(10*18),&m_eTowersIDs[0][0]);
220 
221  int tmp_eTowersIDs_subset_FPGA[10][6];
222 
223  //FPGA 0----------------------------------------------------------------------------------------------------------------------------------------------
224  memset(tmp_eTowersIDs_subset_FPGA, 0, sizeof tmp_eTowersIDs_subset_FPGA);
225  for (int myrow = 0; myrow<10; myrow++){
226  for (int mycol = 0; mycol<6; mycol++){
227  tmp_eTowersIDs_subset_FPGA[myrow][mycol] = tmp_eTowersIDs_subset[myrow][mycol];
228  }
229  }
230  m_eFEXFPGACollection.at(0)->SetTowersAndCells_SG(tmp_eTowersIDs_subset_FPGA);
231  //FPGA 0----------------------------------------------------------------------------------------------------------------------------------------------
232 
233  //FPGA 1----------------------------------------------------------------------------------------------------------------------------------------------
234  memset(tmp_eTowersIDs_subset_FPGA, 0, sizeof tmp_eTowersIDs_subset_FPGA);
235  for (int myrow = 0; myrow<10; myrow++){
236  for (int mycol = 4; mycol<10; mycol++){
237  tmp_eTowersIDs_subset_FPGA[myrow][mycol-4] = tmp_eTowersIDs_subset[myrow][mycol];
238  }
239  }
240  m_eFEXFPGACollection.at(1)->SetTowersAndCells_SG(tmp_eTowersIDs_subset_FPGA);
241  //FPGA 1----------------------------------------------------------------------------------------------------------------------------------------------
242 
243 
244  //FPGA 2----------------------------------------------------------------------------------------------------------------------------------------------
245  memset(tmp_eTowersIDs_subset_FPGA, 0, sizeof tmp_eTowersIDs_subset_FPGA);
246  for (int myrow = 0; myrow<10; myrow++){
247  for (int mycol = 8; mycol<14; mycol++){
248  tmp_eTowersIDs_subset_FPGA[myrow][mycol-8] = tmp_eTowersIDs_subset[myrow][mycol];
249  }
250  }
251  m_eFEXFPGACollection.at(2)->SetTowersAndCells_SG(tmp_eTowersIDs_subset_FPGA);
252  //FPGA 2----------------------------------------------------------------------------------------------------------------------------------------------
253 
254  //FPGA 3----------------------------------------------------------------------------------------------------------------------------------------------
255  memset(tmp_eTowersIDs_subset_FPGA, 0, sizeof tmp_eTowersIDs_subset_FPGA);
256  for (int myrow = 0; myrow<10; myrow++){
257  for (int mycol = 12; mycol<18; mycol++){
258  tmp_eTowersIDs_subset_FPGA[myrow][mycol-12] = tmp_eTowersIDs_subset[myrow][mycol];
259  }
260  }
261  m_eFEXFPGACollection.at(3)->SetTowersAndCells_SG(tmp_eTowersIDs_subset_FPGA);
262  //FPGA 3----------------------------------------------------------------------------------------------------------------------------------------------
263 
264 }

◆ 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_eFEXFPGACollection

std::vector<eFEXFPGA*> LVL1::eFEXSim::m_eFEXFPGACollection
private

Definition at line 72 of file eFEXSim.h.

◆ m_eFEXFPGATool

ToolHandle<IeFEXFPGA> LVL1::eFEXSim::m_eFEXFPGATool {this, "eFEXFPGATool", "LVL1::eFEXFPGA", "Tool that simulates the FPGA hardware"}
private

Definition at line 78 of file eFEXSim.h.

◆ m_emTobObjects

std::vector<std::vector<std::unique_ptr<eFEXegTOB> > > LVL1::eFEXSim::m_emTobObjects
private

Definition at line 74 of file eFEXSim.h.

◆ m_eTowersIDs

int LVL1::eFEXSim::m_eTowersIDs[10][18]
private

Definition at line 69 of file eFEXSim.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_id

int LVL1::eFEXSim::m_id
private

Internal data.

Definition at line 68 of file eFEXSim.h.

◆ m_sCellsCollection

CaloCellContainer LVL1::eFEXSim::m_sCellsCollection
private

Definition at line 71 of file eFEXSim.h.

◆ m_tauBDTTobObjects

std::vector<std::vector<std::unique_ptr<eFEXtauTOB> > > LVL1::eFEXSim::m_tauBDTTobObjects
private

Definition at line 76 of file eFEXSim.h.

◆ m_tauHeuristicTobObjects

std::vector<std::vector<std::unique_ptr<eFEXtauTOB> > > LVL1::eFEXSim::m_tauHeuristicTobObjects
private

Definition at line 75 of file eFEXSim.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::eFEXSim::m_emTobObjects
std::vector< std::vector< std::unique_ptr< eFEXegTOB > > > m_emTobObjects
Definition: eFEXSim.h:74
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
beamspotnt.cols
list cols
Definition: bin/beamspotnt.py:1114
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
LVL1::eFEXSim::getTauTOBs
std::vector< std::unique_ptr< eFEXtauTOB > > getTauTOBs(std::vector< std::vector< std::unique_ptr< eFEXtauTOB >> > &tauTobObjects)
Definition: eFEXSim.cxx:180
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LVL1::eFEXSim::m_eTowersIDs
int m_eTowersIDs[10][18]
Definition: eFEXSim.h:69
lumiFormat.i
int i
Definition: lumiFormat.py:85
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
LVL1::eFEXSim::m_id
int m_id
Internal data.
Definition: eFEXSim.h:68
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::eFEXSim::m_tauHeuristicTobObjects
std::vector< std::vector< std::unique_ptr< eFEXtauTOB > > > m_tauHeuristicTobObjects
Definition: eFEXSim.h:75
beamspotnt.rows
list rows
Definition: bin/beamspotnt.py:1112
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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::eFEXSim::m_tauBDTTobObjects
std::vector< std::vector< std::unique_ptr< eFEXtauTOB > > > m_tauBDTTobObjects
Definition: eFEXSim.h:76
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LVL1::eFEXSim::m_eFEXFPGACollection
std::vector< eFEXFPGA * > m_eFEXFPGACollection
Definition: eFEXSim.h:72
LVL1::eFEXSim::m_eFEXFPGATool
ToolHandle< IeFEXFPGA > m_eFEXFPGATool
Definition: eFEXSim.h:78
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
calibdata.copy
bool copy
Definition: calibdata.py:27
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