ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
ZDCTriggerSimAllLUTs Class Reference

#include <ZDCTriggerSim.h>

Inheritance diagram for ZDCTriggerSimAllLUTs:
Collaboration diagram for ZDCTriggerSimAllLUTs:

Public Member Functions

 ZDCTriggerSimAllLUTs (const std::array< unsigned int, 4096 > &sideALUT, const std::array< unsigned int, 4096 > &sideCLUT, const std::array< unsigned int, 256 > &inCombLUT)
 
virtual unsigned int simLevel1Trig (const ZDCTriggerSim::SimDataCPtr &inputData) override
 
SimStack::const_iterator stackBottom () const
 
SimStack::const_reverse_iterator stackTop () const
 
void dump (std::ostream &strm) const
 

Protected Member Functions

virtual void doSimStage () override
 
void stackClear ()
 
void stackPush (const ZDCTriggerSim::SimDataCPtr &ptr)
 
const ZDCTriggerSim::SimDataCPtrstackTopData () const
 

Private Types

typedef std::list< ZDCTriggerSim::SimDataCPtrSimStack
 

Private Attributes

std::array< unsigned int, 4096 > m_LUTA {}
 
std::array< unsigned int, 4096 > m_LUTC {}
 
SimStack m_stack
 
std::array< unsigned int, 256 > m_combLUT {}
 

Detailed Description

Definition at line 248 of file ZDCTriggerSim.h.

Member Typedef Documentation

◆ SimStack

typedef std::list<ZDCTriggerSim::SimDataCPtr> ZDCTriggerSimBase::SimStack
privateinherited

Definition at line 181 of file ZDCTriggerSim.h.

Constructor & Destructor Documentation

◆ ZDCTriggerSimAllLUTs()

ZDCTriggerSimAllLUTs::ZDCTriggerSimAllLUTs ( const std::array< unsigned int, 4096 > &  sideALUT,
const std::array< unsigned int, 4096 > &  sideCLUT,
const std::array< unsigned int, 256 > &  inCombLUT 
)
inline

Definition at line 263 of file ZDCTriggerSim.h.

266  : ZDCTriggerSimCombLUT(inCombLUT), m_LUTA(sideALUT), m_LUTC(sideCLUT) {}

Member Function Documentation

◆ doSimStage()

void ZDCTriggerSimAllLUTs::doSimStage ( )
overrideprotectedvirtual

Implements ZDCTriggerSimBase.

Reimplemented in ZDCTriggerSimFADC, and ZDCTriggerSimModuleAmpls.

Definition at line 42 of file ZDCTriggerSim.cxx.

42  {
44  if (ptr->getNumData() != 2 || ptr->getNumBits() != 12)
45  throw std::logic_error("Invalid input data in ZDCTriggerSimAllLUTs");
46  ;
47 
48  unsigned int inputSideA = ptr->getValueTrunc(0);
49  unsigned int inputSideC = ptr->getValueTrunc(1);
50 
51  unsigned int valueA = m_LUTA.at(inputSideA);
52  unsigned int valueC = m_LUTC.at(inputSideC);
53 
54  // ZDCTriggerSim::SimDataPtr uses shared_ptr semantics so cleanup is
55  // guaranteed
56  //
58  static_cast<ZDCTriggerSim::CombLUTInputsInt*>(inputs_p.get())
59  ->setData({valueA, valueC});
60 
63 }

◆ dump()

void ZDCTriggerSimBase::dump ( std::ostream &  strm) const
inherited

Definition at line 11 of file ZDCTriggerSim.cxx.

11  {
12  for (auto entry : m_stack) {
13  strm << entry->getType() << ": ";
14  entry->dump(strm);
15  strm << std::endl;
16  }
17 }

◆ simLevel1Trig()

virtual unsigned int ZDCTriggerSimAllLUTs::simLevel1Trig ( const ZDCTriggerSim::SimDataCPtr inputData)
inlineoverridevirtual

Implements ZDCTriggerSimBase.

Reimplemented in ZDCTriggerSimFADC, and ZDCTriggerSimModuleAmpls.

