rootwriter C++ API Reference¶
-
class I3ROOTBranchWrapper¶
- #include <I3ROOTBranchWrapper.h>
Subclassed by I3ROOTBranchWrapperData, I3ROOTBranchWrapperEnum
Public Functions
-
I3ROOTBranchWrapper()¶
-
I3ROOTBranchWrapper(TTree *tree, unsigned int index, size_t arrayLength = 1, bool multirow = false)¶
-
I3ROOTBranchWrapper(const I3ROOTBranchWrapper &rhs)¶
-
virtual ~I3ROOTBranchWrapper()¶
-
virtual void Fill(const I3TableRowConstPtr &data) = 0¶
-
inline const TBranch *Branch() const¶
-
inline TBranch *Branch()¶
Protected Functions
-
inline void SetBranch(TBranch *branch)¶
-
I3ROOTBranchWrapper()¶
-
class I3ROOTBranchWrapperData : public I3ROOTBranchWrapper¶
- #include <I3ROOTBranchWrapperData.h>
Public Functions
-
I3ROOTBranchWrapperData()¶
-
I3ROOTBranchWrapperData(TTree *tree, const I3Datatype &type, const std::string &branchname, const std::string &docstring, unsigned int index, size_t arrayLength = 1, const I3ROOTBranchWrapperConstPtr &counter = I3ROOTBranchWrapperConstPtr())¶
-
I3ROOTBranchWrapperData(const I3ROOTBranchWrapperData &rhs)¶
-
virtual ~I3ROOTBranchWrapperData()¶
-
virtual void Fill(const I3TableRowConstPtr &data)¶
-
I3ROOTBranchWrapperData()¶
-
class I3ROOTBranchWrapperEnum : public I3ROOTBranchWrapper¶
- #include <I3ROOTBranchWrapperEnum.h>
Public Types
-
typedef void (I3ROOTBranchWrapperEnum::* FillFn)(const I3TableRowConstPtr&)¶
Public Functions
-
I3ROOTBranchWrapperEnum()¶
-
I3ROOTBranchWrapperEnum(TTree *tree, const I3Datatype &type, const std::string &branchname, const std::string &docstring, unsigned int index, size_t arrayLength = 1, const I3ROOTBranchWrapperConstPtr &counter = I3ROOTBranchWrapperConstPtr())¶
-
I3ROOTBranchWrapperEnum(const I3ROOTBranchWrapperEnum &rhs)¶
-
virtual ~I3ROOTBranchWrapperEnum()¶
-
virtual void Fill(const I3TableRowConstPtr &data)¶
Private Functions
-
template<typename T>
void FillImp(const I3TableRowConstPtr &data)¶
-
FillFn selectFillImp(const I3Datatype &type)¶
Private Members
Friends
- friend class OnlyForTest
-
typedef void (I3ROOTBranchWrapperEnum::* FillFn)(const I3TableRowConstPtr&)¶
-
class I3ROOTTable : public I3Table¶
- #include <I3ROOTTable.h>
Public Functions
-
I3ROOTTable(I3TableService &service, const std::string &name, I3TableRowDescriptionConstPtr description)¶
-
virtual ~I3ROOTTable()¶
-
void Write()¶
Protected Functions
-
virtual void WriteRows(I3TableRowConstPtr row)¶
-
virtual I3Table::AlignmentType GetAlignmentType()¶
Private Functions
- SET_LOGGER ("I3ROOTTable")
Friends
- friend class I3ROOTTableService
-
I3ROOTTable(I3TableService &service, const std::string &name, I3TableRowDescriptionConstPtr description)¶
-
class I3ROOTTableService : public I3TableService¶
- #include <I3ROOTTableService.h>
Table service to write root table.
Encapsulates a root file and provides methods of writing data to that ROOT file in the tableio framework.
Public Functions
-
inline I3ROOTTableService(const std::string &filename, const std::string &master = "MasterTree", int compress = 1, const std::string &mode = "RECREATE")¶
The only constructor.
- Parameters:
filename – Name of the ROOT files to be written.
master – Name of the master tree in the ROOT file. All other trees are friends of this tree.
compress – Compression parameter. See the documentation of
TFile
in the ROOT documentation for the meaning of this number. The default should be okay for most people.mode – The file mode of the ROOT file. See the documentation of
TFile
in the ROOT documentation. Only change this if you really know what you are doing!
-
virtual ~I3ROOTTableService()¶
Public Static Functions
-
static void setMaxTreeSize(long long int maxSize)¶
Set the maximum file size when writing ROOT trees.
ROOT will automatically split files when they reach a certain size limit. By default, this size is set to 1TB in rootwriter to essentially keep ROOT from splitting files. If your file sizes have to be below some limit you can use this function to set the maximum file size. You should, however, be aware that this feature is experimental in rootwriter. Also, the files will not be independent, since rootwriter cannot guarantee that all trees have the same number of entries in every file. Especially, all entries of the master tree will be in the last file.
- Parameters:
maxSize – The maximum file size in MiB.
Protected Functions
-
virtual I3TablePtr CreateTable(const std::string &tableName, I3TableRowDescriptionConstPtr description)¶
Creates a ROOT tree with the given name and description.
Used by tableio.
-
virtual void CloseFile()¶
Close the ROOT file.
Private Functions
- SET_LOGGER ("I3ROOTTableService")
-
inline I3ROOTTableService(const std::string &filename, const std::string &master = "MasterTree", int compress = 1, const std::string &mode = "RECREATE")¶
-
namespace [anonymous]
-
namespace std
STL namespace.
- file I3ROOTBranchWrapper.cxx
- #include “I3ROOTBranchWrapper.h”
- file I3ROOTBranchWrapper.h
- #include <icetray/I3PointerTypedefs.h>#include <boost/shared_ptr.hpp>#include <cassert>#include <vector>
- file I3ROOTBranchWrapperData.cxx
- #include “I3ROOTBranchWrapperData.h”#include <icetray/I3Logging.h>#include <tableio/I3Datatype.h>#include <tableio/I3TableRow.h>#include <TBranch.h>#include <TTree.h>#include <boost/lexical_cast.hpp>#include <cassert>#include <cctype>#include <cstring>
Functions
-
char I3DatatypeToROOTType(const I3Datatype &type)¶
-
char I3DatatypeToROOTType(const I3Datatype &type)¶
- file I3ROOTBranchWrapperData.h
- #include “I3ROOTBranchWrapper.h”#include <icetray/I3PointerTypedefs.h>#include <boost/shared_ptr.hpp>#include <cassert>#include <vector>
- file I3ROOTBranchWrapperEnum.cxx
- #include “I3ROOTBranchWrapperEnum.h”#include <icetray/I3Logging.h>#include <tableio/I3Datatype.h>#include <tableio/I3TableRow.h>#include <TBranch.h>#include <TTree.h>#include <boost/lexical_cast.hpp>#include <boost/foreach.hpp>#include <cassert>#include <cctype>#include <string>
- file I3ROOTBranchWrapperEnum.h
- #include “I3ROOTBranchWrapper.h”#include <icetray/I3PointerTypedefs.h>#include <boost/shared_ptr.hpp>#include <map>#include <string>
- file I3ROOTTable.cxx
- #include “rootwriter/I3ROOTTable.h”#include “I3ROOTBranchWrapperData.h”#include “I3ROOTBranchWrapperEnum.h”#include <tableio/I3TableRow.h>#include <tableio/I3TableRowDescription.h>#include <boost/foreach.hpp>#include <TTree.h>
- file I3ROOTTable.h
- #include <tableio/I3Table.h>#include <vector>
Functions
-
I3_FORWARD_DECLARATION(I3TableService)
copyright (C) 2010 The Icecube Collaboration
$Id$
- Version
$Revision$
- Date
$LastChangedDate$
- Author
Fabian Kislat fabian.kislat@desy.de Last changed by: $LastChangedBy$
-
I3_FORWARD_DECLARATION(I3TableRowDescription)
-
I3_FORWARD_DECLARATION(I3TableRow)
-
I3_FORWARD_DECLARATION(I3ROOTBranchWrapper)¶
-
I3_FORWARD_DECLARATION(I3ROOTBranchWrapperData)¶
-
I3_POINTER_TYPEDEFS(I3ROOTTable)¶
-
I3_FORWARD_DECLARATION(I3TableService)
- file I3ROOTTableService.cxx
- #include “rootwriter/I3ROOTTableService.h”#include “rootwriter/I3ROOTTable.h”#include <tableio/I3TableRowDescription.h>#include <TFile.h>#include <TTree.h>#include <boost/foreach.hpp>
- file I3ROOTTableService.h
- #include <icetray/I3PointerTypedefs.h>#include <tableio/I3TableService.h>#include <dataio/I3FileStager.h>#include <boost/shared_ptr.hpp>#include <boost/make_shared.hpp>#include <vector>
Functions
-
I3_FORWARD_DECLARATION(I3ROOTTable)¶
-
I3_FORWARD_DECLARATION(I3ROOTTable)¶
- dir icetray
- dir private
- dir public
- dir rootwriter
- dir rootwriter
- dir rootwriter