Gaudi Framework, version v25r2

Home   Generated: Wed Jun 4 2014
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  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 >
INTupleItemcreateNTupleItem (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 >
INTupleItemcreateNTupleItem (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

Definition at line 22 of file RHistogramCnv.cpp.

Definition at line 30 of file RHistogramCnv.cpp.

Definition at line 38 of file RHistogramCnv.cpp.

Definition at line 6 of file RHistogramCnv.cpp.

Definition at line 14 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 275 of file RNTupleCnv.cpp.

{
std::string varName;
if (blockName != "") {
varName = blockName + "/" + itemName;
} else {
varName = itemName;
}
TYP null = 0;
if (min == 0 && max == 0) {
}
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;
}
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 ( std::string  full,
std::string &  blk,
std::string &  var 
)

Definition at line 251 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 16 of file RootDirFcn.cpp.

{
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());
i = p+1;
}
gDirectory->cd( full.substr(i,full.length()-i).c_str() );
return true;
}
bool RootHistCnv::RootMkdir ( const std::string &  full)

Definition at line 40 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());
}
gDirectory->cd(litr->c_str());
}
gDirectory = gDir;
return true;
}
std::string RootHistCnv::RootPwd ( )

Definition at line 86 of file RootDirFcn.cpp.

{
std::string dir = gDirectory->GetPath();
return (dir);
}
bool RootHistCnv::RootTrimLeadingDir ( std::string &  full,
std::string  dir 
)

Definition at line 95 of file RootDirFcn.cpp.

{
if (dir.substr(0,1) != "/") {
dir.insert(0,"/");
}
if (dir.substr(dir.length()-1,1) != "/") {
dir += "/";
}
long ll = full.find(dir);
if (ll != 0) {
return false;
}
full.erase(0,dir.length()-1);
return true;
}

Variable Documentation

std::string RootHistCnv::stat_dir = "/stat"
static

Definition at line 26 of file PersSvc.cpp.

std::string RootHistCnv::undefFileName = "UndefinedROOTOutputFileName"
static

Definition at line 27 of file PersSvc.cpp.


Generated at Wed Jun 4 2014 14:49:07 for Gaudi Framework, version v25r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004