BmnRoot
Loading...
Searching...
No Matches
MpdGetNumEvents.h
Go to the documentation of this file.
1#ifndef __CLING__
2#include "TROOT.h"
3
4#include <string>
5#include <zlib.h>
6#endif
7
8class MpdLibZ
9{
10 public:
11 MpdLibZ(const char* filename);
12 virtual ~MpdLibZ();
13
14 int open(const char* mode);
15 int eof();
16 int close();
17#ifndef __CLING__
18 int write(voidpc buf, unsigned len);
19 int read(voidp buf, unsigned len);
20#endif
21 char* gets(char* buf, int len);
22 int puts(char* s);
23#ifndef __CLING__
24 off_t tell();
25 off_t seek(off_t pos, int whence);
26#endif
27
28 private:
29 const char* fileName;
30#ifndef __CLING__
31 gzFile file;
32#endif
33
34 ClassDef(MpdLibZ, 1);
35};
36
38{
39 private:
41 virtual ~MpdGetNumEvents() {}
42
43 static bool GetQGSMEventHeader(char* ss, MpdLibZ* libz, Int_t& fQGSM_format_ID, int iVerbose);
44 static std::string FindFirstTree(const char* filename, int iVerbose);
45
46 public:
47 // Return event count in a given file produced by the PHSD event generator
48 // filename - file path to the generator file, iVerbose - output level (0 - no output, 1 - only errors, 2 - full
49 // output)
50 static Int_t GetNumPHSDEvents(const char* filename, int iVerbose = 2);
51 // Return event count in a given file produced by the QGSM/DCM-QGSM event generator
52 // filename - file path to the generator file, iVerbose - output level (0 - no output, 1 - only errors, 2 - full
53 // output)
54 static Int_t GetNumQGSMEvents(const char* fileName, int iVerbose = 2);
55 // Return event count in a given file produced by the UrQMD event generator
56 // filename - file path to the generator file, iVerbose - output level (0 - no output, 1 - only errors, 2 - full
57 // output)
58 static Int_t GetNumURQMDEvents(const char* fileName, int iVerbose = 2);
59 // Return event count in a given file produced by the DCM-SMM event generator
60 // filename - file path to the generator file, iVerbose - output level (0 - no output, 1 - only errors, 2 - full
61 // output)
62 static Int_t GetNumDCMSMMEvents(const char* fileName, int iVerbose = 2);
63 // Return event count in a given ROOT file as a number of records in a specfied tree
64 // filename - file path to the ROOT file
65 // treename - name of the tree in the ROOT file; "" - get FairRootManager default tree name, nullptr - get first
66 // tree from the file iVerbose - output level (0 - no output, 1 - only errors, 2 - full output)
67 static Int_t GetNumROOTEvents(const char* filename, const char* treename = "", int iVerbose = 2);
68 // Return event count in a given file for an event generator defined automatically
69 // filename - file path to the generator file, iVerbose - output level (0 - no output, 1 - only errors, 2 - full
70 // output)
71 static Int_t GetNumEvents(const char* filename, int iVerbose = 2);
72
74};
ClassDef(MpdGetNumEvents, 1)
static Int_t GetNumROOTEvents(const char *filename, const char *treename="", int iVerbose=2)
static Int_t GetNumPHSDEvents(const char *filename, int iVerbose=2)
static Int_t GetNumQGSMEvents(const char *fileName, int iVerbose=2)
static Int_t GetNumEvents(const char *filename, int iVerbose=2)
static Int_t GetNumURQMDEvents(const char *fileName, int iVerbose=2)
static Int_t GetNumDCMSMMEvents(const char *fileName, int iVerbose=2)
int read(voidp buf, unsigned len)
virtual ~MpdLibZ()
int write(voidpc buf, unsigned len)
int open(const char *mode)
int puts(char *s)
off_t seek(off_t pos, int whence)
char * gets(char *buf, int len)