Definition at line 268 of file ZDCTriggerSim.h.

269  {
270  stackClear();
271  stackPush(inputData);
272 
273  doSimStage();
274  return stackTopData()->getValueTrunc();
275  }

◆ stackBottom()

SimStack::const_iterator ZDCTriggerSimBase::stackBottom ( ) const
inlineinherited

Definition at line 212 of file ZDCTriggerSim.h.

213  {
214  return m_stack.begin();
215  }

◆ stackClear()

void ZDCTriggerSimBase::stackClear ( )
inlineprotectedinherited

Definition at line 187 of file ZDCTriggerSim.h.

187 { m_stack.clear(); }

◆ stackPush()

void ZDCTriggerSimBase::stackPush ( const ZDCTriggerSim::SimDataCPtr ptr)
inlineprotectedinherited

Definition at line 189 of file ZDCTriggerSim.h.

189  {
190  m_stack.push_back(SimStack::value_type(ptr));
191  }

◆ stackTop()

SimStack::const_reverse_iterator ZDCTriggerSimBase::stackTop ( ) const
inlineinherited

Definition at line 217 of file ZDCTriggerSim.h.

217  {
218  return m_stack.rbegin();
219  }

◆ stackTopData()

const ZDCTriggerSim::SimDataCPtr& ZDCTriggerSimBase::stackTopData ( ) const
inlineprotectedinherited

Definition at line 193 of file ZDCTriggerSim.h.

193  {
194  return m_stack.back();
195  }

Member Data Documentation

◆ m_combLUT

std::array<unsigned int, 256> ZDCTriggerSimCombLUT::m_combLUT {}
privateinherited

Definition at line 225 of file ZDCTriggerSim.h.

◆ m_LUTA

std::array<unsigned int, 4096> ZDCTriggerSimAllLUTs::m_LUTA {}
private

Definition at line 250 of file ZDCTriggerSim.h.

◆ m_LUTC

std::array<unsigned int, 4096> ZDCTriggerSimAllLUTs::m_LUTC {}
private

Definition at line 251 of file ZDCTriggerSim.h.

◆ m_stack

SimStack ZDCTriggerSimBase::m_stack
privateinherited

Definition at line 184 of file ZDCTriggerSim.h.


The documentation for this class was generated from the following files:
ZDCTriggerSimBase::m_stack
SimStack m_stack
Definition: ZDCTriggerSim.h:184
ZDCTriggerSim::SimDataCPtr
std::shared_ptr< const ZDCTriggerSimDataBase > SimDataCPtr
Definition: ZDCTriggerSim.h:170
ZDCTriggerSimBase::stackClear
void stackClear()
Definition: ZDCTriggerSim.h:187
ZDCTriggerSimAllLUTs::doSimStage
virtual void doSimStage() override
Definition: ZDCTriggerSim.cxx:42
ZDCTriggerSimAllLUTs::m_LUTA
std::array< unsigned int, 4096 > m_LUTA
Definition: ZDCTriggerSim.h:250
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
ZDCTriggerSimBase::stackTopData
const ZDCTriggerSim::SimDataCPtr & stackTopData() const
Definition: ZDCTriggerSim.h:193
ZDCTriggerSimCombLUT::ZDCTriggerSimCombLUT
ZDCTriggerSimCombLUT(const std::array< unsigned int, 256 > &inLUT)
Definition: ZDCTriggerSim.h:235
ZDCTriggerSim::SimDataPtr
std::shared_ptr< ZDCTriggerSimDataBase > SimDataPtr
Definition: ZDCTriggerSim.h:171
ZDCTriggerSimCombLUT::doSimStage
virtual void doSimStage() override
Definition: ZDCTriggerSim.cxx:20
ZDCTriggerSimBase::stackPush
void stackPush(const ZDCTriggerSim::SimDataCPtr &ptr)
Definition: ZDCTriggerSim.h:189
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
ZDCTriggerSimData
Definition: ZDCTriggerSim.h:58
ZDCTriggerSimAllLUTs::m_LUTC
std::array< unsigned int, 4096 > m_LUTC
Definition: ZDCTriggerSim.h:251