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

Conditions algorithm for luminosity data. More...

#include <LuminosityCondAlg.h>

Inheritance diagram for LuminosityCondAlg:
Collaboration diagram for LuminosityCondAlg:

Public Member Functions

virtual StatusCode initialize () override
 Gaudi initialize method. More...
 
virtual StatusCode execute (const EventContext &ctx) const override
 Algorithm execute method. More...
 
virtual bool isReEntrant () const override final
 
 AthReentrantAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Forward base class ctor. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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

StatusCode updateAvgLumi (const CondAttrListCollection &lumiData, LuminosityCondData &lumi, unsigned int &preferredChannel, unsigned int &calibChannel, const coral::Blob *&bunchInstLumiBlob) const
 Unpack luminosity data from the attribute list. More...
 
StatusCode updatePerBunchLumi (const EventContext &ctx, const coral::Blob *bunchInstLumiBlob, unsigned int preferredChannel, unsigned int calibChannel, SG::WriteCondHandle< LuminosityCondData > &wHdl, LuminosityCondData &lumi) const
 Fill in per-bunch luminosity data. More...
 
StatusCode updateMuToLumi (const EventContext &ctx, unsigned int calibChannel, SG::WriteCondHandle< LuminosityCondData > &wHdl, LuminosityCondData &lumi, bool &isValid) const
 Fill in mu-to-lumi calibration. More...
 
StatusCode updatePerBunchLumiRun2 (const coral::Blob &bunchInstLumiBlob, unsigned int preferredChannel, LuminosityCondData &lumi) const
 Fill in per-bunch luminosity data, run 2 and later. More...
 
StatusCode updatePerBunchLumiRun1 (const EventContext &ctx, unsigned int preferredChannel, SG::WriteCondHandle< LuminosityCondData > &wHdl, LuminosityCondData &lumi) const
 Fill in per-bunch luminosity data, run 1. More...
 
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

Gaudi::Property< unsigned long > m_lumiChannel { this, "LumiChannelNumber", 0, "Luminosity channel to read. 0 means to determine from the data." }
 
Gaudi::Property< unsigned long > m_calibBackupChannel { this, "CalibBackupChannel", 112, "Backup channel in case calibChannel doesn't exist in online calibration folder" }
 
Gaudi::Property< bool > m_skipInvalid { this, "SkipInvalid", true, "Flag to control whether invalid data is skipped: True (default), returning a zero luminosity; false, returning available luminosity values anyway." }
 
Gaudi::Property< bool > m_expectInvalid { this, "ExpectInvalid", false, "Flag to control printouts when invalid data are encountered: True suppresses messages, False (default) leaves them in" }
 
Gaudi::Property< bool > m_isMC { this, "IsMC", false, "Set to true when running on MC instead of data" }
 
Gaudi::Property< float > m_muToLumi { this, "MCMuToLumi", 0.140569, "mu to lumi conversion factor in MC (80 mb/LHC rev freq)" }
 
SG::ReadCondHandleKey< CondAttrListCollectionm_luminosityFolderInputKey
 
SG::ReadCondHandleKey< OnlineLumiCalibrationCondDatam_onlineLumiCalibrationInputKey
 
SG::ReadCondHandleKey< BunchLumisCondDatam_bunchLumisInputKey
 
SG::ReadCondHandleKey< BunchGroupCondDatam_bunchGroupInputKey
 
SG::ReadCondHandleKey< FillParamsCondDatam_fillParamsInputKey
 
SG::ReadCondHandleKey< AthenaAttributeListm_mcDigitizationInputKey
 
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey { this, "EventInfoKey", "EventInfo", "EventInfo key, used to read in simulated mu in MC" }
 
SG::ReadDecorHandleKey< xAOD::EventInfom_actualMuKey
 
SG::ReadDecorHandleKey< xAOD::EventInfom_averageMuKey
 
SG::WriteCondHandleKey< LuminosityCondDatam_luminosityOutputKey
 Output conditions object. More...
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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

Conditions algorithm for luminosity data.

Definition at line 33 of file LuminosityCondAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ AthReentrantAlgorithm()

AthReentrantAlgorithm::AthReentrantAlgorithm

Forward base class ctor.

Definition at line 90 of file AthReentrantAlgorithm.cxx.

22  :
24 {
25 
26  // Set up to run AthAlgorithmDHUpdate in sysInitialize before
27  // merging depedency lists. This extends the output dependency
28  // list with any symlinks implied by inheritance relations.
29  m_updateDataHandles =
30  std::make_unique<AthenaBaseComps::AthAlgorithmDHUpdate>
32  std::move (m_updateDataHandles));
33 }

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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 LuminosityCondAlg::execute ( const EventContext &  ctx) const
overridevirtual

Algorithm execute method.

Parameters
ctxEvent Context.

Definition at line 84 of file LuminosityCondAlg.cxx.

