Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:14:56

0001 // Date   : 02/03/2004
0002 // Author : N.Almeida (LIP)
0003 
0004 #ifndef DCCTBTOWERBLOCK_HH
0005 #define DCCTBTOWERBLOCK_HH
0006 
0007 #include <iostream>
0008 #include <string>
0009 #include <vector>
0010 #include <map>
0011 #include <utility>
0012 
0013 #include "DCCBlockPrototype.h"
0014 
0015 class DCCTBEventBlock;
0016 class DCCTBXtalBlock;
0017 class DCCTBDataParser;
0018 
0019 class DCCTBTowerBlock : public DCCTBBlockPrototype {
0020 public:
0021   DCCTBTowerBlock(DCCTBEventBlock *dccBlock,
0022                   DCCTBDataParser *parser,
0023                   const uint32_t *buffer,
0024                   uint32_t numbBytes,
0025                   uint32_t wordsToEnd,
0026                   uint32_t wordEventOffset,
0027                   uint32_t expectedTowerID);
0028 
0029   ~DCCTBTowerBlock() override;
0030 
0031   void parseXtalData();
0032   int towerID();
0033 
0034   std::vector<DCCTBXtalBlock *> &xtalBlocks();
0035 
0036   std::vector<DCCTBXtalBlock *> xtalBlocksById(uint32_t stripId, uint32_t xtalId);
0037 
0038 protected:
0039   void dataCheck();
0040 
0041   enum towerFields { BXMASK = 0xFFF, L1MASK = 0xFFF };
0042 
0043   std::vector<DCCTBXtalBlock *> xtalBlocks_;
0044   DCCTBEventBlock *dccBlock_;
0045   uint32_t expectedTowerID_;
0046 };
0047 
0048 inline std::vector<DCCTBXtalBlock *> &DCCTBTowerBlock::xtalBlocks() { return xtalBlocks_; }
0049 
0050 #endif