CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ora::MappingDatabase Class Reference

#include <MappingDatabase.h>

Public Member Functions

void clear ()
 
bool getBaseMappingForContainer (const std::string &className, int containerId, MappingTree &destination)
 
bool getClassVersionListForContainer (int containerId, std::map< std::string, std::string > &versionMap)
 
bool getClassVersionListForMappingVersion (const std::string &mappingVersion, std::set< std::string > &destination)
 
bool getDependentClassesForContainer (int containerId, std::set< std::string > &list)
 
bool getDependentMappingsForContainer (int containerId, std::vector< MappingElement > &destination)
 
bool getMappingByVersion (const std::string &version, MappingTree &destination)
 
bool getMappingForContainer (const std::string &className, const std::string &classVersion, int containerId, MappingTree &destination)
 
bool getMappingVersionsForContainer (int containerId, std::set< std::string > &versionList)
 
void insertClassVersion (const edm::TypeWithDict &dictionaryEntry, int dependencyIndex, int containerId, const std::string &mappingVersion, bool asBase=false)
 
void insertClassVersion (const std::string &className, const std::string &classVersion, int dependencyIndex, int containerId, const std::string &mappingVersion, bool asBase=false)
 
 MappingDatabase (IDatabaseSchema &schema)
 Constructor. More...
 
std::string newMappingVersionForContainer (const std::string &className)
 
std::string newMappingVersionForDependentClass (const std::string &containerName, const std::string &className)
 
void removeMapping (const std::string &version)
 
void setMappingVersionForClass (const edm::TypeWithDict &dictionaryEntry, int containerId, const std::string &mappingVersion, bool dependency=false)
 
void setUp ()
 
void storeMapping (const MappingTree &mappingStructure)
 
const std::set< std::string > & versions ()
 
 ~MappingDatabase ()
 Destructor. More...
 

Static Public Member Functions

static std::string versionOfClass (const edm::TypeWithDict &dictionary)
 

Private Member Functions

void buildElement (MappingElement &parentElement, const std::string &scopeName, std::map< std::string, std::vector< MappingRawElement > > &innerElements)
 
void unfoldElement (const MappingElement &element, MappingRawData &destination)
 

Private Attributes

bool m_isLoaded
 
NamedSequence m_mappingSequence
 
IDatabaseSchemam_schema
 The schema in use. More...
 
std::set< std::string > m_versions
 

Detailed Description

Utility class to manage the object-relational mappings for the C++ classes.

Definition at line 27 of file MappingDatabase.h.

Constructor & Destructor Documentation

ora::MappingDatabase::MappingDatabase ( ora::IDatabaseSchema schema)
explicit

Constructor.

Definition at line 56 of file MappingDatabase.cc.

56  :
57  m_schema( schema ),
59  m_versions(),
60  m_isLoaded( false ){
61 }
NamedSequence m_mappingSequence
static std::string sequenceNameForMapping()
Definition: MappingRules.cc:30
std::set< std::string > m_versions
IDatabaseSchema & m_schema
The schema in use.
ora::MappingDatabase::~MappingDatabase ( )

Destructor.

Definition at line 64 of file MappingDatabase.cc.

64  {
65 }

Member Function Documentation

void ora::MappingDatabase::buildElement ( MappingElement parentElement,
const std::string &  scopeName,
std::map< std::string, std::vector< MappingRawElement > > &  innerElements 
)
private

Definition at line 20 of file MappingDatabase.cc.

References ora::MappingElement::appendSubElement(), ora::MappingElement::setColumnNames(), and AlCaHLTBitMon_QueryRunRegistry::string.

22  {
23  std::map<std::string,std::vector<MappingRawElement> >::iterator iScope = innerElements.find(scopeName);
24  if(iScope != innerElements.end()){
25  for( std::vector<MappingRawElement>::const_iterator iM = iScope->second.begin();
26  iM != iScope->second.end(); ++iM ){
27  MappingElement& element = parentElement.appendSubElement( iM->elementType,
28  iM->variableName,
29  iM->variableType,
30  iM->tableName );
31  element.setColumnNames(iM->columns);
32  std::string nextScope(scopeName);
33  nextScope.append("::").append(iM->variableName);
34  buildElement( element, nextScope, innerElements );
35  }
36  }
37  innerElements.erase(scopeName);
38 }
void buildElement(MappingElement &parentElement, const std::string &scopeName, std::map< std::string, std::vector< MappingRawElement > > &innerElements)
void ora::MappingDatabase::clear ( void  )
bool ora::MappingDatabase::getBaseMappingForContainer ( const std::string &  className,
int  containerId,
MappingTree destination 
)

