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

#include <L1CaloPprChanExtraContainer.h>

Inheritance diagram for L1CaloPprChanExtraContainer:
Collaboration diagram for L1CaloPprChanExtraContainer:

Public Types

using iterator = std::vector< L1CaloPprChanExtra >::iterator
 
using const_iterator = std::vector< L1CaloPprChanExtra >::const_iterator
 

Public Member Functions

 L1CaloPprChanExtraContainer ()
 
 L1CaloPprChanExtraContainer (const std::string &folderKey)
 
virtual ~L1CaloPprChanExtraContainer ()
 
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 L1CaloPprChanExtrapprChanExtra (unsigned int channelId) const
 
const L1CaloPprChanExtrapprChanExtra (const L1CaloCoolChannelId &channelId) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
void addPprChanExtra (const L1CaloPprChanExtra &pprChanExtra)
 
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 {
  eChannelId, eErrorCode, ePedCorrEnable, eSat80BcidThreshHigh,
  eSat80BcidThreshLow, eThreshNumSamplesPeak, eThreshNumSamplesSat, eSatOverride1,
  eSatOverride2, eSatOverride3, eLutCpPar5, eLutCpPar6,
  eLutCpPar7, eLutJepPar5, eLutJepPar6, eLutJepPar7
}
 
typedef std::map< int, std::string > AttrSpecificationMap
 

Private Attributes

std::vector< L1CaloPprChanExtram_pprChanExtras
 
std::string m_coolFolderKey = "/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanExtra"
 
AttrSpecificationMap m_attrSpecificationNameMap
 
AttrSpecificationMap m_attrSpecificationTypeMap
 
std::string m_strConditionType
 

Detailed Description

Definition at line 26 of file L1CaloPprChanExtraContainer.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 56 of file L1CaloPprChanExtraContainer.h.

◆ iterator

Definition at line 53 of file L1CaloPprChanExtraContainer.h.

Member Enumeration Documentation

◆ eAttrSpecification

Enumerator
eChannelId 
eErrorCode 
ePedCorrEnable 
eSat80BcidThreshHigh 
eSat80BcidThreshLow 
eThreshNumSamplesPeak 
eThreshNumSamplesSat 
eSatOverride1 
eSatOverride2 
eSatOverride3 
eLutCpPar5 
eLutCpPar6 
eLutCpPar7 
eLutJepPar5 
eLutJepPar6 
eLutJepPar7 

Definition at line 33 of file L1CaloPprChanExtraContainer.h.

33 {}

Constructor & Destructor Documentation

◆ L1CaloPprChanExtraContainer() [1/2]

L1CaloPprChanExtraContainer::L1CaloPprChanExtraContainer ( )

Definition at line 16 of file L1CaloPprChanExtraContainer.cxx.

17  : AbstractL1CaloPersistentCondition("CondAttrListCollection")
18 {
19  this->addSpecification(eErrorCode, "ErrorCode", "unsigned int");
20  this->addSpecification(ePedCorrEnable, "PedCorrEnable", "unsigned short");
21  this->addSpecification(eSat80BcidThreshHigh, "Sat80BcidThreshHigh", "unsigned short");
22  this->addSpecification(eSat80BcidThreshLow, "Sat80BcidThreshLow", "unsigned short");
23  this->addSpecification(eThreshNumSamplesPeak, "ThreshNumSamplesPeak", "unsigned short");
24  this->addSpecification(eThreshNumSamplesSat, "ThreshNumSamplesSat", "unsigned short");
25  this->addSpecification(eSatOverride1, "SatOverride1", "unsigned short");
26  this->addSpecification(eSatOverride2, "SatOverride2", "unsigned short");
27  this->addSpecification(eSatOverride3, "SatOverride3", "unsigned short");
28  this->addSpecification(eLutCpPar5, "LutCpPar5", "short");
29  this->addSpecification(eLutCpPar6, "LutCpPar6", "short");
30  this->addSpecification(eLutCpPar7, "LutCpPar7", "short");
31  this->addSpecification(eLutJepPar5, "LutJepPar5", "short");
32  this->addSpecification(eLutJepPar6, "LutJepPar6", "short");
33  this->addSpecification(eLutJepPar7, "LutJepPar7", "short");
34 }

◆ L1CaloPprChanExtraContainer() [2/2]

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

Definition at line 36 of file L1CaloPprChanExtraContainer.cxx.

38 {
39  // cppcheck-suppress useInitializationList
40  m_coolFolderKey = folderKey;
41 }

◆ ~L1CaloPprChanExtraContainer()

virtual L1CaloPprChanExtraContainer::~L1CaloPprChanExtraContainer ( )
inlinevirtual

Definition at line 37 of file L1CaloPprChanExtraContainer.h.

Member Function Documentation

◆ addPprChanExtra()

void L1CaloPprChanExtraContainer::addPprChanExtra ( const L1CaloPprChanExtra pprChanExtra)

Definition at line 121 of file L1CaloPprChanExtraContainer.cxx.

122 {
123  // insert into the correct position mainting the sorted vector
124  m_pprChanExtras.insert(std::lower_bound(std::begin(m_pprChanExtras),
127  [](const L1CaloPprChanExtra& el, unsigned int va) -> bool {
128  return el.channelId() < va;
129  }),
130  pprChanExtra);
131 }

◆ 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() [1/2]

iterator L1CaloPprChanExtraContainer::begin ( )
inline

Definition at line 54 of file L1CaloPprChanExtraContainer.h.

54 { return m_pprChanExtras.end(); }

◆ begin() [2/2]

const_iterator L1CaloPprChanExtraContainer::begin ( ) const
inline

Definition at line 57 of file L1CaloPprChanExtraContainer.h.

59 :
60  std::vector<L1CaloPprChanExtra> m_pprChanExtras;

◆ clear()

virtual void L1CaloPprChanExtraContainer::clear ( )
inlinevirtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 45 of file L1CaloPprChanExtraContainer.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> L1CaloPprChanExtraContainer::coolInputKeys ( ) const
inlinevirtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 43 of file L1CaloPprChanExtraContainer.h.

45 {

◆ coolOutputKey()

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

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 44 of file L1CaloPprChanExtraContainer.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() [1/2]

iterator L1CaloPprChanExtraContainer::end ( )
inline

Definition at line 55 of file L1CaloPprChanExtraContainer.h.

59 :
60  std::vector<L1CaloPprChanExtra> m_pprChanExtras;

◆ end() [2/2]

const_iterator L1CaloPprChanExtraContainer::end ( ) const
inline

Definition at line 58 of file L1CaloPprChanExtraContainer.h.

59 :
60  std::vector<L1CaloPprChanExtra> m_pprChanExtras;

◆ makePersistent()

DataObject * L1CaloPprChanExtraContainer::makePersistent ( ) const
virtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 44 of file L1CaloPprChanExtraContainer.cxx.

45 {
46  using std::make_unique;
47 
48  if(m_coolFolderKey.empty()) return nullptr;
49 
50  auto* attrSpecification = this->createAttributeListSpecification();
51  if(!attrSpecification || !attrSpecification->size()) return nullptr;
52 
53  auto attrListCollection = make_unique<CondAttrListCollection>(true);
54  for(const auto& item : m_pprChanExtras) {
55  AthenaAttributeList attrList(*attrSpecification);
56  attrList[specificationName(eErrorCode)].setValue(item.errorCode());
57  attrList[specificationName(ePedCorrEnable)].setValue(item.pedCorrEnable());
58  attrList[specificationName(eSat80BcidThreshHigh)].setValue(item.sat80BcidThreshHigh());
59  attrList[specificationName(eSat80BcidThreshLow)].setValue(item.sat80BcidThreshLow());
60  attrList[specificationName(eThreshNumSamplesPeak)].setValue(item.threshNumSamplesPeak());
61  attrList[specificationName(eThreshNumSamplesSat)].setValue(item.threshNumSamplesSat());
62  attrList[specificationName(eSatOverride1)].setValue(item.satOverride1());
63  attrList[specificationName(eSatOverride2)].setValue(item.satOverride2());
64  attrList[specificationName(eSatOverride3)].setValue(item.satOverride3());
65  attrList[specificationName(eLutCpPar5)].setValue(item.lutCpPar5());
66  attrList[specificationName(eLutCpPar6)].setValue(item.lutCpPar6());
67  attrList[specificationName(eLutCpPar7)].setValue(item.lutCpPar7());
68  attrList[specificationName(eLutJepPar5)].setValue(item.lutJepPar5());
69  attrList[specificationName(eLutJepPar6)].setValue(item.lutJepPar6());
70  attrList[specificationName(eLutJepPar7)].setValue(item.lutJepPar7());
71 
72  attrListCollection->add(item.channelId(), attrList);
73  }
74  return static_cast<DataObject*>(attrListCollection.release());
75 }

◆ 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 L1CaloPprChanExtraContainer::makeTransient ( const std::map< std::string, const CondAttrListCollection * > &  condAttrListCollectionMap)
virtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 77 of file L1CaloPprChanExtraContainer.cxx.

78 {
79  clear();
80 
81  auto it = condAttrListCollectionMap.find(m_coolFolderKey);
82  if(it == std::end(condAttrListCollectionMap)) return;
83 
84  auto attrListCollection = it->second;
85  for(const auto& item : *attrListCollection) {
86  auto chanNum = item.first;
87  const auto& attrList = item.second;
88 
89  auto errorCode = attrList[specificationName(eErrorCode)].data<unsigned int>();
90  auto pedCorrEnable = attrList[specificationName(ePedCorrEnable)].data<unsigned short>();
91  auto sat80BcidThreshHigh = attrList[specificationName(eSat80BcidThreshHigh)].data<unsigned short>();
92  auto sat80BcidThreshLow = attrList[specificationName(eSat80BcidThreshLow)].data<unsigned short>();
93  auto threshNumSamplesPeak = attrList[specificationName(eThreshNumSamplesPeak)].data<unsigned short>();
94  auto threshNumSamplesSat = attrList[specificationName(eThreshNumSamplesSat)].data<unsigned short>();
95  auto satOverride1 = attrList[specificationName(eSatOverride1)].data<unsigned short>();
96  auto satOverride2 = attrList[specificationName(eSatOverride1)].data<unsigned short>();
97  auto satOverride3 = attrList[specificationName(eSatOverride1)].data<unsigned short>();
98  auto lutCpPar5 = attrList[specificationName(eLutCpPar5)].data<short>();
99  auto lutCpPar6 = attrList[specificationName(eLutCpPar6)].data<short>();
100  auto lutCpPar7 = attrList[specificationName(eLutCpPar7)].data<short>();
101  auto lutJepPar5 = attrList[specificationName(eLutJepPar5)].data<short>();
102  auto lutJepPar6 = attrList[specificationName(eLutJepPar6)].data<short>();
103  auto lutJepPar7 = attrList[specificationName(eLutJepPar7)].data<short>();
104 
105  addPprChanExtra(L1CaloPprChanExtra(chanNum, errorCode, pedCorrEnable, sat80BcidThreshHigh, sat80BcidThreshLow, threshNumSamplesPeak, threshNumSamplesSat, satOverride1, satOverride2, satOverride3, lutCpPar5, lutCpPar6, lutCpPar7, lutJepPar5, lutJepPar6, lutJepPar7));
106  }
107 }

◆ 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 }

