StPicoDst.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef StPicoDst_h
  2. #define StPicoDst_h
  3. class StPicoDstMaker;
  4. class StPicoEvent;
  5. class StPicoTrack;
  6. class StPicoV0;
  7. class StPicoTrigger;
  8. class StPicoBTOWHit;
  9. class StPicoBTofHit;
  10. #include "TObject.h"
  11. #include "TClonesArray.h"
  12. #include "StPicoArrays.h"
  13. class StPicoDst : public TObject {
  14. public:
  15. /// constructor
  16. StPicoDst();
  17. /// set the pointers to the TClonesArrays
  18. static void set(StPicoDstMaker* maker);
  19. /// set the pointers to the TClonesArrays
  20. static void set(TClonesArray**, TClonesArray**);
  21. /// resets the pointers to the TClonesArrays to 0
  22. static void unset();
  23. protected:
  24. /// array of TClonesArrays
  25. static TClonesArray** picoArrays;
  26. /// array of TClonesArrays for the stuff inherited from the StPicoV0
  27. static TClonesArray** picoV0Arrays;
  28. public:
  29. /// returns pointer to the n-th TClonesArray
  30. static TClonesArray* picoArray(int type) { return picoArrays[type]; }
  31. /// returns pointer to the n-th TClonesArray from the picoV0 arrays
  32. static TClonesArray* picoV0Array(int type) { return picoV0Arrays[type]; }
  33. /// returns pointer to current StPicoEvent (class holding the event wise information)
  34. static StPicoEvent* event() { return (StPicoEvent*)picoArrays[picoEvent]->UncheckedAt(0); }
  35. /// return pointer to i-th track
  36. static StPicoTrack* track(int i) { return (StPicoTrack*)picoArrays[picoTrack]->UncheckedAt(i); }
  37. /// return pointer to i-th trigger data
  38. static StPicoTrigger* trigger(int i) { return (StPicoTrigger*)picoArrays[picoTrigger]->UncheckedAt(i); }
  39. /// return pointer to i-th btow hit
  40. static StPicoBTOWHit* btowHit(int i) { return (StPicoBTOWHit*)picoArrays[picoBTOWHit]->UncheckedAt(i); }
  41. /// return pointer to i-th btof hit
  42. static StPicoBTofHit* btofHit(int i) { return (StPicoBTofHit*)picoArrays[picoBTofHit]->UncheckedAt(i); }
  43. /// returns pointer to the i-th picoV0Ks
  44. static StPicoV0* ks(int i) { return (StPicoV0*)picoV0Arrays[picoV0Ks]->UncheckedAt(i); }
  45. /// returns pointer to the i-th picoV0L
  46. static StPicoV0* lambda(int i) { return (StPicoV0*)picoV0Arrays[picoV0L]->UncheckedAt(i); }
  47. /// returns pointer to the i-th picoV0Lbar
  48. static StPicoV0* lbar(int i) { return (StPicoV0*)picoV0Arrays[picoV0Lbar]->UncheckedAt(i); }
  49. static unsigned int numberOfTracks() { return picoArrays[picoTrack]->GetEntries(); }
  50. static unsigned int numberOfTriggers() { return picoArrays[picoTrigger]->GetEntries(); }
  51. static unsigned int numberOfBTOWHits() { return picoArrays[picoBTOWHit]->GetEntries(); }
  52. static unsigned int numberOfBTofHits() { return picoArrays[picoBTofHit]->GetEntries(); }
  53. static unsigned int numberOfKs() { return picoV0Arrays[picoV0Ks]->GetEntries(); }
  54. static unsigned int numberOfLambda() { return picoV0Arrays[picoV0L]->GetEntries(); }
  55. static unsigned int numberOfLbar() { return picoV0Arrays[picoV0Lbar]->GetEntries(); }
  56. virtual void Print(Option_t *option = "") const; ///< Print basic event info
  57. static void printTracks();
  58. static void printTriggers();
  59. static void printBTOWHits();
  60. static void printBTofHits();
  61. static void printKs();
  62. static void printLambda();
  63. static void printLbar();
  64. friend class StPicoDstMaker;
  65. ClassDef(StPicoDst,1)
  66. };
  67. #endif