Definition at line 201 of file MappingDatabase.cc.

References ora::MappingRules::baseIdForClass(), className(), ora::MappingTree::className(), newFWLiteAna::found, runTheMatrix::ret, AlCaHLTBitMon_QueryRunRegistry::string, and ora::throwException().

Referenced by ora::DatabaseUtilitySession::importContainerSchema().

203  {
204  bool ret = false;
206  std::string mappingVersion("");
207  bool found = m_schema.mappingSchema().selectMappingVersion( classId, containerId, mappingVersion );
208 
209  if( found ){
210  ret = getMappingByVersion( mappingVersion, destination );
211  if( !ret ){
212  throwException("Mapping version \""+mappingVersion+"\" not found.",
213  "MappingDatabase::getBaseMappingForContainer");
214  }
215  if( destination.className() != className ){
216  throwException("Mapping inconsistency detected for version=\""+mappingVersion+"\"",
217  "MappingDatabase::getBaseMappingForContainer");
218  }
219  }
220  return ret;
221 }
tuple ret
prodAgent to be discontinued
static std::string baseIdForClass(const std::string &className)
Definition: MappingRules.cc:79
virtual bool selectMappingVersion(const std::string &classId, int containerId, std::string &destination)=0
virtual IMappingSchema & mappingSchema()=0
bool getMappingByVersion(const std::string &version, MappingTree &destination)
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
IDatabaseSchema & m_schema
The schema in use.
std::string className(const T &t)
Definition: ClassName.h:30
bool ora::MappingDatabase::getClassVersionListForContainer ( int  containerId,
std::map< std::string, std::string > &  versionMap 
)

Definition at line 261 of file MappingDatabase.cc.

262  {
263 
264  return m_schema.mappingSchema().getClassVersionListForContainer( containerId, versionMap );
265 }
virtual bool getClassVersionListForContainer(int containerId, std::map< std::string, std::string > &versionMap)=0
virtual IMappingSchema & mappingSchema()=0
IDatabaseSchema & m_schema
The schema in use.
bool ora::MappingDatabase::getClassVersionListForMappingVersion ( const std::string &  mappingVersion,
std::set< std::string > &  destination 
)

Definition at line 243 of file MappingDatabase.cc.

Referenced by ora::DatabaseUtilitySession::importContainerSchema().

244  {
246 }
virtual IMappingSchema & mappingSchema()=0
virtual bool getClassVersionListForMappingVersion(const std::string &mappingVersion, std::set< std::string > &destination)=0
IDatabaseSchema & m_schema
The schema in use.
bool ora::MappingDatabase::getDependentClassesForContainer ( int  containerId,
std::set< std::string > &  list 
)

Definition at line 314 of file MappingDatabase.cc.

Referenced by ora::DatabaseUtilitySession::importContainerSchema().

315  {
317 }
virtual IMappingSchema & mappingSchema()=0
IDatabaseSchema & m_schema
The schema in use.
virtual bool getDependentClassesInContainerMapping(int containerId, std::set< std::string > &destination)=0
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
bool ora::MappingDatabase::getDependentMappingsForContainer ( int  containerId,
std::vector< MappingElement > &  destination 
)

Definition at line 223 of file MappingDatabase.cc.

References runTheMatrix::ret, ora::throwException(), and ora::MappingTree::topElement().

224  {
225  bool ret = false;
226  std::set<std::string> versions;
227  if( m_schema.mappingSchema().getMappingVersionListForContainer( containerId, versions, true ) ){
228  ret = true;
229  for( std::set<std::string>::iterator iM = versions.begin();
230  iM != versions.end(); ++iM ){
231  MappingTree mapping;
232  if( ! getMappingByVersion( *iM, mapping )){
233  throwException("Mapping version \""+*iM+"\" not found.",
234  "MappingDatabase::getDependentMappingsForContainer");
235 
236  }
237  destination.push_back( mapping.topElement() );
238  }
239  }
240  return ret;
241 }
tuple ret
prodAgent to be discontinued
virtual IMappingSchema & mappingSchema()=0
bool getMappingByVersion(const std::string &version, MappingTree &destination)
const std::set< std::string > & versions()
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
IDatabaseSchema & m_schema
The schema in use.
virtual bool getMappingVersionListForContainer(int containerId, std::set< std::string > &destination, bool onlyDependency=false)=0
bool ora::MappingDatabase::getMappingByVersion ( const std::string &  version,
MappingTree destination 
)

