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

#include <ZDCTriggerSim.h>

Inheritance diagram for ZDCTriggerSimModuleAmpls:
Collaboration diagram for ZDCTriggerSimModuleAmpls:

Public Member Functions

 ZDCTriggerSimModuleAmpls (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

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

Detailed Description

Definition at line 278 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

◆ ZDCTriggerSimModuleAmpls()

ZDCTriggerSimModuleAmpls::ZDCTriggerSimModuleAmpls ( 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 290 of file ZDCTriggerSim.h.

293  : ZDCTriggerSimAllLUTs(sideALUT, sideCLUT, inCombLUT) {}

Member Function Documentation

◆ doSimStage()

void ZDCTriggerSimModuleAmpls::doSimStage ( )
overrideprotectedvirtual

Implements ZDCTriggerSimBase.

Reimplemented in ZDCTriggerSimFADC.

Definition at line 67 of file ZDCTriggerSim.cxx.

67  {
69  if (ptr->getNumData() != 8 || ptr->getNumBits() != 12)
70  throw std::logic_error("Invalid input data in ZDCTriggerSimModuleAmpls");
71 
72  unsigned int sumA = 0;
73  for (size_t i = 0; i < 4; i++) {
74  sumA += ptr->getValueTrunc(i);
75  }
76 
77  unsigned int sumC = 0;
78  for (size_t i = 4; i < 8; i++) {
79  sumC += ptr->getValueTrunc(i);
80  }
81 
82  // The sums get divided by 4
83  //
84  sumA /= 4;
85  sumC /= 4;
86 
88  static_cast<ZDCTriggerSim::SideLUTInputsInt*>(inputs_p.get())
89  ->setData({sumA, sumC});
90 
92 
94 }

◆ 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 ZDCTriggerSimModuleAmpls::simLevel1Trig ( const ZDCTriggerSim::SimDataCPtr inputData)
inlineoverridevirtual

Implements ZDCTriggerSimBase.

Reimplemented in ZDCTriggerSimFADC.

Definition at line 295 of file ZDCTriggerSim.h.

295  {
296  stackClear();
297  stackPush(inputData);
298 
299  doSimStage();
300  return stackTopData()->getValueTrunc();
301  }

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

Definition at line 250 of file ZDCTriggerSim.h.

◆ m_LUTC

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

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:
ZDCTriggerSimModuleAmpls::doSimStage
virtual void doSimStage() override
Definition: ZDCTriggerSim.cxx:67
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
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
ZDCTriggerSimBase::stackTopData
const ZDCTriggerSim::SimDataCPtr & stackTopData() const
Definition: ZDCTriggerSim.h:193
lumiFormat.i
int i
Definition: lumiFormat.py:85
ZDCTriggerSim::SimDataPtr
std::shared_ptr< ZDCTriggerSimDataBase > SimDataPtr
Definition: ZDCTriggerSim.h:171
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::ZDCTriggerSimAllLUTs
ZDCTriggerSimAllLUTs(const std::array< unsigned int, 4096 > &sideALUT, const std::array< unsigned int, 4096 > &sideCLUT, const std::array< unsigned int, 256 > &inCombLUT)
Definition: ZDCTriggerSim.h:263