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

#include <LArDigitOscillationCorrTool.h>

Inheritance diagram for LArDigitOscillationCorrTool:
Collaboration diagram for LArDigitOscillationCorrTool:

Public Member Functions

 LArDigitOscillationCorrTool (const std::string &type, const std::string &name, const IInterface *parent)
 
 ~LArDigitOscillationCorrTool ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual void handle (const Incident &)
 
StatusCode calculateEventPhase (const LArDigitContainer &theDC)
 
StatusCode correctLArDigits (LArDigitContainer &theDC)
 
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

StatusCode retrieveDB ()
 
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_priority
 
double m_nSigma
 
double m_eventPhase
 
double m_omega
 
const LArEM_IDm_emId
 
const LArFCAL_IDm_fcalId
 
const LArHEC_IDm_hecId
 
const LArOnlineIDm_lar_on_id
 
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"}
 
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

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

◆ LArDigitOscillationCorrTool()

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

Definition at line 27 of file LArDigitOscillationCorrTool.cxx.

30  : AthAlgTool(type, name, parent) ,
31  m_priority(1400),
32  m_nSigma(3.0),
33  m_eventPhase(0),
34  m_omega(1.024e6*hertz),
35  m_emId(nullptr), m_fcalId(nullptr), m_hecId(nullptr), m_lar_on_id(nullptr)
36 {
37  declareInterface<ILArDigitOscillationCorrTool>(this);
38  declareProperty("BeginRunPriority",m_priority);
39  declareProperty("SignalCutInSigma",m_nSigma);
40  declareProperty("Omega",m_omega);
41 }

◆ ~LArDigitOscillationCorrTool()

LArDigitOscillationCorrTool::~LArDigitOscillationCorrTool ( )
inline

Definition at line 47 of file LArDigitOscillationCorrTool.h.

47 {}

Member Function Documentation

◆ calculateEventPhase()

StatusCode LArDigitOscillationCorrTool::calculateEventPhase ( const LArDigitContainer theDC)
virtual

Implements ILArDigitOscillationCorrTool.

Definition at line 67 of file LArDigitOscillationCorrTool.cxx.

