27 edm::LogInfo(
"AlignmentIORootBase") <<
"Write to new file; first iteration: " << iter;
32 edm::LogInfo(
"AlignmentIORootBase") <<
"Write to existing file; highest iteration: " << iter;
36 <<
"Iteration " <<
iteration <<
" invalid or already exists for tree " <<
treename;
40 edm::LogInfo(
"AlignmentIORootBase") <<
"Write to new iteration: " << iter;
55 edm::LogError(
"AlignmentIORootBase") <<
"File does not exist!";
57 }
else if (iterfile == -2) {
63 edm::LogInfo(
"AlignmentIORootBase") <<
"Read from highest iteration: " << iter;
70 edm::LogInfo(
"AlignmentIORootBase") <<
"Read from specified iteration: " << iter;
79 if (
tree ==
nullptr) {
80 edm::LogError(
"AlignmentIORootBase") <<
"Tree does not exist in file!";
111 if (testFILE ==
nullptr) {
116 TFile* aFile = TFile::Open(
filename,
"read");
117 for (
int iter = 0; iter <
itermax; iter++) {
118 if ((
nullptr != (TTree*)aFile->Get(
treeName(iter,
tname))) && (iter > ihighest))
TString treeName(int iter, const TString &tname)
compose tree name
int testFile(const char *filename, const TString &tname)
test if file is existing and if so, what the highest iteration is
Log< level::Error, false > LogError
virtual ~AlignmentIORootBase()
destructor
virtual void setBranchAddresses(void)=0
set root branches
Log< level::Info, false > LogInfo
int closeRoot(void)
close IO
int openRoot(const char *filename, int iteration, bool writemode)
open IO
virtual void createBranches(void)=0
create root branches
std::string tname(const std::string &tableName, const std::string &schemaVersion)