85 {
86  auto lumi = std::make_unique<LuminosityCondData>();
88  (m_luminosityOutputKey, ctx);
89 
90  if (m_isMC) {
91  // MC case.
92  const auto* eventinfo = SG::get(m_eventInfoKey, ctx);
93  // define a range for this one LB with one second validity
94  EventIDRange range = EventIDRange(EventIDBase(eventinfo->runNumber(),
95  EventIDBase::UNDEFEVT,
96  eventinfo->timeStamp(),
97  eventinfo->timeStampNSOffset(),
98  eventinfo->lumiBlock()),
99  EventIDBase(eventinfo->runNumber(),
100  EventIDBase::UNDEFEVT,
101  eventinfo->timeStamp()+1,
102  eventinfo->timeStampNSOffset(),
103  eventinfo->lumiBlock()+1));
104 
105 
107  luminosityCondData.addDependency(range);
108 
109  const float avgMu = eventinfo->averageInteractionsPerCrossing();
110  const auto& attr = (**digitizationFolder)[std::string("BeamIntensityPattern")];
111  const std::string& sbunches = attr.data<std::string>();
112  std::vector<float> bunchpattern = tokenize(sbunches);
113 
114  if (bunchpattern.size() != LuminosityCondData::TOTAL_LHC_BCIDS) {
115  ATH_MSG_ERROR("Decoding MC bunch structure failed, improper number of LHC BCIDs");
116  bunchpattern = std::vector<float>(LuminosityCondData::TOTAL_LHC_BCIDS, 1.);
117  }
118 
119  float totintensity = 0.;
120  for (size_t i = 0; i < bunchpattern.size(); ++i) {
121  totintensity += bunchpattern[i];
122  bunchpattern[i] *= (avgMu*m_muToLumi);
123  }
124 
125  lumi->setLbAverageInteractionsPerCrossing(avgMu);
126  lumi->setLbAverageLuminosity(totintensity*avgMu*m_muToLumi);
127  lumi->setLbLuminosityPerBCIDVector(std::move(bunchpattern));
128  lumi->setMuToLumi(m_muToLumi);
129  }
130  else {
133  luminosityCondData.addDependency(luminosityFolder);
134 
135  unsigned int preferredChannel;
136  unsigned int calibChannel;
137  const coral::Blob* bunchInstLumiBlob = nullptr;
138  ATH_CHECK( updateAvgLumi (**luminosityFolder,
139  *lumi,
140  preferredChannel,
141  calibChannel,
142  bunchInstLumiBlob) );
143 
145  bunchInstLumiBlob,
146  preferredChannel,
147  calibChannel,
148  luminosityCondData,
149  *lumi) );
150  }
151 
152 
153  ATH_CHECK( luminosityCondData.record (std::move (lumi)) );
154  return StatusCode::SUCCESS;
155 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::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 & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ initialize()

StatusCode LuminosityCondAlg::initialize ( )
overridevirtual

Gaudi initialize method.

Definition at line 57 of file LuminosityCondAlg.cxx.

58 {
60 
61  // May be empty if configured for MC.
64 
65  // May be empty if configured for data.
68  ATH_CHECK( m_actualMuKey.initialize(m_isMC) );
69  ATH_CHECK( m_averageMuKey.initialize(m_isMC) );
70 
71  // Only used for run1.
75  return StatusCode::SUCCESS;
76 }

◆ inputHandles()

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

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ isReEntrant()

virtual bool LuminosityCondAlg::isReEntrant ( ) const
inlinefinaloverridevirtual

Definition at line 47 of file LuminosityCondAlg.h.

47 { return false; }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::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< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::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.

◆ updateAvgLumi()

StatusCode LuminosityCondAlg::updateAvgLumi ( const CondAttrListCollection lumiData,
LuminosityCondData lumi,
unsigned int &  preferredChannel,
unsigned int &  calibChannel,
const coral::Blob *&  bunchInstLumiBlob 
) const
private

Unpack luminosity data from the attribute list.

Parameters
lumiDataInput luminosity data.
lumiOutput luminosity data being filled.
preferredChannel[out]Preferred luminosity channel to use.
calibChannel[out]Calibration luminosity channel to use.
bunchInstLumiBlob[out]Packed per-bunch luminosity data. Set to null for Run 1.

Unpacks luminosity data from the attribute list. Fills in the average luminosity fields in lumi, and determines the luminosity channels to use. For Run 2 and later, returns the packed luminosity data.

Definition at line 173 of file LuminosityCondAlg.cxx.

