Project
Loading...
Searching...
No Matches
MilleRecordReader.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16#ifndef ALICEO2_FWDALIGN_MILLERECORD_READER_H
17#define ALICEO2_FWDALIGN_MILLERECORD_READER_H
18
19#include <Rtypes.h>
20#include <TString.h>
21#include <TChain.h>
22#include <TFile.h>
23#include <TTree.h>
24
26
27namespace o2
28{
29namespace fwdalign
30{
31
33{
34 public:
37
39 virtual ~MilleRecordReader();
40
42 void changeDataBranchName(const bool isConstraintsRec = true);
43
45 void connectToChain(TChain* ch);
46
48 bool isReaderOk() const { return mIsSuccessfulInit; }
49
51 bool isReadEntryOk() const { return mIsReadEntryOk; }
52
55
57 long getCurrentDataID() const { return mCurrentDataID; }
58
60 void readNextEntry(const bool doPrint = false);
61
63 void readEntry(const Long_t id, const bool doPrint = false);
64
66 Long64_t getNEntries() const { return mNEntries; }
67
69 TString getDataTreeName() const { return mDataTreeName; }
70
71 protected:
72 TChain* mDataTree;
76 TString mDataTreeName;
79 Long64_t mCurrentDataID;
80 Long64_t mNEntries;
81
83};
84} // namespace fwdalign
85} // namespace o2
86
87#endif
Class to store the data of single track processing.
Store residuals and local/global deriavtives from a single track processing.
Long64_t mCurrentDataID
counter indicating the ID of the current record in the tree
void changeDataBranchName(const bool isConstraintsRec=true)
choose data records filename
o2::fwdalign::MillePedeRecord * mRecord
the running record
bool isReadEntryOk() const
check if the last operation readNextEntry() was ok
void readNextEntry(const bool doPrint=false)
read the next entry in the tree
ClassDef(MilleRecordReader, 0)
TChain * mDataTree
TChain container that stores the records.
bool mIsReadEntryOk
boolean to know if the last operation readNextEntry() was ok
Long64_t getNEntries() const
return the number of entries
bool mIsConstraintsRec
boolean to know if these are data records or constraints records
TString getDataTreeName() const
return the name of record data tree
void readEntry(const Long_t id, const bool doPrint=false)
read the entry # id in the tree
bool mIsSuccessfulInit
boolean to monitor the success of the initialization
void connectToChain(TChain *ch)
connect to input TChain
bool isReaderOk() const
check if connect to input TChain went well
TString mDataBranchName
name of the branch where records will be stored
Long64_t mNEntries
number of entries in the read TChain
TString mDataTreeName
name of the record TTree/TChain
long getCurrentDataID() const
return the ID of the current record in the TTree
o2::fwdalign::MillePedeRecord * getRecord()
return the record
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...