CMS 3D CMS Logo

Classes | Static Public Member Functions | Static Public Attributes | Static Private Member Functions

ora::MappingRules Class Reference

#include <MappingRules.h>

List of all members.

Classes

struct  ToUpper

Static Public Member Functions

static std::string baseClassVersion ()
static std::string baseIdForClass (const std::string &className)
static std::string classId (const std::string &className, const std::string &classVersion)
static std::pair< bool,
std::string > 
classNameFromBaseId (const std::string &classId)
static std::string classVersionFromId (const std::string &classId)
static std::string classVersionPropertyNameInDictionary ()
static std::string columnNameForBlobMetadata (const std::string &dataColumnName)
static std::string columnNameForId ()
static std::string columnNameForNamedReference (const std::string &variableName, const std::string &scope)
static std::string columnNameForOID (const std::string &variableName, const std::string &scope, unsigned int index)
static std::string columnNameForPosition ()
static std::string columnNameForRefColumn ()
static std::string columnNameForRefId (const std::string &variableName, const std::string &scope)
static std::string columnNameForRefMetadata (const std::string &variableName, const std::string &scope)
static std::string columnNameForVariable (const std::string &variableName, const std::string &scope, bool forData=true)
static std::string defaultClassVersion (const std::string &className)
static std::string fkNameForIdentity (const std::string &tableName, int index=0)
static std::string formatName (const std::string &variableName, size_t maxLength)
 formatting for variable names to schema object names
static bool isLooseOnReading (const std::string &persistencyProperty)
static bool isLooseOnWriting (const std::string &persistencyProperty)
static bool isMappedToBlob (const std::string &mappingProperty)
static std::string mappingPropertyNameInDictionary ()
 class related parameters
static std::string newMappingVersionForContainer (const std::string &containerName, int iteration)
 mapping versions
static std::string newMappingVersionForDependentClass (const std::string &containerName, const std::string &className, int iteration)
static std::string newNameForArraySchemaObject (const std::string &initialName, unsigned int index, size_t maxLength)
static std::string newNameForDepSchemaObject (const std::string &initialName, unsigned int index, size_t maxLength)
static std::string newNameForSchemaObject (const std::string &initialName, unsigned int index, size_t maxLength, char indexTrailer=0)
 functions for new schema object name generation
static std::string persistencyPropertyNameInDictionary ()
static std::string scopedVariableForSchemaObjects (const std::string &variableName, const std::string &scope)
static std::string scopedVariableName (const std::string &variableName, const std::string &scope)
 variable name manipulation
static std::string sequenceNameForContainer (const std::string &containerName)
static std::string sequenceNameForContainerId ()
 sequence names
static std::string sequenceNameForDependentClass (const std::string &containerName, const std::string &className)
static std::string sequenceNameForMapping ()
static std::string tableNameForItem (const std::string &itemName)
 schema object naming
static std::string variableNameForArrayColumn (unsigned int arrayIndex)
static std::string variableNameForArrayColumn (const Reflex::Type &array)
static std::string variableNameForArrayIndex (const std::string &arrayVariable, unsigned int index)
static std::string variableNameForContainerKey ()
static std::string variableNameForContainerValue ()

Static Public Attributes

static const size_t ClassNameLengthForSchema = 7
 size parameters for table creation
static const size_t MaxColumnNameLength = 30
static const size_t MaxColumnsForInlineCArray = 13
static const size_t MaxColumnsPerTable = 100
static const size_t MaxTableNameLength = 20

Static Private Member Functions

static std::string nameForSchema (const std::string &variableName)
static std::string nameFromTemplate (const std::string &templateClassName, size_t maxLength)
static std::string newMappingVersion (const std::string &itemName, int iteration, char versionTrailer)
static std::string shortNameByUpperCase (const std::string &className, size_t maxLength)
static std::string shortScopedName (const std::string &scopedClassName, size_t maxLength)

Detailed Description

Definition at line 15 of file MappingRules.h.


Member Function Documentation

std::string ora::MappingRules::baseClassVersion ( ) [static]

Definition at line 83 of file MappingRules.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::MappingDatabase::insertClassVersion().

{
  static std::string classVersion("BASE");
  return classVersion;
}
std::string ora::MappingRules::baseIdForClass ( const std::string &  className) [static]
std::string ora::MappingRules::classId ( const std::string &  className,
const std::string &  classVersion 
) [static]
std::pair< bool, std::string > ora::MappingRules::classNameFromBaseId ( const std::string &  classId) [static]

