source: trunk/FACT++/src/HeadersFAD.cc@ 11014

Last change on this file since 11014 was 10782, checked in by tbretz, 14 years ago
Minor changes to output.
File size: 2.1 KB
Line 
1#include "HeadersFAD.h"
2
3#include <string.h>
4
5#include <iomanip>
6
7#include "Converter.h"
8
9using namespace std;
10
11void FAD::EventHeader::print(std::ostream &out) const
12{
13 out << "Delimiter: " << hex << fStartDelimiter;
14 out << (fStartDelimiter==kDelimiterStart?" (ok)":" (WRONG)") << endl;
15 out << " (Crate=" << dec << Crate() << ", Board=" << Board() << ", Version=" << (fVersion>>8) << "." << (fVersion&0xff) << ", DNA=" << hex << fDNA <<")" << endl;
16
17 out << dec;
18 out << "PkgLength: " << fPackageLength << endl;
19
20 out << "RunNumber: " << fRunNumber << endl;
21 out << "Time: " << fTimeStamp/10000. << "s" << endl;
22 out << "EvtCounter: " << fEventCounter << " of " << fNumTriggersToGenerate << endl;
23 out << "Trigger: Type=" << fTriggerType << " Id=" << fTriggerId << " Crc=0x" << hex << fTriggerCrc << endl;
24
25 out << "RefClock: " << dec << fFreqRefClock << endl;
26 out << "PhaseShift: " << fAdcClockPhaseShift << endl;
27 out << "Prescaler: " << fTriggerGeneratorPrescaler << endl;
28
29 out << "DAC: " << dec;
30 for (int i=0; i<kNumDac; i++)
31 out << " " << fDac[i];
32 out << endl;
33
34 out << "Temp: " << dec;
35 for (int i=0; i<kNumTemp; i++)
36 out << " " << GetTemp(i);
37 out << endl;
38
39 out << "Status=" << hex << fStatus << endl;
40 // PllLock -> 1111
41 out << " RefClk locked (PLLLCK): " << hex << (int)PLLLCK();
42 if (IsRefClockTooHigh())
43 out << " (too high)";
44 if (IsRefClockTooLow())
45 out << " (too low)";
46 out << endl;
47 out << " Domino wave (Denable): " << (HasDenable()?"enabled":"disabled") << endl;
48 out << " DRS sampling (Dwrite): " << (HasDwrite()?"enabled":"disabled") << endl;
49 out << " Dig.clock manager (DCM): " << (IsDcmLocked()?"locked":"unlocked");
50 out << " / " << (IsDcmReady()?"ready":"not ready") << endl;
51 out << " SPI Serial Clock (SCLK): " << (HasSpiSclk()?"enabled":"disabled") << endl;
52}
53
54void FAD::ChannelHeader::print(std::ostream &out) const
55{
56 out << "Chip=" << dec << Chip() << " Ch=" << Channel() << ":";
57 out << " StartCell=" << fStartCell;
58 out << " ROI=" << fRegionOfInterest << endl;
59}
Note: See TracBrowser for help on using the repository browser.