| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

Classes | Typedefs | Functions | Variables

# RootHistCnv Namespace Reference

## Classes
class | DirectoryCnv
class | PersSvc
| Persistency service - to store histograms in ROOT format. More...
class | RConverter
| Root Converter. More...
class | RCWNTupleCnv
| Converter of Column-wise NTuple into ROOT format. More...
class | RDirectoryCnv
| Create persistent and transient representations of data store directories. More...
class | RFileCnv
| NTuple converter class definition. More...
class | RHistogramCnv
| Generic converter to save/read AIDA_ROOT histograms using ROOT. More...
class | RNTupleCnv
| NTuple converter class definition. More...
class | RootObjAddress
class | RRWNTupleCnv
| Row wise NTuple converter class definition. More...
## Typedefs
typedef RHistogramCnv < TProfile, TProfile, Gaudi::HistogramBase > | RootHistCnvP1DCnv
typedef RHistogramCnv < TProfile2D, TProfile2D, Gaudi::HistogramBase > | RootHistCnvP2DCnv
typedef RHistogramCnv< TH1D, TH1, Gaudi::HistogramBase > | RootHistCnvH1DCnv
typedef RHistogramCnv< TH2D, TH2, Gaudi::HistogramBase > | RootHistCnvH2DCnv
typedef RootHistCnv::RHistogramCnv < TH3D, TH3, Gaudi::HistogramBase > | RootHistCnvH3DCnv
## Functions
template<class TYP >
INTupleItem * | createNTupleItem (std::string itemName, std::string blockName, std::string indexName, int indexRange, int arraySize, TYP min, TYP max, INTuple *ntup)
| INSTANTIATE (float)
| INSTANTIATE (double)
| INSTANTIATE (bool)
| INSTANTIATE (char)
| INSTANTIATE (int)
| INSTANTIATE (short)
| INSTANTIATE (long)
| INSTANTIATE (unsigned char)
| INSTANTIATE (unsigned long long)
template<class TYP >
INTupleItem * | createNTupleItem (NTUPLEINFO &tags, long i, INTuple *tuple, TYP minimum, TYP maximum, long &size)
| Add an item of a given type to the N tuple.
bool | parseName (std::string full, std::string &blk, std::string &var)
bool | RootCd (const std::string &full)
bool | RootMkdir (const std::string &full)
std::string | RootPwd ()
bool | RootTrimLeadingDir (std::string &full, std::string dir)
## Variables
static std::string | stat_dir = "/stat"
static std::string | undefFileName = "UndefinedROOTOutputFileName"

## Typedef Documentation

typedef RHistogramCnv<TH1D,TH1,Gaudi::HistogramBase> RootHistCnv::RootHistCnvH1DCnv

Definition at line 24 of file RHistogramCnv.cpp.

typedef RHistogramCnv<TH2D,TH2,Gaudi::HistogramBase> RootHistCnv::RootHistCnvH2DCnv

Definition at line 32 of file RHistogramCnv.cpp.

typedef RootHistCnv::RHistogramCnv<TH3D,TH3,Gaudi::HistogramBase> RootHistCnv::RootHistCnvH3DCnv

Definition at line 40 of file RHistogramCnv.cpp.

typedef RHistogramCnv<TProfile,TProfile,Gaudi::HistogramBase> RootHistCnv::RootHistCnvP1DCnv

Definition at line 4 of file RHistogramCnv.cpp.

typedef RHistogramCnv<TProfile2D,TProfile2D,Gaudi::HistogramBase> RootHistCnv::RootHistCnvP2DCnv

Definition at line 16 of file RHistogramCnv.cpp.

## Function Documentation

template<class TYP >

INTupleItem * RootHistCnv::createNTupleItem | ( | std::string | itemName,
|  | std::string | blockName,
|  | std::string | indexName,
|  | int | indexRange,
|  | int | arraySize,
|  | TYP | min,
|  | TYP | max,
|  | INTuple * | ntup
| ) |  |

Definition at line 278 of file RNTupleCnv.cpp.

                                                    {

        std::string varName;
        if (blockName != "") {
          varName = blockName + "/" + itemName;
        } else {
          varName = itemName;
        }

        TYP null = 0;
        INTupleItem* col = 0;

        if (min == 0 && max == 0) {
          min = NTuple::Range<TYP>::min();
          max = NTuple::Range<TYP>::max();
        }

        if (indexName == "") {

          if (arraySize == 1) {
            // simple items
            col = NTuple::_Item<TYP>::create(ntup, varName,
                                             typeid(TYP),
                                             min, max, null);

          } else {
            // Arrays of fixed size
            col = NTuple::_Array<TYP>::create(ntup, varName,
                                              typeid(TYP),
                                              "", arraySize,
                                              min, max, null);
          }

        } else {

          if (arraySize == 1) {
            // Arrays of variable size
            col = NTuple::_Array<TYP>::create(ntup, varName,
                                              typeid(TYP),
                                              indexName, indexRange,
                                              min, max, null);
          } else {
            // Matrices
            col = NTuple::_Matrix<TYP>::create(ntup, varName,
                                               typeid(TYP),
                                               indexName,
                                               indexRange, arraySize,
                                               min, max, null);
          }

        }

        return col;

      }

template<class TYP >

INTupleItem* RootHistCnv::createNTupleItem | ( | NTUPLEINFO & | tags,
|  | long | i,
|  | INTuple * | tuple,
|  | TYP | minimum,
|  | TYP | maximum,
|  | long & | size
| ) |  |

Add an item of a given type to the N tuple.

RootHistCnv::INSTANTIATE | ( | bool | ) |

RootHistCnv::INSTANTIATE | ( | long | ) |

RootHistCnv::INSTANTIATE | ( | unsigned | char ) |

RootHistCnv::INSTANTIATE | ( | float | ) |

RootHistCnv::INSTANTIATE | ( | unsigned long | long ) |

RootHistCnv::INSTANTIATE | ( | char | ) |

RootHistCnv::INSTANTIATE | ( | double | ) |

RootHistCnv::INSTANTIATE | ( | int | ) |

RootHistCnv::INSTANTIATE | ( | short | ) |

bool RootHistCnv::parseName | ( | std::string | full,
|  | std::string & | blk,
|  | std::string & | var
| ) |  |

Definition at line 254 of file RNTupleCnv.cpp.

                                                                              {
      //-----------------------------------------------------------------------------
      int sp;
      if ( (sp=full.find("/")) != -1 ) {
        blk = full.substr(0,sp);
        var = full.substr(sp+1,full.length());
        return true;
      } else {
        blk = "AUTO_BLK";
        var = full;
        return false;
      }

    }

bool RootHistCnv::RootCd | ( | const std::string & | full ) |

Definition at line 9 of file RootDirFcn.cpp.

                          {

    //-----------------------------------------------------------------------------
    bool RootCd(const std::string& full)
    //-----------------------------------------------------------------------------
    {
      int p,i=1;
      std::string cur,sdir;

      gDirectory->cd("/");
      while ( (p = full.find("/",i)) != -1) {
        sdir = full.substr(i,p-i);
        if (! gDirectory->GetKey(sdir.c_str()) ) {
          return false;
        }
        gDirectory->cd(sdir.c_str());

bool RootHistCnv::RootMkdir | ( | const std::string & | full ) |

Definition at line 33 of file RootDirFcn.cpp.

    {

      int p,i;
      std::string fil,cur,s;
      TDirectory *gDir;

      gDir = gDirectory;

      std::list<std::string> lpath;
      i = 1;

      if ( (p=full.find(":",0)) != -1 ) {
        fil = full.substr(0,p);
        i = p+1;
        fil += ":/";
        gDirectory->cd(fil.c_str());
      }

      while ( (p = full.find("/",i)) != -1) {
        s = full.substr(i,p-i);
        lpath.push_back(s);
        i = p+1;
      }
      lpath.push_back( full.substr(i,full.length()-i) );

      if ( full.substr(0,1) == "/") {
        gDirectory->cd("/");
      }

      std::list<std::string>::const_iterator litr;
      for(litr=lpath.begin(); litr!=lpath.end(); ++litr) {
        cur = *litr;
        if (! gDirectory->GetKey(litr->c_str()) ) {
          gDirectory->mkdir(litr->c_str());

std::string RootHistCnv::RootPwd | ( | ) |

Definition at line 79 of file RootDirFcn.cpp.

bool RootHistCnv::RootTrimLeadingDir | ( | std::string & | full,
|  | std::string | dir
| ) |  |

Definition at line 88 of file RootDirFcn.cpp.

    {
      std::string dir = gDirectory->GetPath();

      return (dir);
    }

    //-----------------------------------------------------------------------------
    bool RootTrimLeadingDir(std::string &full, std::string dir)
    //-----------------------------------------------------------------------------
    {

      if (dir.substr(0,1) != "/") {
        dir.insert(0,"/");
      }

      if (dir.substr(dir.length()-1,1) != "/") {
        dir += "/";
      }

      long ll = full.find(dir);
      if (ll != 0) {

## Variable Documentation

std::string RootHistCnv::stat_dir = "/stat"`[static]`

Definition at line 14 of file PersSvc.cpp.

std::string RootHistCnv::undefFileName = "UndefinedROOTOutputFileName"`[static]`

Definition at line 15 of file PersSvc.cpp.

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines