Jpp  19.1.0-rc.1
the software that should make you happy
Public Member Functions | Static Public Member Functions | List of all members
JSUPPORT::JMetaOld_t Struct Reference

Type definition of old meta data. More...

#include <JMeta.hh>

Inheritance diagram for JSUPPORT::JMetaOld_t:
JSUPPORT::JMeta std::map< std::string, std::string >

Public Member Functions

 operator JComment_t () const
 Type conversion operator. More...
 
std::string toString () const
 Convert meta data to string. More...
 

Static Public Member Functions

static void copy (const char *const file_name, TFile &out)
 Copy meta data. More...
 
static const JEquationParametersgetEquationParameters ()
 Get equation parameters. More...
 
static JMeta valueOf (const std::string &buffer)
 Extract meta data. More...
 

Detailed Description

Type definition of old meta data.

Definition at line 439 of file JMeta.hh.

Member Function Documentation

◆ operator JComment_t()

JSUPPORT::JMeta::operator JComment_t ( ) const
inlineinherited

Type conversion operator.

Returns
comment

Definition at line 123 of file JMeta.hh.

124  {
125  JComment_t comment;
126 
127  for (const_iterator i = this->begin(); i != this->end(); ++i) {
128  comment.push_back(i->first + ' ' + i->second);
129  }
130 
131  return comment;
132  }

◆ copy()

void JSUPPORT::JMeta::copy ( const char *const  file_name,
TFile &  out 
)
staticinherited

Copy meta data.

Parameters
file_namename of input file
outoutput file

Definition at line 421 of file JMeta.hh.

422  {
423  using namespace JPP;
424 
425  JRootFileReader<JMeta> in(file_name);
426 
427  while (in.hasNext()) {
428 
429  const JMeta* p = in.next();
430 
431  putObject(out, *p);
432  }
433  }
ROOT file reader.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool putObject(TDirectory &dir, const JMeta &meta)
Write meta data to ROOT directory.
Definition: JMeta.hh:370
Auxiliary class for ROOT I/O of application specific meta data.
Definition: JMeta.hh:72

◆ getEquationParameters()

static const JEquationParameters& JSUPPORT::JMeta::getEquationParameters ( )
inlinestaticinherited

Get equation parameters.

Returns
equation parameters

Definition at line 149 of file JMeta.hh.

150  {
151  static const JEquationParameters parameters("=", "\n", "", "");
152 
153  return parameters;
154  }
Simple data structure to support I/O of equations (see class JLANG::JEquation).

◆ valueOf()

static JMeta JSUPPORT::JMeta::valueOf ( const std::string &  buffer)
inlinestaticinherited

Extract meta data.

Parameters
buffermeta data
Returns
meta data

Definition at line 163 of file JMeta.hh.

164  {
165  using namespace std;
166  using namespace JPP;
167 
168  JMeta meta;
169 
170  istringstream is(buffer);
171 
173 
174  for (JEquation equation; is >> equation; ) {
175  meta[equation.getKey()] = equation.getValue();
176  }
177 
178  return meta;
179  }
General purpose equation class.
Definition: JEquation.hh:47
JLANG::JEquationFacet setequation
Type definition of stream manipulator for equational I/O.
Definition: JSTDTypes.hh:14
static const JEquationParameters & getEquationParameters()
Get equation parameters.
Definition: JMeta.hh:149

◆ toString()

std::string JSUPPORT::JMeta::toString ( ) const
inlineinherited

Convert meta data to string.

Returns
string

Definition at line 187 of file JMeta.hh.

188  {
189  using namespace std;
190  using namespace JPP;
191 
192  ostringstream os;
193 
195 
196  for (JMeta::const_iterator i = this->begin(); i != this->end(); ++i) {
197  os << JEquation::make_equation(i->first, i->second);
198  }
199 
200  return os.str();
201  }

The documentation for this struct was generated from the following file: