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

#include <L1CaloPprChanDefaultsV1Container.h>

Inheritance diagram for L1CaloPprChanDefaultsV1Container:
Collaboration diagram for L1CaloPprChanDefaultsV1Container:

Public Types

using const_iterator = std::vector< L1CaloPprChanDefaultsV1 >::const_iterator
 

Public Member Functions

 L1CaloPprChanDefaultsV1Container ()
 
 L1CaloPprChanDefaultsV1Container (const std::string &folderKey)
 
virtual ~L1CaloPprChanDefaultsV1Container ()
 
virtual void makeTransient (const std::map< std::string, const CondAttrListCollection * > &)
 
virtual DataObject * makePersistent () const
 
virtual std::vector< std::string > coolInputKeys () const
 
virtual std::string coolOutputKey () const
 
virtual void clear ()
 
const L1CaloPprChanDefaultsV1pprChanDefaultsV1 (unsigned int channelId) const
 
const L1CaloPprChanDefaultsV1pprChanDefaultsV1 (const L1CaloCoolChannelId &channelId) const
 
const_iterator begin () const
 
const_iterator end () const
 
void addPprChanDefaultsV1 (const L1CaloPprChanDefaultsV1 &pprChanDefaultsV1)
 
virtual void makeTransient (const std::map< std::string, const CondAttrListCollection * > &condAttrListCollectionMap)
 
virtual void makeTransient (const std::map< std::string, const AthenaAttributeList * > &condAttributeList)
 
virtual void makeTransient (const std::map< std::string, const AthenaAttributeList * > &condAttributeList)
 
std::string specificationName (int specId) const
 
std::string specificationType (int specId) const
 
void addSpecification (int specId, const std::string &specName, const std::string &specType)
 
coral::AttributeListSpecification * createAttributeListSpecification () const
 
virtual std::string conditionType () const
 

Private Types

enum  eAttrSpecification {
  eBcidDecision1, eSatOverride1, eBcidDecision2, eSatOverride2,
  eBcidDecision3, eSatOverride3, ePeakFinderCond, eDecisionSource
}
 
typedef std::map< int, std::string > AttrSpecificationMap
 

Private Attributes

std::vector< L1CaloPprChanDefaultsV1m_pprChanDefaultsV1s
 
std::string m_coolFolderKey = "/TRIGGER/L1Calo/V1/Configuration/PprChanDefaults"
 
AttrSpecificationMap m_attrSpecificationNameMap
 
AttrSpecificationMap m_attrSpecificationTypeMap
 
std::string m_strConditionType
 

Detailed Description

Definition at line 26 of file L1CaloPprChanDefaultsV1Container.h.

Member Typedef Documentation

◆ AttrSpecificationMap

typedef std::map<int, std::string> AbstractL1CaloPersistentCondition::AttrSpecificationMap
privateinherited

Definition at line 50 of file AbstractL1CaloPersistentCondition.h.

◆ const_iterator

Definition at line 53 of file L1CaloPprChanDefaultsV1Container.h.

Member Enumeration Documentation

◆ eAttrSpecification

Enumerator
eBcidDecision1 
eSatOverride1 
eBcidDecision2 
eSatOverride2 
eBcidDecision3 
eSatOverride3 
ePeakFinderCond 
eDecisionSource 

Definition at line 33 of file L1CaloPprChanDefaultsV1Container.h.

33 {}

Constructor & Destructor Documentation

◆ L1CaloPprChanDefaultsV1Container() [1/2]

L1CaloPprChanDefaultsV1Container::L1CaloPprChanDefaultsV1Container ( )

Definition at line 16 of file L1CaloPprChanDefaultsV1Container.cxx.

17  : AbstractL1CaloPersistentCondition("CondAttrListCollection")
18 {
19  this->addSpecification(eBcidDecision1, "CR12_BcidDecision1", "unsigned int");
20  this->addSpecification(eSatOverride1, "CR12_SatOverride1", "unsigned int");
21  this->addSpecification(eBcidDecision2, "CR13_BcidDecision2", "unsigned int");
22  this->addSpecification(eSatOverride2, "CR13_SatOverride2", "unsigned int");
23  this->addSpecification(eBcidDecision3, "CR14_BcidDecision3", "unsigned int");
24  this->addSpecification(eSatOverride3, "CR14_SatOverride3", "unsigned int");
25  this->addSpecification(ePeakFinderCond, "CR15_PeakFinderCond", "unsigned int");
26  this->addSpecification(eDecisionSource, "CR15_DecisionSource", "unsigned int");
27 }

◆ L1CaloPprChanDefaultsV1Container() [2/2]

L1CaloPprChanDefaultsV1Container::L1CaloPprChanDefaultsV1Container ( const std::string &  folderKey)

Definition at line 29 of file L1CaloPprChanDefaultsV1Container.cxx.

30  : L1CaloPprChanDefaultsV1Container() // delegating constructor
31 {
32  // cppcheck-suppress useInitializationList
33  m_coolFolderKey = folderKey;
34 }

◆ ~L1CaloPprChanDefaultsV1Container()

virtual L1CaloPprChanDefaultsV1Container::~L1CaloPprChanDefaultsV1Container ( )
inlinevirtual

Definition at line 37 of file L1CaloPprChanDefaultsV1Container.h.

Member Function Documentation

◆ addPprChanDefaultsV1()

void L1CaloPprChanDefaultsV1Container::addPprChanDefaultsV1 ( const L1CaloPprChanDefaultsV1 pprChanDefaultsV1)

Definition at line 100 of file L1CaloPprChanDefaultsV1Container.cxx.

