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

level 1 ZDC trigger simulation More...

#include <TrigT1Run3ZDC.h>

Inheritance diagram for LVL1::TrigT1Run3ZDC:
Collaboration diagram for LVL1::TrigT1Run3ZDC:

Public Member Functions

 TrigT1Run3ZDC (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode initialize () override
 
virtual StatusCode execute () override
 
virtual bool isClonable () const override final
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
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 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
 

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

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::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_zdcModuleCalibEnergyKey
 
const ZdcIDm_zdcId {}
 
SG::ReadHandleKey< ZdcLucrodDataContainerm_zldContainerName
 
SG::WriteHandleKey< ZdcCTPm_zdcCTPLocation
 
Gaudi::Property< std::string > m_lutFile
 
Gaudi::Property< unsigned int > m_minSampleAna
 
Gaudi::Property< unsigned int > m_maxSampleAna
 
Gaudi::Property< unsigned int > m_negHG2ndDerivThresh
 
Gaudi::Property< unsigned int > m_negLG2ndDerivThresh
 
Gaudi::Property< unsigned int > m_baselineDelta
 
std::shared_ptr< ZDCTriggerSimFADCm_triggerSimHGPtr
 Two data member to hold the ZDCTrigger Object that computes the LUT logic: shared ptr to ensure cleanup. More...
 
std::shared_ptr< ZDCTriggerSimFADCm_triggerSimLGPtr
 
std::shared_ptr< ZDCTriggerSim::FADCInputsm_hgFADC_ptr
 A data member to hold the ZDCTrigger Object that stores flash ADC input values: shared ptr to ensure cleanup. More...
 
std::shared_ptr< ZDCTriggerSim::FADCInputsm_lgFADC_ptr
 
DataObjIDColl m_extendedExtraObjects
 
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

level 1 ZDC trigger simulation

Definition at line 45 of file TrigT1Run3ZDC.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrigT1Run3ZDC()

LVL1::TrigT1Run3ZDC::TrigT1Run3ZDC ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 21 of file TrigT1Run3ZDC.cxx.

22  : AthAlgorithm(name, pSvcLocator) {}

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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()

StatusCode LVL1::TrigT1Run3ZDC::execute ( )
overridevirtual

Definition at line 115 of file TrigT1Run3ZDC.cxx.

115  {
116 
117  const EventContext &ctx = Gaudi::Hive::currentContext();
118 
119  // create uints to hold trigger averages
120  unsigned int trigAvgAHG = 0;
121  unsigned int trigAvgCHG = 0;
122  unsigned int trigAvgALG = 0;
123  unsigned int trigAvgCLG = 0;
124 
125  // create multi-dim array to store event by event flash ADC values
126  std::array<std::array<std::array<unsigned int, 24>, 4>, 2> FADCSamplesHG;
127  std::array<std::array<std::array<unsigned int, 24>, 4>, 2> FADCSamplesLG;
128 
129  // create vectors to store flattened above multi
130  // dim arrays, in order to give the TriggerSimTool
131  // data in the proper format
132  std::vector<unsigned int> FADCFlattenedHG;
133  std::vector<unsigned int> FADCFlattenedLG;
134 
135  // access LUCROD data
136 
137  // use readhandle to retrive lucrodCollection
139 
140  for (const ZdcLucrodData *zld : *lucrodCollection) {
141 
142  // get lucrod board number
143  uint32_t lucrod_id = zld->GetLucrodID();
144 
145  // unpack data for each lucrod
146  for (size_t i = 0; i < zld->GetChanDataSize(); i++) {
147 
148  // create channel object
149  const ZdcLucrodChannel &zlc = zld->GetChanData(i);
150 
151  // figure out which channel we are reading out (0,1)
152  uint16_t lucrod_channel = zlc.id;
153 
154  // variable to hold if it is a ZDC (0) or RPD (1) type
155  // lucrod
157  lucrod_id)["type"][lucrod_channel];
158 
159  // trigger based on ZDC amplitudes, don't use
160  // RPD channels
161  if (type != 0) {
162  continue;
163  }
164 
165  // retrive what side, module, and gain we are reading out
167  lucrod_id)["side"][lucrod_channel];
169  lucrod_id)["module"][lucrod_channel];
171  lucrod_id)["gain"][lucrod_channel];
172 
173  // Fill different flash ADC vectors for Low and High
174  // gain samples
175  if (gain == 0) {
176  unsigned int counter = 0;
177  for (const auto &sample : zlc.waveform) {
178  // fill low gain FADC samples
179  FADCSamplesLG.at((side == 1)).at(module).at(counter) = sample;
180  counter++;
181  }
182  } else if (gain == 1) {
183  unsigned int counter = 0;
184  for (const auto &sample : zlc.waveform) {
185  // fill high gain FADC samples
186  FADCSamplesHG.at((side == 1)).at(module).at(counter) = sample;
187  counter++;
188  }
189  }
190  // retrive Trig Avg amp for debugging
191  // from both LG and HG modules
192  if (side * gain * module == 3) {
193  trigAvgAHG = zld->GetTrigAvgA();
194  trigAvgCHG = zld->GetTrigAvgC();
195  } else if (side * module == 3) {
196  trigAvgALG = zld->GetTrigAvgA();
197  trigAvgCLG = zld->GetTrigAvgC();
198  }
199  }
200  } // end lucrod loop
201 
202  // unpack FADC data into one long vector for both
203  // high and low gain
204  for (int side : {1, 0}) {
205  for (int module : {0, 1, 2, 3}) {
206  for (const auto sample : FADCSamplesLG.at(side).at(module)) {
207  FADCFlattenedLG.push_back(sample);
208  }
209  }
210  }
211 
212  for (int side : {1, 0}) {
213  for (int module : {0, 1, 2, 3}) {
214  for (const auto sample : FADCSamplesHG.at(side).at(module)) {
215  FADCFlattenedHG.push_back(sample);
216  }
217  }
218  }
219 
220  // set data in Trigger Sim Object
221  m_hgFADC_ptr->setData(FADCFlattenedHG);
222  m_lgFADC_ptr->setData(FADCFlattenedLG);
223 
224  // call ZDCTriggerSim to actually get L1 decisions
225  unsigned int wordOutHG = m_triggerSimHGPtr->simLevel1Trig(m_hgFADC_ptr);
226  unsigned int wordOutLG = m_triggerSimLGPtr->simLevel1Trig(m_lgFADC_ptr);
227 
228  // convert int to bitset for ZDC Triggers
229  std::bitset<3> binhg(wordOutHG);
230 
231  // convert int to bitset for ZDC ALT Trigggers
232  std::bitset<3> binlg(wordOutLG);
233 
234  // ZDC L1 items are located on CTPIN SLOT 9
235  // Each slot holds 4 connectors that each carry a 32 bit trigger word
236  // ZDC HG items are located on Connector 1 (CTPCAL)
237  // at bits 25, 26, 27
238  // ZDC LG (UCC) items are located on Connector 3 (NIM3)
239  // at bits 28, 29, 30
240  // for more info see
241  // twiki.cern.ch/twiki/bin/view/Atlas/LevelOneCentralTriggerSetup#CTPIN_Slot_9
242 
243  // load HG output into trigger word on correct bits
244  unsigned int word0 = 0;
245  word0 += (binhg[0] << 25);
246  word0 += (binhg[1] << 26);
247  word0 += (binhg[2] << 27);
248 
249  // load LG output into trigger word on correct bits
250  unsigned int word1 = 0;
251  word1 += (binlg[0] << 28);
252  word1 += (binlg[1] << 29);
253  word1 += (binlg[2] << 30);
254 
255  // form CTP obejct
257 
258  // record CTP object
259  ATH_CHECK(zdcCTP.record(std::make_unique<ZdcCTP>(word0, word1)));
260 
261  // debug output
263  "Stored ZDC CTP object with words "
264  << std::endl
265  << std::hex << word0 << " from hgLUTOutput: " << std::dec << wordOutHG
266  << " AvgAmpA: " << trigAvgAHG << " C: " << trigAvgCHG << std::endl
267  << std::hex << word1 << " from lgLUTOutput: " << std::dec << wordOutLG
268  << " AvgAmpA: " << trigAvgALG << " C: " << trigAvgCLG);
269 
270  return StatusCode::SUCCESS;
271 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ initialize()

