CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Classes | Enumerations | Functions
ora Namespace Reference

TO BE REMOVED. More...

Namespaces

 ClassUtils
 
 RelationalMapping
 
 SchemaUtils
 

Classes

struct  AllKnowTypeHandlers
 
union  AnyData
 
struct  AnyTypeHandler
 
class  ArrayHandlerFactory
 
class  ArrayMapping
 
class  BlobMapping
 
class  BlobReader
 
class  BlobStreamer
 
class  BlobUpdater
 
class  BlobWriter
 
class  BlobWriterBase
 
class  BulkInsertOperation
 
class  CArrayHandler
 
class  CArrayIteratorHandler
 
class  CArrayMapping
 
class  CArrayReader
 
class  CArrayStreamer
 
class  CArrayUpdater
 
class  CArrayWriter
 
struct  CompareTypeHandler
 
class  CondMetadataTable
 
class  Configuration
 
class  ConnectionPool
 To be moved in DBCommon, has to serve also the pure coral use case. More...
 
class  Container
 
struct  ContainerHeaderData
 
class  ContainerIterator
 
class  ContainerSchema
 
class  ContainerUpdateTable
 
class  Database
 
class  DatabaseContainer
 
class  DatabaseImpl
 
class  DatabaseSession
 
class  DatabaseUtility
 
class  DatabaseUtilitySession
 
class  DataElement
 
class  DeleteBuffer
 
class  DeleteOperation
 
class  DependentClassReader
 
class  DependentClassWriter
 
class  EmptyMapping
 
class  Exception
 Base exception class for the object to relational access. More...
 
struct  Guid
 
class  Handle
 
class  Holder
 
class  IArrayHandler
 
class  IArrayIteratorHandler
 
class  IBlobStreamingService
 Interface for a Streaming Service. More...
 
class  IContainerHeaderTable
 
class  IDatabaseSchema
 
class  IDatabaseTable
 
class  IMainTable
 
class  IMappingSchema
 
class  INamingServiceTable
 
class  InlineCArrayReader
 
class  InlineCArrayStreamer
 
class  InlineCArrayStreamerBase
 
class  InlineCArrayUpdater
 
class  InlineCArrayWriter
 
class  InputRelationalData
 
class  InsertCache
 
class  InsertOperation
 
class  IPtrLoader
 
class  IReferenceHandler
 
class  IRelationalData
 
class  IRelationalMapping
 
class  IRelationalOperation
 
class  IRelationalReader
 
class  IRelationalStreamer
 
class  IRelationalUpdater
 
class  IRelationalWriter
 
class  ISequenceTable
 
class  IteratorBuffer
 
class  ITokenParser
 
class  ITokenWriter
 
class  IVectorLoader
 
class  MappingDatabase
 
class  MappingElement
 
class  MappingGenerator
 
struct  MappingRawData
 
struct  MappingRawElement
 
class  MappingRules
 
class  MappingToSchema
 
class  MappingTree
 
class  Monitoring
 
class  MultiIndexDataTrie
 
class  MultiRecordInsertOperation
 
class  MultiRecordSelectOperation
 
class  NamedRef
 
class  NamedReference
 
class  NamedReferenceStreamerBase
 
class  NamedRefMapping
 
class  NamedRefReader
 
class  NamedRefStreamer
 
class  NamedRefUpdater
 
class  NamedRefWriter
 
class  NamedSequence
 
struct  NullTypeHandler
 
class  Object
 
class  ObjectMapping
 
class  ObjectReader
 
class  ObjectStreamer
 
class  ObjectStreamerBase
 
class  ObjectUpdater
 
class  ObjectWriter
 
class  OId
 
class  OraClassVersionTable
 
class  OraContainerHeaderTable
 
class  OraDatabaseSchema
 
class  OraMainTable
 
class  OraMappingElementTable
 
class  OraMappingSchema
 
class  OraMappingVersionTable
 
class  OraNamingServiceTable
 
class  OraPtrMapping
 
class  OraPtrReadBuffer
 
class  OraPtrReader
 
class  OraPtrStreamer
 
class  OraPtrUpdater
 
class  OraPtrWriter
 
class  OraReferenceMapping
 
class  OraReferenceReader
 
class  OraReferenceStreamer
 
class  OraReferenceStreamerBase
 
class  OraReferenceUpdater
 
class  OraReferenceWriter
 
class  OraSequenceTable
 
class  PoolClassVersionTable
 
class  PoolContainerHeaderTable
 
class  PoolDatabaseSchema
 
class  PoolDbCache
 
struct  PoolDbCacheData
 
class  PoolMainTable
 
class  PoolMappingElementTable
 
class  PoolMappingSchema
 
class  PoolMappingVersionTable
 
class  PoolSequenceTable
 
class  PrimitiveMapping
 
class  PrimitiveReader
 
class  PrimitiveStreamer
 
class  PrimitiveStreamerBase
 
class  PrimitiveUpdater
 
class  PrimitiveWriter
 
class  Properties
 
class  Ptr
 
class  PVector
 
class  PVectorHandler
 
class  PVectorIteratorHandler
 
class  PVectorReader
 
class  PVectorStreamer
 
class  PVectorUpdater
 
class  PVectorWriter
 
class  Query
 
class  QueryableVector
 
class  QueryableVectorLoader
 
class  QueryableVectorReader
 
class  QueryableVectorStreamer
 
class  QueryableVectorUpdater
 
class  QueryableVectorWriter
 
class  QVQueryMaker
 
