seperate FileInfo and GroupInfo struct
This commit is contained in:
parent
0927cca571
commit
86ac37d898
49
Aux/CustomStruct.h
Normal file
49
Aux/CustomStruct.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
#ifndef CustomStruct_H
|
||||
#define CustomStruct_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstdio>
|
||||
|
||||
#define ORDERSHIFT 100000
|
||||
|
||||
struct FileInfo {
|
||||
std::string fileName;
|
||||
unsigned int fileSize;
|
||||
unsigned int SN;
|
||||
unsigned long hitCount;
|
||||
unsigned short DPPType;
|
||||
unsigned short tick2ns;
|
||||
unsigned short order;
|
||||
unsigned short readerID;
|
||||
|
||||
unsigned long long t0;
|
||||
|
||||
unsigned long ID; // sn + 100000 * order
|
||||
|
||||
void CalOrder(){ ID = ORDERSHIFT * SN + order; }
|
||||
|
||||
void Print(){
|
||||
printf(" %10lu | %3d | %60s | %2d | %6lu | %10u Bytes = %.2f MB\n",
|
||||
ID, DPPType, fileName.c_str(), tick2ns, hitCount, fileSize, fileSize/1024./1024.);
|
||||
}
|
||||
};
|
||||
|
||||
struct GroupInfo{
|
||||
|
||||
std::vector<unsigned short> fileIDList;
|
||||
unsigned int usedHitCount ;
|
||||
|
||||
std::vector<unsigned short> readerIDList;
|
||||
unsigned long hitID ; // this is the ID for the reader->GetHit(hitID);
|
||||
|
||||
unsigned short currentID ; // the ID of the readerIDList;
|
||||
unsigned long hitCount ; // this is the hitCount for the currentID;
|
||||
unsigned int sn;
|
||||
bool finished;
|
||||
|
||||
unsigned long long timeShift;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -8,6 +8,8 @@
|
|||
#include "TFile.h"
|
||||
#include "TTree.h"
|
||||
|
||||
#include "CustomStruct.h"
|
||||
|
||||
#define MAX_MULTI 1000
|
||||
|
||||
//^#############################################################
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "fsuReader.h"
|
||||
#include "CustomStruct.h"
|
||||
|
||||
#include "TROOT.h"
|
||||
#include "TSystem.h"
|
||||
|
|
|
@ -3,47 +3,6 @@
|
|||
#include <algorithm>
|
||||
#include <filesystem>
|
||||
|
||||
#define ORDERSHIFT 100000
|
||||
|
||||
struct FileInfo {
|
||||
std::string fileName;
|
||||
unsigned int fileSize;
|
||||
unsigned int SN;
|
||||
unsigned long hitCount;
|
||||
unsigned short DPPType;
|
||||
unsigned short tick2ns;
|
||||
unsigned short order;
|
||||
unsigned short readerID;
|
||||
|
||||
unsigned long long t0;
|
||||
|
||||
unsigned long ID; // sn + 100000 * order
|
||||
|
||||
void CalOrder(){ ID = ORDERSHIFT * SN + order; }
|
||||
|
||||
void Print(){
|
||||
printf(" %10lu | %3d | %60s | %2d | %6lu | %10u Bytes = %.2f MB\n",
|
||||
ID, DPPType, fileName.c_str(), tick2ns, hitCount, fileSize, fileSize/1024./1024.);
|
||||
}
|
||||
};
|
||||
|
||||
struct GroupInfo{
|
||||
|
||||
std::vector<unsigned short> fileIDList;
|
||||
uInt usedHitCount ;
|
||||
|
||||
std::vector<unsigned short> readerIDList;
|
||||
ulong hitID ; // this is the ID for the reader->GetHit(hitID);
|
||||
|
||||
unsigned short currentID ; // the ID of the readerIDList;
|
||||
ulong hitCount ; // this is the hitCount for the currentID;
|
||||
uInt sn;
|
||||
bool finished;
|
||||
|
||||
unsigned long long timeShift;
|
||||
|
||||
};
|
||||
|
||||
class FSUReader{
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue
Block a user