29 mIsSuccessfulInit(false),
30 mIsConstraintsRec(false),
31 mNEntriesAutoSave(10000),
32 mDataFileName(
"millerecords.root"),
33 mDataTreeName(
"o2sim"),
34 mDataBranchName(
"data"),
46 LOG(info) <<
"MilleRecordWriter - closed file "
85 "MilleRecordWriter::init() - failed to initialise records file %s!",
93 const int bufsize = 32000;
94 const int splitLevel = 99;
98 LOG(fatal) <<
"MilleRecordWriter::init() - failed to initialise TTree !";
104 "MilleRecordWriter::init() - file %s used for derivatives records",
108 "MilleRecordWriter::init() - file %s used for constraints records",
118 LOG(warning) <<
"MilleRecordWriter::fillRecordTree() - aborted, init was not ok !";
124 LOGF(info,
"MilleRecordWriter::fillRecordTree() - added entry %i",
mCurrentDataID);
136 LOG(info) <<
"MilleRecordWriter::terminate() - wrote tree "
ClassImp(o2::fwdalign::MilleRecordWriter)
Class dedicated to write MillePedeRecords to output file for FWDALIGN.
Store residuals and local/global deriavtives from a single track processing.
void SetWeight(Double_t w=1)
void Print(const Option_t *opt="") const override
print itself
void SetRunID(UInt_t run)
TString mDataFileName
name of the output file that will store the record TTree
virtual ~MilleRecordWriter()
destructor
void setCyclicAutoSave(const long nEntries)
Set the number of entries to be used by TTree::AutoSave()
bool isInitOk() const
check if init went well
Long64_t mCurrentDataID
counter increasing when adding a record to the tree
MilleRecordWriter()
constructor
void init()
init output file and tree
TTree * mDataTree
TTree container that stores the records.
bool mIsSuccessfulInit
boolean to monitor the success of the initialization
o2::fwdalign::MillePedeRecord * mRecord
the running record
bool mIsConstraintsRec
boolean to know if these are data records or constraints records
TFile * mDataFile
output file where the records are written
TString mDataTreeName
name of the record TTree
void setRecordRun(int run)
assign run
TString mDataBranchName
name of the branch where records will be stored
long mNEntriesAutoSave
max entries in the buffer after which TTree::AutoSave() is automatically used
void terminate()
write tree and close output file
void changeDataBranchName(const bool isConstraintsRec=true)
choose data records filename
void setRecordWeight(double wgh)
assign weight
void fillRecordTree(const bool doPrint=false)
fill tree
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"