ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloEnergyScanRunInfoContainer Class Reference

Container of L1CaloEnergyScanRunInfo metadata, inherit from the abstract base class AbstractL1CaloConditionContainer. More...

#include <L1CaloEnergyScanRunInfoContainer.h>

Inheritance diagram for L1CaloEnergyScanRunInfoContainer:
Collaboration diagram for L1CaloEnergyScanRunInfoContainer:

Public Types

enum  eCoolFolders { eEnergyScanRunInfo }

Public Member Functions

 L1CaloEnergyScanRunInfoContainer ()
 L1CaloEnergyScanRunInfoContainer (const std::map< L1CaloEnergyScanRunInfoContainer::eCoolFolders, std::string > &folderKeysMap)
virtual ~L1CaloEnergyScanRunInfoContainer ()
virtual DataObject * makePersistent () const
virtual void makeTransient (const std::map< std::string, AthenaAttributeList * > &athenaAttributeListMap)
unsigned int runNumber () const
const std::string & gainStrategy () const
void setRunNumber (unsigned int run)
void setGainStrategy (const std::string &strategy)
virtual std::vector< std::string > coolInputKeys () const
virtual std::string coolOutputKey () const
virtual void makeTransient (const std::map< std::string, const CondAttrListCollection * > &condAttrListCollectionMap)
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
virtual void clear ()

Private Types

enum  eAttrSpecification { eRunNumber , eGainStrategy }
typedef std::map< int, std::string > AttrSpecificationMap

Private Member Functions

std::string coolFolderKey (L1CaloEnergyScanRunInfoContainer::eCoolFolders efolder) const

Private Attributes

std::map< L1CaloEnergyScanRunInfoContainer::eCoolFolders, std::string > m_mCoolFoldersKeysMap
unsigned int m_runNumber
std::string m_gainStrategy
AttrSpecificationMap m_attrSpecificationNameMap
AttrSpecificationMap m_attrSpecificationTypeMap
std::string m_strConditionType

Detailed Description

Container of L1CaloEnergyScanRunInfo metadata, inherit from the abstract base class AbstractL1CaloConditionContainer.

Implement the IL1CaloPersistenceCapable interface.

Copied from L1CaloPprLutContainer and modified.

Definition at line 26 of file L1CaloEnergyScanRunInfoContainer.h.

Member Typedef Documentation

◆ AttrSpecificationMap

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

Definition at line 50 of file AbstractL1CaloPersistentCondition.h.

Member Enumeration Documentation

◆ eAttrSpecification

◆ eCoolFolders

Constructor & Destructor Documentation

◆ L1CaloEnergyScanRunInfoContainer() [1/2]

L1CaloEnergyScanRunInfoContainer::L1CaloEnergyScanRunInfoContainer ( )

Definition at line 13 of file L1CaloEnergyScanRunInfoContainer.cxx.

13 :
14 AbstractL1CaloPersistentCondition("AthenaAttributeList"),
15 m_runNumber(0),
17{
18 // Define DB rows names and types in order to construct the AttributeListSpecification object
19 this->addSpecification(eRunNumber, std::string("RunNumber"), std::string("unsigned int"));
20 this->addSpecification(eGainStrategy,std::string("GainStrategy"),std::string("string"));
21
22 m_mCoolFoldersKeysMap[L1CaloEnergyScanRunInfoContainer::eEnergyScanRunInfo] = std::string("/TRIGGER/L1Calo/V1/Results/EnergyScanRunInfo");
23}
AbstractL1CaloPersistentCondition(const std::string &condType)
void addSpecification(int specId, const std::string &specName, const std::string &specType)
std::map< L1CaloEnergyScanRunInfoContainer::eCoolFolders, std::string > m_mCoolFoldersKeysMap

◆ L1CaloEnergyScanRunInfoContainer() [2/2]

L1CaloEnergyScanRunInfoContainer::L1CaloEnergyScanRunInfoContainer ( const std::map< L1CaloEnergyScanRunInfoContainer::eCoolFolders, std::string > & folderKeysMap)

Definition at line 25 of file L1CaloEnergyScanRunInfoContainer.cxx.

25 :
26 AbstractL1CaloPersistentCondition("AthenaAttributeList"),
27 m_mCoolFoldersKeysMap(folderKeysMap),
28 m_runNumber(0),
30{
31 // Define DB rows names and types in order to construct the AttributeListSpecification object
32 this->addSpecification(eRunNumber, std::string("RunNumber"), std::string("unsigned int"));
33 this->addSpecification(eGainStrategy,std::string("GainStrategy"),std::string("string"));
34}

◆ ~L1CaloEnergyScanRunInfoContainer()

virtual L1CaloEnergyScanRunInfoContainer::~L1CaloEnergyScanRunInfoContainer ( )
inlinevirtual

Definition at line 38 of file L1CaloEnergyScanRunInfoContainer.h.

