| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions
RCWNTupleCnv.cpp File Reference
`#include "GaudiKernel/xtoa.h"`
`#include "GaudiKernel/INTupleSvc.h"`
`#include "GaudiKernel/MsgStream.h"`
`#include "GaudiKernel/NTuple.h"`
`#include <cstdio>`
`#include <utility>`
`#include <list>`
`#include <vector>`
`#include "RCWNTupleCnv.h"`
`#include "TTree.h"`
`#include "TLeafI.h"`
`#include "TLeafF.h"`
`#include "TLeafD.h"`
Include dependency graph for RCWNTupleCnv.cpp:

Go to the source code of this file.

## Macros
#define | ROOTHISTCNV_RCWNTUPLECNV_CPP
#define | ALLOW_ALL_TYPES

## Functions
template<class T >
void | analyzeItem (std::string typ, const NTuple::_Data< T > *it, std::string &desc, std::string &block_name, std::string &var_name, long &lowerRange, long &upperRange, long &size)

## Macro Definition Documentation

#define ALLOW_ALL_TYPES

Definition at line 3 of file RCWNTupleCnv.cpp.

#define ROOTHISTCNV_RCWNTUPLECNV_CPP

Definition at line 1 of file RCWNTupleCnv.cpp.

## Function Documentation

template<class T >

void analyzeItem | ( | std::string | typ,
|  | const NTuple::_Data< T > * | it,
|  | std::string & | desc,
|  | std::string & | block_name,
|  | std::string & | var_name,
|  | long & | lowerRange,
|  | long & | upperRange,
|  | long & | size
| ) |  |

Definition at line 31 of file RCWNTupleCnv.cpp.

{
std::string full_name = it->name();
RootHistCnv::parseName(full_name,block_name,var_name);
//long item_size = (sizeof(T) < 4) ? 4 : sizeof(T);
long item_size = sizeof(T);
long dimension = it->length();
long ndim = it->ndim()-1;
std::ostringstream text;
text << var_name;
if ( it->hasIndex() || it->length() > 1 ) {
text << '[';
}
if ( it->hasIndex() )
{
std::string ind_blk, ind_var;
std::string ind = it->index();
RootHistCnv::parseName(ind,ind_blk,ind_var);
if (ind_blk != block_name) {
std::cerr << "ERROR: Index for CWNT variable " << ind_var
<< " is in a different block: " << ind_blk << std::endl;
}
text << ind_var;
}
else if ( it->dim(ndim) > 1 ) {
text << it->dim(ndim);
}
for ( int i = ndim-1; i>=0; i-- ){
text << "][" << it->dim(i);
}
if ( it->hasIndex() || it->length() > 1 ) {
text << ']';
}
if (it->range().lower() != it->range().min() &&
it->range().upper() != it->range().max() ) {
lowerRange = (long) it->range().lower();
upperRange = (long) it->range().upper();
} else {
lowerRange = 0;
upperRange = -1;
}
text << typ;
desc += text.str();
size += item_size * dimension;
}