class  QVReader
 
class  Range
 
class  RangeIterator
 
class  RangeReverseIterator
 
class  ReadBuffer
 
class  Record
 
class  RecordSpec
 
struct  RecordSpecImpl
 
class  Reference
 
class  RelationalBuffer
 
class  RelationalDeleter
 
class  RelationalMappingFactory
 
class  RelationalPtrLoader
 
class  RelationalRefLoader
 
class  RelationalStreamerFactory
 
class  RflxDeleter
 
class  ScopedTransaction
 
class  Selection
 
class  SelectOperation
 
class  SequenceManager
 
class  Sequences
 
class  Serializer
 
class  SessionMonitoringData
 
struct  SharedLibraryName
 
class  SharedSession
 
struct  SimpleTypeHandler
 
class  SpecialSTLContainerHandler
 
class  STLContainerHandler
 
class  STLContainerIteratorHandler
 
class  STLContainerReader
 
class  STLContainerStreamer
 
class  STLContainerUpdater
 
class  STLContainerWriter
 
struct  TableInfo
 
class  TableRegister
 
class  Transaction
 
class  TransactionCache
 
struct  TransactionMonitoringData
 
struct  TypeHandler
 
union  U_Primitives
 
class  UniqueRef
 
class  UniqueReferenceMapping
 
class  UniqueRefReader
 
class  UniqueRefStreamer
 
class  UniqueRefUpdater
 
class  UniqueRefWriter
 
class  UpdateBuffer
 
class  UpdateOperation
 
class  Version
 
struct  VoidStarHandler
 
class  WriteBuffer
 

Enumerations

enum  ConditionType {
  Eq, Gt, Lt, Ge,
  Le
}
 
enum  SelectionItemType {
  EQ, NE, GT, GE,
  LT, LE
}
 

Functions

void addFromTableHierarchy (const std::string &tableName, std::map< std::string, std::set< std::string > > &tableList, std::vector< std::string > &orderedList)
 
void checkString (const std::string &s, int code, bool thro=true)
 
const char * conditionOfType (ConditionType condType)
 
void deleteArrayElements (MappingElement &mapping, int oid, int fromIndex, RelationalBuffer &buffer)
 
int existAttribute (const std::string &attributeName, const coral::AttributeList &data)
 
Container getContainerFromSession (const std::string &name, const edm::TypeWithDict &contType, DatabaseSession &session)
 
void getTableHierarchyFromMappingElement (const MappingElement &source, std::map< std::string, std::set< std::string > > &tableList)
 
std::string guidFromTime ()
 
bool isLoosePersistencyDataMember (const edm::MemberWithDict &dataMember)
 
bool isLoosePersistencyOnWriting (const edm::MemberWithDict &dataMember)
 
bool isMappedToBlob (const edm::MemberWithDict &dataMember)
 
std::string mappingTypeFromPool (const std::string &mappingType)
 
std::string namedRefNullLabel ()
 
std::string nameFromClass (const edm::TypeWithDict &contType)
 
std::string poolSchemaVersion ()
 
void processBaseClasses (MappingElement &mappingElement, const edm::TypeWithDict &objType, const std::string &scopeNameForSchema, TableRegister &tableRegister)
 
void processLeafElement (MappingElement &parentElement, const std::string &elementType, const std::string &typeName, const std::string &attributeName, const std::string &attributeNameForSchema, const std::string &scopeNameForSchema, TableRegister &tableRegister)
 
void processTableHierarchy (const MappingElement &element, std::set< std::string > &tableRegister, std::vector< std::pair< std::string, std::string > > &tableList)
 
void rebuildPoolMapping (const std::string &scope, const std::string &extraScope, const std::map< std::string, std::vector< MappingRawElement > > &elementsByScope, ora::MappingRawData &dest, int &counter)
 
void scanElement (const MappingElement &element, const TableInfo &currentTable, bool isDependency, std::vector< std::string > &tableHierarchy, std::map< std::string, TableInfo > &tableMap)
 
void setTableAccessPermission (coral::ITable &table, const std::string &principal, bool forWrite)
 
void throwException (const std::string &message, const std::string &methodName) __attribute__((noreturn))
 
void throwException (const std::string &message, const std::type_info &sourceType, const std::string &methodName) __attribute__((noreturn))
 
std::string uniqueRefNullLabel ()
 
static const std::string validChars ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-0123456789")
 
std::string variableNameFromPool (const std::string &variableName)
 

Detailed Description

TO BE REMOVED.

Enumeration Type Documentation

Enumerator
Eq 
Gt 
Lt 
Ge 
Le 

Definition at line 33 of file RelationalOperation.h.

Enumerator
EQ 
NE 
GT 
GE 
LT 
LE 

Definition at line 16 of file Selection.h.

16 { EQ, NE, GT, GE, LT, LE } SelectionItemType;
SelectionItemType
Definition: Selection.h:16

Function Documentation

void ora::addFromTableHierarchy ( const std::string &  tableName,
std::map< std::string, std::set< std::string > > &  tableList,
std::vector< std::string > &  orderedList 
)

Definition at line 35 of file ContainerSchema.cc.

Referenced by ora::ContainerSchema::getTableHierarchy().