Definition at line 89 of file MappingRules.cc.

References GOODCOLL_filter_cfg::cut, and run_regression::ret.

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

                                                                                      {
  std::pair<bool,std::string> ret(false,"");
  size_t cut = classId.find("."+baseClassVersion() );
  if( cut != std::string::npos ){
    ret.first = true;
    ret.second = classId.substr(0,cut);
  }
  return ret;
}
std::string ora::MappingRules::classVersionFromId ( const std::string &  classId) [static]

Definition at line 68 of file MappingRules.cc.

References customizeTrackingMonitorSeedNumber::idx, run_regression::ret, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::PoolMappingSchema::selectMappingVersion(), and ora::PoolMappingSchema::setMappingVersion().

                                                                       {
  std::string ret("");
  size_t idx = classId.find('.');
  if( idx != std::string::npos ){
    ret = classId.substr( idx+2 );
  }
  return ret;
}
std::string ora::MappingRules::classVersionPropertyNameInDictionary ( ) [static]

Definition at line 108 of file MappingRules.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::MappingDatabase::versionOfClass().

{
  static std::string s_propertyName("class_version");
  return s_propertyName;

}
std::string ora::MappingRules::columnNameForBlobMetadata ( const std::string &  dataColumnName) [static]

Definition at line 510 of file MappingRules.cc.

References prof2calltree::prefix, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::processLeafElement().

                                                                           {
  std::string prefix("M");
  return prefix + dataColumnName.substr(1);
}
std::string ora::MappingRules::columnNameForId ( ) [static]
std::string ora::MappingRules::columnNameForNamedReference ( const std::string &  variableName,
const std::string &  scope 
) [static]

Definition at line 477 of file MappingRules.cc.

References run_regression::ret.

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

{
  std::stringstream ret;
  ret << "R" << columnNameForVariable( variableName, scope, false )<<"_NAME";
  return ret.str();
}
std::string ora::MappingRules::columnNameForOID ( const std::string &  variableName,
const std::string &  scope,
unsigned int  index 
) [static]

Definition at line 467 of file MappingRules.cc.

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

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

{
  std::stringstream ret;
  ret << "R" << columnNameForVariable( variableName, scope, false )<<"_OID"<<index;
  return ret.str();
}
std::string ora::MappingRules::columnNameForPosition ( ) [static]

Definition at line 504 of file MappingRules.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::ArrayMapping::process(), and ora::CArrayMapping::process().

{
  return std::string("POS");
}
std::string ora::MappingRules::columnNameForRefColumn ( ) [static]

Definition at line 413 of file MappingRules.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::MappingGenerator::createNewDependentMapping().

{
  return std::string("REF_ID");
}
std::string ora::MappingRules::columnNameForRefId ( const std::string &  variableName,
const std::string &  scope 
) [static]

Definition at line 495 of file MappingRules.cc.

References run_regression::ret.

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

{
  std::stringstream ret;
  ret << "RID_" << columnNameForVariable( variableName, scope, false );
  return ret.str();
}
std::string ora::MappingRules::columnNameForRefMetadata ( const std::string &  variableName,
const std::string &  scope 
) [static]

Definition at line 486 of file MappingRules.cc.

References run_regression::ret.

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

{
  std::stringstream ret;
  ret << "M" << columnNameForVariable( variableName, scope, false );
  return ret.str();
}
std::string ora::MappingRules::columnNameForVariable ( const std::string &  variableName,
const std::string &  scope,
bool  forData = true 
) [static]

Definition at line 419 of file MappingRules.cc.

References run_regression::ret, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::processLeafElement().

