#include "HeadersFAD.h" #include #include #include "Converter.h" using namespace std; void FAD::EventHeader::print(std::ostream &out) const { out << "Delimiter: " << hex << fStartDelimiter; out << (fStartDelimiter==kDelimiterStart?" (ok)":" (WRONG)") << endl; out << " (Crate=" << dec << Crate() << ", Board=" << Board() << ", Version=" << (fVersion>>8) << "." << (fVersion&0xff) << ", DNA=" << hex << fDNA <<")" << endl; out << dec; out << "PkgLength: " << fPackageLength << endl; out << "RunNumber: " << fRunNumber << endl; out << "Time: " << setprecision(3) << fixed << fTimeStamp/10000. << "s" << endl; out << "EvtCounter: " << fEventCounter << " of " << fNumTriggersToGenerate << endl; out << "Trigger: Type=" << hex << fTriggerType << dec << " Counter=" << fTriggerCounter << " Crc=0x" << hex << fTriggerCrc << endl; out << " N/40 = " << dec << GetTriggerLogic() << endl; out << " TRG ="; if (IsTriggerPhys()) out << " phys"; if (HasTriggerPed()) out << " ped"; if (HasTriggerLPext()) out << " LPext"; if (HasTriggerLPint()) out << " LPint"; if (HasTIMsource()) out << " TIM"; if (HasTriggerExt1()) out << " ext1"; if (HasTriggerExt2()) out << " ext2"; out << endl; out << " LPset = " << GetTriggerLPset() << endl; out << "RefClock: " << dec << fFreqRefClock << " (approx. " << fFreqRefClock*2.048 << "GHz)" << endl; out << "PhaseShift: " << fAdcClockPhaseShift << endl; out << "Prescaler: " << fTriggerGeneratorPrescaler << endl; out << "DAC: " << dec; for (int i=0; i