179 {
180  preferredChannel = 0;
181  calibChannel = 0;
182  bunchInstLumiBlob = nullptr;
183 
184  const coral::AttributeList& attrList = lumiData.attributeList (m_lumiChannel);
185  if (attrList.size() == 0 || attrList["Valid"].isNull()) {
186  ATH_MSG_DEBUG ("Can't find luminosity information for channel " << m_lumiChannel);
187  return StatusCode::SUCCESS;
188  }
189 
190  if (msgLvl (MSG::DEBUG)) {
191  std::ostringstream attrStr1;
192  attrList.toOutputStream( attrStr1 );
193  ATH_MSG_DEBUG( "ChanNum " << m_lumiChannel << " Attribute list "
194  << attrStr1.str() );
195  }
196 
197  // Check data availability
198  if (attrList["LBAvInstLumi"].isNull() || attrList["LBAvEvtsPerBX"].isNull()) {
199  ATH_MSG_ERROR( " NULL Luminosity information in database " );
200  return StatusCode::FAILURE;
201  }
202 
203  // Check validity (don't bother continuing if invalid)
204  uint32_t valid = attrList["Valid"].data<cool::UInt32>();
205  lumi.setLbAverageValid (valid);
206  if (valid & 0x01) {
207  if (m_skipInvalid) {
208  if (!m_expectInvalid) {
209  ATH_MSG_INFO( " Invalid LB Average luminosity ... set lumi to 0" );
210  }
211  return StatusCode::SUCCESS;
212  } else {
213  ATH_MSG_DEBUG( " Invalid LB Average luminosity ... continuing because skipInvalid == FALSE" );
214  }
215  }
216 
217  // Get preferred channel (needed for per-BCID calculation)
218  if (m_lumiChannel == 0u) {
219 
220  // Check if we have a payload for this (Run2 only)
221  bool hasAlgorithmID = false;
222  for (coral::AttributeList::const_iterator attr = attrList.begin();
223  attr != attrList.end(); ++attr) {
224  if (attr->specification().name() == "AlgorithmID") {
225  hasAlgorithmID = true;
226  break;
227  }
228  }
229 
230  if (hasAlgorithmID) {
231  // In Run2, channel 0 should be good. Leave as is
232  preferredChannel = m_lumiChannel;
233  calibChannel = attrList["AlgorithmID"].data<cool::UInt32>();
234 
235  } else {
236  // In Run1, we need to recalculate from the actual channel number
237  preferredChannel = (valid >> 22);
238  calibChannel = preferredChannel;
239  }
240 
241  } else {
242  preferredChannel = m_lumiChannel;
243  calibChannel = m_lumiChannel;
244  }
245 
246  float LBAvInstLumi = attrList["LBAvInstLumi"].data<cool::Float>(); // Lumi
247  float LBAvEvtsPerBX = attrList["LBAvEvtsPerBX"].data<cool::Float>(); // Mu
248 
249  // Check (and protect for NaN
250  if ( std::isnan (LBAvInstLumi) ) {
251  ATH_MSG_WARNING( " Luminosity is not a number.. " << LBAvInstLumi << " ... set it to 0 " );
252  LBAvInstLumi=0.;
253  }
254 
255  if ( std::isnan (LBAvEvtsPerBX) ) {
256  ATH_MSG_WARNING( " Luminosity is not a number.. " << LBAvEvtsPerBX << " ... set it to 0 " );
257  LBAvEvtsPerBX=0.;
258  }
259 
260  lumi.setLbAverageLuminosity (LBAvInstLumi);
261  lumi.setLbAverageInteractionsPerCrossing (LBAvEvtsPerBX);
262 
263  // Check validity of per-BCID luminosity (will issue warning in recalcPerBCIDLumi
264  int perBcidValid = ((valid&0x3ff)/10) % 10;
265  if ((perBcidValid > 0) && m_skipInvalid) {
266  return StatusCode::SUCCESS;
267  }
268 
269  // Also save per-BCID blob if it exists
270  for (coral::AttributeList::const_iterator attr = attrList.begin();
271  attr != attrList.end(); ++attr)
272  {
273  if (attr->specification().name() == "BunchInstLumi") {
274  if (!attrList["BunchInstLumi"].isNull())
275  bunchInstLumiBlob = &attrList["BunchInstLumi"].data<coral::Blob>();
276  break;
277  }
278  }
279 
280  return StatusCode::SUCCESS;
281 }

◆ updateMuToLumi()

StatusCode LuminosityCondAlg::updateMuToLumi ( const EventContext &  ctx,
unsigned int  calibChannel,
SG::WriteCondHandle< LuminosityCondData > &  wHdl,
LuminosityCondData lumi,
bool &  isValid 
) const
private

Fill in mu-to-lumi calibration.

Parameters
ctxEvent context.
calibChannelCalibration luminosity channel to use.
wHdlWriteCondHandle of the conditions data being filled. Range is updated if needed.
lumiOutput luminosity data being filled.
isValidSet to false if data are not valid.
ctxEvent context.
calibChannelCalibration luminosity channel to use.
wHdlWriteHandle of the conditions data being filled. Range is updated if needed.
lumiOutput luminosity data being filled.
isValidSet to false if data are not valid.

Definition at line 347 of file LuminosityCondAlg.cxx.

