Project
Loading...
Searching...
No Matches
o2::fwdalign::MilleRecordWriter Class Reference

#include <MilleRecordWriter.h>

Public Member Functions

 MilleRecordWriter ()
 constructor
 
virtual ~MilleRecordWriter ()
 destructor
 
void setCyclicAutoSave (const long nEntries)
 Set the number of entries to be used by TTree::AutoSave()
 
void setDataFileName (TString fname)
 choose data records filename
 
void changeDataBranchName (const bool isConstraintsRec=true)
 choose data records filename
 
void init ()
 init output file and tree
 
bool isInitOk () const
 check if init went well
 
o2::fwdalign::MillePedeRecordgetRecord ()
 return the record
 
Long64_t getCurrentDataID () const
 return the ID of the current record in the TTree
 
void fillRecordTree (const bool doPrint=false)
 fill tree
 
void terminate ()
 write tree and close output file
 
void setRecordRun (int run)
 assign run
 
void setRecordWeight (double wgh)
 assign weight
 

Protected Member Functions

 ClassDef (MilleRecordWriter, 0)
 

Protected Attributes

TTree * mDataTree
 TTree container that stores the records.
 
TFile * mDataFile
 output file where the records are written
 
bool mIsSuccessfulInit
 boolean to monitor the success of the initialization
 
bool mIsConstraintsRec
 boolean to know if these are data records or constraints records
 
long mNEntriesAutoSave
 max entries in the buffer after which TTree::AutoSave() is automatically used
 
TString mDataFileName
 name of the output file that will store the record TTree
 
TString mDataTreeName
 name of the record TTree
 
TString mDataBranchName
 name of the branch where records will be stored
 
o2::fwdalign::MillePedeRecordmRecord
 the running record
 
Long64_t mCurrentDataID
 counter increasing when adding a record to the tree
 

Detailed Description

Definition at line 31 of file MilleRecordWriter.h.

Constructor & Destructor Documentation

◆ MilleRecordWriter()

MilleRecordWriter::MilleRecordWriter ( )

constructor

Definition at line 26 of file MilleRecordWriter.cxx.

◆ ~MilleRecordWriter()

MilleRecordWriter::~MilleRecordWriter ( )
virtual

destructor

Definition at line 42 of file MilleRecordWriter.cxx.

Member Function Documentation

◆ changeDataBranchName()

void MilleRecordWriter::changeDataBranchName ( const bool  isConstraintsRec = true)

choose data records filename

Definition at line 64 of file MilleRecordWriter.cxx.

◆ ClassDef()

o2::fwdalign::MilleRecordWriter::ClassDef ( MilleRecordWriter  ,
 
)
protected

◆ fillRecordTree()

void MilleRecordWriter::fillRecordTree ( const bool  doPrint = false)

fill tree

Definition at line 115 of file MilleRecordWriter.cxx.

◆ getCurrentDataID()

Long64_t o2::fwdalign::MilleRecordWriter::getCurrentDataID ( ) const
inline

return the ID of the current record in the TTree

Definition at line 59 of file MilleRecordWriter.h.

◆ getRecord()

o2::fwdalign::MillePedeRecord * o2::fwdalign::MilleRecordWriter::getRecord ( )
inline

return the record

Definition at line 56 of file MilleRecordWriter.h.

◆ init()

void MilleRecordWriter::init ( )

init output file and tree

Definition at line 75 of file MilleRecordWriter.cxx.

◆ isInitOk()

bool o2::fwdalign::MilleRecordWriter::isInitOk ( ) const
inline

check if init went well

Definition at line 53 of file MilleRecordWriter.h.

◆ setCyclicAutoSave()

void MilleRecordWriter::setCyclicAutoSave ( const long  nEntries)

Set the number of entries to be used by TTree::AutoSave()

Definition at line 55 of file MilleRecordWriter.cxx.

◆ setDataFileName()

void o2::fwdalign::MilleRecordWriter::setDataFileName ( TString  fname)
inline

choose data records filename

Definition at line 44 of file MilleRecordWriter.h.

◆ setRecordRun()

void MilleRecordWriter::setRecordRun ( int  run)

assign run

Definition at line 149 of file MilleRecordWriter.cxx.

◆ setRecordWeight()

void MilleRecordWriter::setRecordWeight ( double  wgh)

assign weight

Definition at line 143 of file MilleRecordWriter.cxx.

◆ terminate()

void MilleRecordWriter::terminate ( )

write tree and close output file

Definition at line 131 of file MilleRecordWriter.cxx.

Member Data Documentation

◆ mCurrentDataID

Long64_t o2::fwdalign::MilleRecordWriter::mCurrentDataID
protected

counter increasing when adding a record to the tree

Definition at line 83 of file MilleRecordWriter.h.

◆ mDataBranchName

TString o2::fwdalign::MilleRecordWriter::mDataBranchName
protected

name of the branch where records will be stored

Definition at line 81 of file MilleRecordWriter.h.

◆ mDataFile

TFile* o2::fwdalign::MilleRecordWriter::mDataFile
protected

output file where the records are written

Definition at line 75 of file MilleRecordWriter.h.

◆ mDataFileName

TString o2::fwdalign::MilleRecordWriter::mDataFileName
protected

name of the output file that will store the record TTree

Definition at line 79 of file MilleRecordWriter.h.

◆ mDataTree

TTree* o2::fwdalign::MilleRecordWriter::mDataTree
protected

TTree container that stores the records.

Definition at line 74 of file MilleRecordWriter.h.

◆ mDataTreeName

TString o2::fwdalign::MilleRecordWriter::mDataTreeName
protected

name of the record TTree

Definition at line 80 of file MilleRecordWriter.h.

◆ mIsConstraintsRec

bool o2::fwdalign::MilleRecordWriter::mIsConstraintsRec
protected

boolean to know if these are data records or constraints records

Definition at line 77 of file MilleRecordWriter.h.

◆ mIsSuccessfulInit

bool o2::fwdalign::MilleRecordWriter::mIsSuccessfulInit
protected

boolean to monitor the success of the initialization

Definition at line 76 of file MilleRecordWriter.h.

◆ mNEntriesAutoSave

long o2::fwdalign::MilleRecordWriter::mNEntriesAutoSave
protected

max entries in the buffer after which TTree::AutoSave() is automatically used

Definition at line 78 of file MilleRecordWriter.h.

◆ mRecord

o2::fwdalign::MillePedeRecord* o2::fwdalign::MilleRecordWriter::mRecord
protected

the running record

Definition at line 82 of file MilleRecordWriter.h.


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