001 #ifndef SixdErrorMonitorHtmlGen_hh
002 #define SixdErrorMonitorHtmlGen_hh
003
004
005 #include <string>
006 #include <vector>
007 #include <fstream>
008 #include "Trybos/TRY_Fixed_Size_Types.hh"
009
010
011
012 class SixdErrorMonitorHdiWord{
013 private:
014 std::string color1stHalf;
015 std::string colorLastHalf;
016 int4 word;
017 int4 orgWord;
018 unsigned int errorWord;
019 bool thisIsChip;
020
021
022 public:
023 SixdErrorMonitorHdiWord(int4 aword, unsigned int anerror, bool chip, int4 org_word);
024 ~SixdErrorMonitorHdiWord();
025
026 void Dump(std::ofstream& outfile);
027 void DumpErrorWord(std::ofstream& outfile);
028 int4 GetWord();
029 int4 GetCapID();
030 unsigned int GetErrorWord();
031 void SetChanColor(std::string color);
032 void SetChipColor(std::string color);
033 void SetDataColor(std::string color);
034 void SetCapIDColor(std::string color);
035 bool ThisIsChip();
036 };
037
038
039
040
041 class SixdErrorMonitorHdi{
042 private:
043 int runNum;
044 std::string name;
045 std::vector<SixdErrorMonitorHdiWord*> wordColl;
046 std::ofstream outfile;
047 char outfilename[256];
048 int isProblematic;
049 int errInCurrEvt;
050 bool zero0f3;
051 bool c2c2;
052
053
054 public:
055 SixdErrorMonitorHdi();
056 SixdErrorMonitorHdi(int runnumber, std::string astring);
057 ~SixdErrorMonitorHdi();
058
059 std::string GetName();
060 void SetName(std::string astring);
061 void Set00f3C2c2(unsigned int errorWord);
062 void AddWord(int4 aWord, unsigned int errorWord, bool thisIsChip, int4 org_word);
063 void AddTermWord(int4 aWord, unsigned int errorWord );
064 void ContinueDataAfterBreak( int4 aWord, unsigned int errorWord );
065 void DumpAnEvent(int eventnumber, int currEventCapid);
066 int IsProblematic();
067 void CloseHtml();
068 };
069
070
071
072
073 class SixdErrorMonitorHtmlGen {
074 private:
075 std::vector<SixdErrorMonitorHdi*> hdiColl;
076 int runNum;
077 int currEvent;
078 int4 currEventCapid;
079
080 public:
081 SixdErrorMonitorHtmlGen();
082 ~SixdErrorMonitorHtmlGen();
083
084 void SetRunNum(int value);
085 void Put00f3C2c2( int eventNum, int4 hdiHeader, unsigned int errorWord );
086 void PutChipWord( int eventNum, int4 hdiHeader, int4 aWord,
087 unsigned int errorWord, int4 orgWord );
088 void PutChanWord( int eventNum, int4 hdiHeader, int4 aWord,
089 unsigned int errorWord, int4 orgWord );
090 void PutTermWord( int eventNum, int4 hdiHeader, int4 aWord,
091 unsigned int errorWord, int4 orgWord );
092 void ContinueDataAfterBreak( int4 hdiHeader, int4 aWord,
093 unsigned int errorWord );
094 void DumpAnEvent(int eventnumber);
095 void MakeList();
096 SixdErrorMonitorHdi* FindIf(std::string aname);
097 };
098
099
100 #endif
Send problems or questions to cdfcode@fnal.gov