{
  std::ostringstream totalString;
  int scopeMaxSize = MaxColumnNameLength/4-1;
  int extraSize = MaxColumnNameLength-variableName.size()-2;
  if( extraSize>0 && extraSize>scopeMaxSize ) scopeMaxSize = extraSize;
  if( !scopeName.empty() ) {
    size_t scopeCut = scopeName.size();
    if( scopeCut> (size_t)scopeMaxSize ) scopeCut = scopeMaxSize;
    totalString << scopeName.substr(0,scopeCut);
    totalString << "_";
  }
  size_t varMaxSize = MaxColumnNameLength-totalString.str().size();

  size_t fp = variableName.find('[');
  if( fp != std::string::npos ){
    // process for c-arrays
    std::string arrayVar = variableName.substr(0,fp);
    std::string indexVar = variableName.substr(fp);
    for( size_t ind = 0; ind!=std::string::npos; ind=indexVar.find('[',ind+1 ) ){
      indexVar = indexVar.replace(ind,1,"I");
    }
    for( size_t ind = indexVar.find(']'); ind!=std::string::npos; ind=indexVar.find(']',ind+1 ) ){
      indexVar = indexVar.replace(ind,1,"_");
    }
    size_t arrayVarCut = 0;
    size_t varCut = variableName.size()+1;
    if( varCut>varMaxSize ) varCut = varMaxSize;
    if( varCut>(indexVar.size()+1) ) arrayVarCut = varCut-indexVar.size()-1;
    totalString << arrayVar.substr(0,arrayVarCut);
    totalString << "_" << indexVar;
  } else {
    size_t varCut = variableName.size();
    if( varCut>varMaxSize ) varCut = varMaxSize;
    // other types
    totalString << variableName.substr(0,varCut);
  }

  std::stringstream ret;
  if(forData) ret << "D";
  ret << nameForSchema(totalString.str());
  //return formatForSchema(ret.str(),MaxColumnNameLength);
  return formatName(ret.str(),MaxColumnNameLength);
}
std::string ora::MappingRules::defaultClassVersion ( const std::string &  className) [static]

Definition at line 100 of file MappingRules.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::MappingDatabase::versionOfClass().

{
  std::string classVersion(className);
  classVersion.append("_default");
  return classVersion;
}
std::string ora::MappingRules::fkNameForIdentity ( const std::string &  tableName,
int  index = 0 
) [static]

Definition at line 516 of file MappingRules.cc.

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

Referenced by ora::MappingToSchema::createTable().

{
  std::stringstream ret;
  ret << tableName <<"_ID_FK";
  if( index ) ret << "_"<<index;
  return ret.str();
}
std::string ora::MappingRules::formatName ( const std::string &  variableName,
size_t  maxLength 
) [static]

formatting for variable names to schema object names

Definition at line 524 of file MappingRules.cc.

Referenced by ora::MappingGenerator::createNewDependentMapping(), and ora::MappingGenerator::createNewMapping().

                                                             {
  return nameFromTemplate( variableName, maxLength );
}
bool ora::MappingRules::isLooseOnReading ( const std::string &  persistencyProperty) [static]

Definition at line 53 of file MappingRules.cc.

                                                                     {
  return (persistencyProperty == "loose_on_reading" || persistencyProperty == "LOOSE_ON_READING" ); 
}
bool ora::MappingRules::isLooseOnWriting ( const std::string &  persistencyProperty) [static]

Definition at line 58 of file MappingRules.cc.

Referenced by ora::isLoosePersistencyOnWriting().

                                                                     {
  return (persistencyProperty == "loose_on_writing" || persistencyProperty == "LOOSE_ON_WRITING" ); 
}
bool ora::MappingRules::isMappedToBlob ( const std::string &  mappingProperty) [static]

Definition at line 42 of file MappingRules.cc.

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

                                                               {
  return (mappingProperty == "Blob" || mappingProperty == "blob" || mappingProperty == "BLOB" );
}
std::string ora::MappingRules::mappingPropertyNameInDictionary ( ) [static]

class related parameters

Definition at line 35 of file MappingRules.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

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

{
  static std::string s_propertyName("mapping");
  return s_propertyName;
}
std::string ora::MappingRules::nameForSchema ( const std::string &  variableName) [static, private]

Definition at line 250 of file MappingRules.cc.

References dqm_diff::start, AlCaHLTBitMon_QueryRunRegistry::string, and create_public_pileup_plots::transform.

                                                             {
  std::string varName( variableName );
  //first turn className into uppercase
  MappingRules::ToUpper up(std::locale::classic());
  std::transform(varName.begin(), varName.end(),varName.begin(),up);
  size_t cutPoint = varName.size();
  if(cutPoint && varName[varName.size()-1] == '_' ) cutPoint -= 1;
  if(!cutPoint) return "";
  size_t start = 0;
  if(varName.size() && varName[0]== '_' ) start = 1;
  return varName.substr(start,cutPoint);
}
std::string ora::MappingRules::nameFromTemplate ( const std::string &  templateClassName,
size_t  maxLength 
) [static, private]

