ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloReadoutConfigContainer.h
Go to the documentation of this file.
1// -*- C++ -*-
2#ifndef TRIGT1CALOCALIBCONDITIONS_L1CALOREADOUTCONFIGCONTAINER_H
3/*
4 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5*/
6#define TRIGT1CALOCALIBCONDITIONS_L1CALOREADOUTCONFIGCONTAINER_H
7
8#include <map>
9#include <string>
10#include <vector>
12#include "GaudiKernel/DataObject.h"
16
18
19/***
20* Container of L1CaloReadoutConfig objects. Automatically created using:
21*
22* ../python/CreateClassesForFolder.py --db frontier://ATLF/();schema=ATLAS_COOLONL_TRIGGER;dbname=CONDBR2 /TRIGGER/L1Calo/V2/Configuration/ReadoutConfig
23*/
24class L1CaloReadoutConfigContainer : public DataObject, virtual public AbstractL1CaloPersistentCondition
25{
26private:
28public:
30 L1CaloReadoutConfigContainer(const std::string& folderKey);
32
33 // interface of AbstractL1CaloPersistentCondition
35 virtual void makeTransient(const std::map<std::string, const CondAttrListCollection*>&);
36 virtual DataObject* makePersistent() const;
37 virtual std::vector<std::string> coolInputKeys() const { return {m_coolFolderKey}; }
38 virtual std::string coolOutputKey() const { return m_coolFolderKey; }
39 virtual void clear() { m_readoutConfigs.clear(); }
40
41 // getters
42 const L1CaloReadoutConfig* readoutConfig(unsigned int channelId) const;
43 const L1CaloReadoutConfig* readoutConfig(const L1CaloCoolChannelId& channelId) const {
44 return readoutConfig(channelId.id());
45 }
46
47 using const_iterator = std::vector<L1CaloReadoutConfig>::const_iterator;
48 const_iterator begin() const { return m_readoutConfigs.begin(); }
49 const_iterator end() const { return m_readoutConfigs.end(); }
50
51 // setters
53
54private:
55 std::vector<L1CaloReadoutConfig> m_readoutConfigs;
56 std::string m_coolFolderKey = "/TRIGGER/L1Calo/V2/Configuration/ReadoutConfig";
57};
58
61
62#endif // TRIGT1CALOCALIBCONDITIONS_L1CALOREADOUTCONFIGCONTAINER_H
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
macros to associate a CLID to a type
virtual void makeTransient(const std::map< std::string, const CondAttrListCollection * > &condAttrListCollectionMap)
AbstractL1CaloPersistentCondition(const std::string &condType)
This class is a collection of AttributeLists where each one is associated with a channel number.
Encapsulates the ID of one channel of conditions data in COOL, ie the ID of a row in a table.
std::vector< L1CaloReadoutConfig >::const_iterator const_iterator
virtual void makeTransient(const std::map< std::string, const CondAttrListCollection * > &)
virtual std::vector< std::string > coolInputKeys() const
const L1CaloReadoutConfig * readoutConfig(const L1CaloCoolChannelId &channelId) const
virtual std::string coolOutputKey() const
std::vector< L1CaloReadoutConfig > m_readoutConfigs
const L1CaloReadoutConfig * readoutConfig(unsigned int channelId) const
virtual DataObject * makePersistent() const
void addReadoutConfig(const L1CaloReadoutConfig &readoutConfig)
Folder <-> Object mapping for /TRIGGER/L1Calo/V2/Configuration/ReadoutConfig .