| The Gaudi Framework v30r0 (c919700c)

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

- Namespace List
- Namespace Members

Classes | Typedefs | Functions
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 | RootCompressionSettings
| Simple class to decode a ROOT compression settings string, of the form '<Alg>:<level>' into the integer code to pass to ROOT. 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. More...
bool | parseName (const 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)

## Typedef Documentation

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

Definition at line 33 of file RHistogramCnv.cpp.

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

Definition at line 46 of file RHistogramCnv.cpp.

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

Definition at line 59 of file RHistogramCnv.cpp.

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

Definition at line 7 of file RHistogramCnv.cpp.

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

Definition at line 20 of file RHistogramCnv.cpp.

## Function Documentation

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.

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 273 of file RNTupleCnv.cpp.

275 {
276
277 std::string varName;
278 if ( blockName != "" ) {
279 varName = blockName + "/" + itemName;
280 } else {
281 varName = itemName;
282 }
283
284 TYP null = 0;
285 INTupleItem* col = nullptr;
286
287 if ( min == 0 && max == 0 ) {
288 min = NTuple::Range<TYP>::min();
289 max = NTuple::Range<TYP>::max();
290 }
291
292 if ( indexName == "" ) {
293
294 if ( arraySize == 1 ) {
295 // simple items
296 col = NTuple::_Item<TYP>::create( ntup, varName, typeid( TYP ), min, max, null );
297
298 } else {
299 // Arrays of fixed size
300 col = NTuple::_Array<TYP>::create( ntup, varName, typeid( TYP ), "", arraySize, min, max, null );
301 }
302
303 } else {
304
305 if ( arraySize == 1 ) {
306 // Arrays of variable size
307 col = NTuple::_Array<TYP>::create( ntup, varName, typeid( TYP ), indexName, indexRange, min, max, null );
308 } else {
309 // Matrices
310 col = NTuple::_Matrix<TYP>::create( ntup, varName, typeid( TYP ), indexName, indexRange, arraySize, min, max,
311 null );
312 }
313 }
314
315 return col;
316 }
NTuple::Range::min
static TYP min()
Minimal number of data.
Definition: NTuple.h:85
NTuple::_Array::create
static _Array * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long len, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:34
std::string
STL class.
std::min
T min(T...args)
INTupleItem
NTuple interface class definition.
Definition: INTuple.h:27
NTuple::Range::max
static TYP max()
Maximal number of data.
Definition: NTuple.h:87
std::max
T max(T...args)
NTuple::_Item::create
static _Item * create(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:26
NTuple::_Matrix::create
static _Matrix * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long ncol, long nrow, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:42

RootHistCnv::INSTANTIATE | ( | float |  | ) |

RootHistCnv::INSTANTIATE | ( | double |  | ) |

RootHistCnv::INSTANTIATE | ( | bool |  | ) |

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

RootHistCnv::INSTANTIATE | ( | int |  | ) |

RootHistCnv::INSTANTIATE | ( | short |  | ) |

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

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

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

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

Definition at line 246 of file RNTupleCnv.cpp.

247 {
248 //-----------------------------------------------------------------------------
249 int sp;
250 if ( ( sp = full.find( "/" ) ) != -1 ) {
251 blk = full.substr( 0, sp );
252 var = full.substr( sp + 1 );
253 return true;
254 } else {
255 blk = "AUTO_BLK";
256 var = full;
257 return false;
258 }
259 }
compareOutputFiles.sp
sp
Definition: compareOutputFiles.py:466
std::string::find
T find(T...args)
std::string::substr
T substr(T...args)

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

Definition at line 15 of file RootDirFcn.cpp.

17 {
18 int p, i = 1;
19
20 gDirectory->cd( "/" );
21 while ( ( p = full.find( "/", i ) ) != -1 ) {
22 auto sdir = full.substr( i, p - i );
23 if ( !gDirectory->GetKey( sdir.c_str() ) ) {
24 return false;
25 }
26 gDirectory->cd( sdir.c_str() );
27 i = p + 1;
28 }
29 gDirectory->cd( full.substr( i ).c_str() );
30 return true;
31 }
std::string::find
T find(T...args)
std::string::substr
T substr(T...args)

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

Definition at line 34 of file RootDirFcn.cpp.

36 {
37
38 TDirectory* gDir = gDirectory;
39
40 int i = 1;
41 auto p = full.find( ":", 0 );
42 if ( p != std::string::npos ) {
43 auto fil = full.substr( 0, p );
44 i = p + 1;
45 fil += ":/";
46 gDirectory->cd( fil.c_str() );
47 }
48
49 std::vector<std::string> lpath;
50 while ( ( p = full.find( "/", i ) ) != std::string::npos ) {
51 lpath.push_back( full.substr( i, p - i ) );
52 i = p + 1;
53 }
54 lpath.push_back( full.substr( i ) );
55
56 if ( full.compare( 0, 1, "/" ) == 0 ) gDirectory->cd( "/" );
57
58 for ( const auto& lp : lpath ) {
59 if ( !gDirectory->GetKey( lp.c_str() ) ) {
60 gDirectory->mkdir( lp.c_str() );
61 }
62 gDirectory->cd( lp.c_str() );
63 }
64 gDirectory = gDir;
65
66 return true;
67 }
std::vector::push_back
T push_back(T...args)
std::string::find
T find(T...args)
std::vector< std::string >
std::string::substr
T substr(T...args)
std::string::compare
T compare(T...args)

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

Definition at line 70 of file RootDirFcn.cpp.

72 {
73 std::string dir = gDirectory->GetPath();
74
75 return ( dir );
76 }
std::string
STL class.

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

Definition at line 79 of file RootDirFcn.cpp.

81 {
82
83 if ( dir.compare( 0, 1, "/" ) != 0 ) {
84 dir.insert( 0, "/" );
85 }
86
87 if ( dir.compare( dir.length() - 1, 1, "/" ) != 0 ) {
88 dir += "/";
89 }
90
91 long ll = full.find( dir );
92 if ( ll != 0 ) {
93 return false;
94 }
95
96 full.erase( 0, dir.length() - 1 );
97
98 return true;
99 }
std::string::erase
T erase(T...args)
std::string::insert
T insert(T...args)
std::string::find
T find(T...args)
std::string::length
T length(T...args)
std::string::compare
T compare(T...args)