123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- // C++ headers
- #include <iostream>
- // 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<unsigned short>::max() ) ?
- std::numeric_limits<unsigned short>::max() : (UShort_t)nes );
- fStepNr = ( ( stepNr > std::numeric_limits<unsigned short>::max() ) ?
- std::numeric_limits<unsigned short>::max() : (UShort_t)stepNr ) ;
- fStepT = (Float_t)stepT;
- fComment = comment;
- }
- //_________________
- void UEvent::clear() {
- /* noop */
- }
|