Definition at line 125 of file MappingDatabase.cc.

References ora::MappingElement::classMappingElementType(), ora::MappingRawElement::columns, ora::MappingElement::dependencyMappingElementType(), ora::MappingRawData::elements, ora::MappingRawElement::elementType, ora::MappingRawElement::emptyScope(), runTheMatrix::ret, ora::MappingElement::setColumnNames(), ora::MappingTree::setTopElement(), ora::MappingTree::setVersion(), ora::MappingRawElement::tableName, ora::throwException(), and ora::MappingRawElement::variableName.

Referenced by ora::DatabaseUtilitySession::importContainerSchema().

125  {
126  bool ret = false;
127  MappingRawData mapData;
128  if(m_schema.mappingSchema().getMapping( version, mapData )){
129  ret = true;
130  MappingRawElement topLevelElement;
131  bool topLevelFound = false;
132  bool dependency = false;
133  std::map<std::string, std::vector<MappingRawElement> > innerElements;
134  for( std::map< int, MappingRawElement>::iterator iElem = mapData.elements.begin();
135  iElem != mapData.elements.end(); iElem++ ){
136  // first loading the top level elements
137  if( iElem->second.scopeName == MappingRawElement::emptyScope() ){
138  if( iElem->second.elementType == MappingElement::classMappingElementType() ||
139  iElem->second.elementType == MappingElement::dependencyMappingElementType() ){
140  if( topLevelFound ){
141  throwException("Mapping inconsistent.More then one top level element found.",
142  "MappingDatabase::getMappingByVersion");
143  }
144  topLevelElement = iElem->second;
145  if( topLevelElement.elementType == MappingElement::dependencyMappingElementType() ) dependency = true;
146  topLevelFound = true;
147  }
148  } else {
149  std::map<std::string, std::vector<MappingRawElement> >::iterator iN = innerElements.find( iElem->second.scopeName );
150  if(iN==innerElements.end()){
151  innerElements.insert( std::make_pair( iElem->second.scopeName, std::vector<MappingRawElement>(1,iElem->second) ) );
152  } else {
153  iN->second.push_back( iElem->second );
154  }
155  }
156  }
157  if( !topLevelFound ){
158  throwException( "Could not find top element for mapping version \""+version+"\".",
159  "MappingDatabase::getMappingByVersion" );
160  }
161  MappingElement& topElement = destination.setTopElement( topLevelElement.variableName,
162  topLevelElement.tableName,
163  dependency );
164  topElement.setColumnNames( topLevelElement.columns);
165  buildElement( topElement, topLevelElement.variableName, innerElements );
166  destination.setVersion( version );
167  }
168  return ret;
169 }
tuple ret
prodAgent to be discontinued
static std::string dependencyMappingElementType()
Returns the name of the dependent class mapping element type.
virtual bool getMapping(const std::string &version, MappingRawData &destination)=0
void buildElement(MappingElement &parentElement, const std::string &scopeName, std::map< std::string, std::vector< MappingRawElement > > &innerElements)
static std::string emptyScope()
virtual IMappingSchema & mappingSchema()=0
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
IDatabaseSchema & m_schema
The schema in use.
static std::string classMappingElementType()
Returns the name of the class mapping element type.
bool ora::MappingDatabase::getMappingForContainer ( const std::string &  className,
const std::string &  classVersion,
int  containerId,
MappingTree destination 
)

Definition at line 176 of file MappingDatabase.cc.

References ora::MappingRules::classId(), className(), ora::MappingTree::className(), newFWLiteAna::found, runTheMatrix::ret, AlCaHLTBitMon_QueryRunRegistry::string, ora::throwException(), and relval_steps::version.