StatusCode LVL1::TrigT1Run3ZDC::initialize ( )
overridevirtual

Definition at line 28 of file TrigT1Run3ZDC.cxx.

28  {
29  ATH_CHECK(m_zdcCTPLocation.initialize());
32  // Find the full path to filename:
34  ATH_MSG_INFO("Reading file " << file);
35  std::ifstream fin(file.c_str());
36  if (!fin) {
37  ATH_MSG_ERROR("Can not read file: " << file);
38  return StatusCode::FAILURE;
39  }
41 
42  // Will eventually obtain LUTs from COOL, for now obtain them from calibration
43  // area A data member to hold the side A LUT values
44  std::array<unsigned int, 4096> sideALUTHG =
45  data["LucrodHighGain"]["LUTs"]["sideA"];
46  // A data member to hold the side C LUT values
47  std::array<unsigned int, 4096> sideCLUTHG =
48  data["LucrodHighGain"]["LUTs"]["sideC"];
49  // A data member to hold the Combined LUT values
50  std::array<unsigned int, 256> combLUTHG =
51  data["LucrodHighGain"]["LUTs"]["comb"];
52  // area A data member to hold the side A LUT values
53  std::array<unsigned int, 4096> sideALUTLG =
54  data["LucrodLowGain"]["LUTs"]["sideA"];
55  // A data member to hold the side C LUT values
56  std::array<unsigned int, 4096> sideCLUTLG =
57  data["LucrodLowGain"]["LUTs"]["sideC"];
58  // A data member to hold the Combined LUT values
59  std::array<unsigned int, 256> combLUTLG =
60  data["LucrodLowGain"]["LUTs"]["comb"];
61 
62  // Access Raw Lucrod Data
63  const ZdcID *zdcId = nullptr;
64  if (detStore()->retrieve(zdcId).isFailure()) {
65  msg(MSG::ERROR)
66  << "execute: Could not retrieve ZdcID object from the detector store"
67  << endmsg;
68  return StatusCode::FAILURE;
69  } else {
70  msg(MSG::DEBUG) << "execute: retrieved ZdcID" << endmsg;
71  }
72  m_zdcId = zdcId;
73 
74  std::array<std::array<unsigned int, 4>, 2> deriv2ndHGThresh;
75  std::array<std::array<unsigned int, 4>, 2> deriv2ndLGThresh;
76 
77  for (unsigned int side : {0, 1}) {
78  for (unsigned int module : {0, 1, 2, 3}) {
79  deriv2ndHGThresh[side][module] = m_negHG2ndDerivThresh;
80  deriv2ndLGThresh[side][module] = m_negLG2ndDerivThresh;
81  }
82  }
83 
84  // We disable the EM module in the LG trigger
85  //
86  deriv2ndLGThresh[0][0] = 4095;
87  deriv2ndLGThresh[1][0] = 4095;
88 
89  std::cout << "Trigger simulation will use sample indices: " << m_minSampleAna
90  << " through " << m_maxSampleAna
91  << ", and baselinDelta = " << m_baselineDelta << std::endl;
92 
93  // Construct Simulation Objects
94  m_triggerSimHGPtr = std::make_shared<ZDCTriggerSimFADC>(
95  ZDCTriggerSimFADC(sideALUTHG, sideCLUTHG, combLUTHG, deriv2ndHGThresh,
97 
98  m_triggerSimLGPtr = std::make_shared<ZDCTriggerSimFADC>(
99  ZDCTriggerSimFADC(sideALUTLG, sideCLUTLG, combLUTLG, deriv2ndLGThresh,
101 
102  m_hgFADC_ptr =
103  std::make_shared<ZDCTriggerSim::FADCInputs>(ZDCTriggerSim::FADCInputs());
104  m_lgFADC_ptr =
105  std::make_shared<ZDCTriggerSim::FADCInputs>(ZDCTriggerSim::FADCInputs());
106 
107  ATH_MSG_DEBUG("TrigT1Run3ZDC initilized");
108  return StatusCode::SUCCESS;
109 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::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.

◆ isClonable()

virtual bool LVL1::TrigT1Run3ZDC::isClonable ( ) const
inlinefinaloverridevirtual

Definition at line 54 of file TrigT1Run3ZDC.h.

54 { return true; }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::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< Algorithm >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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_baselineDelta

Gaudi::Property<unsigned int> LVL1::TrigT1Run3ZDC::m_baselineDelta
private
Initial value:
{
this, "BaselineDelta", 3,
"Parameter to take out average offset from raw Flash ADC values"}

Definition at line 88 of file TrigT1Run3ZDC.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_hgFADC_ptr

std::shared_ptr<ZDCTriggerSim::FADCInputs> LVL1::TrigT1Run3ZDC::m_hgFADC_ptr
private

A data member to hold the ZDCTrigger Object that stores flash ADC input values: shared ptr to ensure cleanup.

Definition at line 101 of file TrigT1Run3ZDC.h.

◆ m_lgFADC_ptr

std::shared_ptr<ZDCTriggerSim::FADCInputs> LVL1::TrigT1Run3ZDC::m_lgFADC_ptr
private

Definition at line 102 of file TrigT1Run3ZDC.h.

◆ m_lutFile

Gaudi::Property<std::string> LVL1::TrigT1Run3ZDC::m_lutFile
private
Initial value:
{
this, "filepath_LUT", "TrigT1ZDC/zdcRun3T1LUT_v1_30_05_2023.json",
"path to LUT file"}

Definition at line 75 of file TrigT1Run3ZDC.h.

◆ m_maxSampleAna

Gaudi::Property<unsigned int> LVL1::TrigT1Run3ZDC::m_maxSampleAna
private
Initial value:
{
this, "MaxSampleAna",154, "Last Sample in ZDC LUCROD Analysis window"}

Definition at line 80 of file TrigT1Run3ZDC.h.

◆ m_minSampleAna

Gaudi::Property<unsigned int> LVL1::TrigT1Run3ZDC::m_minSampleAna
private
Initial value:
{
this, "MinSampleAna", 7, "First Sample in ZDC LUCROD Analysis window"}

Definition at line 78 of file TrigT1Run3ZDC.h.

◆ m_negHG2ndDerivThresh

Gaudi::Property<unsigned int> LVL1::TrigT1Run3ZDC::m_negHG2ndDerivThresh
private
Initial value:
{
this, "NegHG2ndDerivThresh", 45,
"Negative 2nd Derivative Threshold for High Gain LUCROD Channel"}

Definition at line 82 of file TrigT1Run3ZDC.h.

◆ m_negLG2ndDerivThresh

Gaudi::Property<unsigned int> LVL1::TrigT1Run3ZDC::m_negLG2ndDerivThresh
private
Initial value:
{
this, "NegLG2ndDerivThresh", 15,
"Negative 2nd Derivative Threshold for Low Gain LUCROD Channel"}

Definition at line 85 of file TrigT1Run3ZDC.h.

◆ m_triggerSimHGPtr

std::shared_ptr<ZDCTriggerSimFADC> LVL1::TrigT1Run3ZDC::m_triggerSimHGPtr
private

Two data member to hold the ZDCTrigger Object that computes the LUT logic: shared ptr to ensure cleanup.

Definition at line 95 of file TrigT1Run3ZDC.h.

◆ m_triggerSimLGPtr

std::shared_ptr<ZDCTriggerSimFADC> LVL1::TrigT1Run3ZDC::m_triggerSimLGPtr
private

Definition at line 96 of file TrigT1Run3ZDC.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_zdcCTPLocation

SG::WriteHandleKey<ZdcCTP> LVL1::TrigT1Run3ZDC::m_zdcCTPLocation
private
Initial value:
{this, "ZdcCTPLocation",
"Write handle key for ZdcCTP"}

Definition at line 70 of file TrigT1Run3ZDC.h.

◆ m_zdcId

const ZdcID* LVL1::TrigT1Run3ZDC::m_zdcId {}
private

Definition at line 63 of file TrigT1Run3ZDC.h.

◆ m_zdcModuleCalibEnergyKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> LVL1::TrigT1Run3ZDC::m_zdcModuleCalibEnergyKey
private
Initial value:
{
this, "ZdcModuleCalibEnergyKey", "ZdcModules.CalibEnergy",
"ReadHandleKey for Zdc CalibEnergy AuxData"}

Definition at line 58 of file TrigT1Run3ZDC.h.

◆ m_zldContainerName

SG::ReadHandleKey<ZdcLucrodDataContainer> LVL1::TrigT1Run3ZDC::m_zldContainerName
private
Initial value:
{
this, "ZdcLucrodDataContainerKey", TrigT1CaloDefs::ZdcLucrodDataContainer,
"Read Handle key for ZdcLucrodDataContainer"}

Definition at line 65 of file TrigT1Run3ZDC.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LVL1::TrigT1Run3ZDC::m_negLG2ndDerivThresh
Gaudi::Property< unsigned int > m_negLG2ndDerivThresh
Definition: TrigT1Run3ZDC.h:85
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
LVL1::TrigT1Run3ZDC::m_hgFADC_ptr
std::shared_ptr< ZDCTriggerSim::FADCInputs > m_hgFADC_ptr
A data member to hold the ZDCTrigger Object that stores flash ADC input values: shared ptr to ensure ...
Definition: TrigT1Run3ZDC.h:101
ZdcLucrodChannelType
Definition: ZdcLucrodData.h:12
xAOD::word1
word1
Definition: eFexEMRoI_v1.cxx:87
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
json
nlohmann::json json
Definition: HistogramDef.cxx:9
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:1054
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
LVL1::TrigT1CaloDefs::ZdcLucrodDataContainer
static const std::string ZdcLucrodDataContainer
Definition: TrigT1CaloDefs.h:41
LVL1::TrigT1CaloDefs::ZdcCTPLocation
static const std::string ZdcCTPLocation
Definition: TrigT1CaloDefs.h:80
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LVL1::TrigT1Run3ZDC::m_triggerSimLGPtr
std::shared_ptr< ZDCTriggerSimFADC > m_triggerSimLGPtr
Definition: TrigT1Run3ZDC.h:96
LVL1::TrigT1Run3ZDC::m_zdcModuleCalibEnergyKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_zdcModuleCalibEnergyKey
Definition: TrigT1Run3ZDC.h:58
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ZdcLucrodMapRun3::getLucrod
const nlohmann::json & getLucrod(int i) const
Definition: ZdcLucrodMapRun3.h:23
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
LVL1::TrigT1Run3ZDC::m_zldContainerName
SG::ReadHandleKey< ZdcLucrodDataContainer > m_zldContainerName
Definition: TrigT1Run3ZDC.h:65
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TRT::Hit::side
@ side
Definition: HitInfo.h:83
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
python.PyAthena.module
module
Definition: PyAthena.py:131
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
LVL1::TrigT1Run3ZDC::m_zdcId
const ZdcID * m_zdcId
Definition: TrigT1Run3ZDC.h:63
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:113
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
ZdcLucrodChannelType::waveform
std::vector< uint16_t > waveform
Definition: ZdcLucrodData.h:15
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
file
TFile * file
Definition: tile_monitor.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Algorithm > >::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
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ZDCTriggerSimData
Definition: ZDCTriggerSim.h:58
LVL1::TrigT1Run3ZDC::m_maxSampleAna
Gaudi::Property< unsigned int > m_maxSampleAna
Definition: TrigT1Run3ZDC.h:80
LVL1::TrigT1Run3ZDC::m_negHG2ndDerivThresh
Gaudi::Property< unsigned int > m_negHG2ndDerivThresh
Definition: TrigT1Run3ZDC.h:82
ZDCTriggerSimFADC
Definition: ZDCTriggerSim.h:306
LVL1::TrigT1Run3ZDC::m_baselineDelta
Gaudi::Property< unsigned int > m_baselineDelta
Definition: TrigT1Run3ZDC.h:88
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
LVL1::TrigT1Run3ZDC::m_zdcCTPLocation
SG::WriteHandleKey< ZdcCTP > m_zdcCTPLocation
Definition: TrigT1Run3ZDC.h:70
a
TList * a
Definition: liststreamerinfos.cxx:10
h
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ZdcLucrodData
Definition: ZdcLucrodData.h:20
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
ZdcLucrodChannelType::id
unsigned int id
Definition: ZdcLucrodData.h:14
compute_lumi.fin
fin
Definition: compute_lumi.py:19
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LVL1::TrigT1Run3ZDC::m_lutFile
Gaudi::Property< std::string > m_lutFile
Definition: TrigT1Run3ZDC.h:75
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
LVL1::TrigT1Run3ZDC::m_lgFADC_ptr
std::shared_ptr< ZDCTriggerSim::FADCInputs > m_lgFADC_ptr
Definition: TrigT1Run3ZDC.h:102
test_pyathena.counter
counter
Definition: test_pyathena.py:15
LVL1::TrigT1Run3ZDC::m_minSampleAna
Gaudi::Property< unsigned int > m_minSampleAna
Definition: TrigT1Run3ZDC.h:78
ZdcID
Definition: ZdcID.h:25
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
ServiceHandle< ICondSvc >
LVL1::TrigT1Run3ZDC::m_triggerSimHGPtr
std::shared_ptr< ZDCTriggerSimFADC > m_triggerSimHGPtr
Two data member to hold the ZDCTrigger Object that computes the LUT logic: shared ptr to ensure clean...
Definition: TrigT1Run3ZDC.h:95
ZdcLucrodMapRun3::getInstance
static const ZdcLucrodMapRun3 * getInstance()
Definition: ZdcLucrodMapRun3.cxx:10