◆ pprChanExtra() [1/2]

const L1CaloPprChanExtra* L1CaloPprChanExtraContainer::pprChanExtra ( const L1CaloCoolChannelId channelId) const
inline

Definition at line 49 of file L1CaloPprChanExtraContainer.h.

50  { return m_pprChanExtras.begin(); }
51  iterator end() { return m_pprChanExtras.end(); }

◆ pprChanExtra() [2/2]

const L1CaloPprChanExtra * L1CaloPprChanExtraContainer::pprChanExtra ( unsigned int  channelId) const

Definition at line 109 of file L1CaloPprChanExtraContainer.cxx.

110 {
111  auto it = std::lower_bound(std::begin(m_pprChanExtras),
113  channelId,
114  [](const L1CaloPprChanExtra& el, unsigned int val) -> bool {
115  return el.channelId() < val;
116  });
117  if(it == std::end(m_pprChanExtras)) return nullptr;
118  return &(*it);
119 }

◆ 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 L1CaloPprChanExtraContainer::m_coolFolderKey = "/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanExtra"
private

Definition at line 65 of file L1CaloPprChanExtraContainer.h.

◆ m_pprChanExtras

std::vector<L1CaloPprChanExtra> L1CaloPprChanExtraContainer::m_pprChanExtras
private

Definition at line 64 of file L1CaloPprChanExtraContainer.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:
L1CaloPprChanExtraContainer::iterator
std::vector< L1CaloPprChanExtra >::iterator iterator
Definition: L1CaloPprChanExtraContainer.h:53
L1CaloPprChanExtraContainer::eSatOverride2
@ eSatOverride2
Definition: L1CaloPprChanExtraContainer.h:37
L1CaloPprChanExtraContainer::eLutJepPar5
@ eLutJepPar5
Definition: L1CaloPprChanExtraContainer.h:37
AbstractL1CaloPersistentCondition::m_attrSpecificationTypeMap
AttrSpecificationMap m_attrSpecificationTypeMap
Definition: AbstractL1CaloPersistentCondition.h:52
L1CaloPprChanExtraContainer::clear
virtual void clear()
Definition: L1CaloPprChanExtraContainer.h:45
L1CaloPprChanExtraContainer::eLutCpPar7
@ eLutCpPar7
Definition: L1CaloPprChanExtraContainer.h:37
L1CaloPprChanExtraContainer::eThreshNumSamplesPeak
@ eThreshNumSamplesPeak
Definition: L1CaloPprChanExtraContainer.h:37
L1CaloPprChanExtraContainer::m_pprChanExtras
std::vector< L1CaloPprChanExtra > m_pprChanExtras
Definition: L1CaloPprChanExtraContainer.h:64
L1CaloPprChanExtraContainer::eErrorCode
@ eErrorCode
Definition: L1CaloPprChanExtraContainer.h:37
L1CaloPprChanExtraContainer::eLutJepPar7
@ eLutJepPar7
Definition: L1CaloPprChanExtraContainer.h:37
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
L1CaloPprChanExtraContainer::addPprChanExtra
void addPprChanExtra(const L1CaloPprChanExtra &pprChanExtra)
Definition: L1CaloPprChanExtraContainer.cxx:121
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
L1CaloPprChanExtra
Folder <-> Object mapping for /TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCalib .
Definition: L1CaloPprChanExtra.h:17
L1CaloPprChanExtraContainer::eSatOverride1
@ eSatOverride1
Definition: L1CaloPprChanExtraContainer.h:37
L1CaloPprChanExtraContainer::end
iterator end()
Definition: L1CaloPprChanExtraContainer.h:55
L1CaloPprChanExtraContainer::ePedCorrEnable
@ ePedCorrEnable
Definition: L1CaloPprChanExtraContainer.h:37
L1CaloPprChanExtraContainer::m_coolFolderKey
std::string m_coolFolderKey
Definition: L1CaloPprChanExtraContainer.h:65
AbstractL1CaloPersistentCondition::createAttributeListSpecification
coral::AttributeListSpecification * createAttributeListSpecification() const
Definition: AbstractL1CaloPersistentCondition.cxx:31
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
L1CaloPprChanExtraContainer::eLutCpPar6
@ eLutCpPar6
Definition: L1CaloPprChanExtraContainer.h:37
checkCoolLatestUpdate.chanNum
chanNum
Definition: checkCoolLatestUpdate.py:27
AbstractL1CaloPersistentCondition::AbstractL1CaloPersistentCondition
AbstractL1CaloPersistentCondition(const std::string &condType)
Definition: AbstractL1CaloPersistentCondition.h:45
L1CaloPprChanExtra::channelId
unsigned int channelId() const
Definition: L1CaloPprChanExtra.h:22
AbstractL1CaloPersistentCondition::m_attrSpecificationNameMap
AttrSpecificationMap m_attrSpecificationNameMap
Definition: AbstractL1CaloPersistentCondition.h:51
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
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
L1CaloPprChanExtraContainer::eSat80BcidThreshLow
@ eSat80BcidThreshLow
Definition: L1CaloPprChanExtraContainer.h:37
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
L1CaloPprChanExtraContainer::eSatOverride3
@ eSatOverride3
Definition: L1CaloPprChanExtraContainer.h:37
item
Definition: ItemListSvc.h:43
AbstractL1CaloPersistentCondition::specificationName
std::string specificationName(int specId) const
Definition: AbstractL1CaloPersistentCondition.cxx:44
L1CaloPprChanExtraContainer::pprChanExtra
const L1CaloPprChanExtra * pprChanExtra(unsigned int channelId) const
Definition: L1CaloPprChanExtraContainer.cxx:109
L1CaloPprChanExtraContainer::eSat80BcidThreshHigh
@ eSat80BcidThreshHigh
Definition: L1CaloPprChanExtraContainer.h:37
L1CaloPprChanExtraContainer::L1CaloPprChanExtraContainer
L1CaloPprChanExtraContainer()
Definition: L1CaloPprChanExtraContainer.cxx:16
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
L1CaloPprChanExtraContainer::eLutCpPar5
@ eLutCpPar5
Definition: L1CaloPprChanExtraContainer.h:37
AbstractL1CaloPersistentCondition::m_strConditionType
std::string m_strConditionType
Definition: AbstractL1CaloPersistentCondition.h:53
L1CaloPprChanExtraContainer::eLutJepPar6
@ eLutJepPar6
Definition: L1CaloPprChanExtraContainer.h:37
L1CaloPprChanExtraContainer::eThreshNumSamplesSat
@ eThreshNumSamplesSat
Definition: L1CaloPprChanExtraContainer.h:37