68 {
69  ATH_MSG_DEBUG ( "In execute: calculate event phase" );
70 
71  //Pointer to conditions data objects to get pedetestals
72  ATH_MSG_DEBUG ( "Retrieving pedestal " );
73  const ILArPedestal* larPedestal=nullptr;
74  ATH_CHECK( detStore()->retrieve(larPedestal) );
75 
76  //Pointer to conditions data objects to get channel phases
77  ATH_MSG_DEBUG ( "Retrieving channel phases and amplituides " );
78  const ILArH6Oscillation* larH6Oscillations = nullptr;
79  ATH_CHECK( detStore()->retrieve(larH6Oscillations) );
80  unsigned int iHECChan(0);
81  std::vector<std::vector<short> > theSamples;
82  std::vector<float> thePedestals;
83  std::vector<double> theChannelAmplitudes;
84  std::vector<double> theChannelPhases;
85  std::vector<float> theRMSValues;
86 
87  //Now all data is available, start loop over Digit Container
88  ATH_MSG_DEBUG ( "Loop over Digit Container with size <" << theDC.size() << ">" );
89 
91  const LArOnOffIdMapping* cabling{*cablingHdl};
92  if(!cabling) {
93  ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key() );
94  return StatusCode::FAILURE;
95  }
96 
97 
98  for (unsigned int i=0;i<theDC.size();i++) {
99  //Get data from LArDigit
100  const LArDigit *theDigit = theDC[i];
101  const std::vector<short>& samples = theDigit->samples();
102  const HWIdentifier chid = theDigit->channelID();
103  const CaloGain::CaloGain gain = theDigit->gain();
104 
105  // use only HEC channels
106  const Identifier id = cabling->cnvToIdentifier(chid);
107  bool isHEC = false;
108 
109  if (m_hecId->is_lar_hec(id)) {
110  isHEC = true;
111  }
112 
113  if ( isHEC) {
114  float DBpedestalRMS=larPedestal->pedestalRMS(chid,gain);
115  if (DBpedestalRMS <= (1.0+LArElecCalib::ERRORCODE)) {
116  ATH_MSG_DEBUG ( "No pedestal RMS found for this cell. Exiting ...." );
117  return StatusCode::FAILURE;
118  }
119  // log << MSG::DEBUG << "Retriving channelPhase " << endmsg;
120  const double& DBchannelPhase=larH6Oscillations->channelPhase(chid);
121  // log << MSG::DEBUG << "Retriving channelAmplitude " << endmsg;
122  const double& DBchannelAmplitude=larH6Oscillations->channelAmplitude(chid);
123 
124  if( DBpedestalRMS > 0 && DBchannelAmplitude>0 ) {
125  theRMSValues.push_back(DBpedestalRMS);
126  theSamples.push_back(samples);
127  theChannelPhases.push_back(DBchannelPhase);
128  theChannelAmplitudes.push_back(DBchannelAmplitude);
129  float DBpedestal=larPedestal->pedestal(chid,gain);
130  if (DBpedestal >= (1.0+LArElecCalib::ERRORCODE))
131  thePedestals.push_back(DBpedestal);
132  else {
133  ATH_MSG_DEBUG ( "No valid pedestal found for this cell. Exiting ...." );
134  return StatusCode::FAILURE;
135  }
136  iHECChan++;
137  }
138  }
139  }
140 
141  ATH_MSG_DEBUG ( "Start calculating the event phase" );
142  double lchimin = -1;
143  int nTotSamples = 0;
144  for(double myEventPhase = -M_PI; myEventPhase<M_PI; myEventPhase+=0.1) {
145  double lchitest = 0;
146  for (unsigned int i=0;i<iHECChan;i++) {
147  unsigned int nSamples = theSamples[i].size();
148  for(unsigned int j=0;j<nSamples;j++) {
149  // exclude all samples (and the previous and next sample) which
150  //have more than nSigma worth of absolute signal
151  if ( j == 0 || (std::abs(theSamples[i][j] - theSamples[i][0]) <= m_nSigma*theRMSValues[i]
152  && ( j <= 0 || std::abs(theSamples[i][j-1] - theSamples[i][0]) <= m_nSigma*theRMSValues[i])
153  && ( j >= nSamples-1 || std::abs(theSamples[i][j+1] - theSamples[i][0]) <= m_nSigma*theRMSValues[i])) ) {
154 
155  if ( lchimin < 0 )
156  nTotSamples ++;
157  lchitest += pow((theSamples[i][j] - thePedestals[i]
158  - theChannelAmplitudes[i]*sin(j*25*ns*m_omega
159  +theChannelPhases[i]+myEventPhase))
160  /theRMSValues[i],2);
161  }
162  }
163  }
164  if ( lchitest < lchimin || lchimin < 0 ) {
165  lchimin = lchitest;
166  m_eventPhase = myEventPhase;
167  }
168  }
169 
170  ATH_MSG_DEBUG ( "Ending eventphase calculation. Phase = <" << m_eventPhase << ">, Number of Channels used = <" << iHECChan << ">, Average Number of Samples Used = <"
171  << (iHECChan > 0 ? (double)nTotSamples/iHECChan : 0)
172  << ">" );
173  return StatusCode::SUCCESS;
174 }

◆ correctLArDigits()

StatusCode LArDigitOscillationCorrTool::correctLArDigits ( LArDigitContainer theDC)
virtual

Implements ILArDigitOscillationCorrTool.

Definition at line 177 of file LArDigitOscillationCorrTool.cxx.

178 {
179  ATH_MSG_DEBUG ( "In execute: correct LAr Digit" );
180 
181  //Pointer to conditions data objects to get channel phases
182  const ILArH6Oscillation* larH6Oscillations = nullptr;
183  ATH_CHECK( detStore()->retrieve(larH6Oscillations) );
184 
185  std::vector<double> theChannelAmplitudes;
186  std::vector<double> theChannelPhases;
187 
188  //Now all data is available, start loop over Digit Container
189  ATH_MSG_DEBUG ( "Loop over Digit Container " );
190 
192  const LArOnOffIdMapping* cabling{*cablingHdl};
193  if(!cabling) {
194  ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key() );
195  return StatusCode::FAILURE;
196  }
197 
198  for (unsigned int i=0;i<theDC.size();i++) {
199  //Get data from LArDigit
200  LArDigit * theDigit = theDC[i];
201  const std::vector<short>& samples = theDigit->samples();
202  unsigned int nSamples = samples.size();
203  const HWIdentifier chid = theDigit->channelID();
204  const CaloGain::CaloGain gain = theDigit->gain();
205 
206  // correct only HEC channels
207  const Identifier id = cabling->cnvToIdentifier(chid);
208  bool isHEC = false;
209 
210  if (m_hecId->is_lar_hec(id)) {
211  isHEC = true;
212  }
213 
214  if ( isHEC) {
215  const double& DBchannelPhase=larH6Oscillations->channelPhase(chid);
216  const double& DBchannelAmplitude=larH6Oscillations->channelAmplitude(chid);
217  ATH_MSG_DEBUG ( "The HWId is " << chid
218  << ", the offline Id is " << m_hecId->show_to_string(id,nullptr,'/')
219  << ", the ChannelAmplitude is " << DBchannelAmplitude
220  << ", the ChannelPhase is " << DBchannelPhase );
221  ATH_MSG_DEBUG ( "m_omega value is " << m_omega );
222  if( DBchannelAmplitude>0 ) {
223  std::vector<short> new_samples(nSamples);
224  for(unsigned int j=0;j<nSamples;j++)
225  new_samples[j] = (short)(samples[j] + 0.5
226  - DBchannelAmplitude*sin(j*25*ns*m_omega+DBchannelPhase+m_eventPhase));
227  HWIdentifier new_id(chid);
228  CaloGain::CaloGain new_gain(gain);
229  LArDigit * theNewDigit = new LArDigit(new_id,new_gain,new_samples);
230  theDC[i] = theNewDigit;
231  }
232  }
233  }
234  return StatusCode::SUCCESS;
235 }

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

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

virtual StatusCode LArDigitOscillationCorrTool::finalize ( )
inlinevirtual

Definition at line 51 of file LArDigitOscillationCorrTool.h.

51 {return StatusCode::SUCCESS;}

◆ handle()

void LArDigitOscillationCorrTool::handle ( const Incident &  )
virtual

Definition at line 238 of file LArDigitOscillationCorrTool.cxx.

239 {
240  ATH_MSG_DEBUG ( "LArDigitOscillationCorrTool handle()" );
241 
242  this->retrieveDB().ignore();
243 }

◆ initialize()

StatusCode LArDigitOscillationCorrTool::initialize ( )
virtual

Definition at line 43 of file LArDigitOscillationCorrTool.cxx.

44 {
45  ATH_MSG_DEBUG ( "LArDigitOscillationCorrTool initialize() begin" );
46 
47  ATH_CHECK( detStore()->retrieve(m_lar_on_id,"LArOnlineID") );
48 
49  const CaloCell_ID* idHelper = nullptr;
50  ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") );
51  m_emId = idHelper->em_idHelper();
52  m_fcalId = idHelper->fcal_idHelper();
53  m_hecId = idHelper->hec_idHelper();
54 
56 
57  IIncidentSvc* incSvc = nullptr;
58  ATH_CHECK( service("IncidentSvc", incSvc) );
59 
60  //start listening to "BeginRun"
61  incSvc->addListener(this, "BeginRun", m_priority);
62 
63  ATH_MSG_DEBUG ( "LArDigitOscillationCorrTool initialize() end" );
64  return StatusCode::SUCCESS;
65 }

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

static const InterfaceID& LArDigitOscillationCorrTool::interfaceID ( )
inlinestatic

Definition at line 39 of file LArDigitOscillationCorrTool.h.

39 { return IID_LArDigitOscillationCorrTool; }

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

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

◆ retrieveDB()

StatusCode LArDigitOscillationCorrTool::retrieveDB ( )
private

Definition at line 246 of file LArDigitOscillationCorrTool.cxx.

247 {
248  ATH_MSG_DEBUG ( "in retrieveDB() " );
249  return StatusCode::SUCCESS;
250 }

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

SG::ReadCondHandleKey<LArOnOffIdMapping> LArDigitOscillationCorrTool::m_cablingKey {this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"}
private

Definition at line 72 of file LArDigitOscillationCorrTool.h.

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

const LArEM_ID* LArDigitOscillationCorrTool::m_emId
private

Definition at line 67 of file LArDigitOscillationCorrTool.h.

◆ m_eventPhase

double LArDigitOscillationCorrTool::m_eventPhase
private

Definition at line 64 of file LArDigitOscillationCorrTool.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_fcalId

const LArFCAL_ID* LArDigitOscillationCorrTool::m_fcalId
private

Definition at line 68 of file LArDigitOscillationCorrTool.h.

◆ m_hecId

const LArHEC_ID* LArDigitOscillationCorrTool::m_hecId
private

Definition at line 69 of file LArDigitOscillationCorrTool.h.

◆ m_lar_on_id

const LArOnlineID* LArDigitOscillationCorrTool::m_lar_on_id
private

Definition at line 70 of file LArDigitOscillationCorrTool.h.

◆ m_nSigma

double LArDigitOscillationCorrTool::m_nSigma
private

Definition at line 63 of file LArDigitOscillationCorrTool.h.

◆ m_omega

double LArDigitOscillationCorrTool::m_omega
private

Definition at line 65 of file LArDigitOscillationCorrTool.h.

◆ m_priority

int LArDigitOscillationCorrTool::m_priority
private

Definition at line 62 of file LArDigitOscillationCorrTool.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:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ILArPedestal::pedestal
virtual float pedestal(const HWIdentifier &id, int gain) const =0
LArDigitOscillationCorrTool::m_priority
int m_priority
Definition: LArDigitOscillationCorrTool.h:62
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
LArDigitOscillationCorrTool::retrieveDB
StatusCode retrieveDB()
Definition: LArDigitOscillationCorrTool.cxx:246
CaloCell_ID::em_idHelper
const LArEM_ID * em_idHelper() const
access to EM idHelper
Definition: CaloCell_ID.h:63
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArDigitOscillationCorrTool::m_lar_on_id
const LArOnlineID * m_lar_on_id
Definition: LArDigitOscillationCorrTool.h:70
ILArPedestal
Definition: ILArPedestal.h:12
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
LArDigit::samples
const std::vector< short > & samples() const
Definition: LArDigit.h:78
M_PI
#define M_PI
Definition: ActiveFraction.h:11
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
LArDigitOscillationCorrTool::m_hecId
const LArHEC_ID * m_hecId
Definition: LArDigitOscillationCorrTool.h:69
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
HWIdentifier
Definition: HWIdentifier.h:13
LArDigitOscillationCorrTool::m_eventPhase
double m_eventPhase
Definition: LArDigitOscillationCorrTool.h:64
LArDigitOscillationCorrTool::m_nSigma
double m_nSigma
Definition: LArDigitOscillationCorrTool.h:63
CaloCell_ID::hec_idHelper
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
Definition: CaloCell_ID.h:69
AthCommonDataStore< AthCommonMsg< AlgTool > >::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
python.SystemOfUnits.hertz
int hertz
Definition: SystemOfUnits.py:125
LArDigitOscillationCorrTool::m_fcalId
const LArFCAL_ID * m_fcalId
Definition: LArDigitOscillationCorrTool.h:68
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LArDigit
Liquid Argon digit base class.
Definition: LArDigit.h:25
lumiFormat.i
int i
Definition: lumiFormat.py:92
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
LArDigitOscillationCorrTool::m_omega
double m_omega
Definition: LArDigitOscillationCorrTool.h:65
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AtlasDetectorID::is_lar_hec
bool is_lar_hec(Identifier id) const
Definition: AtlasDetectorID.h:829
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ILArH6Oscillation::channelAmplitude
virtual const double & channelAmplitude(const HWIdentifier &id) const =0
access to channel amplitude index by Identifier
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
LArDigit::gain
CaloGain::CaloGain gain() const
Definition: LArDigit.h:72
a
TList * a
Definition: liststreamerinfos.cxx:10
h
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:574
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ILArH6Oscillation::channelPhase
virtual const double & channelPhase(const HWIdentifier &id) const =0
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
LArDigit::channelID
const HWIdentifier & channelID() const
Definition: LArDigit.h:69
LArElecCalib::ERRORCODE
@ ERRORCODE
Definition: LArCalibErrorCode.h:17
LArDigits2NtupleDumper.nSamples
nSamples
Definition: LArDigits2NtupleDumper.py:70
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
LArDigitOscillationCorrTool::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArDigitOscillationCorrTool.h:72
ILArH6Oscillation
Definition: ILArH6Oscillation.h:14
ILArPedestal::pedestalRMS
virtual float pedestalRMS(const HWIdentifier &id, int gain) const =0
access to RMS of Pedestal index by Identifier, and gain setting
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
LArDigitOscillationCorrTool::m_emId
const LArEM_ID * m_emId
Definition: LArDigitOscillationCorrTool.h:67
CaloCell_ID::fcal_idHelper
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
Definition: CaloCell_ID.h:75
fitman.k
k
Definition: fitman.py:528
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20