Definition at line 360 of file MappingRules.cc.

References i, prof2calltree::prefix, and AlCaHLTBitMon_QueryRunRegistry::string.

                                                                   {
  if( !maxLength ) return "";
  std::string tempClassName(templateClassName);
  size_t indComas = tempClassName.find(',',0);
  std::vector<size_t> vComas;
  while(indComas != std::string::npos) {
    vComas.push_back(indComas);
    indComas = tempClassName.find(',',indComas+1);
  }
  typedef std::vector<size_t>::const_iterator vSizeIter;
  vSizeIter vBegin = vComas.begin();
  vSizeIter vEnd = vComas.end();
  for(vSizeIter i = vBegin; i != vEnd; ++i) {
    tempClassName.replace(*i, 1, 1, '_');
  }
  std::string newName("");
  size_t ind0 = tempClassName.find('<',0);
  if( ind0 != std::string::npos ){
    size_t ind1 = tempClassName.rfind('>');
    std::string templArg = tempClassName.substr( ind0+1, ind1-ind0-1 );
    std::string prefix = shortScopedName( tempClassName.substr( 0, ind0 ), maxLength );
    size_t currSize = templArg.size()+prefix.size()+1;
    if( currSize > maxLength+1 ){
      // a cut is required...
      size_t prefixL = maxLength/3;
      if( prefixL == 0 ) prefixL = 1;
      if( prefixL >1 ) prefixL -=1;
      prefix = shortScopedName( prefix, prefixL );
    }
    size_t templMaxSize = maxLength-prefix.size()-1;
    templArg = nameFromTemplate( templArg,  templMaxSize );
    newName = prefix+"_"+ templArg;
  } else {
    newName = shortScopedName( tempClassName, maxLength );
  }
  //checkString( newName, 3 );
  return newName;
}
std::string ora::MappingRules::newMappingVersion ( const std::string &  itemName,
int  iteration,
char  versionTrailer 
) [static, private]

Definition at line 116 of file MappingRules.cc.

References align_cfg::iteration.

                                                           {
  std::ostringstream os;
  os << itemName;
  os << "_" << versionTrailer;
  if ( iteration > 0 ) {
    if ( iteration < 10 ) os << "0";
    if ( iteration < 100 ) os << "0";
    os << iteration;
  } else {
    os << "000";
  }
  return os.str();  
}
std::string ora::MappingRules::newMappingVersionForContainer ( const std::string &  containerName,
int  iteration 
) [static]

mapping versions

Definition at line 133 of file MappingRules.cc.

Referenced by ora::MappingDatabase::newMappingVersionForContainer().

                                                                 {
  return newMappingVersion( containerName, iteration, 'M' );
}
std::string ora::MappingRules::newMappingVersionForDependentClass ( const std::string &  containerName,
const std::string &  className,
int  iteration 
) [static]

Definition at line 139 of file MappingRules.cc.