352 {
355  wHdl.addDependency(onlineLumiCalibration);
356 
357  // This is the only correct way to do this!
358  // The division below gives average mu (over all bunches) to total lumi
359  float muToLumi = onlineLumiCalibration->getMuToLumi (calibChannel);
360 
361  // Check if this is reasonable
362  if (muToLumi < 0.) {
363  ATH_MSG_WARNING(" Found muToLumi = " << muToLumi << " for channel " << calibChannel << ". Try backup channel..." );
364  muToLumi = onlineLumiCalibration->getMuToLumi(m_calibBackupChannel);
365  ATH_MSG_WARNING(" Found muToLumi = " << muToLumi << " for backup channel " << m_calibBackupChannel);
366  }
367 
368  lumi.setMuToLumi (muToLumi);
369 
370  // Check validity
371  isValid = true;
372  int perBcidValid = ((lumi.lbAverageValid()&0x3ff)/10) % 10;
373  if ((lumi.lbAverageValid() & 0x03) || (perBcidValid > 0)) { // Skip if either per-BCID or LBAv is invalid
374  isValid = false;
375  if (m_skipInvalid) {
376  ATH_MSG_WARNING( " Invalid per-BCID luminosity found: "
377  << lumi.lbAverageValid() << "!" );
378  return StatusCode::SUCCESS;
379  } else {
380  ATH_MSG_WARNING( " Invalid per-BCID luminosity found: "
381  << lumi.lbAverageValid()
382  << " continuing because skipInvalid == FALSE" );
383  }
384  }
385 
386  // Now check muToLumi and report depending upon whether lumi is valid or not
387  if (muToLumi < 0.) {
388  if (isValid) {
389  ATH_MSG_ERROR(" Found invalid muToLumi = " << muToLumi << " for backup channel " << m_calibBackupChannel << "!");
390  } else {
391  ATH_MSG_WARNING(" Found invalid muToLumi = " << muToLumi << " for backup channel " << m_calibBackupChannel << "!");
392  }
393 
394  // Don't keep negative values
395  muToLumi = 0.;
396  lumi.setMuToLumi (muToLumi);
397  }
398 
399  ATH_MSG_DEBUG(" Found muToLumi = " << muToLumi << " for channel "
400  << calibChannel );
401 
402  return StatusCode::SUCCESS;
403 }

◆ updatePerBunchLumi()

StatusCode LuminosityCondAlg::updatePerBunchLumi ( const EventContext &  ctx,
const coral::Blob *  bunchInstLumiBlob,
unsigned int  preferredChannel,
unsigned int  calibChannel,
SG::WriteCondHandle< LuminosityCondData > &  wHdl,
LuminosityCondData lumi 
) const
private

Fill in per-bunch luminosity data.

Parameters
ctxEvent context.
bunchInstLumiBlobPacked per-bunch luminosity data. Null for Run 1.
preferredChannelPreferred luminosity channel to use.
calibChannelCalibration luminosity channel to use.
wHdlWriteCondHandle conditions data being filled. Range is updated if needed.
lumiOutput luminosity data being filled.
ctxEvent context.
bunchInstLumiBlobPacked per-bunch luminosity data. Null for Run 1.
preferredChannelPreferred luminosity channel to use.
calibChannelCalibration luminosity channel to use.
wHdlWriteHandle of the conditions data being filled. Range is updated if needed.
lumiOutput luminosity data being filled.

Definition at line 296 of file LuminosityCondAlg.cxx.

302 {
303  if (lumi.lbAverageLuminosity() <= 0.) {
304  if (!m_expectInvalid) {
305  ATH_MSG_INFO( "LBAvInstLumi is zero or negative in updatePerBunchLumi():"
306  << lumi.lbAverageLuminosity());
308  }
309  return StatusCode::SUCCESS;
310  }
311  bool isValid = true;
312  ATH_CHECK( updateMuToLumi (ctx, calibChannel, wHdl, lumi, isValid) );
313 
314  // Check here if we want to do this the Run1 way (hard) or the Run2 way (easy)
315 
316  if (!isValid) {
317  // Skip if not valid.
318  }
319  else if (bunchInstLumiBlob != nullptr) { // Run2 way, easy
320  ATH_CHECK( updatePerBunchLumiRun2 (*bunchInstLumiBlob,
321  preferredChannel,
322  lumi) );
323  }
324  else { // Run1 way, hard!
326  preferredChannel,
327  wHdl,
328  lumi) );
329  }
330 
331  ATH_MSG_DEBUG( "finished updatePerBunchLumi() for alg: "
332  << preferredChannel );
333  return StatusCode::SUCCESS;
334 }

◆ updatePerBunchLumiRun1()

StatusCode LuminosityCondAlg::updatePerBunchLumiRun1 ( const EventContext &  ctx,
unsigned int  preferredChannel,
SG::WriteCondHandle< LuminosityCondData > &  wHdl,
LuminosityCondData lumi 
) const
private

Fill in per-bunch luminosity data, run 1.

Parameters
preferredChannelPreferred luminosity channel to use.
wHdlWriteHandle of the conditions data being filled. Range is updated if needed.
lumiOutput luminosity data being filled.
preferredChannelPreferred luminosity channel to use.
wHdlWriteHandle of the conditions data being filled.
lumiOutput luminosity data being filled.