179  {
180  bool ret = false;
181  // The classId parameter
182  std::string classId = MappingRules::classId( className, classVersion );
183 
184  std::string version("");
185  bool found = m_schema.mappingSchema().selectMappingVersion( classId, containerId, version );
186 
187  if( found ){
189  if( !ret ){
190  throwException("Mapping version \""+version+"\" not found.",
191  "MappingDatabase::getMappingForContainer");
192  }
193  if( destination.className() != className ){
194  throwException("Mapping inconsistency detected for version=\""+version+"\"",
195  "MappingDatabase::getMappingForContainer");
196  }
197  }
198  return ret;
199 }
tuple ret
prodAgent to be discontinued
virtual bool selectMappingVersion(const std::string &classId, int containerId, std::string &destination)=0
virtual IMappingSchema & mappingSchema()=0
bool getMappingByVersion(const std::string &version, MappingTree &destination)
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
static std::string classId(const std::string &className, const std::string &classVersion)
Definition: MappingRules.cc:64
IDatabaseSchema & m_schema
The schema in use.
std::string className(const T &t)
Definition: ClassName.h:30
bool ora::MappingDatabase::getMappingVersionsForContainer ( int  containerId,
std::set< std::string > &  versionList 
)

Definition at line 302 of file MappingDatabase.cc.

Referenced by ora::DatabaseUtilitySession::importContainerSchema().

302  {
303  return m_schema.mappingSchema().getMappingVersionListForContainer( containerId, versionList );
304 }
virtual IMappingSchema & mappingSchema()=0
IDatabaseSchema & m_schema
The schema in use.
virtual bool getMappingVersionListForContainer(int containerId, std::set< std::string > &destination, bool onlyDependency=false)=0
void ora::MappingDatabase::insertClassVersion ( const edm::TypeWithDict dictionaryEntry,
int  dependencyIndex,
int  containerId,
const std::string &  mappingVersion,
bool  asBase = false 
)

Definition at line 267 of file MappingDatabase.cc.

References className(), edm::TypeWithDict::cppName(), and AlCaHLTBitMon_QueryRunRegistry::string.

271  {
272  std::string className = dictionaryEntry.cppName();
273  std::string classVersion = versionOfClass( dictionaryEntry );
274  insertClassVersion( className, classVersion, depIndex, containerId, mappingVersion, asBase );
275 }
std::string cppName() const
void insertClassVersion(const edm::TypeWithDict &dictionaryEntry, int dependencyIndex, int containerId, const std::string &mappingVersion, bool asBase=false)
static std::string versionOfClass(const edm::TypeWithDict &dictionary)
std::string className(const T &t)
Definition: ClassName.h:30
void ora::MappingDatabase::insertClassVersion ( const std::string &  className,
const std::string &  classVersion,
int  dependencyIndex,
int  containerId,
const std::string &  mappingVersion,
bool  asBase = false 
)

Definition at line 248 of file MappingDatabase.cc.

References ora::MappingRules::baseClassVersion(), ora::MappingRules::baseIdForClass(), ora::MappingRules::classId(), and AlCaHLTBitMon_QueryRunRegistry::string.

253  {
254  std::string classId = MappingRules::classId( className, classVersion );
255  m_schema.mappingSchema().insertClassVersion( className, classVersion, classId, dependencyIndex, containerId, mappingVersion );
256  if( asBase ){
258  }
259 }
static std::string baseIdForClass(const std::string &className)
Definition: MappingRules.cc:79
virtual IMappingSchema & mappingSchema()=0
virtual void insertClassVersion(const std::string &className, const std::string &classVersion, const std::string &classId, int dependencyIndex, int containerId, const std::string &mappingVersion)=0
static std::string baseClassVersion()
Definition: MappingRules.cc:84
static std::string classId(const std::string &className, const std::string &classVersion)
Definition: MappingRules.cc:64
IDatabaseSchema & m_schema
The schema in use.
std::string className(const T &t)
Definition: ClassName.h:30
std::string ora::MappingDatabase::newMappingVersionForContainer ( const std::string &  className)

Definition at line 72 of file MappingDatabase.cc.

References newFWLiteAna::found, align_cfg::iteration, ora::MappingRules::newMappingVersionForContainer(), and AlCaHLTBitMon_QueryRunRegistry::string.

72  {
73  if(!m_isLoaded){
75  m_isLoaded = true;
76  }
77 
78  std::string newMappingVersion = "";
79  for ( int iteration = 0;; ++iteration ) {
80  newMappingVersion = MappingRules::newMappingVersionForContainer( containerName, iteration );
81  bool found = false;
82  for ( std::set<std::string>::reverse_iterator iVersion = m_versions.rbegin();
83  iVersion != m_versions.rend(); ++iVersion ) {
84  if ( *iVersion == newMappingVersion ) {
85  found = true;
86  break;
87  }
88  }
89  if ( ! found ){
90  m_versions.insert( newMappingVersion );
91  break;
92  }
93 
94  }
95  return newMappingVersion;
96 }
static std::string newMappingVersionForContainer(const std::string &containerName, int iteration)
mapping versions
virtual bool getVersionList(std::set< std::string > &destination)=0
tuple iteration
Definition: align_cfg.py:5
virtual IMappingSchema & mappingSchema()=0
std::set< std::string > m_versions
IDatabaseSchema & m_schema
The schema in use.
std::string ora::MappingDatabase::newMappingVersionForDependentClass ( const std::string &  containerName,
const std::string &  className 
)

