MpdGetNumEvents.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #include "TROOT.h"
  2. #ifndef __CLING__
  3. #include <zlib.h>
  4. #endif
  5. class MpdLibZ
  6. {
  7. public:
  8. MpdLibZ (const char* filename);
  9. ~MpdLibZ();
  10. int open(const char* mode);
  11. int eof();
  12. int close();
  13. #ifndef __CLING__
  14. int write(voidpc buf, unsigned len);
  15. int read(voidp buf, unsigned len);
  16. #endif
  17. char* gets(char* buf, int len);
  18. int puts(char* s);
  19. #ifndef __CLING__
  20. off_t tell ();
  21. off_t seek (off_t pos, int whence);
  22. #endif
  23. private:
  24. const char* fileName;
  25. #ifndef __CLING__
  26. gzFile file;
  27. #endif
  28. ClassDef(MpdLibZ, 1);
  29. };
  30. class MpdGetNumEvents
  31. {
  32. private:
  33. MpdGetNumEvents(){}
  34. ~MpdGetNumEvents(){}
  35. static bool GetQGSMEventHeader(char* ss, MpdLibZ* libz, Int_t& fQGSM_format_ID);
  36. public:
  37. static Int_t GetNumROOTEvents(const char* filename);
  38. static Int_t GetNumPHSDEvents(const char* filename);
  39. static Int_t GetNumQGSMEvents(const char* fileName);
  40. static Int_t GetNumURQMDEvents(const char* fileName);
  41. static Int_t GetNumDCMSMMEvents(const char* fileName);
  42. ClassDef(MpdGetNumEvents, 1);
  43. };