Definition at line 480 of file LuminosityCondAlg.cxx.

484 {
485  ATH_MSG_DEBUG( "starting updatePerBunchLumiRun1() for alg: " << preferredChannel );
486 
487  if (preferredChannel == 0) {
488  return StatusCode::SUCCESS;
489  }
490 
491  // Nothing to do if we don't have the ingredients
493  ATH_MSG_DEBUG( "OnlineLumiCalibrationInputKey.empty() is TRUE, skipping..." );
494  return StatusCode::SUCCESS;
495  }
496  if (m_bunchLumisInputKey.empty()) {
497  ATH_MSG_DEBUG( "BunchLumisInputKey.empty() is TRUE, skipping..." );
498  return StatusCode::SUCCESS;
499  }
500  if (m_bunchGroupInputKey.empty()) {
501  ATH_MSG_DEBUG( "BunchGroupTool.empty() is TRUE, skipping..." );
502  return StatusCode::SUCCESS;
503  }
504  if (m_fillParamsInputKey.empty()) {
505  ATH_MSG_DEBUG( "FillParamsInputKey.empty() is TRUE, skipping..." );
506  return StatusCode::SUCCESS;
507  }
508 
511  wHdl.addDependency(onlineLumiCalibration);
513  wHdl.addDependency(bunchLumis);
515  wHdl.addDependency(bunchGroup);
517  wHdl.addDependency(fillParams);
518 
519  const std::vector<unsigned int>& luminousBunches = fillParams->luminousBunches();
520  ATH_MSG_DEBUG( "N LuminousBunches:" << luminousBunches.size() );
521 
522  // Get the raw data for the preferred channel
523  const std::vector<float>& rawLumiVec = bunchLumis->rawLuminosity(preferredChannel);
524  if (rawLumiVec.empty()) {
525  ATH_MSG_DEBUG( "Empty raw luminosity vector" );
526  return StatusCode::SUCCESS;
527  }
528 
529  //
530  // Calibration step
531  //
532 
533  // Here we want to go through and calibrate raw values in the luminous bunches only.
534  // This is what the OL adds up, and since these are online calibrations, we want to rescale the total
535  // to agree to whatever offline tag we are using.
536  std::vector<float> calLumiVec (LuminosityCondData::TOTAL_LHC_BCIDS, 0.);
537 
538  // Update muToLumi while we are at it (also check that calibration exists)
539  float muToLumi = onlineLumiCalibration->getMuToLumi (preferredChannel);
540  if (muToLumi <= 0.) {
541  ATH_MSG_ERROR( " dont have calibration information for preferred channel "
542  << preferredChannel << "!" );
543  return StatusCode::FAILURE;
544  }
545  lumi.setMuToLumi (muToLumi);
546 
547  double lumiSum = 0.;
548  for (unsigned int bcid : luminousBunches) {
549  // Don't waste time on zero lumi
550  if (rawLumiVec.at(bcid) <= 0.) {
551  ATH_MSG_DEBUG( "Calibrate BCID " << bcid << " with raw "
552  << rawLumiVec.at(bcid) << " -> skipping" );
553  continue;
554  }
555 
556  // Calibrate
557  if (!onlineLumiCalibration->calibrateLumi(preferredChannel,
558  rawLumiVec[bcid],
559  calLumiVec[bcid]))
560  {
561  ATH_MSG_DEBUG( "Calibrate BCID " << bcid << " with raw " << rawLumiVec[bcid] << " -> calibration failed!" );
562  ATH_MSG_WARNING( "Per-BCID calibration failed for bcid " << bcid << " with raw lumi = " << rawLumiVec[bcid] );
563  continue;
564  }
565 
566  lumiSum += calLumiVec[bcid];
567 
568  ATH_MSG_DEBUG( "Calibrate BCID " << bcid << " with raw " << rawLumiVec[bcid] << " -> " << calLumiVec[bcid] );
569  }
570 
571  // Work out scale factor between offline and online estimate
572  float offlineOnlineRatio = 1.;
573  if (lumiSum > 0.) offlineOnlineRatio = lumi.lbAverageLuminosity() / lumiSum;
574 
575  ATH_MSG_DEBUG( " Offline/Online scale factor: " << lumi.lbAverageLuminosity()
576  << " / " << lumiSum << " = " << offlineOnlineRatio );
577 
578  // Make sure we have values for all BCIDs in the physics bunch group
579  for (unsigned int bcid : bunchGroup->bunchGroup (1)) {
580  // Don't repeat if value already exists
581  if (calLumiVec[bcid] > 0.) continue;
582  if (rawLumiVec[bcid] <= 0.) continue;
583 
584  // Calibrate
585  if (!onlineLumiCalibration->calibrateLumi(preferredChannel,
586  rawLumiVec[bcid],
587  calLumiVec[bcid]))
588  {
589  ATH_MSG_DEBUG( " -> Calibration failed!" );
590  ATH_MSG_WARNING( "Per-BCID calibration failed for bcid " << bcid
591  << " with raw lumi = " << rawLumiVec[bcid] );
592  continue;
593  }
594  }
595 
596  // Almost done, now we apply the scale factor to all BCIDs
597  for (float& lumi : calLumiVec) {
598  lumi *= offlineOnlineRatio;
599  }
600 
601  lumi.setLbLuminosityPerBCIDVector (std::move (calLumiVec));
602 
603  return StatusCode::SUCCESS;
604 }

◆ updatePerBunchLumiRun2()

StatusCode LuminosityCondAlg::updatePerBunchLumiRun2 ( const coral::Blob &  bunchInstLumiBlob,
unsigned int  preferredChannel,
LuminosityCondData lumi 
) const
private

Fill in per-bunch luminosity data, run 2 and later.

Parameters
bunchInstLumiBlobPacked per-bunch luminosity data.
preferredChannelPreferred luminosity channel to use.
lumiOutput luminosity data being filled.

Definition at line 413 of file LuminosityCondAlg.cxx.

416 {
417  ATH_MSG_DEBUG( "starting updatePerBunchLumiRun2() for alg: " << preferredChannel );
418 
419  // Check that the length isn't zero
420  if (bunchInstLumiBlob.size() == 0) {
421  ATH_MSG_ERROR("BunchInstLumi blob found with zero length!");
422  return StatusCode::FAILURE;
423  }
424 
425  // Hardcode the Run2 BLOB decoding (should use CoolLumiUtilities...)
426  const uint8_t* ATH_RESTRICT pchar =
427  static_cast<const uint8_t*>(bunchInstLumiBlob.startingAddress()); // First byte holds storage size and mode
428  unsigned int bss = ((*pchar) % 100) / 10; // Byte storage size
429  unsigned int smod = ((*pchar) % 10); // Storage mode
430  ++pchar; // Points to next char after header
431 
432  ATH_MSG_DEBUG( "BunchInstLumi blob found with storage mode " << smod
433  << " and byte storage size " << bss );
434 
435  // Make sure we have what we think we have
436  if (bss != 4 || smod != 1) {
437  ATH_MSG_ERROR( "BunchInstLumi blob found with storage mode " << smod << " and byte storage size " << bss << " - Unknown!");
438  return StatusCode::FAILURE;
439  }
440 
441  unsigned int nbcids = LuminosityCondData::TOTAL_LHC_BCIDS;
442  unsigned int bloblength = bss * nbcids + 1;
443 
444  if (static_cast<cool::UInt32>(bunchInstLumiBlob.size()) != bloblength) {
445  ATH_MSG_ERROR( "BunchRawInstLumi blob found with length"
446  << bunchInstLumiBlob.size() << "in storage mode" << smod
447  << ", expecting " << bloblength << "!" );
448  return StatusCode::FAILURE;
449  }
450 
451  // Length is correct, read raw data according to packing scheme
452  // This is absolute luminosity, so just unpack values into our array
453 
454  ATH_MSG_DEBUG( "Unpacking lumi value from blob");
455  std::vector<float> instLumi (nbcids);
456  for (unsigned int i=0; i<nbcids; i++) {
457  // Can't use assignment directly because source may be misaligned.
458  instLumi[i] = CxxUtils::get_unaligned_float (pchar);
459  }
460 
461  if (msgLvl (MSG::DEBUG)) {
462  for (unsigned int i=0; i<nbcids; i++) {
463  ATH_MSG_DEBUG( "Bcid: " << i << " Lumi: " << instLumi[i] );
464  }
465  }
466 
467  lumi.setLbLuminosityPerBCIDVector (std::move (instLumi));
468 
469  return StatusCode::SUCCESS;
470 }

◆ updateVHKA()

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

SG::ReadDecorHandleKey<xAOD::EventInfo> LuminosityCondAlg::m_actualMuKey
private
Initial value:
{ this, "actualMuKey", "EventInfo.actualInteractionsPerCrossing",
"Decoration for Actual Interaction Per Crossing, for MC" }

Definition at line 184 of file LuminosityCondAlg.h.

◆ m_averageMuKey

SG::ReadDecorHandleKey<xAOD::EventInfo> LuminosityCondAlg::m_averageMuKey
private
Initial value:
{ this, "averageMuKey", "EventInfo.averageInteractionsPerCrossing",
"Decoration for Average Interaction Per Crossing" }

Definition at line 188 of file LuminosityCondAlg.h.

◆ m_bunchGroupInputKey

SG::ReadCondHandleKey<BunchGroupCondData> LuminosityCondAlg::m_bunchGroupInputKey
private
Initial value:
{ this, "BunchGroupInputKey", "",
"Input filled bunch data. Only used for Run 1." }

Definition at line 168 of file LuminosityCondAlg.h.

◆ m_bunchLumisInputKey

SG::ReadCondHandleKey<BunchLumisCondData> LuminosityCondAlg::m_bunchLumisInputKey
private
Initial value:
{ this, "BunchLumisInputKey", "",
"Input raw luminosities. Only used for Run 1." }