Definition at line 99 of file MappingDatabase.cc.

References newFWLiteAna::found, align_cfg::iteration, ora::MappingRules::newMappingVersionForDependentClass(), and AlCaHLTBitMon_QueryRunRegistry::string.

99  {
100  if(!m_isLoaded){
102  m_isLoaded = true;
103  }
104 
105  std::string newMappingVersion = "";
106  for ( int iteration = 0;; ++iteration ) {
107  newMappingVersion = MappingRules::newMappingVersionForDependentClass( containerName, className, iteration );
108  bool found = false;
109  for ( std::set<std::string>::reverse_iterator iVersion = m_versions.rbegin();
110  iVersion != m_versions.rend(); ++iVersion ) {
111  if ( *iVersion == newMappingVersion ) {
112  found = true;
113  break;
114  }
115  }
116  if ( ! found ){
117  m_versions.insert( newMappingVersion );
118  break;
119  }
120 
121  }
122  return newMappingVersion;
123 }
virtual bool getVersionList(std::set< std::string > &destination)=0
tuple iteration
Definition: align_cfg.py:5
virtual IMappingSchema & mappingSchema()=0
std::set< std::string > m_versions
static std::string newMappingVersionForDependentClass(const std::string &containerName, const std::string &className, int iteration)
IDatabaseSchema & m_schema
The schema in use.
std::string className(const T &t)
Definition: ClassName.h:30
void ora::MappingDatabase::removeMapping ( const std::string &  version)

Definition at line 171 of file MappingDatabase.cc.

171  {
173 }
virtual IMappingSchema & mappingSchema()=0
IDatabaseSchema & m_schema
The schema in use.
virtual void removeMapping(const std::string &version)=0
void ora::MappingDatabase::setMappingVersionForClass ( const edm::TypeWithDict dictionaryEntry,
int  containerId,
const std::string &  mappingVersion,
bool  dependency = false 
)

Definition at line 277 of file MappingDatabase.cc.

References ora::MappingRules::classId(), className(), edm::TypeWithDict::cppName(), newFWLiteAna::found, and AlCaHLTBitMon_QueryRunRegistry::string.

280  {
281  std::string className = dictionaryEntry.cppName();
282  std::string classVersion = versionOfClass( dictionaryEntry );
283  std::string classId = MappingRules::classId( className, classVersion );
284  std::string mv("");
285  bool found = m_schema.mappingSchema().selectMappingVersion( classId, containerId, mv );
286  if( !found ){
287  int depIndex = 0;
288  if( dependency ) depIndex = 1;
289  m_schema.mappingSchema().insertClassVersion( className, classVersion, classId, depIndex, containerId, mappingVersion );
290  } else {
291  m_schema.mappingSchema().setMappingVersion( classId, containerId, mappingVersion );
292  }
293 }
virtual bool selectMappingVersion(const std::string &classId, int containerId, std::string &destination)=0
virtual void setMappingVersion(const std::string &classId, int containerId, const std::string &mappingVersion)=0
std::string cppName() const
virtual IMappingSchema & mappingSchema()=0
virtual void insertClassVersion(const std::string &className, const std::string &classVersion, const std::string &classId, int dependencyIndex, int containerId, const std::string &mappingVersion)=0
static std::string classId(const std::string &className, const std::string &classVersion)
Definition: MappingRules.cc:64
static std::string versionOfClass(const edm::TypeWithDict &dictionary)
IDatabaseSchema & m_schema
The schema in use.
std::string className(const T &t)
Definition: ClassName.h:30
void ora::MappingDatabase::setUp ( )

Definition at line 67 of file MappingDatabase.cc.

67  {
69 }
NamedSequence m_mappingSequence
void ora::MappingDatabase::storeMapping ( const MappingTree mappingStructure)

Definition at line 295 of file MappingDatabase.cc.

