ATLAS Offline Software
BunchCrossingCondAlg.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-2022 CERN for the benefit of the ATLAS collaboration.
4  */
13 #ifndef LUMIBLOCKCOMPS_BUNCHCROSSINGCONDALG_H
14 #define LUMIBLOCKCOMPS_BUNCHCROSSINGCONDALG_H
15 
16 
25 
30 
31 public:
35 
36 
38  virtual StatusCode initialize() override;
39 
40 
42  virtual StatusCode execute (const EventContext& ctx) const override;
43  virtual bool isReEntrant() const override final { return false; }
44 
45 
46 
47 private:
49  SG::ReadCondHandleKey<AthenaAttributeList> m_fillParamsFolderKey{ this, "FillParamsFolderKey", "/TDAQ/OLC/LHC/FILLPARAMS", "" };
50  SG::ReadCondHandleKey<LuminosityCondData> m_lumiCondDataKey{this, "LumiCondData", "LuminosityCondData", "Lumi cond data key"};
51  SG::ReadCondHandleKey<TrigConf::L1BunchGroupSet> m_bunchGroupCondDataKey{this, "L1BunchGroupCondData", "L1BunchGroup", "Bunch group cond data key"};
53  SG::WriteCondHandleKey<BunchCrossingCondData> m_outputKey{this, "OutputKey", "BunchCrossingData", "Key of output CDO" };
54 
55  // Service handle
56  const ServiceHandle<TrigConf::ILVL1ConfigSvc> m_trigConfigSvc{this, "TrigConfigSvc", "TrigConf::xAODConfigSvc/xAODConfigSvc", "Trig Config Svc"};
57 
59  std::vector<bunchTrain_t> findTrains(const std::bitset< BunchCrossingCondData::m_MAX_BCID>& pairsToConsume, const int maxSpacingInTrain, const unsigned minBunchesPerTrain) const;
60  std::vector<float> tokenize(const std::string& pattern) const;
61 
62  //Algorithm properties
63  Gaudi::Property<unsigned> m_maxBunchSpacing{this, "MaxBunchSpacing",5, "Maximal bunch-spacing to be considered a 'bunch train'"};
64  Gaudi::Property<unsigned> m_minBunchesPerTrain{this, "MinBunchesPerTrain",32, "Minimal number of bunches to be considerd a 'bunch train'"};
65  Gaudi::Property<bool> m_isRun1{this,"Run1",false,"Assume run-1 database"};
66  Gaudi::Property<int> m_mode{this, "Mode", 1, "Alg mode (COOL FILLPARAMS = 0, MC = 1, TrigConf = 2, Luminosity = 3)"};
67 };
68 
69 #endif
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
BunchCrossingCondAlg::tokenize
std::vector< float > tokenize(const std::string &pattern) const
This helper function is used to convert a string of type "[0.0, 0.0, 1.0, 1.0, 1.0]" into a vector of...
Definition: BunchCrossingCondAlg.cxx:398
BunchCrossingCondAlg::m_trigConfigSvc
const ServiceHandle< TrigConf::ILVL1ConfigSvc > m_trigConfigSvc
Definition: BunchCrossingCondAlg.h:56
BunchCrossingCondAlg::m_minBunchesPerTrain
Gaudi::Property< unsigned > m_minBunchesPerTrain
Definition: BunchCrossingCondAlg.h:64
WriteCondHandleKey.h
BunchCrossingCondAlg::isReEntrant
virtual bool isReEntrant() const override final
Definition: BunchCrossingCondAlg.h:43
BunchCrossingCondAlg::m_bunchGroupCondDataKey
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSet > m_bunchGroupCondDataKey
Definition: BunchCrossingCondAlg.h:51
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
BunchCrossingCondAlg::m_isRun1
Gaudi::Property< bool > m_isRun1
Definition: BunchCrossingCondAlg.h:65
ILVL1ConfigSvc.h
BunchCrossingCondAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm execute method.
Definition: BunchCrossingCondAlg.cxx:49
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
BunchCrossingCondAlg::findTrains
std::vector< bunchTrain_t > findTrains(const std::bitset< BunchCrossingCondData::m_MAX_BCID > &pairsToConsume, const int maxSpacingInTrain, const unsigned minBunchesPerTrain) const
internal methods:
Definition: BunchCrossingCondAlg.cxx:292
BunchCrossingCondAlg::m_outputKey
SG::WriteCondHandleKey< BunchCrossingCondData > m_outputKey
Output conditions object.
Definition: BunchCrossingCondAlg.h:53
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
BunchCrossingCondAlg::bunchTrain_t
BunchCrossingCondData::bunchTrain_t bunchTrain_t
Definition: BunchCrossingCondAlg.h:34
FillParamsCondData.h
Holds fill parameters data.
BunchCrossingCondAlg::initialize
virtual StatusCode initialize() override
Gaudi initialize method.
Definition: BunchCrossingCondAlg.cxx:37
LuminosityCondData.h
Hold luminosity data produced by LuminosityCondAlg.
ReadCondHandleKey.h
AthReentrantAlgorithm.h
L1BunchGroupSet.h
BunchCrossingCondAlg::m_fillParamsFolderKey
SG::ReadCondHandleKey< AthenaAttributeList > m_fillParamsFolderKey
Input conditions object.
Definition: BunchCrossingCondAlg.h:49
BunchCrossingCondAlg
Conditions algorithm to unpack fill parameters from COOL.
Definition: BunchCrossingCondAlg.h:29
SG::ReadCondHandleKey< AthenaAttributeList >
BunchCrossingCondAlg::m_lumiCondDataKey
SG::ReadCondHandleKey< LuminosityCondData > m_lumiCondDataKey
Definition: BunchCrossingCondAlg.h:50
BunchCrossingCondAlg::m_maxBunchSpacing
Gaudi::Property< unsigned > m_maxBunchSpacing
Definition: BunchCrossingCondAlg.h:63
SG::WriteCondHandleKey< BunchCrossingCondData >
BunchCrossingCondData.h
Replaces the BunchCrossing AlgTool used in run1/2.
BunchCrossingCondAlg::m_mode
Gaudi::Property< int > m_mode
Definition: BunchCrossingCondAlg.h:66
ServiceHandle< TrigConf::ILVL1ConfigSvc >
BunchCrossingCondData::bunchTrain_t
Definition: BunchCrossingCondData.h:315