Definition at line 164 of file LuminosityCondAlg.h.

◆ m_calibBackupChannel

Gaudi::Property<unsigned long> LuminosityCondAlg::m_calibBackupChannel { this, "CalibBackupChannel", 112, "Backup channel in case calibChannel doesn't exist in online calibration folder" }
private

Definition at line 139 of file LuminosityCondAlg.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> LuminosityCondAlg::m_eventInfoKey { this, "EventInfoKey", "EventInfo", "EventInfo key, used to read in simulated mu in MC" }
private

Definition at line 181 of file LuminosityCondAlg.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_expectInvalid

Gaudi::Property<bool> LuminosityCondAlg::m_expectInvalid { this, "ExpectInvalid", false, "Flag to control printouts when invalid data are encountered: True suppresses messages, False (default) leaves them in" }
private

Definition at line 145 of file LuminosityCondAlg.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_fillParamsInputKey

SG::ReadCondHandleKey<FillParamsCondData> LuminosityCondAlg::m_fillParamsInputKey
private
Initial value:
{ this, "FillParamsInputKey", "",
"Input luminous bunch data. Only used for Run 1." }

Definition at line 172 of file LuminosityCondAlg.h.

◆ m_isMC

Gaudi::Property<bool> LuminosityCondAlg::m_isMC { this, "IsMC", false, "Set to true when running on MC instead of data" }
private

Definition at line 149 of file LuminosityCondAlg.h.

◆ m_lumiChannel

Gaudi::Property<unsigned long> LuminosityCondAlg::m_lumiChannel { this, "LumiChannelNumber", 0, "Luminosity channel to read. 0 means to determine from the data." }
private

Definition at line 136 of file LuminosityCondAlg.h.

◆ m_luminosityFolderInputKey

SG::ReadCondHandleKey<CondAttrListCollection> LuminosityCondAlg::m_luminosityFolderInputKey
private
Initial value:
{ this, "LuminosityFolderInputKey", "/TRIGGER/OFLLUMI/LBLESTOFL",
"Input luminosity COOL folder." }

Definition at line 156 of file LuminosityCondAlg.h.

◆ m_luminosityOutputKey

SG::WriteCondHandleKey<LuminosityCondData> LuminosityCondAlg::m_luminosityOutputKey
private
Initial value:
{ this, "LuminosityOutputKey", "LuminosityCondData",
"Output luminosity data." }

Output conditions object.

Definition at line 193 of file LuminosityCondAlg.h.

◆ m_mcDigitizationInputKey

SG::ReadCondHandleKey<AthenaAttributeList> LuminosityCondAlg::m_mcDigitizationInputKey
private
Initial value:
{ this, "DigitizationFolderInputKey", "/Digitization/Parameters",
"Digitization parameters metadata folder." }

Definition at line 177 of file LuminosityCondAlg.h.

◆ m_muToLumi

Gaudi::Property<float> LuminosityCondAlg::m_muToLumi { this, "MCMuToLumi", 0.140569, "mu to lumi conversion factor in MC (80 mb/LHC rev freq)" }
private

Definition at line 152 of file LuminosityCondAlg.h.

◆ m_onlineLumiCalibrationInputKey

SG::ReadCondHandleKey<OnlineLumiCalibrationCondData> LuminosityCondAlg::m_onlineLumiCalibrationInputKey
private
Initial value:
{ this, "OnlineLumiCalibrationInputKey", "OnlineLumiCalibrationCondData",
"Input luminosity calibration." }

Definition at line 160 of file LuminosityCondAlg.h.

◆ m_skipInvalid

Gaudi::Property<bool> LuminosityCondAlg::m_skipInvalid { this, "SkipInvalid", true, "Flag to control whether invalid data is skipped: True (default), returning a zero luminosity; false, returning available luminosity values anyway." }
private

