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

Algorithm to produce TriggerTowers filled with simulated pedestal runs. More...

#include <L1CaloPedestalGenerator.h>

Inheritance diagram for L1CaloPedestalGenerator:
Collaboration diagram for L1CaloPedestalGenerator:

Public Member Functions

 L1CaloPedestalGenerator (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~L1CaloPedestalGenerator ()
 
virtual StatusCode initialize ()
 
virtual StatusCode execute ()
 
virtual StatusCode finalize ()
 
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

LVL1::InternalTriggerTowerfindInternalTriggerTower (const Identifier &towerId, bool bCreate=true)
 
LVL1::InternalTriggerTowerfindInternalTriggerTower (double tt_phi, double tt_eta, unsigned int key, bool bCreate=true)
 
double IDeta (const Identifier &id, const CaloLVL1_ID *l1id)
 
double IDphi (const Identifier &id, const CaloLVL1_ID *l1id)
 
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

const CaloIdManagerm_caloMgr
 
const CaloLVL1_IDm_lvl1Helper
 
std::string m_TTLocation
 
double m_pedMean
 
double m_pedRMS
 
unsigned int m_nSamples
 
LVL1::TriggerTowerKeym_towerKey
 
std::map< unsigned int, LVL1::InternalTriggerTower * > * m_IntTTContainer
 
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

Algorithm to produce TriggerTowers filled with simulated pedestal runs.

Author
Damien Prieur damie.nosp@m.n.pr.nosp@m.ieur@.nosp@m.cern.nosp@m..ch

Definition at line 27 of file L1CaloPedestalGenerator.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

◆ L1CaloPedestalGenerator()

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

Definition at line 21 of file L1CaloPedestalGenerator.cxx.

22 {
23 }
24 
25 //-------------------------------------------
26 // Initialize
27 //-------------------------------------------
29 {
30  ATH_MSG_INFO("From Initialize...");
31  StatusCode sc;
32 
33  // Retrieve CaloIdManager

◆ ~L1CaloPedestalGenerator()

L1CaloPedestalGenerator::~L1CaloPedestalGenerator ( )
virtual

Definition at line 37 of file L1CaloPedestalGenerator.cxx.

41  {

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 L1CaloPedestalGenerator::execute ( )
virtual

Definition at line 104 of file L1CaloPedestalGenerator.cxx.

116  {
117  double eta = it->second->eta();
118  double phi = it->second->phi();
119  unsigned int key = it->second->key();
120 
121  std::vector<double> vEmAmps = it->second->EmAmps();
122  std::vector<int> emDigits(vEmAmps.size());
123  for (size_t i = 0; i < vEmAmps.size(); i++)
124  emDigits[i] = static_cast<int> (vEmAmps[i]);
125 
126  std::vector<double> vHadAmps = it->second->HadAmps();
127  std::vector<int> hadDigits(vHadAmps.size());
128  for (size_t i = 0; i < vHadAmps.size(); i++)
129  hadDigits[i] = static_cast<int> (vHadAmps[i]);
130 
131  //need to put some fake push back to be able to use TriggerTowers2Ntuple
132  // cause LVL1::TriggerTower::emEnergy() make a m_em_energy[m_em_peak];
133  // instead of using m_em_energy.at(m_em_peak);
134  std::vector<int> emEt; emEt.push_back(0);
135  std::vector<int> hadEt; hadEt.push_back(0);
136  std::vector<int> emBCID; emBCID.push_back(0);
137  std::vector<int> hadBCID; hadBCID.push_back(0);
138  std::vector<int> emExt; emExt.push_back(0);
139  std::vector<int> hadExt; hadExt.push_back(0);
140  int peak = 0;
141  int emADCPeak = 0;
142  int hadADCPeak = 0;
143 
144  // Create TT
146  emDigits, emEt, emExt, emBCID, 0, peak, emADCPeak,
147  hadDigits, hadEt, hadExt, hadBCID, 0, peak, hadADCPeak);
148 
149  VectorOfTTs->push_back(tower);
150 
151  } //-- End Loop on InternalTriggerTowers --
152 
153  ATH_MSG_DEBUG( VectorOfTTs->size()<<" TTs have been generated");
154 
155  sc = evtStore()->setConst(VectorOfTTs);
156  if (sc.isSuccess()) ATH_MSG_DEBUG( "TT container locked");
157  else {
158  ATH_MSG_ERROR( "failed to lock TT container");
159  return StatusCode::FAILURE;
160  }
161 
162  it = m_IntTTContainer->begin();
163  for(;it!=m_IntTTContainer->end();++it) delete it->second;
164  delete m_IntTTContainer;
165 
166  ATH_MSG_DEBUG("End of Execute...");
167  return StatusCode::SUCCESS;
168 }
169 
170 //-----------------------------------------
171 // Finalize
172 //-----------------------------------------
174 {
175  delete m_towerKey;
176 
177  return StatusCode::SUCCESS;
178 }
179 
181  // Create tower key from towerId
182  double tower_eta = IDeta(towerId,m_lvl1Helper);
183  double tower_phi = IDphi(towerId,m_lvl1Helper);
184  unsigned int key = m_towerKey->ttKey(tower_phi,tower_eta);
185  double tt_phi = m_towerKey->phi();
186  double tt_eta = m_towerKey->eta();
187 
188  return findInternalTriggerTower(tt_phi, tt_eta, key, bCreate);
189 }
190 
191 LVL1::InternalTriggerTower* L1CaloPedestalGenerator::findInternalTriggerTower(double tt_phi, double tt_eta, unsigned int key, bool bCreate) {
194  if (it == m_IntTTContainer->end()){
195  if(bCreate) {
196  // no TT yet. Create it!
197  TT = new LVL1::InternalTriggerTower(tt_phi,tt_eta, key);
198  m_IntTTContainer->insert(std::map<unsigned int, LVL1::InternalTriggerTower*>::value_type(key,TT)); //and put it in the map.
199  }
200  }else{
201  TT = (it->second);
202  } // end else
203  return TT;
204 }
205 
206 double L1CaloPedestalGenerator::IDeta(const Identifier& id, const CaloLVL1_ID* l1id) {
207  int region = l1id->region(id);
208  int ieta = l1id->eta(id);
209  int sign = l1id->pos_neg_z(id);
210 
211  double gran[4] = {0.1, 0.2, 0.1, 0.425};
212  double offset[4] = {0., 2.5, 3.1, 3.2};
213  double eta;
214 
215  if (region>=0 && region<=3) {
216  eta = sign* ( ( (ieta+0.5) * gran[region] ) + offset[region] );
217  }
218  else {
219  eta = 0.;
220  }
221  return eta;
222 }
223 
224 double L1CaloPedestalGenerator::IDphi(const Identifier& id, const CaloLVL1_ID* l1id) {
225  Identifier regId = l1id->region_id(id);
226 
227  double phiMax = l1id->phi_max(regId);
228  int iphi = l1id->phi(id);
229 
230  double phi = (iphi+0.5)*2*M_PI/(phiMax+1);
231 
232  return phi;
233 }
234 

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

