123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- // C++ headers
- #include <iostream>
- // UniGen headers
- #include "URun.h"
- #include "UEvent.h"
- #include "UParticle.h"
- #include "UDst.h" // MUST be the last one
- TClonesArray** UDst::uArrays = 0;
- //________________
- void UDst::unset() {
- // Unset pointers
- uArrays = 0;
- }
- //________________
- void UDst::set(TClonesArray** theUArrays) {
- // Set pointers
- uArrays = theUArrays;
- }
- //________________
- void UDst::print() {
- // Print all information
- std::cout << "\n==================== Full event information ====================\n";
- printRunInfo();
- printEventInfo();
- printParticles();
- std::cout << "\n================================================================\n";
- }
- //________________
- void UDst::printRunInfo() {
- // Print run information
- run()->print();
- }
- //________________
- void UDst::printEventInfo() {
- // Print event information
- event()->print();
- }
- //________________
- void UDst::printParticles() {
- // Print all particles
- if( numberOfParticles() == 0 ) {
- std::cout << "No particles found!" << std::endl;
- return;
- }
- std::cout << "\n Particle list contains: " << numberOfParticles() << " entries\n\n";
- // Particle loop
- for(UInt_t iPart=0; iPart<numberOfParticles(); iPart++) {
- std::cout << "+++ particles #[" << iPart << "/" << numberOfParticles << "]\n";
- particle(iPart)->print();
- }
- std::cout << std::endl;
- }
|