Definition at line 142 of file LuminosityCondAlg.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LuminosityCondAlg::updateMuToLumi
StatusCode updateMuToLumi(const EventContext &ctx, unsigned int calibChannel, SG::WriteCondHandle< LuminosityCondData > &wHdl, LuminosityCondData &lumi, bool &isValid) const
Fill in mu-to-lumi calibration.
Definition: LuminosityCondAlg.cxx:347
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
LuminosityCondAlg::m_luminosityOutputKey
SG::WriteCondHandleKey< LuminosityCondData > m_luminosityOutputKey
Output conditions object.
Definition: LuminosityCondAlg.h:194
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LuminosityCondAlg::m_luminosityFolderInputKey
SG::ReadCondHandleKey< CondAttrListCollection > m_luminosityFolderInputKey
Definition: LuminosityCondAlg.h:157
LuminosityCondAlg::updatePerBunchLumi
StatusCode updatePerBunchLumi(const EventContext &ctx, const coral::Blob *bunchInstLumiBlob, unsigned int preferredChannel, unsigned int calibChannel, SG::WriteCondHandle< LuminosityCondData > &wHdl, LuminosityCondData &lumi) const
Fill in per-bunch luminosity data.
Definition: LuminosityCondAlg.cxx:296
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CxxUtils::tokenize
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Definition: Control/CxxUtils/Root/StringUtils.cxx:15
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LuminosityCondAlg::m_onlineLumiCalibrationInputKey
SG::ReadCondHandleKey< OnlineLumiCalibrationCondData > m_onlineLumiCalibrationInputKey
Definition: LuminosityCondAlg.h:161
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
LuminosityCondAlg::m_fillParamsInputKey
SG::ReadCondHandleKey< FillParamsCondData > m_fillParamsInputKey
Definition: LuminosityCondAlg.h:173
LuminosityCondData::TOTAL_LHC_BCIDS
static constexpr unsigned int TOTAL_LHC_BCIDS
Definition: LuminosityCondData.h:27
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:620
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
ATH_RESTRICT
#define ATH_RESTRICT
Definition: restrict.h:31
LuminosityCondAlg::m_calibBackupChannel
Gaudi::Property< unsigned long > m_calibBackupChannel
Definition: LuminosityCondAlg.h:140
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
CxxUtils::get_unaligned_float
float get_unaligned_float(const uint8_t *ATH_RESTRICT &p)
Read little-endian float value from a possibly unaligned pointer.
Definition: get_unaligned.h:122
calibdata.valid
list valid
Definition: calibdata.py:45
LuminosityCondAlg::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: LuminosityCondAlg.h:182
LuminosityCondAlg::m_bunchGroupInputKey
SG::ReadCondHandleKey< BunchGroupCondData > m_bunchGroupInputKey
Definition: LuminosityCondAlg.h:169
LuminosityCondAlg::m_expectInvalid
Gaudi::Property< bool > m_expectInvalid
Definition: LuminosityCondAlg.h:146
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::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
LuminosityCondAlg::m_muToLumi
Gaudi::Property< float > m_muToLumi
Definition: LuminosityCondAlg.h:153
IOVInfiniteRange::infiniteRunLB
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
Definition: IOVInfiniteRange.h:39
LuminosityCondAlg::m_actualMuKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_actualMuKey
Definition: LuminosityCondAlg.h:185
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CondAttrListCollection::attributeList
const AttributeList & attributeList(ChanNum chanNum) const
attribute list for a given channel number
Definition: CondAttrListCollection.h:401
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
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
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
LuminosityCondAlg::updateAvgLumi
StatusCode updateAvgLumi(const CondAttrListCollection &lumiData, LuminosityCondData &lumi, unsigned int &preferredChannel, unsigned int &calibChannel, const coral::Blob *&bunchInstLumiBlob) const
Unpack luminosity data from the attribute list.
Definition: LuminosityCondAlg.cxx:173
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
LuminosityCondAlg::updatePerBunchLumiRun1
StatusCode updatePerBunchLumiRun1(const EventContext &ctx, unsigned int preferredChannel, SG::WriteCondHandle< LuminosityCondData > &wHdl, LuminosityCondData &lumi) const
Fill in per-bunch luminosity data, run 1.
Definition: LuminosityCondAlg.cxx:480
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
LuminosityCondAlg::m_isMC
Gaudi::Property< bool > m_isMC
Definition: LuminosityCondAlg.h:150
COOLRates.luminousBunches
luminousBunches
Definition: COOLRates.py:1245
LuminosityCondAlg::updatePerBunchLumiRun2
StatusCode updatePerBunchLumiRun2(const coral::Blob &bunchInstLumiBlob, unsigned int preferredChannel, LuminosityCondData &lumi) const
Fill in per-bunch luminosity data, run 2 and later.
Definition: LuminosityCondAlg.cxx:413
lumiFormat.lumi
lumi
Definition: lumiFormat.py:106
a
TList * a
Definition: liststreamerinfos.cxx:10
LuminosityCondAlg::m_bunchLumisInputKey
SG::ReadCondHandleKey< BunchLumisCondData > m_bunchLumisInputKey
Definition: LuminosityCondAlg.h:165
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DEBUG
#define DEBUG
Definition: page_access.h:11
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
LuminosityCondAlg::m_skipInvalid
Gaudi::Property< bool > m_skipInvalid
Definition: LuminosityCondAlg.h:143
LuminosityCondAlg::m_mcDigitizationInputKey
SG::ReadCondHandleKey< AthenaAttributeList > m_mcDigitizationInputKey
Definition: LuminosityCondAlg.h:178
SG::get
const T * get(const ReadHandleKey< T > &key)
Convenience function to retrieve an object given a ReadHandleKey.
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
LuminosityCondAlg::m_lumiChannel
Gaudi::Property< unsigned long > m_lumiChannel
Definition: LuminosityCondAlg.h:137
LuminosityCondAlg::m_averageMuKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_averageMuKey
Definition: LuminosityCondAlg.h:189
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
SG::WriteCondHandle::addDependency
void addDependency(const EventIDRange &range)
Definition: WriteCondHandle.h:275