◆ finalize()

StatusCode L1CaloPedestalGenerator::finalize ( )
virtual

Definition at line 336 of file L1CaloPedestalGenerator.cxx.

◆ findInternalTriggerTower() [1/2]

LVL1::InternalTriggerTower * L1CaloPedestalGenerator::findInternalTriggerTower ( const Identifier towerId,
bool  bCreate = true 
)
private

Definition at line 351 of file L1CaloPedestalGenerator.cxx.

◆ findInternalTriggerTower() [2/2]

LVL1::InternalTriggerTower * L1CaloPedestalGenerator::findInternalTriggerTower ( double  tt_phi,
double  tt_eta,
unsigned int  key,
bool  bCreate = true 
)
private

Definition at line 373 of file L1CaloPedestalGenerator.cxx.

◆ IDeta()

double L1CaloPedestalGenerator::IDeta ( const Identifier id,
const CaloLVL1_ID l1id 
)
private

Definition at line 403 of file L1CaloPedestalGenerator.cxx.

◆ IDphi()

double L1CaloPedestalGenerator::IDphi ( const Identifier id,
const CaloLVL1_ID l1id 
)
private

Definition at line 439 of file L1CaloPedestalGenerator.cxx.

◆ initialize()

StatusCode L1CaloPedestalGenerator::initialize ( )
virtual

Definition at line 51 of file L1CaloPedestalGenerator.cxx.

55 {
56  ATH_MSG_DEBUG("From Execute...");
57 
58  StatusCode sc;
59 
60  m_IntTTContainer = new std::map<unsigned int, LVL1::InternalTriggerTower*>;
61 
63  sc = evtStore()->record(VectorOfTTs, m_TTLocation);
64 
65  if (sc.isSuccess()) ATH_MSG_DEBUG( "Stored TTs in TES at "<< m_TTLocation );
66  else {
67  ATH_MSG_ERROR( "failed to write TTs to TES at " << m_TTLocation );
68  return StatusCode::FAILURE;
69  }
70 
71  //---
72  // Loop on all Trigger Towers to create the TT objects
73  // and store them into containers
74 
75  std::vector<Identifier>::const_iterator tower_it = m_lvl1Helper->tower_begin();
76 
77  // -- Loop on Trigger Tower offline Ids --
78  for(;tower_it!=m_lvl1Helper->tower_end();++tower_it) {
79  Identifier towerId = (*tower_it);
80 
81  //---
82  // Check detector type
83  bool bIsTile = m_lvl1Helper->is_tile(towerId);
84  bool bIsHadronic = m_lvl1Helper->sampling(towerId); // check if tt is an HEC tt
85 
86  //---
87  // Generate pedestal samples
88  std::vector<double> vnoise;
89  for(unsigned int sample=0;sample<m_nSamples;++sample) vnoise.push_back(CLHEP::RandGaussZiggurat::shoot(0.,m_pedRMS));
90 
91  std::vector< std::vector<double> > vAutoCorrMatrix(m_nSamples, std::vector<double>(m_nSamples,0));
92  for(unsigned int sample=0;sample<m_nSamples;++sample) vAutoCorrMatrix[sample][sample] = 1;
93 
94  std::vector<double> vsamples;

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

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

const CaloIdManager* L1CaloPedestalGenerator::m_caloMgr
private

Definition at line 40 of file L1CaloPedestalGenerator.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_IntTTContainer

std::map<unsigned int, LVL1::InternalTriggerTower*>* L1CaloPedestalGenerator::m_IntTTContainer
private

Definition at line 55 of file L1CaloPedestalGenerator.h.

◆ m_lvl1Helper

const CaloLVL1_ID* L1CaloPedestalGenerator::m_lvl1Helper
private

Definition at line 43 of file L1CaloPedestalGenerator.h.

◆ m_nSamples

unsigned int L1CaloPedestalGenerator::m_nSamples
private

Definition at line 50 of file L1CaloPedestalGenerator.h.

◆ m_pedMean

double L1CaloPedestalGenerator::m_pedMean
private

Definition at line 48 of file L1CaloPedestalGenerator.h.

◆ m_pedRMS

double L1CaloPedestalGenerator::m_pedRMS
private

Definition at line 49 of file L1CaloPedestalGenerator.h.

◆ m_towerKey

LVL1::TriggerTowerKey* L1CaloPedestalGenerator::m_towerKey
private

Definition at line 53 of file L1CaloPedestalGenerator.h.

◆ m_TTLocation

std::string L1CaloPedestalGenerator::m_TTLocation
private

Definition at line 46 of file L1CaloPedestalGenerator.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.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
LVL1::KeyUtilities::phi
virtual double phi() const
returns phi coordinate of centre of relevant trigger tower.
Definition: KeyUtilities.cxx:159
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
L1CaloPedestalGenerator::m_IntTTContainer
std::map< unsigned int, LVL1::InternalTriggerTower * > * m_IntTTContainer
Definition: L1CaloPedestalGenerator.h:55
L1CaloPedestalGenerator::m_lvl1Helper
const CaloLVL1_ID * m_lvl1Helper
Definition: L1CaloPedestalGenerator.h:43
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloLVL1_ID::phi_max
int phi_max(const Identifier regId) const
min value of phi index (-999 == failure)
Definition: CaloLVL1_ID.cxx:495
skel.it
it
Definition: skel.GENtoEVGEN.py:396
L1CaloPedestalGenerator::findInternalTriggerTower
LVL1::InternalTriggerTower * findInternalTriggerTower(const Identifier &towerId, bool bCreate=true)
Definition: L1CaloPedestalGenerator.cxx:351
M_PI
#define M_PI
Definition: ActiveFraction.h:11
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
CaloLVL1_ID::region
int region(const Identifier id) const
return region according to :
Definition: CaloLVL1_ID.h:647
L1CaloPedestalGenerator::m_towerKey
LVL1::TriggerTowerKey * m_towerKey
Definition: L1CaloPedestalGenerator.h:53
CaloLVL1_ID::region_id
Identifier region_id(int pos_neg_z, int sampling, int region) const
build a region (of towers) identifier
Definition: CaloLVL1_ID.h:502
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
L1CaloPedestalGenerator::IDphi
double IDphi(const Identifier &id, const CaloLVL1_ID *l1id)
Definition: L1CaloPedestalGenerator.cxx:439
CaloLVL1_ID::tower_end
id_iterator tower_end() const
end iterator over towers
Definition: CaloLVL1_ID.h:603
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
LVL1::KeyUtilities::eta
virtual double eta() const
returns the centre of the TT at eta_coord:
Definition: KeyUtilities.cxx:150
CaloLVL1_ID::phi
int phi(const Identifier id) const
return phi according to :
Definition: CaloLVL1_ID.h:659
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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
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.
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
L1CaloPedestalGenerator::m_TTLocation
std::string m_TTLocation
Definition: L1CaloPedestalGenerator.h:46
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DataVector< LVL1::TriggerTower >
L1CaloPedestalGenerator::m_pedRMS
double m_pedRMS
Definition: L1CaloPedestalGenerator.h:49
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::InternalTriggerTower
A version of the TriggerTower that contains information that would not be availiable during datatakin...
Definition: InternalTriggerTower.h:31
LVL1::TriggerTower
Trigger towers are the inputs to all other parts of the calorimeter trigger.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:45
CaloLVL1_ID
Helper class for offline TT identifiers.
Definition: CaloLVL1_ID.h:66
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloLVL1_ID::eta
int eta(const Identifier id) const
return eta according to :
Definition: CaloLVL1_ID.h:653
CaloLVL1_ID::pos_neg_z
int pos_neg_z(const Identifier id) const
return pos_neg_z according to :
Definition: CaloLVL1_ID.h:635
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TriggerTowerCollection
DataVector< LVL1::TriggerTower > TriggerTowerCollection
Definition: TriggerTowerCollection.h:10
L1CaloPedestalGenerator::IDeta
double IDeta(const Identifier &id, const CaloLVL1_ID *l1id)
Definition: L1CaloPedestalGenerator.cxx:403
CaloLVL1_ID::tower_begin
id_iterator tower_begin() const
begin iterator over towers
Definition: CaloLVL1_ID.h:597
CaloLVL1_ID::sampling
int sampling(const Identifier id) const
return sampling according to :
Definition: CaloLVL1_ID.h:641
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
L1CaloPedestalGenerator::finalize
virtual StatusCode finalize()
Definition: L1CaloPedestalGenerator.cxx:336
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
LVL1::TriggerTowerKey::ttKey
virtual unsigned int ttKey(const TriggerTower &tower)
returns the key of the passed tower
Definition: TriggerTowerKey.cxx:143
Analysis::TT
@ TT
Definition: JpsiFinder.h:36
CaloLVL1_ID::is_tile
bool is_tile(const Identifier id) const
Test wether given tower or layer is part of the Tile Calorimeter.
Definition: CaloLVL1_ID.h:672
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
L1CaloPedestalGenerator::initialize
virtual StatusCode initialize()
Definition: L1CaloPedestalGenerator.cxx:51
L1CaloPedestalGenerator::m_nSamples
unsigned int m_nSamples
Definition: L1CaloPedestalGenerator.h:50
fitman.k
k
Definition: fitman.py:528
xAOD::TriggerTower
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/TriggerTower.h:16
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
Identifier
Definition: IdentifierFieldParser.cxx:14