Belle II Software  release-08-01-10
RawSecMapRootInterface Class Reference

To be used as an interface to root-stuff. More...

#include <RawSecMapRootInterface.h>

Collaboration diagram for RawSecMapRootInterface:

Public Member Functions

 RawSecMapRootInterface (const std::string &mapName, const std::string &tag)
 Constructor - prepares ttree. More...
 
 ~RawSecMapRootInterface ()
 destructor deleting the rootFile.
 
 RawSecMapRootInterface (const RawSecMapRootInterface &rawSecMapInterFace)=delete
 That class shall not be copied.
 
 RawSecMapRootInterface (RawSecMapRootInterface &&other)
 but it may be moved
 
RawSecMapRootInterfaceoperator= (const RawSecMapRootInterface &rawSecMapInterFace)=delete
 That class shall not be copied.
 
void initialize2Hit (std::vector< std::string > filterNames)
 initialize the RawSecMapRootInterface for two-hit-combinations (to be called in Module::initialize().
 
void initialize3Hit (std::vector< std::string > filterNames)
 initialize the RawSecMapRootInterface for three-hit-combinations (to be called in Module::initialize().
 
FilterValueDataSet< SecIDPair > & get2HitDataSet ()
 returns a reference to the 2-hit-dataset so one can set the relevant values.
 
FilterValueDataSet< SecIDTriplet > & get3HitDataSet ()
 returns a reference to the 3-hit-dataset so one can set the relevant values.
 
void fill2Hit ()
 fill two-hit-combinations in tree, triggers an Error if values not set yet. More...
 
void fill3Hit ()
 fill three-hit-combinations in tree, triggers an Error if values not set yet. More...
 
void write ()
 write all trees to file at end of processing.
 

Protected Attributes

TFile * m_file
 a pointer to the file where the Tree shall be stored.
 
std::string m_name
 name of the StoreObjPtr.
 
StoreObjPtr< RootMergeable< TTree > > m_tree2Hit
 interface to the TTree storing two-hit-variables.
 
FilterValueDataSet< SecIDPairm_data2Hit
 Mask for storing dataSets to be piped into 2hit-tree.
 
StoreObjPtr< RootMergeable< TTree > > m_tree3Hit
 interface to the TTree storing three-hit-variables.
 
FilterValueDataSet< SecIDTripletm_data3Hit
 Mask for storing dataSets to be piped into 3hit-tree.
 

Detailed Description

To be used as an interface to root-stuff.

Definition at line 32 of file RawSecMapRootInterface.h.

Constructor & Destructor Documentation

◆ RawSecMapRootInterface()

RawSecMapRootInterface ( const std::string &  mapName,
const std::string &  tag 
)
inline

Constructor - prepares ttree.

Without calling the initializer-functions this Object is still not working!

Definition at line 58 of file RawSecMapRootInterface.h.

58  :
59  m_name(mapName),
60  m_tree2Hit((m_name + std::string("2Hit")), DataStore::c_Persistent),
61  m_data2Hit({}),
62  m_tree3Hit((m_name + std::string("3Hit")), DataStore::c_Persistent),
63  m_data3Hit({})
64 
65  {
66  // the "create" option results in the file not being opened if already existing
67  std::string fileName = mapName + "_" + tag + ".root";
68  m_file = new TFile((fileName).c_str(), "CREATE");
69  if (!m_file->IsOpen()) {
70  B2FATAL("File was not opened! File name: " << fileName << " (maybe it already esists!?)");
71  }
72  m_file->cd();
73  }
@ c_Persistent
Object is available during entire execution time.
Definition: DataStore.h:60
FilterValueDataSet< SecIDPair > m_data2Hit
Mask for storing dataSets to be piped into 2hit-tree.
StoreObjPtr< RootMergeable< TTree > > m_tree3Hit
interface to the TTree storing three-hit-variables.
StoreObjPtr< RootMergeable< TTree > > m_tree2Hit
interface to the TTree storing two-hit-variables.
TFile * m_file
a pointer to the file where the Tree shall be stored.
FilterValueDataSet< SecIDTriplet > m_data3Hit
Mask for storing dataSets to be piped into 3hit-tree.
std::string m_name
name of the StoreObjPtr.

Member Function Documentation

◆ fill2Hit()

void fill2Hit ( )
inline

fill two-hit-combinations in tree, triggers an Error if values not set yet.

(data is reset during each fill2Hit-call).

Definition at line 191 of file RawSecMapRootInterface.h.

◆ fill3Hit()

void fill3Hit ( )
inline

fill three-hit-combinations in tree, triggers an Error if values not set yet.

(data is reset during each fill3Hit-call).

Definition at line 205 of file RawSecMapRootInterface.h.


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