37  {
38  orderedList.push_back( tableName );
39  std::map<std::string, std::set<std::string> >::const_iterator iDeps = tableList.find( tableName );
40  if(iDeps != tableList.end() ){
41  for( std::set<std::string>::const_iterator iDt = iDeps->second.begin();
42  iDt != iDeps->second.end(); iDt++ ){
43  addFromTableHierarchy( *iDt, tableList, orderedList );
44  }
45  }
46  }
void addFromTableHierarchy(const std::string &tableName, std::map< std::string, std::set< std::string > > &tableList, std::vector< std::string > &orderedList)
void ora::checkString ( const std::string &  s,
int  code,
bool  thro = true 
)

Definition at line 203 of file MappingRules.cc.

References i, throwException(), and validChars().

203  {
204  for( size_t i=0;i<s.size();i++){
205  if( validChars.find( s[i])==std::string::npos ) {
206  std::stringstream mess;
207  mess <<" code="<<code<<" in string ["<<s<<"] found a wrong char=["<<s[i]<<"].";
208  if( thro ) throwException( mess.str(),"validChars");
209  }
210  }
211  }
int i
Definition: DBlmapReader.cc:9
static const std::string validChars("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-0123456789")
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
const char* ora::conditionOfType ( ConditionType  condType)

Definition at line 27 of file RelationalOperation.cc.

Referenced by ora::InputRelationalData::addWhereId().

27  {
28  static const char* cond[ 5 ] = { (char*)"=",(char*)">",(char*)"<",(char*)">=",(char*)"<=" };
29  return cond[ condType ];
30  }
void ora::deleteArrayElements ( MappingElement &  mapping,
int  oid,
int  fromIndex,
RelationalBuffer &  buffer 
)

Definition at line 8 of file ArrayCommonImpl.cc.

References ora::InputRelationalData::addWhereId(), ora::MappingElement::begin(), ora::MappingElement::columnNames(), ora::MappingElement::elementType(), ora::MappingElement::end(), Ge, ora::RelationalBuffer::newDelete(), AlCaHLTBitMon_QueryRunRegistry::string, ora::MappingElement::tableName(), and ora::InputRelationalData::whereData().

Referenced by ora::PVectorUpdater::update().

11  {
12  for ( MappingElement::iterator iMe = mapping.begin();
13  iMe != mapping.end(); ++iMe ) {
14  MappingElement::ElementType elementType = iMe->second.elementType();
15  // add the InlineCArray (or change the algorithm...
16  if ( elementType == MappingElement::Object ||
17  elementType == MappingElement::Array ||
18  elementType == MappingElement::OraArray ||
19  elementType == MappingElement::CArray ) {
20  deleteArrayElements( iMe->second, oid, fromIndex, buffer );
21  }
22  }
23  if ( mapping.elementType() == MappingElement::Object) return;
24 
25  std::string oidColumn = mapping.columnNames()[ 0 ];
26  std::string indexColumn = mapping.columnNames()[ 1 ];
27  DeleteOperation& deleteOperation = buffer.newDelete( mapping.tableName() );
28  deleteOperation.addWhereId( oidColumn );
29  deleteOperation.addWhereId( indexColumn, Ge );
30  coral::AttributeList::iterator condDataIter = deleteOperation.whereData().begin();
31  condDataIter->data<int>() = oid;
32  ++condDataIter;
33  condDataIter->data<int>() = fromIndex;
34 }
void deleteArrayElements(MappingElement &mapping, int oid, int fromIndex, RelationalBuffer &buffer)
int ora::existAttribute ( const std::string &  attributeName,
const coral::AttributeList &  data 
)

Definition at line 15 of file RelationalOperation.cc.

References cmsHarvester::index, and run_regression::ret.

Referenced by ora::InputRelationalData::addBlobData(), ora::InputRelationalData::addData(), ora::InputRelationalData::addId(), ora::InputRelationalData::addWhereId(), and ora::SelectOperation::addWhereId().

