EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairRegistry.cxx File Reference
#include <map>
#include <iomanip>
#include "TBuffer.h"
#include "TObject.h"
#include "FairRegistry.h"
#include "FairRegistryItem.h"
#include <FairUtilStream.h>
#include <iostream>
#include <sstream>
#include <cassert>
+ Include dependency graph for FairRegistry.cxx:

Go to the source code of this file.

Macros

#define REGISTRY_SET(TYPE)
 
#define REGISTRY_GET(TYPE)
 
#define REGISTRY_GET_TYPE(NAME, RETTYPE, TYPE)
 

Functions

 ClassImp (FairRegistry) FairRegistry
 
static std::istream & bail (std::istream &is)
 

Macro Definition Documentation

#define REGISTRY_GET (   TYPE)
Value:
bool FairRegistry::Get(const char* key, TYPE & val) const \
{ \
tRegMap::const_iterator mit = fMap.find(key); \
if (mit == fMap.end()) return false; \
dynamic_cast<FairRegistryItemXxx<TYPE>*>(mit->second); \
if (rix == 0){ \
cout << "Key " << key \
<< " does not have type " \
<< #TYPE << " as required" \
<< endl; \
return false; \
} \
val = *(rix->Get()); \
return true; \
}

Definition at line 319 of file FairRegistry.cxx.

View newest version in sPHENIX GitHub at line 319 of file FairRegistry.cxx

#define REGISTRY_GET_TYPE (   NAME,
  RETTYPE,
  TYPE 
)
Value:
RETTYPE FairRegistry::Get##NAME(const char* key) const \
{ \
TYPE retval = 0; \
if (Get(key,retval)) return retval; \
if (fErrorHandler) { fErrorHandler(); return 0; } \
else { \
cout \
<< "\nFairRegistry::GetTYPE: failed to get value for key \"" \
<< key << "\" from FairRegistry \"" << this->GetName() \
<< "\". Aborting\n\n"; \
bool must_get_a_value = false; \
assert(must_get_a_value); \
return 0; \
} \
}

Definition at line 365 of file FairRegistry.cxx.

View newest version in sPHENIX GitHub at line 365 of file FairRegistry.cxx

#define REGISTRY_SET (   TYPE)

Definition at line 238 of file FairRegistry.cxx.

View newest version in sPHENIX GitHub at line 238 of file FairRegistry.cxx

Function Documentation

static std::istream& bail ( std::istream &  is)
static

Definition at line 497 of file FairRegistry.cxx.

View newest version in sPHENIX GitHub at line 497 of file FairRegistry.cxx

Referenced by FairRegistry::ReadStream().

+ Here is the caller graph for this function:

ClassImp ( FairRegistry  )

Definition at line 22 of file FairRegistry.cxx.

View newest version in sPHENIX GitHub at line 22 of file FairRegistry.cxx