List of all members.
Detailed Description
Definition at line 24 of file ntuple.
Constructor & Destructor Documentation
inlib::waxml::ntuple::ntuple |
( |
std::ostream & |
a_writer, |
|
|
unsigned int |
a_spaces = 0 |
|
) |
| [inline] |
virtual inlib::waxml::ntuple::~ntuple |
( |
| ) |
[inline, virtual] |
inlib::waxml::ntuple::ntuple |
( |
const ntuple & |
a_from | ) |
[inline, protected] |
Member Function Documentation
static cid inlib::waxml::ntuple::_cid |
( |
int |
| ) |
[inline, static, protected] |
static cid inlib::waxml::ntuple::_cid |
( |
float |
| ) |
[inline, static, protected] |
static cid inlib::waxml::ntuple::_cid |
( |
double |
| ) |
[inline, static, protected] |
bool inlib::waxml::ntuple::add_row |
( |
| ) |
[inline] |
const std::vector<iobj*>& inlib::waxml::ntuple::columns |
( |
| ) |
const [inline] |
template<class T >
column<T>* inlib::waxml::ntuple::create_column |
( |
const std::string & |
a_name, |
|
|
const T & |
a_def = T() |
|
) |
| [inline] |
Definition at line 215 of file ntuple.
{
if(find_named<iobj>(m_cols,a_name)) return 0;
column<T>* col = new column<T>(a_name,a_def);
if(!col) return 0;
m_cols.push_back(col);
return col;
}
sub_ntuple* inlib::waxml::ntuple::create_sub_ntuple |
( |
const std::string & |
a_name | ) |
[inline] |
Definition at line 224 of file ntuple.
{
if(find_named<iobj>(m_cols,a_name)) return 0;
std::string spaces;
for(unsigned int i=0;i<10;i++) spaces += " ";
sub_ntuple* col = new sub_ntuple(a_name,m_spaces+spaces);
if(!col) return 0;
m_cols.push_back(col);
return col;
}
static void inlib::waxml::ntuple::get_booking |
( |
const std::vector< iobj * > & |
a_cols, |
|
|
std::string & |
a_string |
|
) |
| [inline, static, protected] |
Definition at line 297 of file ntuple.
{
a_string += "{";
std::vector<iobj*>::const_iterator it;
for(it=a_cols.begin();it!=a_cols.end();++it) {
if(it!=a_cols.begin()) a_string += ",";
std::string type = (*it)->aida_type();
a_string += type + " ";
std::string name = (*it)->name();
a_string += name + " = ";
if(sub_ntuple* sub = id_cast<iobj,sub_ntuple>(*(*it))){
get_booking(sub->columns(),a_string);
} else if(leaf* lf = id_cast<iobj,leaf>(*(*it))){
a_string += lf->s_def();
}
}
a_string += "}";
}
ntuple& inlib::waxml::ntuple::operator= |
( |
const ntuple & |
a_from | ) |
[inline, protected] |
static const std::string& inlib::waxml::ntuple::s_aida_type |
( |
int |
| ) |
[inline, static, protected] |
Definition at line 57 of file ntuple.
{
static const std::string s_v("int");
return s_v;
}
static const std::string& inlib::waxml::ntuple::s_aida_type |
( |
float |
| ) |
[inline, static, protected] |
Definition at line 61 of file ntuple.
{
static const std::string s_v("float");
return s_v;
}
static const std::string& inlib::waxml::ntuple::s_aida_type |
( |
double |
| ) |
[inline, static, protected] |
Definition at line 65 of file ntuple.
{
static const std::string s_v("double");
return s_v;
}
void inlib::waxml::ntuple::write_header |
( |
const std::string & |
a_path, |
|
|
const std::string & |
a_name, |
|
|
const std::string & |
a_title |
|
) |
| [inline] |
Definition at line 234 of file ntuple.
{
m_writer << m_spaces << " <tuple"
<< " path=" << sout(a_path)
<< " name=" << sout(a_name)
<< " title=" << sout(a_title)
<< ">" << std::endl;
m_writer << m_spaces << " <columns>" << std::endl;
std::vector<iobj*>::iterator it;
for(it=m_cols.begin();it!=m_cols.end();++it) {
if(sub_ntuple* sub = id_cast<iobj,sub_ntuple>(*(*it))){
m_writer << m_spaces << " <column"
<< " name=" << sout((*it)->name())
<< " type=" << sout("ITuple")
<< " booking=" << sout(sub->booking())
<< "/>" << std::endl;
} else if(leaf* lf = id_cast<iobj,leaf>(*(*it))){
m_writer << m_spaces << " <column"
<< " name=" << sout((*it)->name())
<< " type=" << sout((*it)->aida_type())
<< " default=" << sout(lf->s_def())
<< "/>" << std::endl;
}
}
m_writer << m_spaces << " </columns>" << std::endl;
m_writer << m_spaces << " <rows>" << std::endl;
}
void inlib::waxml::ntuple::write_trailer |
( |
| ) |
[inline] |
Member Data Documentation
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/old/inexlib-1.2/inlib/inlib/waxml/ntuple