References ora::MappingTree::topElement(), and ora::MappingTree::version().

295  {
296  MappingRawData rowMapping( mapping.version() );
297  unfoldElement( mapping.topElement(), rowMapping );
299  m_schema.mappingSchema().storeMapping( rowMapping );
300 }
NamedSequence m_mappingSequence
void unfoldElement(const MappingElement &element, MappingRawData &destination)
virtual void storeMapping(const MappingRawData &data)=0
virtual IMappingSchema & mappingSchema()=0
IDatabaseSchema & m_schema
The schema in use.
void ora::MappingDatabase::unfoldElement ( const MappingElement element,
MappingRawData destination 
)
private

Definition at line 40 of file MappingDatabase.cc.

References ora::MappingRawData::addElement(), ora::MappingElement::begin(), ora::MappingElement::columnNames(), ora::MappingRawElement::columns, HTMLExport::elem(), ora::MappingRawElement::elementType, ora::MappingElement::elementType(), ora::MappingElement::elementTypeAsString(), ora::MappingRawElement::emptyScope(), ora::MappingElement::end(), ora::MappingRawElement::scopeName, ora::MappingElement::scopeName(), ora::MappingRawElement::tableName, ora::MappingElement::tableName(), ora::MappingRawElement::variableName, ora::MappingElement::variableName(), ora::MappingRawElement::variableType, and ora::MappingElement::variableType().

40  {
41  int newElemId = m_mappingSequence.getNextId();
42  MappingRawElement& elem = destination.addElement( newElemId );
43  elem.elementType = MappingElement::elementTypeAsString( element.elementType() );
44  elem.scopeName = element.scopeName();
45  if(elem.scopeName.empty()) elem.scopeName = MappingRawElement::emptyScope();
46  elem.variableName = element.variableName();
47  elem.variableType = element.variableType();
48  elem.tableName = element.tableName();
49  elem.columns = element.columnNames();
50  for ( MappingElement::const_iterator iSubEl = element.begin();
51  iSubEl != element.end(); ++iSubEl) {
52  unfoldElement( iSubEl->second, destination );
53  }
54 }
NamedSequence m_mappingSequence
int getNextId(bool sinchronize=false)
Definition: Sequences.cc:83
void unfoldElement(const MappingElement &element, MappingRawData &destination)
static std::string elementTypeAsString(ElementType elementType)
Converts the enumeration type to a string.
static std::string emptyScope()
std::map< std::string, MappingElement >::const_iterator const_iterator
std::string ora::MappingDatabase::versionOfClass ( const edm::TypeWithDict dictionary)
static

Definition at line 13 of file MappingDatabase.cc.

References className(), ora::MappingRules::classVersionPropertyNameInDictionary(), edm::TypeWithDict::cppName(), ora::MappingRules::defaultClassVersion(), ora::ClassUtils::getClassProperty(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::ContainerSchema::loadMappingForDependentClass(), and ora::ContainerSchema::mapping().

13  {
14  std::string className = dictionary.cppName();
16  if( classVersion.empty() ) classVersion = MappingRules::defaultClassVersion(className);
17  return classVersion;
18 }
std::string cppName() const
static std::string defaultClassVersion(const std::string &className)
std::string getClassProperty(const std::string &propertyName, const edm::TypeWithDict &type)
Definition: ClassUtils.cc:500
static std::string classVersionPropertyNameInDictionary()
std::string className(const T &t)
Definition: ClassName.h:30
const std::set< std::string > & ora::MappingDatabase::versions ( )

Definition at line 306 of file MappingDatabase.cc.

306  {
307  if(!m_isLoaded){
309  m_isLoaded = true;
310  }
311  return m_versions;
312 }
virtual bool getVersionList(std::set< std::string > &destination)=0
virtual IMappingSchema & mappingSchema()=0
std::set< std::string > m_versions
IDatabaseSchema & m_schema
The schema in use.

Member Data Documentation

bool ora::MappingDatabase::m_isLoaded
private

Definition at line 86 of file MappingDatabase.h.

NamedSequence ora::MappingDatabase::m_mappingSequence
private

Definition at line 84 of file MappingDatabase.h.

IDatabaseSchema& ora::MappingDatabase::m_schema
private

The schema in use.

Definition at line 83 of file MappingDatabase.h.

std::set<std::string> ora::MappingDatabase::m_versions
private

Definition at line 85 of file MappingDatabase.h.