ATLAS Offline Software
Loading...
Searching...
No Matches
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-2025 CERN for the benefit of the ATLAS collaboration.
4 */
11
12
13#ifndef LUMIBLOCKCOMPS_BUNCHCROSSINGCONDALG_H
14#define LUMIBLOCKCOMPS_BUNCHCROSSINGCONDALG_H
15
16
28
33
34public:
36 using AthCondAlgorithm::AthCondAlgorithm;
38
39
41 virtual StatusCode initialize() override;
42
43
45 virtual StatusCode execute (const EventContext& ctx) const override;
46
47
48
49private:
51 SG::ReadCondHandleKey<AthenaAttributeList> m_fillParamsFolderKey{ this, "FillParamsFolderKey", "/TDAQ/OLC/LHC/FILLPARAMS", "" };
52 SG::ReadCondHandleKey<LuminosityCondData> m_lumiCondDataKey{this, "LumiCondData", "LuminosityCondData", "Lumi cond data key"};
53 SG::ReadCondHandleKey<TrigConf::L1BunchGroupSet> m_bunchGroupCondDataKey{this, "L1BunchGroupCondData", "L1BunchGroup", "Bunch group cond data key"};
54
57 { this, "ByteStreamMetadataKey", "",
58 "ByteStream metadata (for reading IOV metadata from BS files in MC mode)" };
59
60 SG::WriteCondHandleKey<BunchCrossingCondData> m_outputKey{this, "OutputKey", "BunchCrossingData", "Key of output CDO" };
61
62 // Service handle
63 const ServiceHandle<TrigConf::ILVL1ConfigSvc> m_trigConfigSvc{this, "TrigConfigSvc", "TrigConf::xAODConfigSvc/xAODConfigSvc", "Trig Config Svc"};
64
66 std::vector<bunchTrain_t> findTrains(const std::bitset< BunchCrossingCondData::m_MAX_BCID>& pairsToConsume, const int maxSpacingInTrain, const unsigned minBunchesPerTrain) const;
67 std::vector<float> tokenize(const std::string& pattern) const;
68
69 //Algorithm properties
70 Gaudi::Property<unsigned> m_maxBunchSpacing{this, "MaxBunchSpacing",5, "Maximal bunch-spacing to be considered a 'bunch train'"};
71 Gaudi::Property<unsigned> m_minBunchesPerTrain{this, "MinBunchesPerTrain",32, "Minimal number of bunches to be considerd a 'bunch train'"};
72 Gaudi::Property<bool> m_isRun1{this,"Run1",false,"Assume run-1 database"};
73 Gaudi::Property<int> m_mode{this, "Mode", 1, "Alg mode (COOL FILLPARAMS = 0, MC = 1, TrigConf = 2, Luminosity = 3)"};
74};
75
76#endif
Base class for conditions algorithms.
Replaces the BunchCrossing AlgTool used in run1/2.
This file contains the class definition for the ByteStreamMetadataContainer class.
Holds fill parameters data.
Hold luminosity data produced by LuminosityCondAlg.
An AttributeList represents a logical row of attributes in a metadata table.
Property holding a SG store/key/clid from which a ReadHandle is made.
Base class for conditions algorithms.
Conditions algorithm to unpack fill parameters from COOL.
SG::ReadHandleKey< ByteStreamMetadataContainer > m_byteStreamMetadataKey
ByteStream metadata (for reading IOV metadata from BS files in MC mode)
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...
Gaudi::Property< bool > m_isRun1
Gaudi::Property< int > m_mode
SG::WriteCondHandleKey< BunchCrossingCondData > m_outputKey
Output conditions object.
virtual StatusCode initialize() override
Gaudi initialize method.
Gaudi::Property< unsigned > m_maxBunchSpacing
Gaudi::Property< unsigned > m_minBunchesPerTrain
std::vector< bunchTrain_t > findTrains(const std::bitset< BunchCrossingCondData::m_MAX_BCID > &pairsToConsume, const int maxSpacingInTrain, const unsigned minBunchesPerTrain) const
internal methods:
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSet > m_bunchGroupCondDataKey
SG::ReadCondHandleKey< LuminosityCondData > m_lumiCondDataKey
const ServiceHandle< TrigConf::ILVL1ConfigSvc > m_trigConfigSvc
SG::ReadCondHandleKey< AthenaAttributeList > m_fillParamsFolderKey
Input conditions object.
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm execute method.
BunchCrossingCondData::bunchTrain_t bunchTrain_t
Property holding a SG store/key/clid from which a ReadHandle is made.