// C++ headers #include // ROOT headers #include "TObject.h" #include "TString.h" #include "TClonesArray.h" // UNI headers #include "UEvent.h" ClassImp(UEvent); //_________________ UEvent::UEvent() : TObject(), fEventNr(0), fB(0), fPhi(0), fNes(0), fStepNr(0), fStepT(0), fComment("") { // Default constructor /* empty */ } //_________________ UEvent::UEvent(const UEvent& right) : TObject() { // Copy constructor fEventNr = right.fEventNr; fB = right.fB; fPhi = right.fPhi; fNes = right.fNes; fStepNr = right.fStepNr; fStepT = right.fStepT; fComment = right.fComment; } //_________________ UEvent::~UEvent() { // Destructor Clear(); } //_________________ void UEvent::print(Option_t* option) { // Print data members to the standard output std::cout << "---------------------------------------------" << std::endl << "-I- Event -I-" << std::endl << "Event number : " << fEventNr << std::endl << "Impact parameter (fm) : " << fB << std::endl << "Reaction plane angle (rad) : " << fPhi << std::endl << "Number of time steps : " << fNes << std::endl << "Time step number : " << fStepNr << std::endl << "Time of the time step (fm) : " << fStepT << std::endl << "Comment :\n" << fComment << std::endl; #if 0 TString opt = option; if(opt.Contains("all")) { // TODO: particle info? } #endif std::cout << "---------------------------------------------" << std::endl; } //_________________ void UEvent::setParameters(const Int_t& eventNr, const Double_t& b, const Double_t& phi, const Int_t& nes, const Int_t& stepNr, const Double_t& stepT, const char* comment) { // Set the event parameters fEventNr = (UInt_t)eventNr; fB = (Float_t)b; fPhi = (Float_t)phi; fNes = ( ( nes > std::numeric_limits::max() ) ? std::numeric_limits::max() : (UShort_t)nes ); fStepNr = ( ( stepNr > std::numeric_limits::max() ) ? std::numeric_limits::max() : (UShort_t)stepNr ) ; fStepT = (Float_t)stepT; fComment = comment; } //_________________ void UEvent::clear() { /* noop */ }