StHbtFemtoDstReader.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //
  2. // The version of the class should be changed every time
  3. // when any changes in the codes are done
  4. // Grigory Nigmatkulov: 2016/12/15
  5. //
  6. #ifndef StHbtFemtoDstReader_hh
  7. #define StHbtFemtoDstReader_hh
  8. #include "StHbtMaker/Base/StHbtEventReader.hh"
  9. #include "StHbtMaker/Infrastructure/StHbtEvent.hh"
  10. #include "StHbtMaker/Infrastructure/StHbtTrack.hh"
  11. #include "StHbtMaker/Infrastructure/StHbtEnumeration.hh"
  12. #include "StEvent/StEnumerations.h"
  13. #include "StMaker.h"
  14. #include "StFemtoEvent.h"
  15. #include "TSystem.h"
  16. #include "TChain.h"
  17. #include "StChain.h"
  18. #include <string>
  19. #include <stdlib.h>
  20. class StFlowEvent;
  21. class StIOMaker;
  22. class TTree;
  23. class TFile;
  24. //_________________
  25. class StHbtFemtoDstReader : public StHbtEventReader {
  26. private:
  27. string mDir;
  28. string mFileName;
  29. string mFilter;
  30. bool mDebug;
  31. unsigned int mEventIndex;
  32. unsigned int mNEvents;
  33. unsigned int mTrig;
  34. TChain *mTChain;
  35. TTree *mTree;
  36. StFemtoEvent *mFemtoEvent;
  37. float mTotalTracks;
  38. float mSphLo, mSphHi;
  39. bool mSphFlag;
  40. std::vector<unsigned int> mTrigIdCol;
  41. int mMaxFiles;
  42. int InitRead(string aDir, string aFileName,
  43. string aFilter, int aMaxFiles);
  44. int FillChain(TChain *aChain, const char *aFileName,
  45. int aMaxFiles);
  46. int FillChain(TChain *aChain, char *aDir,
  47. const char *aFilter, int aMaxFiles);
  48. void UninitRead();
  49. StHbtEvent *Read();
  50. public:
  51. StHbtFemtoDstReader(const char *aDirName, const char *aFileName,
  52. const char *aFilter = ".", int aMaxFiles = 1e9, bool aDebug = false);
  53. StHbtEvent *ReturnHbtEvent();
  54. void AddTrigId(unsigned int aTrigId);
  55. void EnaSphericityCut() { mSphFlag = true; }
  56. void DisSphericityCut() { mSphFlag = false; }
  57. void SetSphericityCut(float lo, float hi) { mSphLo = lo; mSphHi = hi; }
  58. void PrintTotalTracks();
  59. void DoDebug(bool aDebug = false);
  60. StHbtString Report();
  61. int GetNEvents();
  62. void SetTrigger(unsigned int trig, char mode);
  63. ClassDef(StHbtFemtoDstReader, 2)
  64. };
  65. #endif