ATLAS Offline Software
AbstractL1CaloPersistentCondition.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include "CoralBase/AttributeListSpecification.h"
8 
9 #include <iostream>
10 
12  std::cout << "ERROR - The makePersistent() method you are calling is not implemented by the current class !" << std::endl;
13  return 0;
14 }
15 
16 void AbstractL1CaloPersistentCondition::makeTransient(const std::map<std::string, const CondAttrListCollection*>& /* condAttrListCollectionMap */) {
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 }
20 
21 void AbstractL1CaloPersistentCondition::makeTransient(const std::map<std::string, const AthenaAttributeList*>& /* athenaAttributeList */) {
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 }
25 
26 void AbstractL1CaloPersistentCondition::addSpecification(int specId, const std::string& specName, const std::string& specType) {
27  m_attrSpecificationNameMap[specId] = specName;
28  m_attrSpecificationTypeMap[specId] = specType;
29 }
30 
31 coral::AttributeListSpecification* AbstractL1CaloPersistentCondition::createAttributeListSpecification() const {
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 }
43 
45  return m_attrSpecificationNameMap.find(specId)->second;
46 }
47 
49  return m_attrSpecificationTypeMap.find(specId)->second;
50 }
51 
53  std::cout << "ERROR - The clear() method you are calling is not implemented by the current class !" << std::endl;
54  return;
55 }
AbstractL1CaloPersistentCondition::m_attrSpecificationTypeMap
AttrSpecificationMap m_attrSpecificationTypeMap
Definition: AbstractL1CaloPersistentCondition.h:52
AbstractL1CaloPersistentCondition::addSpecification
void addSpecification(int specId, const std::string &specName, const std::string &specType)
Definition: AbstractL1CaloPersistentCondition.cxx:26
AbstractL1CaloPersistentCondition.h
AbstractL1CaloPersistentCondition::createAttributeListSpecification
coral::AttributeListSpecification * createAttributeListSpecification() const
Definition: AbstractL1CaloPersistentCondition.cxx:31
AbstractL1CaloPersistentCondition::m_attrSpecificationNameMap
AttrSpecificationMap m_attrSpecificationNameMap
Definition: AbstractL1CaloPersistentCondition.h:51
AbstractL1CaloPersistentCondition::specificationType
std::string specificationType(int specId) const
Definition: AbstractL1CaloPersistentCondition.cxx:48
AbstractL1CaloPersistentCondition::makeTransient
virtual void makeTransient(const std::map< std::string, const CondAttrListCollection * > &condAttrListCollectionMap)
Definition: AbstractL1CaloPersistentCondition.cxx:16
AbstractL1CaloPersistentCondition::specificationName
std::string specificationName(int specId) const
Definition: AbstractL1CaloPersistentCondition.cxx:44
AbstractL1CaloPersistentCondition::makePersistent
virtual DataObject * makePersistent() const
Definition: AbstractL1CaloPersistentCondition.cxx:11
AbstractL1CaloPersistentCondition::clear
virtual void clear()
Definition: AbstractL1CaloPersistentCondition.cxx:52