#ifndef UDst_h #define UDst_h // ROOT headers #include "TClonesArray.h" // UniGen headers #include "UArrays.h" // Forward declarations class UEvent; class URun; class UParticle; //________________ class UDst { public: /// Default constructor UDst() { /* emtpy */ } /// Destructor ~UDst() { /* emtpy */ } /// Set pointers to the TClonesArrays static void set(TClonesArray** array); /// Reset pointers to the TClonesArrays to 0 static void unset(); /// Return pointer to the i-th TClonesArray static TClonesArray* uArray(Int_t type) { return uArrays[type]; } /// Return pointer to the URun information static URun* run() { return (URun*)uArrays[UArrays::Run]->UncheckedAt(0); } /// Return pointer to the UEvent information static UEvent* event() { return (UEvent*)uArrays[UArrays::Event]->UncheckedAt(0); } /// Return pointer to the i-th particle static UParticle* particle(Int_t i) { return (UParticle*)uArrays[UArrays::Particle]->UncheckedAt(i); } /// Return number of particles in the current events static UInt_t numberOfParticles() { return uArrays[UArrays::Particle]->GetEntries(); } /// Print information static void print(); /// Print run information static void printRunInfo(); /// Print event information static void printEventInfo(); /// Print particle information static void printParticles(); private: /// Array of TClonesArrays static TClonesArray** uArrays; }; #endif // #define UDst_h