References className(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::MappingDatabase::newMappingVersionForDependentClass().

{
  std::string contDependencyName = containerName+"_"+className;
  return newMappingVersion( contDependencyName, iteration, 'D' );
}
std::string ora::MappingRules::newNameForArraySchemaObject ( const std::string &  initialName,
unsigned int  index,
size_t  maxLength 
) [static]

Definition at line 242 of file MappingRules.cc.

Referenced by ora::ArrayMapping::process(), and ora::CArrayMapping::process().

{
  return newNameForSchemaObject( initialName, index, maxL, 'A' );
}
std::string ora::MappingRules::newNameForDepSchemaObject ( const std::string &  initialName,
unsigned int  index,
size_t  maxLength 
) [static]

Definition at line 234 of file MappingRules.cc.

Referenced by ora::MappingGenerator::createNewDependentMapping().

{
  return newNameForSchemaObject( initialName, index, maxLength, 'D' );
}
std::string ora::MappingRules::newNameForSchemaObject ( const std::string &  initialName,
unsigned int  index,
size_t  maxLength,
char  indexTrailer = 0 
) [static]

functions for new schema object name generation

Definition at line 214 of file MappingRules.cc.

References getHLTprescales::index, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::OraReferenceMapping::process(), ora::UniqueReferenceMapping::process(), ora::NamedRefMapping::process(), and ora::processLeafElement().

                                                             {
  unsigned int digitsForPostfix = 3;
  if(index<10) digitsForPostfix = 2;
  size_t newSize = initialName.size()+digitsForPostfix;
  if(newSize > maxLength) newSize = maxLength;
  unsigned int cutSize = newSize - digitsForPostfix;
  std::stringstream newStr("");
  if( initialName[cutSize-1]=='_' ) cutSize -= 1;
  std::string cutString = initialName.substr(0, cutSize );
  newStr << cutString << "_";
  if( indexTrailer !=0 ) newStr<< indexTrailer;
  newStr<< index;
  //checkString( newStr.str(), 7 );
  return newStr.str();
}
std::string ora::MappingRules::persistencyPropertyNameInDictionary ( ) [static]

Definition at line 47 of file MappingRules.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::isLoosePersistencyOnWriting().

                                                    {
  static std::string s_propertyName("persistency");
  return s_propertyName;
}
std::string ora::MappingRules::scopedVariableForSchemaObjects ( const std::string &  variableName,
const std::string &  scope 
) [static]

Definition at line 189 of file MappingRules.cc.

Referenced by ora::processBaseClasses().

                                                                           {
  std::stringstream scopedName;
  if(!scope.empty()) scopedName << formatName(scope, ClassNameLengthForSchema) << "_";
  scopedName << variableName;
  return scopedName.str();  
}
std::string ora::MappingRules::scopedVariableName ( const std::string &  variableName,
const std::string &  scope 
) [static]

variable name manipulation

Definition at line 148 of file MappingRules.cc.

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

                                                               {
  std::stringstream scopedName;
  if(!scope.empty()) scopedName << scope << "::";
  scopedName << variableName;
  return scopedName.str();
}
std::string ora::MappingRules::sequenceNameForContainer ( const std::string &  containerName) [static]
std::string ora::MappingRules::sequenceNameForContainerId ( ) [static]

sequence names

Definition at line 9 of file MappingRules.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::PoolDbCache::add(), ora::PoolDbCache::clear(), and ora::DatabaseSession::startTransaction().

                                                     {
  static std::string s_sequenceName("CONTAINER_ID");
  return s_sequenceName;
}
std::string ora::MappingRules::sequenceNameForDependentClass ( const std::string &  containerName,
const std::string &  className 
) [static]
std::string ora::MappingRules::sequenceNameForMapping ( ) [static]

Definition at line 29 of file MappingRules.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ora::PoolDbCache::clear().

                                                 {
  static std::string s_mappingSequenceName("MAPPING_ELEMENT_ID");
  return s_mappingSequenceName;
}
std::string ora::MappingRules::shortNameByUpperCase ( const std::string &  className,
size_t  maxLength 
) [static, private]

Definition at line 263 of file MappingRules.cc.

References GOODCOLL_filter_cfg::cut, i, j, max(), cfg-viewer::more, and dqm_diff::start.

                                                                  {
  if( !maxL ) return "";
  if( className.size() < maxL ) return className;
  std::vector< size_t>  uppers;
  for( size_t i=0;i<className.size();i++) {
    if(::isupper(className[i]) || ::isdigit(className[i]) ) uppers.push_back(i);
  }
  std::stringstream shName;
  size_t usize = uppers.size();
  if( usize < maxL ){
    size_t start = 0;
    size_t cut = maxL-usize;
    if( usize && (cut > uppers[0]) ) cut = uppers[0];
    shName << className.substr( start, cut );
    size_t left = maxL-cut-usize;
    if( usize > 1) left = 0;
    size_t curs = 0;
    for( size_t i=0; i<usize;i++){
      size_t st = uppers[i];
      curs = st+left+1;
      shName << className.substr(st,left+1);
      left = 0;
    }
    size_t maxIndex = className.size();
    if( shName.str().size()<maxL && curs < maxIndex ){
      size_t more = maxL - shName.str().size();
      size_t max = curs+more;
      if(max > className.size()) max = className.size();
      for( size_t j=curs;j<max-1;j++ ){
        shName << className[j];
      }
    }
    
    //checkString( shName.str(), 0 );
  } else {
    shName << className[0];
    for(size_t i=0 ;i<maxL-1;i++) {
      if( uppers[i] != 0 ) shName << className[uppers[i]];
    }
    //checkString( shName.str(), 1 );
  }
  return shName.str();
}
std::string ora::MappingRules::shortScopedName ( const std::string &  scopedClassName,
size_t  maxLength 
) [static, private]

Definition at line 309 of file MappingRules.cc.

References run_regression::ret, and AlCaHLTBitMon_QueryRunRegistry::string.

                                                                  {
  if( !maxLength ) return "";
  std::string cn = scopedClassName;
  std::string sn("");
  size_t ns = cn.rfind("::");
  if( ns!= std::string::npos ){
    cn = scopedClassName.substr( ns+2 );
    sn = scopedClassName.substr( 0, ns );
  }
  //
  ns = cn.find(" ");
  while( ns != std::string::npos ){
    cn = cn.replace( ns, 1, "_");
    ns = cn.find(" ");
  }
  //
  ns = sn.find("::");
  if( ns == 0 ){
    sn = sn.substr( 2 );
    ns = sn.find("::");
  } 
  while( ns != std::string::npos ){
    sn = sn.replace( ns, 2, "_");
    ns = sn.find("::");
  }
  //
  if( sn[sn.size()-1]=='_' ) sn = sn.substr(0,sn.size()-1);
  // ignore if namespace==std
  if( sn == "std" ) sn = "";
  
  size_t currSize = sn.size()+cn.size()+1;
  if( currSize > maxLength+1 ){
    // a cut is required...
    size_t maxScopeLen = maxLength/3;
    if( maxScopeLen ==0 ) maxScopeLen = 1;
    if( maxScopeLen > 1 ) maxScopeLen -= 1;
    if( sn.size() > maxScopeLen ){
      sn = sn.substr( 0,maxScopeLen );
    }
    size_t availableSize = maxLength-sn.size();
    if( sn.size() ) availableSize -= 1;
    cn =shortNameByUpperCase( cn, availableSize );
  }
  std::string ret = sn;
  if(!ret.empty()) ret += "_";
  ret += cn;
  //checkString( ret, 2 );
  return ret;
}
std::string ora::MappingRules::tableNameForItem ( const std::string &  itemName) [static]

schema object naming

Definition at line 401 of file MappingRules.cc.

Referenced by ora::MappingGenerator::createNewMapping().

{
  return "ORA_C_"+nameForSchema(formatName( itemName, MaxTableNameLength-5 ));
}
std::string ora::MappingRules::variableNameForArrayColumn ( const Reflex::Type &  array) [static]

Definition at line 172 of file MappingRules.cc.

                                                                    {
  std::stringstream contentTypeName;
  contentTypeName << "A" << array.ArrayLength();
  return contentTypeName.str();
}
std::string ora::MappingRules::variableNameForArrayColumn ( unsigned int  arrayIndex) [static]

Definition at line 165 of file MappingRules.cc.

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

                                                                    {
  std::ostringstream arrayElementLabel;
  arrayElementLabel << "I" << arrayIndex;
  return arrayElementLabel.str();
}
std::string ora::MappingRules::variableNameForArrayIndex ( const std::string &  arrayVariable,
unsigned int  index 
) [static]

Definition at line 157 of file MappingRules.cc.

Referenced by ora::InlineCArrayStreamerBase::buildDataElement(), and ora::CArrayMapping::process().

                                                                  {
  std::ostringstream arrayElementLabel;
  arrayElementLabel << arrayVariable << "[" << index << "]";
  return arrayElementLabel.str();
}
std::string ora::MappingRules::variableNameForContainerKey ( ) [static]

Definition at line 183 of file MappingRules.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

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

                                                      {
  static std::string s_ck("CK");
  return s_ck;
}
std::string ora::MappingRules::variableNameForContainerValue ( ) [static]

Definition at line 178 of file MappingRules.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

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

                                                        {
  static std::string s_cv("CV");
  return s_cv;
}

Member Data Documentation

size parameters for table creation

Definition at line 18 of file MappingRules.h.

Referenced by ora::MappingGenerator::createNewDependentMapping(), and ora::MappingGenerator::createNewMapping().

const size_t ora::MappingRules::MaxColumnNameLength = 30 [static]

Definition at line 22 of file MappingRules.h.

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

const size_t ora::MappingRules::MaxColumnsPerTable = 100 [static]
const size_t ora::MappingRules::MaxTableNameLength = 20 [static]