38{};

Member Function Documentation

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

◆ clear()

◆ conditionType()

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

◆ coolFolderKey()

std::string L1CaloEnergyScanRunInfoContainer::coolFolderKey ( L1CaloEnergyScanRunInfoContainer::eCoolFolders efolder) const
private

Definition at line 36 of file L1CaloEnergyScanRunInfoContainer.cxx.

36 {
37
38 std::map<L1CaloEnergyScanRunInfoContainer::eCoolFolders, std::string>::const_iterator it = m_mCoolFoldersKeysMap.find(efolder);
39 if(it!=m_mCoolFoldersKeysMap.end()) {
40 return it->second;
41 } else {
42 return std::string("");
43 }
44}

◆ coolInputKeys()

std::vector< std::string > L1CaloEnergyScanRunInfoContainer::coolInputKeys ( ) const
virtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 46 of file L1CaloEnergyScanRunInfoContainer.cxx.

46 {
47 std::vector<std::string> v;
49 return v;
50}
std::string coolFolderKey(L1CaloEnergyScanRunInfoContainer::eCoolFolders efolder) const

◆ coolOutputKey()

std::string L1CaloEnergyScanRunInfoContainer::coolOutputKey ( ) const
virtual

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

◆ gainStrategy()

const std::string & L1CaloEnergyScanRunInfoContainer::gainStrategy ( ) const
inline

Definition at line 49 of file L1CaloEnergyScanRunInfoContainer.h.

49{ return m_gainStrategy; }

◆ makePersistent()

DataObject * L1CaloEnergyScanRunInfoContainer::makePersistent ( ) const
virtual

Reimplemented from AbstractL1CaloPersistentCondition.

Definition at line 56 of file L1CaloEnergyScanRunInfoContainer.cxx.

56 {
57
58 // Create AttributeListSpecification according to the attributes to be recorded
59 // this is required to create the AttributeList objs
60 coral::AttributeListSpecification* attrSpecification = this->createAttributeListSpecification();
61 if(!attrSpecification->size()) return NULL;
62
63 AthenaAttributeList* attrList = new AthenaAttributeList(*attrSpecification);
64
65 (*attrList)[ this->specificationName(eRunNumber) ].setValue(m_runNumber);
66 (*attrList)[ this->specificationName(eGainStrategy) ].setValue(m_gainStrategy);
67
68 return attrList;
69}
coral::AttributeListSpecification * createAttributeListSpecification() const

◆ makeTransient() [1/3]

void L1CaloEnergyScanRunInfoContainer::makeTransient ( const std::map< std::string, AthenaAttributeList * > & athenaAttributeListMap)
virtual

Definition at line 71 of file L1CaloEnergyScanRunInfoContainer.cxx.

71 {
72
73 std::map<std::string, AthenaAttributeList*>::const_iterator
74 it_map(athenaAttributeListMap.find(this->coolFolderKey(L1CaloEnergyScanRunInfoContainer::eEnergyScanRunInfo)));
75
76 if(it_map!=athenaAttributeListMap.end()) {
77
78 const AthenaAttributeList& attrList(*(it_map->second));
79
80 m_runNumber = attrList[ this->specificationName(eRunNumber) ].data<unsigned int>();
81 m_gainStrategy = attrList[ this->specificationName(eGainStrategy) ].data<std::string>();
82
83 } else {
84 std::cout << "L1CaloEnergyScanRunInfoContainer : Could not find requested AthenaAttributeList "
86 }
87}

◆ makeTransient() [2/3]

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

Reimplemented from AbstractL1CaloPersistentCondition.

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/3]

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

Reimplemented from AbstractL1CaloPersistentCondition.

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}

◆ runNumber()

unsigned int L1CaloEnergyScanRunInfoContainer::runNumber ( ) const
inline

Definition at line 48 of file L1CaloEnergyScanRunInfoContainer.h.

48{ return m_runNumber; }

◆ setGainStrategy()

void L1CaloEnergyScanRunInfoContainer::setGainStrategy ( const std::string & strategy)
inline

◆ setRunNumber()

void L1CaloEnergyScanRunInfoContainer::setRunNumber ( unsigned int run)
inline

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

std::string L1CaloEnergyScanRunInfoContainer::m_gainStrategy
private

Definition at line 61 of file L1CaloEnergyScanRunInfoContainer.h.

◆ m_mCoolFoldersKeysMap

std::map<L1CaloEnergyScanRunInfoContainer::eCoolFolders, std::string> L1CaloEnergyScanRunInfoContainer::m_mCoolFoldersKeysMap
private

Definition at line 59 of file L1CaloEnergyScanRunInfoContainer.h.

◆ m_runNumber

unsigned int L1CaloEnergyScanRunInfoContainer::m_runNumber
private

Definition at line 60 of file L1CaloEnergyScanRunInfoContainer.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: