| # Gaudi Framework, version v20r4
Generated: 8 Jan 2009

# NTupleInterface.cpp File Reference

`#include "GaudiKernel/NTuple.h"`
`#include "HbookDef.h"`
`#include "NTupleInfo.h"`
`#include <climits>`

Include dependency graph for NTupleInterface.cpp:

Go to the source code of this file.

## Functions
long HBOOK_CALL_TYPE | rwntbook_ (const long &id, const long &dim, const char tag[512][64], const char *rzdir, const char *title, long, long, long)
long HBOOK_CALL_TYPE | rwntinfo_ (const long &id, long &dim, long &ents, char tags[512][64], double range[512][2], char title[], long, long)
long HBOOK_CALL_TYPE | cwntbook_ (const long &id, const char title[], const char opt[], long, long)
long HBOOK_CALL_TYPE | cwntinfo_ (const long &id, char name[512][64], long dim[], long theDim[512][5], long hasIndex[], char index[512][64], char type[], long size[], long hasRange[], long irange[512][2], double frange[512][2], char title[], long &numVar, long &numEnt, char block[512][12], long, long, long, long, long, long)
void HBOOK_CALL_TYPE | hlnext_ (long &id, char *, char *, const char *, int, int, int)
void | hbname_ (const long &id, const char *title, const void *opt, const char *form, int, int)
void | hropen_ (const long &, const char *, const char *, const char *, long &, long &, int, int, int)
void | hcdir_ (const char *, const char *, int, int)
void | hldir_ (const char *, const char *, int, int)
void | hmdir_ (const char *, const char *, int, int)
long | RWNT_BOOK (const NTUPLEINFO &i)
long | RWNT_INFO (NTUPLEINFO &i)
long | CWNT_BOOK (const NTUPLEINFO &i)
long | CWNT_INFO (NTUPLEINFO &i)
void | HLNEXT (long &id, std::string &a, std::string &b, const std::string &c)
void | HCDIR (const std::string &a, const std::string &b)
void | HLDIR (const std::string &a, const std::string &b)
void | HMDIR (const std::string &a, const std::string &b)
void | HBNAME (const long &id, const std::string &a, const void *opt, const std::string &b)
void | HROPEN (const long &lun, const std::string &a, const std::string &b, const std::string &c, long &i, long &j)

## Function Documentation

long CWNT_BOOK | ( | const NTUPLEINFO & | i | ) |

Definition at line 210 of file NTupleInterface.cpp.

    00210                                      {
    00211   return cwntbook_(i.id, i.title, " ", strlen(i.title), 1);
    00212 }

long CWNT_INFO | ( | NTUPLEINFO & | i | ) |

Definition at line 214 of file NTupleInterface.cpp.

    00214                               {
    00215   long r = cwntinfo_(i.id,
    00216                      i.name,
    00217                      i.dim,
    00218                      i.theDim,
    00219                      i.hasIndex,
    00220                      i.index,
    00221                      i.type,
    00222                      i.size,
    00223                      i.hasRange,
    00224                      i.irange,
    00225                      i.frange,
    00226                      i.title,
    00227                      i.numVar,
    00228                      i.numEnt,
    00229                      i.block,
    00230                      sizeof(i.name[0]), sizeof(i.index[0]), 1,
    00231                      sizeof(i.title)-1,
    00232                      sizeof(i.block[0]),sizeof(i.index[0])
    00233                      );
    00234
    00235   // Clean up ntuple block names
    00236   for (long iv=0; iv<i.numVar; ++iv) {
    00237     std::string blk = i.block[iv];
    00238     blk = blk.substr(0,8);
    00239     int ibs;
    00240     if ( (ibs = blk.find(" ")) >= 0 ) {
    00241       blk = blk.substr(0,ibs);
    00242     }
    00243     strcpy(i.block[iv],blk.c_str());
    00244   }
    00245
    00246   cleanForString(i.title, sizeof(i.title)-1);
    00247   return r;
    00248 }

long HBOOK_CALL_TYPE cwntbook_ | ( | const long & | id,
|  | const char | title[],
|  | const char | opt[],
|  | long | ,
|  | long |  |
| ) |  |  |

long HBOOK_CALL_TYPE cwntinfo_ | ( | const long & | id,
|  | char | name[512][64],
|  | long | dim[],
|  | long | theDim[512][5],
|  | long | hasIndex[],
|  | char | index[512][64],
|  | char | type[],
|  | long | size[],
|  | long | hasRange[],
|  | long | irange[512][2],
|  | double | frange[512][2],
|  | char | title[],
|  | long & | numVar,
|  | long & | numEnt,
|  | char | block[512][12],
|  | long | ,
|  | long | ,
|  | long | ,
|  | long | ,
|  | long | ,
|  | long |  |
| ) |  |  |

void HBNAME | ( | const long & | id,
|  | const std::string & | a,
|  | const void * | opt,
|  | const std::string & | b |
| ) |  |  |

Definition at line 269 of file NTupleInterface.cpp.

    00269                                                                                       {
    00270   hbname_(id, a.c_str(), opt, b.c_str(), a.length(), b.length());
    00271 }

void hbname_ | ( | const long & | id,
|  | const char * | title,
|  | const void * | opt,
|  | const char * | form,
|  | int | ,
|  | int |  |
| ) |  |  |

void HCDIR | ( | const std::string & | a,
|  | const std::string & | b |
| ) |  |  |

Definition at line 260 of file NTupleInterface.cpp.

    00260                                                      {
    00261   hcdir_(a.c_str(), b.c_str(), a.length(), b.length());
    00262 }

void hcdir_ | ( | const char * | ,
|  | const char * | ,
|  | int | ,
|  | int |  |
| ) |  |  |

void HLDIR | ( | const std::string & | a,
|  | const std::string & | b |
| ) |  |  |

Definition at line 263 of file NTupleInterface.cpp.

    00263                                                      {
    00264   hldir_(a.c_str(), b.c_str(), a.length(), b.length());
    00265 }

void hldir_ | ( | const char * | ,
|  | const char * | ,
|  | int | ,
|  | int |  |
| ) |  |  |

void HLNEXT | ( | long & | id,
|  | std::string & | a,
|  | std::string & | b,
|  | const std::string & | c |
| ) |  |  |

Definition at line 250 of file NTupleInterface.cpp.

    00250                                                                       {
    00251   char buff[256], typ[2] = {0,0};
    00252   memset(buff,0,sizeof(buff));
    00253   hlnext_(id, typ, buff, c.c_str(), sizeof(typ)-1, sizeof(buff), c.length());
    00254   buff[sizeof(buff)-1] = 0;
    00255   cleanForString(buff, sizeof(buff)-1);
    00256   b = buff;
    00257   a = typ;
    00258 }

void HBOOK_CALL_TYPE hlnext_ | ( | long & | id,
|  | char * | ,
|  | char * | ,
|  | const char * | ,
|  | int | ,
|  | int | ,
|  | int |  |
| ) |  |  |

void HMDIR | ( | const std::string & | a,
|  | const std::string & | b |
| ) |  |  |

Definition at line 266 of file NTupleInterface.cpp.

    00266                                                      {
    00267   hmdir_(a.c_str(), b.c_str(), a.length(), b.length());
    00268 }

void hmdir_ | ( | const char * | ,
|  | const char * | ,
|  | int | ,
|  | int |  |
| ) |  |  |

void HROPEN | ( | const long & | lun,
|  | const std::string & | a,
|  | const std::string & | b,
|  | const std::string & | c,
|  | long & | i,
|  | long & | j |
| ) |  |  |

Definition at line 272 of file NTupleInterface.cpp.

    00272                                                                                                            {
    00273   hropen_(lun, a.c_str(), b.c_str(), c.c_str(), i, j, a.length(), b.length(), c.length());
    00274 }

void hropen_ | ( | const long & | ,
|  | const char * | ,
|  | const char * | ,
|  | const char * | ,
|  | long & | ,
|  | long & | ,
|  | int | ,
|  | int | ,
|  | int |  |
| ) |  |  |

long RWNT_BOOK | ( | const NTUPLEINFO & | i | ) |

Definition at line 183 of file NTupleInterface.cpp.

    00183                                      {
    00184   return rwntbook_(i.id,
    00185        i.numVar,
    00186        i.name,
    00187        i.rzdir,
    00188        i.title,
    00189        sizeof(i.name[0]), strlen(i.rzdir), strlen(i.title));
    00190 }

long RWNT_INFO | ( | NTUPLEINFO & | i | ) |

Definition at line 192 of file NTupleInterface.cpp.

    00192                               {
    00193   long r = rwntinfo_(i.id,
    00194          i.numVar,
    00195          i.numEnt,
    00196          i.name,
    00197          i.frange,
    00198          i.title,
    00199          sizeof(i.name[0]), sizeof(i.title));
    00200   for ( long j = 0; j < i.numVar; j++ )   {
    00201     i.size[j] = sizeof(float)*CHAR_BIT;
    00202     i.dim[j] = 0;
    00203     i.hasRange[j] = 0;
    00204     i.hasIndex[j] = 0;
    00205   }
    00206   memset(i.block,0,sizeof(i.block));
    00207   return r;
    00208 }

long HBOOK_CALL_TYPE rwntbook_ | ( | const long & | id,
|  | const long & | dim,
|  | const char | tag[512][64],
|  | const char * | rzdir,
|  | const char * | title,
|  | long | ,
|  | long | ,
|  | long |  |
| ) |  |  |

long HBOOK_CALL_TYPE rwntinfo_ | ( | const long & | id,
|  | long & | dim,
|  | long & | ents,
|  | char | tags[512][64],
|  | double | range[512][2],
|  | char | title[],
|  | long | ,
|  | long |  |
| ) |  |  |