00001
00002
00003
00004
00005
00006 #ifndef DCCTBTCCBLOCK_HH
00007 #define DCCTBTCCBLOCK_HH
00008
00009 #include <iostream>
00010 #include <string>
00011 #include <vector>
00012 #include <map>
00013 #include <utility>
00014
00015 #include "DCCBlockPrototype.h"
00016 #include "DCCDataParser.h"
00017 #include "DCCDataMapper.h"
00018 #include "DCCEventBlock.h"
00019
00020 class DCCTBEventBlock;
00021 class DCCTBDataParser;
00022
00023
00024 class DCCTBTCCBlock : public DCCTBBlockPrototype {
00025
00026 public :
00030 DCCTBTCCBlock(DCCTBEventBlock * dccBlock,
00031 DCCTBDataParser * parser,
00032 ulong * buffer,
00033 ulong numbBytes,
00034 ulong wordsToEnd,
00035 ulong wordEventOffset,
00036 ulong expectedId );
00037
00038
00039
00040 std::vector< std::pair<int, bool> > triggerSamples();
00041
00042 std::vector<int> triggerFlags();
00043
00044 protected :
00048 void dataCheck();
00049
00053 void increment(ulong numb);
00054
00062 enum tccFields{
00063 BXMASK = 0xFFF,
00064 L1MASK = 0xFFF,
00065 BPOSITION_BLOCKID = 29,
00066 BLOCKID = 3,
00067 BPOSITION_FGVB = 8,
00068 ETMASK = 0xFF
00069 };
00070
00071 DCCTBEventBlock * dccBlock_;
00072 ulong expectedId_;
00073 };
00074
00075 #endif