#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"
Go to the source code of this file.
|
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) |
|
#define ROOTHISTCNV_RCWNTUPLECNV_CPP |
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.
42 std::string full_name = it->
name();
46 long item_size =
sizeof(T);
47 long dimension = it->
length();
48 long ndim = it->
ndim()-1;
49 std::ostringstream text;
56 std::string ind_blk, ind_var;
57 std::string ind = it->
index();
59 if (ind_blk != block_name) {
60 std::cerr <<
"ERROR: Index for CWNT variable " << ind_var
61 <<
" is in a different block: " << ind_blk << std::endl;
65 else if ( it->
dim(ndim) > 1 ) {
66 text << it->
dim(ndim);
69 for (
int i = ndim-1;
i>=0;
i-- ){
70 text <<
"][" << it->
dim(
i);
76 if (it->
range().lower() != it->
range().min() &&
78 lowerRange = (long) it->
range().lower();
79 upperRange = (long) it->
range().upper();
87 size += item_size * dimension;
virtual const ItemRange & range() const =0
Access the range if specified.
virtual bool hasIndex() const =0
Is the tuple have an index item?
virtual const std::string & name() const =0
Access _Item name.
virtual long dim(long i) const =0
Access individual dimensions.
virtual long ndim() const =0
Dimension.
bool parseName(std::string full, std::string &blk, std::string &var)
virtual const std::string & index() const =0
Access the index _Item.
virtual long length() const =0
Access the buffer length.