16  {
17  int ret = -1;
18  int index = 0;
19  for(coral::AttributeList::const_iterator iAttr = data.begin();
20  iAttr!=data.end() && (ret==-1); ++iAttr){
21  if( iAttr->specification().name() == attributeName ) ret = index;
22  index++;
23  }
24  return ret;
25  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
Container ora::getContainerFromSession ( const std::string &  name,
const edm::TypeWithDict contType,
DatabaseSession &  session 
)

Definition at line 41 of file Database.cc.

References ora::Configuration::automaticContainerCreation(), ora::Configuration::automaticDatabaseCreation(), ora::DatabaseSession::configuration(), ora::DatabaseSession::containerHandle(), ora::DatabaseSession::createContainer(), ora::Properties::getFlag(), ora::Configuration::properties(), and throwException().

Referenced by ora::Database::getContainer(), and ora::Database::insertItem().

41  {
42  Handle<DatabaseContainer> contHandle = session.containerHandle( name );
43  if( !contHandle ){
44  if( session.configuration().properties().getFlag( Configuration::automaticDatabaseCreation()) ||
45  session.configuration().properties().getFlag( Configuration::automaticContainerCreation() ) ){
46  contHandle = session.createContainer( name, contType );
47  } else {
48  throwException("Container \""+name+"\" does not exist in the database.",
49  "Database::getContainerFromSession");
50  }
51  }
52 
53  return Container( contHandle );
54  }
EcalChannelStatus Container
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
void ora::getTableHierarchyFromMappingElement ( const MappingElement &  source,
std::map< std::string, std::set< std::string > > &  tableList 
)

Definition at line 16 of file ContainerSchema.cc.

References ora::MappingElement::begin(), ora::MappingElement::end(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_25ns14e33_v1_cff::tableName, and ora::MappingElement::tableName().

Referenced by ora::ContainerSchema::getTableHierarchy().

17  {
18  const std::string& tableName = source.tableName();
19  std::map<std::string, std::set<std::string> >::iterator iTab = tableList.find( tableName );
20  if( iTab ==tableList.end() ){
21  std::set<std::string> dependencies;
22  tableList.insert(std::make_pair( tableName, dependencies ) );
23  }
24  for( MappingElement::const_iterator iElem = source.begin();
25  iElem != source.end(); iElem++ ){
26  std::map<std::string, std::set<std::string> >::iterator iT = tableList.find( tableName );
27  const std::string& innerTable = iElem->second.tableName();
28  if( innerTable != tableName ){
29  iT->second.insert( innerTable );
30  }
31  getTableHierarchyFromMappingElement( iElem->second, tableList );
32  }
33  }
void getTableHierarchyFromMappingElement(const MappingElement &source, std::map< std::string, std::set< std::string > > &tableList)
static std::string const source
Definition: EdmProvDump.cc:42
std::string ora::guidFromTime ( )

Definition at line 37 of file Guid.cc.

References ora::Guid::fromTime(), tmp, and ora::Guid::toString().

Referenced by ora::SessionMonitoringData::newTransaction(), and ora::Monitoring::startSession().

37  {
38  Guid tmp;
39  tmp.fromTime();
40  return tmp.toString();
41 }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
ora::Guid Guid
Definition: Guid.h:26
bool ora::isLoosePersistencyDataMember ( const edm::MemberWithDict dataMember)

Definition at line 13 of file ObjectStreamer.cc.

References ora::ClassUtils::getDataMemberProperty(), ora::MappingRules::isLooseOnReading(), ora::MappingRules::isLooseOnWriting(), ora::MappingRules::persistencyPropertyNameInDictionary(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::ObjectStreamerBase::buildBaseDataMembers(), and ora::ObjectStreamerBase::buildDataMembers().

13  {
15  return ora::MappingRules::isLooseOnWriting( persistencyType ) || ora::MappingRules::isLooseOnReading( persistencyType ) ;
16  }
static std::string persistencyPropertyNameInDictionary()
Definition: MappingRules.cc:48
static bool isLooseOnReading(const std::string &persistencyProperty)
Definition: MappingRules.cc:54
static bool isLooseOnWriting(const std::string &persistencyProperty)
Definition: MappingRules.cc:59
std::string getDataMemberProperty(const std::string &propertyName, const edm::MemberWithDict &dataMember)
Definition: ClassUtils.cc:510
bool ora::isLoosePersistencyOnWriting ( const edm::MemberWithDict dataMember)

Definition at line 541 of file RelationalMapping.cc.

References ora::ClassUtils::getDataMemberProperty(), ora::MappingRules::isLooseOnWriting(), and ora::MappingRules::persistencyPropertyNameInDictionary().

Referenced by ora::ObjectMapping::process(), and processBaseClasses().

541  {
543  }
static std::string persistencyPropertyNameInDictionary()
Definition: MappingRules.cc:48
static bool isLooseOnWriting(const std::string &persistencyProperty)
Definition: MappingRules.cc:59
std::string getDataMemberProperty(const std::string &propertyName, const edm::MemberWithDict &dataMember)
Definition: ClassUtils.cc:510
bool ora::isMappedToBlob ( const edm::MemberWithDict dataMember)

Definition at line 545 of file RelationalMapping.cc.

References ora::ClassUtils::getDataMemberProperty(), ora::MappingRules::isMappedToBlob(), and ora::MappingRules::mappingPropertyNameInDictionary().

Referenced by ora::ObjectMapping::process(), and processBaseClasses().

545  {
547  }
static std::string mappingPropertyNameInDictionary()
class related parameters
Definition: MappingRules.cc:36
static bool isMappedToBlob(const std::string &mappingProperty)
Definition: MappingRules.cc:43
std::string getDataMemberProperty(const std::string &propertyName, const edm::MemberWithDict &dataMember)
Definition: ClassUtils.cc:510
std::string ora::mappingTypeFromPool ( const std::string &  mappingType)

Definition at line 731 of file PoolDatabaseSchema.cc.

References ora::MappingElement::OraArrayMappingElementType().

Referenced by ora::PoolMappingSchema::getMapping().

731  {
732  if( mappingType == "PoolArray" ) return MappingElement::OraArrayMappingElementType();
733  return mappingType;
734  }
std::string ora::namedRefNullLabel ( )

Definition at line 14 of file NamedRefStreamer.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::NamedReferenceStreamerBase::bindDataForRead(), and ora::NamedReferenceStreamerBase::bindDataForUpdate().

14  {
15  static const std::string nullLabel("ora::NamedRef::Null");
16  return nullLabel;
17 }
std::string ora::nameFromClass ( const edm::TypeWithDict contType)

Definition at line 37 of file Database.cc.

References edm::TypeWithDict::cppName().

Referenced by ora::Database::createContainer(), ora::Database::getContainer(), and ora::Database::nameForContainer().

37  {
38  return contType.cppName();
39  }
std::string cppName() const
std::string ora::poolSchemaVersion ( )

Definition at line 9 of file IDatabaseSchema.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::BlobWriterBase::buildDataElement(), ora::Version::fromString(), and ora::PoolMainTable::schemaVersion().

9  {
10  static const std::string s_version("POOL");
11  return s_version;
12 }
void ora::processBaseClasses ( MappingElement &  mappingElement,
const edm::TypeWithDict objType,
const std::string &  scopeNameForSchema,
TableRegister &  tableRegister 
)

Definition at line 549 of file RelationalMapping.cc.

References b, newFWLiteAna::base, className(), edm::TypeWithDict::cppName(), edm::MemberWithDict::declaringType(), isLoosePersistencyOnWriting(), isMappedToBlob(), edm::MemberWithDict::isStatic(), edm::MemberWithDict::isTransient(), edm::BaseWithDict::name(), edm::MemberWithDict::name(), ora::RelationalMappingFactory::newProcessor(), ora::ClassUtils::resolvedType(), ora::MappingRules::scopedVariableForSchemaObjects(), ora::MappingRules::scopedVariableName(), AlCaHLTBitMon_QueryRunRegistry::string, throwException(), edm::TypeWithDict::toType(), edm::BaseWithDict::typeOf(), and edm::MemberWithDict::typeOf().

Referenced by ora::ObjectMapping::process().

552  {
553  std::string className = objType.cppName();
554  edm::TypeBases bases(objType);
555  for (auto const & b : bases) {
557  edm::TypeWithDict baseType = ClassUtils::resolvedType( base.typeOf().toType() );
558  if(!baseType){
559  throwException( "Class for base \""+base.name()+"\" is not in the dictionary.","ObjectMapping::process");
560  }
561 
562  // TO BE FIXED:: here there is still to fix the right scopeName to pass
563  processBaseClasses( mappingElement, baseType, scopeNameForSchema, tableRegister );
564  edm::TypeDataMembers members(baseType);
565  for (auto const & member : members) {
566  edm::MemberWithDict baseMember(member);
567  // Skip the transient and the static ones
568  if ( baseMember.isTransient() || baseMember.isStatic() || isLoosePersistencyOnWriting( baseMember ) ) continue;
569  // Retrieve the data member type
570  edm::TypeWithDict type = ClassUtils::resolvedType( baseMember.typeOf() );
571  edm::TypeWithDict declaringType = ClassUtils::resolvedType( baseMember.declaringType());
572  std::string scope = declaringType.cppName();
573  // Retrieve the field name
574  std::string objectMemberName = ora::MappingRules::scopedVariableName( baseMember.name(), scope );
575  std::string objectMemberNameForSchema = ora::MappingRules::scopedVariableForSchemaObjects( baseMember.name(), scope );
576 
577  bool blobStreaming = isMappedToBlob( baseMember );
578 
579  RelationalMappingFactory mappingFactory( tableRegister );
580  std::auto_ptr<IRelationalMapping> processor( mappingFactory.newProcessor( type, blobStreaming ) );
581  processor->process( mappingElement, objectMemberName, objectMemberNameForSchema, scopeNameForSchema );
582  }
583  }
584  }
tuple base
Main Program
Definition: newFWLiteAna.py:92
type
Definition: HCALResponse.h:21
edm::TypeWithDict resolvedType(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:483
void processBaseClasses(MappingElement &mappingElement, const edm::TypeWithDict &objType, const std::string &scopeNameForSchema, TableRegister &tableRegister)
static std::string scopedVariableName(const std::string &variableName, const std::string &scope)
variable name manipulation
static std::string scopedVariableForSchemaObjects(const std::string &variableName, const std::string &scope)
std::string cppName() const
bool isMappedToBlob(const edm::MemberWithDict &dataMember)
double b
Definition: hdecay.h:120
bool isLoosePersistencyOnWriting(const edm::MemberWithDict &dataMember)
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
std::string className(const T &t)
Definition: ClassName.h:30
void ora::processLeafElement ( MappingElement &  parentElement,
const std::string &  elementType,
const std::string &  typeName,
const std::string &  attributeName,
const std::string &  attributeNameForSchema,
const std::string &  scopeNameForSchema,
TableRegister &  tableRegister 
)

Definition at line 144 of file RelationalMapping.cc.

References ora::MappingElement::appendSubElement(), ora::MappingElement::blobMappingElementType(), ora::TableRegister::checkColumn(), ora::TableRegister::checkTable(), ora::MappingRules::columnNameForBlobMetadata(), ora::MappingRules::columnNameForVariable(), i, ora::TableRegister::insertColumn(), ora::MappingRules::MaxColumnNameLength, ora::MappingRules::newNameForSchemaObject(), ora::MappingElement::setColumnNames(), AlCaHLTBitMon_QueryRunRegistry::string, ora::MappingElement::tableName(), and throwException().

Referenced by ora::PrimitiveMapping::process(), and ora::BlobMapping::process().

150  {
151  if(!tableRegister.checkTable( parentElement.tableName())){
152  throwException("Table \""+parentElement.tableName()+"\" has not been allocated.",
153  "processLeafElement");
154  }
155  ora::MappingElement& me = parentElement.appendSubElement( elementType, attributeName, typeName, parentElement.tableName() );
156  std::string inputCol = ora::MappingRules::columnNameForVariable( attributeNameForSchema, scopeNameForSchema );
157  std::string columnName(inputCol);
158  unsigned int i=0;
159  while(tableRegister.checkColumn(parentElement.tableName(),columnName)){
161  i++;
162  }
163  tableRegister.insertColumn(parentElement.tableName(),columnName);
164  std::vector<std::string> cols;
165  cols.push_back( columnName );
166  // add metadata column for blobs
167  if( elementType == ora::MappingElement::blobMappingElementType() ){
168  std::string metaDataColumnName = ora::MappingRules::columnNameForBlobMetadata( columnName );
169  tableRegister.insertColumn(parentElement.tableName(),metaDataColumnName );
170  cols.push_back( metaDataColumnName );
171  }
172  me.setColumnNames( cols );
173  }
int i
Definition: DBlmapReader.cc:9
static std::string blobMappingElementType()
Returns the name of the blob mapping element type.
MappingElement & appendSubElement(const std::string &elementType, const std::string &variableName, const std::string &variableType, const std::string &tableName)
static std::string columnNameForVariable(const std::string &variableName, const std::string &scope, bool forData=true)
static std::string columnNameForBlobMetadata(const std::string &dataColumnName)
static const size_t MaxColumnNameLength
Definition: MappingRules.h:20
static std::string newNameForSchemaObject(const std::string &initialName, unsigned int index, size_t maxLength, char indexTrailer=0)
functions for new schema object name generation
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
void setColumnNames(const std::vector< std::string > &columns)
void ora::processTableHierarchy ( const MappingElement &  element,
std::set< std::string > &  tableRegister,
std::vector< std::pair< std::string, std::string > > &  tableList 
)

Definition at line 277 of file MappingElement.cc.

References ora::MappingElement::begin(), ora::MappingElement::columnNames(), ora::MappingElement::end(), AlCaHLTBitMon_QueryRunRegistry::string, HLT_25ns14e33_v1_cff::tableName, ora::MappingElement::tableName(), throwException(), and ora::MappingElement::variableName().

Referenced by ora::MappingElement::tableHierarchy().

279  {
280  const std::string& tableName = element.tableName();
281  std::set<std::string>::iterator iT = tableRegister.find( tableName );
282  if( iT == tableRegister.end() ){
283  if( element.columnNames().empty() ){
284  throwException( "Mapping element for variable \""+element.variableName()+"\" does not specify column names.",
285  "MappingElement::tableHierarchy");
286  }
287  tableRegister.insert( tableName );
288  tableList.push_back( std::make_pair(tableName,element.columnNames()[0]) );
289  }
290  for(MappingElement::const_iterator iEl = element.begin();
291  iEl != element.end(); ++iEl ){
292  processTableHierarchy( iEl->second, tableRegister, tableList );
293  }
294  }
void processTableHierarchy(const MappingElement &element, std::set< std::string > &tableRegister, std::vector< std::pair< std::string, std::string > > &tableList)
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
void ora::rebuildPoolMapping ( const std::string &  scope,
const std::string &  extraScope,
const std::map< std::string, std::vector< MappingRawElement > > &  elementsByScope,
ora::MappingRawData dest,
int &  counter 
)

Definition at line 778 of file PoolDatabaseSchema.cc.

References ora::MappingRawData::addElement(), HTMLExport::elem(), and ora::MappingRawElement::scopeName.

Referenced by ora::PoolMappingSchema::getMapping().

778  {
779  std::map<std::string, std::vector<MappingRawElement> >::const_iterator iSc = elementsByScope.find( scope );
780  if( iSc != elementsByScope.end() ){
781  for( std::vector<MappingRawElement>::const_iterator iMap = iSc->second.begin();
782  iMap != iSc->second.end(); ++iMap ){
783  MappingRawElement& elem = dest.addElement( counter ) = *iMap;
784  elem.scopeName = extraScope+"::"+iMap->scopeName;
785  counter++;
786  rebuildPoolMapping( scope+"::"+iMap->variableName, extraScope, elementsByScope, dest, counter );
787  }
788  }
789  }
MappingRawElement & addElement(int elementId)
void rebuildPoolMapping(const std::string &scope, const std::string &extraScope, const std::map< std::string, std::vector< MappingRawElement > > &elementsByScope, ora::MappingRawData &dest, int &counter)
static std::atomic< unsigned int > counter
void ora::scanElement ( const MappingElement &  element,
const TableInfo &  currentTable,
bool  isDependency,
std::vector< std::string > &  tableHierarchy,
std::map< std::string, TableInfo > &  tableMap 
)

Definition at line 64 of file MappingTree.cc.

References ora::MappingElement::begin(), ora::MappingElement::Blob, ora::MappingElement::columnNames(), ora::MappingElement::elementType(), ora::MappingElement::end(), ora::TableInfo::m_idColumns, ora::TableInfo::m_tableName, ora::MappingElement::NamedReference, ora::MappingElement::OraReference, ora::MappingElement::Primitive, AlCaHLTBitMon_QueryRunRegistry::string, ora::MappingElement::tableName(), ora::MappingElement::UniqueReference, and ora::MappingElement::variableType().

Referenced by ora::MappingTree::tables().

68  {
69  const std::string& tName = element.tableName();
70  std::map<std::string,TableInfo>::iterator iT = tableMap.find( tName );
71  if( iT == tableMap.end() ){
72  tableHierarchy.push_back( tName );
73  iT = tableMap.insert( std::make_pair( tName, TableInfo() ) ).first;
74  iT->second.m_dependency = isDependency;
75  iT->second.m_tableName = tName;
76  iT->second.m_idColumns = element.columnNames();
77  iT->second.m_parentTableName = currentTable.m_tableName;
78  iT->second.m_refColumns = currentTable.m_idColumns;
79  } else {
80  const std::vector<std::string>& dataCols = element.columnNames();
81  MappingElement::ElementType elementType = element.elementType();
82  switch ( elementType ) {
83  case MappingElement::Primitive :
84  iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
85  element.variableType() ));
86  break;
87  case MappingElement::Blob :
88  iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
89  coral::AttributeSpecification::typeNameForId( typeid(coral::Blob) ) ));
90  iT->second.m_dataColumns.insert( std::make_pair( dataCols[1],
91  coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ));
92  iT->second.m_nullableColumns.insert( dataCols[1] );
93  break;
94  case MappingElement::OraReference :
95  iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
96  coral::AttributeSpecification::typeNameForId( typeid(int) ) ));
97  iT->second.m_dataColumns.insert( std::make_pair( dataCols[1],
98  coral::AttributeSpecification::typeNameForId( typeid(int) ) ));
99  break;
100  case MappingElement::NamedReference :
101  iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
102  coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ));
103  break;
104  case MappingElement::UniqueReference :
105  iT->second.m_dataColumns.insert( std::make_pair( dataCols[0],
106  coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ));
107  iT->second.m_dataColumns.insert( std::make_pair( dataCols[1],
108  coral::AttributeSpecification::typeNameForId( typeid(int) ) ));
109  break;
110  default:
111  break;
112  }
113  }
114  TableInfo currT = iT->second;
115  for( MappingElement::const_iterator iM = element.begin();
116  iM != element.end(); ++iM ){
117  scanElement( iM->second, currT, isDependency, tableHierarchy, tableMap );
118  }
119  }
void scanElement(const MappingElement &element, const TableInfo &currentTable, bool isDependency, std::vector< std::string > &tableHierarchy, std::map< std::string, TableInfo > &tableMap)
Definition: MappingTree.cc:64
void ora::setTableAccessPermission ( coral::ITable &  table,
const std::string &  principal,
bool  forWrite 
)

Definition at line 14 of file IDatabaseSchema.cc.

References archive::Delete().

Referenced by ora::IDatabaseTable::setAccessPermission(), and ora::ContainerSchema::setAccessPermission().

16  {
17  table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Select );
18  if(forWrite){
19  table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Update );
20  table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Insert );
21  table.privilegeManager().grantToUser( principal, coral::ITablePrivilegeManager::Delete );
22  }
23 }
def Delete
Definition: archive.py:449
#define table(NAME)
Definition: DbCore.h:49
void ora::throwException ( const std::string &  message,
const std::string &  methodName 
)

Definition at line 10 of file Exception.cc.

References edm::hlt::Exception.

Referenced by ora::PoolDbCache::add(), ora::PoolContainerHeaderTable::addContainer(), ora::Selection::addIndexItem(), ora::MappingToSchema::alter(), ora::MappingElement::alterType(), ora::MappingElement::appendSubElement(), ora::BlobWriterBase::bindData(), ora::PrimitiveStreamerBase::bindDataForRead(), ora::OraReferenceStreamerBase::bindDataForRead(), ora::NamedReferenceStreamerBase::bindDataForRead(), ora::PrimitiveStreamerBase::bindDataForUpdate(), ora::OraReferenceStreamerBase::bindDataForUpdate(), ora::NamedReferenceStreamerBase::bindDataForUpdate(), ora::MultiIndexDataTrie::branchSize(), ora::DependentClassWriter::build(), ora::OraPtrWriter::build(), ora::CArrayWriter::build(), ora::UniqueRefWriter::build(), ora::OraPtrReadBuffer::build(), ora::STLContainerWriter::build(), ora::OraPtrUpdater::build(), ora::QVQueryMaker::build(), ora::BlobReader::build(), ora::UniqueRefReader::build(), ora::CArrayReader::build(), ora::DependentClassReader::build(), ora::STLContainerReader::build(), ora::ObjectStreamerBase::buildBaseDataMembers(), ora::OraReferenceStreamerBase::buildDataElement(), ora::PrimitiveStreamerBase::buildDataElement(), ora::BlobWriterBase::buildDataElement(), ora::InlineCArrayStreamerBase::buildDataElement(), ora::NamedReferenceStreamerBase::buildDataElement(), ora::ObjectStreamerBase::buildDataMembers(), ora::Object::cast(), checkString(), ora::Database::checkTransaction(), ora::DatabaseUtilitySession::containerHandle(), ora::Database::containerHandle(), ora::OraMainTable::create(), ora::OraSequenceTable::create(), ora::PoolMainTable::create(), ora::OraMappingVersionTable::create(), ora::PoolSequenceTable::create(), ora::OraMappingElementTable::create(), ora::PoolMappingVersionTable::create(), ora::OraContainerHeaderTable::create(), ora::PoolMappingElementTable::create(), ora::OraClassVersionTable::create(), ora::PoolContainerHeaderTable::create(), ora::PoolClassVersionTable::create(), ora::OraNamingServiceTable::create(), ora::CondMetadataTable::create(), ora::PoolDatabaseSchema::create(), ora::Database::createContainer(), ora::MappingGenerator::createNewDependentMapping(), ora::MappingGenerator::createNewMapping(), ora::MultiRecordSelectOperation::data(), ora::SelectOperation::data(), ora::PoolContainerHeaderTable::decrementNumberOfObjects(), ora::Object::destruct(), ora::DatabaseContainer::drop(), ora::DatabaseSession::drop(), ora::CondMetadataTable::drop(), ora::MappingElement::elementTypeAsString(), ora::MappingElement::elementTypeFromString(), ora::DatabaseUtilitySession::eraseMapping(), ora::ContainerSchema::evolve(), ora::QVQueryMaker::executeAndLoad(), ora::PoolSequenceTable::exists(), ora::OraDatabaseSchema::exists(), ora::PoolDatabaseSchema::exists(), ora::DatabaseContainer::fetchItemAsType(), ora::PoolDbCache::find(), ora::WriteBuffer::flush(), ora::UpdateBuffer::flush(), ora::SharedSession::get(), ora::MappingDatabase::getBaseMappingForContainer(), ora::PoolContainerHeaderTable::getContainerData(), getContainerFromSession(), ora::MappingDatabase::getDependentMappingsForContainer(), ora::IteratorBuffer::getItemAsType(), ora::PoolSequenceTable::getLastId(), ora::MappingDatabase::getMappingByVersion(), ora::MappingDatabase::getMappingForContainer(), ora::Database::getNamesForObject(), ora::Sequences::getNextId(), ora::MappingElement::idColumn(), ora::DatabaseUtilitySession::importContainerSchema(), ora::PoolContainerHeaderTable::incrementNumberOfObjects(), ora::ContainerSchema::initClassDict(), ora::PoolMappingSchema::insertClassVersion(), ora::Container::insertItem(), ora::DatabaseContainer::insertItem(), ora::STLContainerHandler::iterate(), ora::PVectorHandler::iterate(), ora::DatabaseUtility::listMappings(), ora::DatabaseUtility::listMappingVersions(), ora::Database::listObjectNames(), ora::RelationalPtrLoader::load(), ora::RelationalRefLoader::load(), ora::ContainerSchema::loadMappingForDependentClass(), ora::DatabaseContainer::lock(), ora::Database::lockContainer(), ora::MultiIndexDataTrie::lookupAndClear(), ora::ClassUtils::lookupDictionary(), ora::ContainerSchema::mapping(), ora::ContainerSchema::mappingForDependentClass(), ora::ArrayHandlerFactory::newArrayHandler(), ora::RelationalStreamerFactory::newStreamer(), ora::Database::open(), cond::parseToken(), ora::MappingElement::pkColumn(), ora::MappingElement::posColumn(), ora::OraReferenceMapping::process(), ora::UniqueReferenceMapping::process(), ora::ArrayMapping::process(), ora::CArrayMapping::process(), ora::ObjectMapping::process(), processBaseClasses(), processLeafElement(), processTableHierarchy(), ora::UniqueRef< T >::ptr(), ora::Ptr< T >::ptr(), ora::MultiIndexDataTrie::push(), ora::PVectorHandler::PVectorHandler(), ora::QueryableVector< Tp >::query(), ora::OraPtrReadBuffer::read(), ora::QueryableVectorReader::read(), ora::BlobReader::read(), ora::UniqueRefReader::read(), ora::OraPtrReader::read(), ora::CArrayReader::read(), ora::STLContainerReader::read(), ora::DependentClassReader::read(), ora::ReadBuffer::read(), ora::ReadBuffer::ReadBuffer(), ora::MappingElement::recordIdColumns(), ora::PoolContainerHeaderTable::removeContainer(), ora::NamedRef< T >::safePtr(), ora::Database::schemaVersion(), ora::OraPtrReader::select(), ora::CArrayReader::select(), ora::STLContainerReader::select(), ora::QVQueryMaker::select(), ora::QueryableVector< Tp >::select(), ora::MultiRecordSelectOperation::selectRow(), ora::PoolMappingSchema::setMappingVersion(), ora::QVQueryMaker::setQueryCondition(), ora::PoolSequenceTable::sinchronize(), ora::SpecialSTLContainerHandler::SpecialSTLContainerHandler(), ora::STLContainerHandler::STLContainerHandler(), ora::OraDatabaseSchema::testDropPermission(), ora::Database::transaction(), ora::PVectorUpdater::update(), ora::QueryableVectorUpdater::update(), ora::OraPtrUpdater::update(), ora::Container::updateItem(), ora::DatabaseContainer::updateItem(), ora::PoolContainerHeaderTable::updateNumberOfObjects(), ora::Handle< T >::validate(), ora::QueryableVectorWriter::write(), ora::OraPtrWriter::write(), ora::CArrayWriter::write(), ora::UniqueRefWriter::write(), ora::STLContainerWriter::write(), and ora::DependentClassWriter::write().

