clean up evtReader.h

This commit is contained in:
Ryan Tang 2022-02-14 16:14:26 -05:00
parent 4e569c1f9e
commit 15a825e68a

View File

@ -35,12 +35,11 @@ class evtReader{
bool endOfFile;
bool isOpened;
Long64_t blockID;
long int nBlock;
unsigned int extraHeader[14];
unsigned int traceBlock[4000];
long int nBlock;
TBenchmark gClock;
///============================================ Methods
@ -53,18 +52,18 @@ class evtReader{
void OpenFile(TString inFileName);
void UpdateFileSize();
bool IsOpen() { return isOpened;}
bool IsEndOfFile();
bool IsOpen() {return isOpened;}
long int GetFilePos() {return inFilePos;}
long int GetFileSize() {return inFileSize;}
Long64_t GetBlockID() {return blockID;}
Long64_t GetNumberOfBlock() {return nBlock;}
Long64_t GetBlockID() { return blockID;}
int ReadBlock(int opt = 0); /// 0 = default, fill data
/// 1 = no fill data
void ScanNumberOfBlock();
Long64_t GetNumberOfBlock() {return nBlock;}
void PrintStatus(int mod);
};
@ -79,11 +78,10 @@ evtReader::evtReader(){
inFileSize = 0;
inFilePos = 0;
nBlock = 0;
blockID = -1;
endOfFile = false;
isOpened = false;
nBlock = 0;
}
@ -101,11 +99,11 @@ evtReader::evtReader(TString inFileName){
inFileSize = 0;
inFilePos = 0;
nBlock = 0;
blockID = -1;
endOfFile = false;
isOpened = false;
nBlock = 0;
OpenFile(inFileName);
}
@ -116,22 +114,15 @@ void evtReader::OpenFile(TString inFileName){
}else{
fseek(inFile, 0L, SEEK_END);
inFileSize = ftell(inFile);
inFilePos = 0;
rewind(inFile); ///back to the File begining
data->Clear();
blockID = -1;
endOfFile = false;
isOpened = true;
gClock.Reset();
gClock.Start("timer");
}
};
void evtReader::UpdateFileSize(){
if( inFile == NULL ) return;
fseek(inFile, 0L, SEEK_END);