101 {
102  // insert into the correct position mainting the sorted vector
103  m_pprChanDefaultsV1s.insert(std::lower_bound(std::begin(m_pprChanDefaultsV1s),
106  [](const L1CaloPprChanDefaultsV1& el, unsigned int va) -> bool {
107  return el.channelId() < va;
108  }),
110 }

◆ addSpecification()

void AbstractL1CaloPersistentCondition::addSpecification ( int  specId,
const std::string &  specName,
const std::string &  specType 
)
inherited

Definition at line 26 of file AbstractL1CaloPersistentCondition.cxx.

26  {
27  m_attrSpecificationNameMap[specId] = specName;
28  m_attrSpecificationTypeMap[specId] = specType;
29 }

◆ begin()

const_iterator L1CaloPprChanDefaultsV1Container::begin ( ) const

◆ clear()

virtual void L1CaloPprChanDefaultsV1Container::clear ( )
inlinevirtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 45 of file L1CaloPprChanDefaultsV1Container.h.

45 {

◆ conditionType()

virtual std::string AbstractL1CaloPersistentCondition::conditionType ( ) const
inlinevirtualinherited

Implements IL1CaloPersistenceCapable.

Definition at line 37 of file AbstractL1CaloPersistentCondition.h.

37 { return m_strConditionType; };

◆ coolInputKeys()

virtual std::vector<std::string> L1CaloPprChanDefaultsV1Container::coolInputKeys ( ) const
inlinevirtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 43 of file L1CaloPprChanDefaultsV1Container.h.

45 {

◆ coolOutputKey()

virtual std::string L1CaloPprChanDefaultsV1Container::coolOutputKey ( ) const
inlinevirtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 44 of file L1CaloPprChanDefaultsV1Container.h.

45 {

◆ createAttributeListSpecification()

coral::AttributeListSpecification * AbstractL1CaloPersistentCondition::createAttributeListSpecification ( ) const
inherited

Definition at line 31 of file AbstractL1CaloPersistentCondition.cxx.

31  {
32 
33  coral::AttributeListSpecification* attrSpecification = new coral::AttributeListSpecification();
34 
35  AttrSpecificationMap::const_iterator it_name = m_attrSpecificationNameMap.begin();
36  AttrSpecificationMap::const_iterator it_type = m_attrSpecificationTypeMap.begin();
37 
38  for(;it_name!=m_attrSpecificationNameMap.end();++it_name,++it_type) {
39  attrSpecification->extend(it_name->second, it_type->second);
40  }
41  return attrSpecification;
42 }

◆ end()

const_iterator L1CaloPprChanDefaultsV1Container::end ( ) const

◆ makePersistent()

DataObject * L1CaloPprChanDefaultsV1Container::makePersistent ( ) const
virtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 37 of file L1CaloPprChanDefaultsV1Container.cxx.

38 {
39  using std::make_unique;
40 
41  if(m_coolFolderKey.empty()) return nullptr;
42 
43  auto* attrSpecification = this->createAttributeListSpecification();
44  if(!attrSpecification || !attrSpecification->size()) return nullptr;
45 
46  auto attrListCollection = make_unique<CondAttrListCollection>(true);
47  for(const auto& item : m_pprChanDefaultsV1s) {
48  AthenaAttributeList attrList(*attrSpecification);
49  attrList[specificationName(eBcidDecision1)].setValue(item.bcidDecision1());
50  attrList[specificationName(eSatOverride1)].setValue(item.satOverride1());
51  attrList[specificationName(eBcidDecision2)].setValue(item.bcidDecision2());
52  attrList[specificationName(eSatOverride2)].setValue(item.satOverride2());
53  attrList[specificationName(eBcidDecision3)].setValue(item.bcidDecision3());
54  attrList[specificationName(eSatOverride3)].setValue(item.satOverride3());
55  attrList[specificationName(ePeakFinderCond)].setValue(item.peakFinderCond());
56  attrList[specificationName(eDecisionSource)].setValue(item.decisionSource());
57 
58  attrListCollection->add(item.channelId(), attrList);
59  }
60  return static_cast<DataObject*>(attrListCollection.release());
61 }

◆ makeTransient() [1/4]

void AbstractL1CaloPersistentCondition::makeTransient ( const std::map< std::string, const AthenaAttributeList * > &  condAttributeList)
virtualinherited

Implements IL1CaloPersistenceCapable.

Definition at line 21 of file AbstractL1CaloPersistentCondition.cxx.

21  {
22  std::cout << "ERROR - The makeTransient(const map<std::string, const AthenaAttributeList*>) method you are calling is not implemented by the current class !" << std::endl;
23  return;
24 }

◆ makeTransient() [2/4]

void AbstractL1CaloPersistentCondition::makeTransient

Definition at line 30 of file AbstractL1CaloPersistentCondition.cxx.

21  {
22  std::cout << "ERROR - The makeTransient(const map<std::string, const AthenaAttributeList*>) method you are calling is not implemented by the current class !" << std::endl;
23  return;
24 }

◆ makeTransient() [3/4]

void L1CaloPprChanDefaultsV1Container::makeTransient ( const std::map< std::string, const CondAttrListCollection * > &  condAttrListCollectionMap)
virtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 63 of file L1CaloPprChanDefaultsV1Container.cxx.

64 {
65  clear();
66 
67  auto it = condAttrListCollectionMap.find(m_coolFolderKey);
68  if(it == std::end(condAttrListCollectionMap)) return;
69 
70  auto attrListCollection = it->second;
71  for(const auto& item : *attrListCollection) {
72  auto chanNum = item.first;
73  const auto& attrList = item.second;
74 
75  auto BcidDecision1 = attrList[specificationName(eBcidDecision1)].data<unsigned int>();
76  auto SatOverride1 = attrList[specificationName(eSatOverride1)].data<unsigned int>();
77  auto BcidDecision2 = attrList[specificationName(eBcidDecision2)].data<unsigned int>();
78  auto SatOverride2 = attrList[specificationName(eSatOverride2)].data<unsigned int>();
79  auto BcidDecision3 = attrList[specificationName(eBcidDecision3)].data<unsigned int>();
80  auto SatOverride3 = attrList[specificationName(eSatOverride3)].data<unsigned int>();
81  auto PeakFinderCond = attrList[specificationName(ePeakFinderCond)].data<unsigned int>();
82  auto DecisionSource = attrList[specificationName(eDecisionSource)].data<unsigned int>();
83 
84  addPprChanDefaultsV1(L1CaloPprChanDefaultsV1(chanNum, BcidDecision1, SatOverride1, BcidDecision2, SatOverride2, BcidDecision3, SatOverride3, PeakFinderCond, DecisionSource));
85  }
86 }

◆ makeTransient() [4/4]

void AbstractL1CaloPersistentCondition::makeTransient

Definition at line 29 of file AbstractL1CaloPersistentCondition.cxx.

16  {
17  std::cout << "ERROR - The makeTransient(const map<std::string, const CondAttrListCollection*>) method you are calling is not implemented by the current class !" << std::endl;
18  return;
19 }

◆ pprChanDefaultsV1() [1/2]

const L1CaloPprChanDefaultsV1* L1CaloPprChanDefaultsV1Container::pprChanDefaultsV1 ( const L1CaloCoolChannelId channelId) const
inline

Definition at line 49 of file L1CaloPprChanDefaultsV1Container.h.

56  :
57  std::vector<L1CaloPprChanDefaultsV1> m_pprChanDefaultsV1s;

◆ pprChanDefaultsV1() [2/2]

const L1CaloPprChanDefaultsV1 * L1CaloPprChanDefaultsV1Container::pprChanDefaultsV1 ( unsigned int  channelId) const

Definition at line 88 of file L1CaloPprChanDefaultsV1Container.cxx.

89 {
90  auto it = std::lower_bound(std::begin(m_pprChanDefaultsV1s),
92  channelId,
93  [](const L1CaloPprChanDefaultsV1& el, unsigned int val) -> bool {
94  return el.channelId() < val;
95  });
96  if(it == std::end(m_pprChanDefaultsV1s)) return nullptr;
97  return &(*it);
98 }

◆ specificationName()

std::string AbstractL1CaloPersistentCondition::specificationName ( int  specId) const
inherited

Definition at line 44 of file AbstractL1CaloPersistentCondition.cxx.

44  {
45  return m_attrSpecificationNameMap.find(specId)->second;
46 }

◆ specificationType()

std::string AbstractL1CaloPersistentCondition::specificationType ( int  specId) const
inherited

Definition at line 48 of file AbstractL1CaloPersistentCondition.cxx.

48  {
49  return m_attrSpecificationTypeMap.find(specId)->second;
50 }

Member Data Documentation

◆ m_attrSpecificationNameMap

AttrSpecificationMap AbstractL1CaloPersistentCondition::m_attrSpecificationNameMap
privateinherited

Definition at line 51 of file AbstractL1CaloPersistentCondition.h.

◆ m_attrSpecificationTypeMap

AttrSpecificationMap AbstractL1CaloPersistentCondition::m_attrSpecificationTypeMap
privateinherited

Definition at line 52 of file AbstractL1CaloPersistentCondition.h.

◆ m_coolFolderKey

std::string L1CaloPprChanDefaultsV1Container::m_coolFolderKey = "/TRIGGER/L1Calo/V1/Configuration/PprChanDefaults"
private

Definition at line 62 of file L1CaloPprChanDefaultsV1Container.h.

◆ m_pprChanDefaultsV1s

std::vector<L1CaloPprChanDefaultsV1> L1CaloPprChanDefaultsV1Container::m_pprChanDefaultsV1s
private

Definition at line 61 of file L1CaloPprChanDefaultsV1Container.h.

◆ m_strConditionType

std::string AbstractL1CaloPersistentCondition::m_strConditionType
privateinherited

Definition at line 53 of file AbstractL1CaloPersistentCondition.h.


The documentation for this class was generated from the following files:
AbstractL1CaloPersistentCondition::m_attrSpecificationTypeMap
AttrSpecificationMap m_attrSpecificationTypeMap
Definition: AbstractL1CaloPersistentCondition.h:52
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
L1CaloPprChanDefaultsV1Container::clear
virtual void clear()
Definition: L1CaloPprChanDefaultsV1Container.h:45
L1CaloPprChanDefaultsV1Container::eSatOverride1
@ eSatOverride1
Definition: L1CaloPprChanDefaultsV1Container.h:37
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:396
AbstractL1CaloPersistentCondition::addSpecification
void addSpecification(int specId, const std::string &specName, const std::string &specType)
Definition: AbstractL1CaloPersistentCondition.cxx:26
L1CaloPprChanDefaultsV1Container::m_pprChanDefaultsV1s
std::vector< L1CaloPprChanDefaultsV1 > m_pprChanDefaultsV1s
Definition: L1CaloPprChanDefaultsV1Container.h:61
L1CaloPprChanDefaultsV1Container::pprChanDefaultsV1
const L1CaloPprChanDefaultsV1 * pprChanDefaultsV1(unsigned int channelId) const
Definition: L1CaloPprChanDefaultsV1Container.cxx:88
AbstractL1CaloPersistentCondition::createAttributeListSpecification
coral::AttributeListSpecification * createAttributeListSpecification() const
Definition: AbstractL1CaloPersistentCondition.cxx:31
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
L1CaloPprChanDefaultsV1Container::eSatOverride3
@ eSatOverride3
Definition: L1CaloPprChanDefaultsV1Container.h:37
L1CaloPprChanDefaultsV1Container::eBcidDecision1
@ eBcidDecision1
Definition: L1CaloPprChanDefaultsV1Container.h:37
L1CaloPprChanDefaultsV1Container::eBcidDecision3
@ eBcidDecision3
Definition: L1CaloPprChanDefaultsV1Container.h:37
checkCoolLatestUpdate.chanNum
chanNum
Definition: checkCoolLatestUpdate.py:27
L1CaloPprChanDefaultsV1Container::m_coolFolderKey
std::string m_coolFolderKey
Definition: L1CaloPprChanDefaultsV1Container.h:62
AbstractL1CaloPersistentCondition::AbstractL1CaloPersistentCondition
AbstractL1CaloPersistentCondition(const std::string &condType)
Definition: AbstractL1CaloPersistentCondition.h:45
AbstractL1CaloPersistentCondition::m_attrSpecificationNameMap
AttrSpecificationMap m_attrSpecificationNameMap
Definition: AbstractL1CaloPersistentCondition.h:51
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
L1CaloPprChanDefaultsV1
Folder <-> Object mapping for /TRIGGER/L1Calo/V1/Configuration/PprChanDefaults .
Definition: L1CaloPprChanDefaultsV1.h:17
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
L1CaloPprChanDefaultsV1Container::ePeakFinderCond
@ ePeakFinderCond
Definition: L1CaloPprChanDefaultsV1Container.h:37
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
L1CaloPprChanDefaultsV1Container::eBcidDecision2
@ eBcidDecision2
Definition: L1CaloPprChanDefaultsV1Container.h:37
item
Definition: ItemListSvc.h:43
AbstractL1CaloPersistentCondition::specificationName
std::string specificationName(int specId) const
Definition: AbstractL1CaloPersistentCondition.cxx:44
L1CaloPprChanDefaultsV1Container::addPprChanDefaultsV1
void addPprChanDefaultsV1(const L1CaloPprChanDefaultsV1 &pprChanDefaultsV1)
Definition: L1CaloPprChanDefaultsV1Container.cxx:100
L1CaloPprChanDefaultsV1Container::eDecisionSource
@ eDecisionSource
Definition: L1CaloPprChanDefaultsV1Container.h:37
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
AbstractL1CaloPersistentCondition::m_strConditionType
std::string m_strConditionType
Definition: AbstractL1CaloPersistentCondition.h:53
L1CaloPprChanDefaultsV1Container::L1CaloPprChanDefaultsV1Container
L1CaloPprChanDefaultsV1Container()
Definition: L1CaloPprChanDefaultsV1Container.cxx:16
L1CaloPprChanDefaultsV1Container::eSatOverride2
@ eSatOverride2
Definition: L1CaloPprChanDefaultsV1Container.h:37
L1CaloPprChanDefaultsV1::channelId
unsigned int channelId() const
Definition: L1CaloPprChanDefaultsV1.h:22