ATLAS Offline Software
Functions
RootType.cxx File Reference
#include "DataModelRoot/RootType.h"
#include "TBaseClass.h"
#include "TClass.h"
#include "TClassEdit.h"
#include "TClassTable.h"
#include "TDataType.h"
#include "TDataMember.h"
#include "TDictAttributeMap.h"
#include "TError.h"
#include "TFunction.h"
#include "TInterpreter.h"
#include "TMethod.h"
#include "TMethodArg.h"
#include "TROOT.h"
#include "TEnum.h"
#include <assert.h>
#include <cxxabi.h>
#include <iostream>

Go to the source code of this file.

Functions

TTypeAdapter TMemberAdapter::DeclaringType ATLAS_NOT_THREAD_SAFE () const
 
bool is_fundamental_type (const std::string &name)
 
const std::type_info & fundamental_type (const std::string &name)
 
TScopeAdapter TScopeAdapter::ByName ATLAS_NOT_THREAD_SAFE (const std::string &name, Bool_t load, Bool_t quiet)
 

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE() [1/2]

TTypeAdapter TMemberAdapter::DeclaringType ATLAS_NOT_THREAD_SAFE ( ) const

Definition at line 348 of file RootType.cxx.

349 {
350 // no distinction between scope/type
351  return DeclaringScope();
352 }

◆ ATLAS_NOT_THREAD_SAFE() [2/2]

TScopeAdapter TScopeAdapter::ByName ATLAS_NOT_THREAD_SAFE ( const std::string &  name,
Bool_t  load,
Bool_t  quiet 
)

Definition at line 574 of file RootType.cxx.

576 {
577  return TScopeAdapter (name, load, quiet);
578 }

◆ fundamental_type()

const std::type_info& fundamental_type ( const std::string &  name)

Definition at line 448 of file RootType.cxx.

449 {
450  const char* typname = name.c_str();
451  switch(typname[0]) {
452  case 'b':
453  if ( strcmp(typname,"bool") ==0 ) return typeid(bool);
454  break;
455  case 'c':
456  if ( strcmp(typname,"char") ==0 ) return typeid(char);
457  break;
458  case 'l':
459  if ( strcmp(typname,"long") ==0 ) return typeid(long);
460  if ( strcmp(typname,"long long") ==0 ) return typeid(long long);
461  if ( strcmp(typname,"long long int") ==0 ) return typeid(long long int);
462  break;
463  case 'i':
464  if ( strcmp(typname,"int") ==0 ) return typeid(int);
465  break;
466  case 'd':
467  if ( strcmp(typname,"double") ==0 ) return typeid(double);
468  break;
469  case 'f':
470  if ( strcmp(typname,"float") ==0 ) return typeid(float);
471  break;
472  case 's':
473  if( strcmp(typname,"short") ==0 ) return typeid(short);
474  if( strcmp(typname,"short int") ==0 ) return typeid(short int);
475  break;
476  case 'u':
477  if ( strcmp(typname,"unsigned char") ==0 ) return typeid(unsigned char);
478  if ( strcmp(typname,"unsigned long") ==0 ) return typeid(unsigned long);
479  if ( strcmp(typname,"unsigned long long") ==0 ) return typeid(unsigned long long);
480  if ( strcmp(typname,"unsigned long long int") ==0 ) return typeid(unsigned long long int);
481  if ( strcmp(typname,"unsigned int") ==0 ) return typeid(unsigned int);
482  if ( strcmp(typname,"unsigned short") ==0 ) return typeid(unsigned short);
483  if ( strcmp(typname,"unsigned short int") ==0 ) return typeid(unsigned short int);
484  break;
485  case 'v':
486  if ( strcmp(typname,"void") ==0 ) return typeid(void);
487  break;
488  }
489  cerr << "WARNING! RootType getting typeinfo failed for: " << typname << endl;
490  return typeid(void);
491 }

◆ is_fundamental_type()

bool is_fundamental_type ( const std::string &  name)

Definition at line 385 of file RootType.cxx.

386 {
387  const char* typname = name.c_str();
388  switch(typname[0]) {
389  case 'b':
390  if ( strcmp(typname,"bool") ==0 ) return true;
391  break;
392  case 'c':
393  if ( strcmp(typname,"char") ==0 ) return true;
394  break;
395  case 'l':
396  if ( strncmp(typname,"lib",3) ==0 ) return true;
397  if ( strcmp(typname,"long") ==0 ) return true;
398  if ( strcmp(typname,"long long") ==0 ) return true;
399  if ( strcmp(typname,"long long int") ==0 ) return true;
400  break;
401  case 'L':
402  if ( strcmp(typname,"Long_t") ==0 ) return true;
403  if ( strcmp(typname,"Long64_t") ==0 ) return true;
404  break;
405  case 'i':
406  if ( strcmp(typname,"int") ==0 ) return true;
407  if ( strcmp(typname,"__int64") ==0 ) return true;
408  break;
409  case 'I':
410  if ( strcmp(typname,"Int_t") ==0 ) return true;
411  break;
412  case 'e':
413  if ( strncmp(typname,"enum ",5) ==0 ) return true;
414  break;
415  case 'd':
416  if ( strcmp(typname,"double") ==0 ) return true;
417  break;
418  case 'D':
419  if ( strcmp(typname,"Double_t") ==0 ) return true;
420  break;
421  case 'f':
422  if ( strcmp(typname,"float") ==0 ) return true;
423  break;
424  case 'F':
425  if ( strcmp(typname,"Float_t") ==0 ) return true;
426  break;
427  case 's':
428  if( strcmp(typname,"short") ==0 ) return true;
429  if( strcmp(typname,"short int") ==0 ) return true;
430  break;
431  case 'S':
432  if ( strcmp(typname,"Short_t") ==0 ) return true;
433  break;
434  case 'u':
435  if ( strncmp(typname,"unknown",7) ==0 ) return true;
436  if ( strcmp(typname,"unsigned int") ==0 ) return true;
437  if ( strcmp(typname,"unsigned short") ==0 ) return true;
438  if ( strcmp(typname,"unsigned long") ==0 ) return true;
439  if ( strcmp(typname,"unsigned char") ==0 ) return true;
440  if ( strcmp(typname,"unsigned long long") ==0 ) return true;
441  if ( strcmp(typname,"unsigned long long int") ==0 ) return true;
442  break;
443  }
444  return false;
445 }
quiet
bool quiet
Definition: TrigGlobEffCorrValidation.cxx:190
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
python.root_pickle.load
def load(f, use_proxy=1, key=None)
Definition: root_pickle.py:476
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
TScopeAdapter
Definition: RootType.h:119