ATLAS Offline Software
TrigLiveFractionCondAlg.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
4  */
13 #ifndef LUMIBLOCKCOMPS_TRIGLIVEFRACTIONCONDALG_H
14 #define LUMIBLOCKCOMPS_TRIGLIVEFRACTIONCONDALG_H
15 
16 
23 #include "CoralBase/Blob.h"
24 
25 
30  : public AthReentrantAlgorithm
31 {
32 public:
35 
36 
38  virtual StatusCode initialize() override;
39 
40 
42  virtual StatusCode execute (const EventContext& ctx) const override;
43 
44 
45 private:
54  unpackDeadtime (const AthenaAttributeList& deadtimeFolder,
55  unsigned int& turnCounter,
56  std::vector<float>& liveFractionLo,
57  std::vector<float>& liveFractionHi) const;
58 
59 
68  unsigned int turnCounter,
69  std::vector<float>& livevec) const;
70 
71 
81  const std::vector<float>& liveFractionLo,
82  const std::vector<float>& liveFractionHi,
83  float& lumiLiveFractionLo,
84  float& lumiLiveFractionHi) ;
85 
86 
89  { this, "DeadtimeFolderInputKey", "/TRIGGER/LUMI/PerBcidDeadtime",
90  "Input deadtime COOL folder." };
91 
94  { this, "LuminosityInputKey", "LuminosityCondData",
95  "Input luminosity data." };
96 
99  { this, "TrigLiveFractionOutputKey", "TrigLiveFractionCondData",
100  "Output live fraction data." };
101 };
102 
103 
104 #endif // not LUMIBLOCKCOMPS_TRIGLIVEFRACTIONCONDALG_H
TrigLiveFractionCondAlg::m_luminosityInputKey
SG::ReadCondHandleKey< LuminosityCondData > m_luminosityInputKey
Input luminosity data.
Definition: TrigLiveFractionCondAlg.h:94
TrigLiveFractionCondAlg::unpackDeadtime
StatusCode unpackDeadtime(const AthenaAttributeList &deadtimeFolder, unsigned int &turnCounter, std::vector< float > &liveFractionLo, std::vector< float > &liveFractionHi) const
Unpack information from the deadtime COOL folder.
Definition: TrigLiveFractionCondAlg.cxx:94
WriteCondHandleKey.h
TrigLiveFractionCondAlg::m_trigLiveFractionOutputKey
SG::WriteCondHandleKey< TrigLiveFractionCondData > m_trigLiveFractionOutputKey
Output conditions object.
Definition: TrigLiveFractionCondAlg.h:99
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
TrigLiveFractionCondAlg::m_deadtimeFolderInputKey
SG::ReadCondHandleKey< AthenaAttributeList > m_deadtimeFolderInputKey
Input deadtime folder.
Definition: TrigLiveFractionCondAlg.h:89
TrigLiveFractionCondAlg::initialize
virtual StatusCode initialize() override
Gaudi initialize method.
Definition: TrigLiveFractionCondAlg.cxx:21
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
TrigLiveFractionCondData.h
Hold live fraction data produced by TrigLiveFractionCondAlg.
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigLiveFractionCondAlg::lumiWeight
static StatusCode lumiWeight(const LuminosityCondData &lumi, const std::vector< float > &liveFractionLo, const std::vector< float > &liveFractionHi, float &lumiLiveFractionLo, float &lumiLiveFractionHi)
Calculate weighted average live fractions.
Definition: TrigLiveFractionCondAlg.cxx:181
AthenaAttributeList
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Definition: PersistentDataModel/PersistentDataModel/AthenaAttributeList.h:45
LuminosityCondData.h
Hold luminosity data produced by LuminosityCondAlg.
ReadCondHandleKey.h
AthReentrantAlgorithm.h
LuminosityCondData
Definition: LuminosityCondData.h:23
AthenaAttributeList.h
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
SG::ReadCondHandleKey< AthenaAttributeList >
TrigLiveFractionCondAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm execute method.
Definition: TrigLiveFractionCondAlg.cxx:35
lumiFormat.lumi
lumi
Definition: lumiFormat.py:106
TrigLiveFractionCondAlg::unpackVector
StatusCode unpackVector(const coral::Blob &blob, unsigned int turnCounter, std::vector< float > &livevec) const
Unpack a single deadtime vector.
Definition: TrigLiveFractionCondAlg.cxx:142
SG::WriteCondHandleKey< TrigLiveFractionCondData >
TrigLiveFractionCondAlg
Conditions algorithm for trigger live fraction data.
Definition: TrigLiveFractionCondAlg.h:31
CaloCondBlobAlgs_fillNoiseFromASCII.blob
blob
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:96