11  {
12  throw Exception( message, methodName );
13  }
void ora::throwException ( const std::string &  message,
const std::type_info &  sourceType,
const std::string &  methodName 
)

Definition at line 15 of file Exception.cc.

References className(), ora::ClassUtils::demangledName(), edm::hlt::Exception, and AlCaHLTBitMon_QueryRunRegistry::string.

17  {
19  throw Exception( message, className+"::"+methodName );
20  }
std::string demangledName(const std::type_info &typeInfo)
Definition: ClassUtils.cc:156
std::string className(const T &t)
Definition: ClassName.h:30
std::string ora::uniqueRefNullLabel ( )

Definition at line 184 of file UniqueRefStreamer.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::UniqueRefWriter::write().

184  {
185  static const std::string nullLabel("ora::UniqueRef::Null");
186  return nullLabel;
187 }
static const std::string ora::validChars ( "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-0123456789"  )
static

Referenced by checkString().

std::string ora::variableNameFromPool ( const std::string &  variableName)

Definition at line 736 of file PoolDatabaseSchema.cc.

Referenced by ora::PoolMappingSchema::getMapping().

736  {
737  size_t ind = variableName.find("pool::PVector");
738  if( ind != std::string::npos ){
739  return "ora::PVector"+variableName.substr(13);
740  }
741  return variableName;
742  }