CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/EventFilter/EcalRawToDigi/interface/DCCMemBlock.h

Go to the documentation of this file.
00001 #ifndef DCCMEMBLOCK_HH
00002 #define DCCMEMBLOCK_HH
00003 
00004 /*
00005  *\ Class DCCMemBlock
00006  *
00007  * Class responsible for MEMs unpacking 
00008  *
00009  * \file DCCTCCBlock.h
00010  *
00011  * $Date: 2010/09/15 21:51:33 $
00012  * $Revision: 1.2 $
00013  *
00014  * \author N. Almeida
00015  * \author G. Franzoni
00016  *
00017 */
00018 
00019 #include <iostream>
00020 #include <memory>
00021 #include <stdint.h>
00022 #include <string>
00023 #include <vector>
00024 #include <map>
00025 #include <utility>
00026 
00027 #include <DataFormats/EcalDigi/interface/EcalDigiCollections.h>
00028 #include <DataFormats/EcalRawData/interface/EcalRawDataCollections.h>
00029 #include <DataFormats/EcalDetId/interface/EcalDetIdCollections.h>
00030 #include <FWCore/MessageLogger/interface/MessageLogger.h>
00031 #include "DCCDataBlockPrototype.h"
00032 
00033 class DCCEventBlock;
00034 class DCCDataUnpacker;
00035 
00036 class DCCMemBlock : public DCCDataBlockPrototype {
00037         
00038   public :
00039 
00040     DCCMemBlock( DCCDataUnpacker * u,EcalElectronicsMapper * m, DCCEventBlock * e);
00041          
00042     virtual ~DCCMemBlock(){}
00043          
00044     void updateCollectors();
00045     
00046     void display(std::ostream & o); 
00047     
00048     int unpack(uint64_t ** data, unsigned int * dwToEnd, unsigned int expectedTowerID);   
00049                         
00050   protected :
00051          
00052     void unpackMemTowerData();
00053     void fillPnDiodeDigisCollection();
00054 
00055     std::vector<short> pn_;
00056 
00057     unsigned int expTowerID_;
00058     unsigned int expXtalTSamples_;
00059     unsigned int kSamplesPerPn_;
00060          
00061     unsigned int lastStripId_;
00062     unsigned int lastXtalId_;
00063     unsigned int lastTowerBeforeMem_;
00064 
00065     unsigned int towerId_;      
00066     unsigned int numbDWInXtalBlock_;
00067     unsigned int xtalBlockSize_;
00068     unsigned int nTSamples_; 
00069     unsigned int unfilteredTowerBlockLength_; 
00070    
00071     unsigned int bx_;
00072     unsigned int l1_;
00073          
00074     std::auto_ptr<EcalElectronicsIdCollection>   * invalidMemChIds_;  
00075     std::auto_ptr<EcalElectronicsIdCollection>   * invalidMemBlockSizes_; 
00076     std::auto_ptr<EcalElectronicsIdCollection>   * invalidMemTtIds_; 
00077     std::auto_ptr<EcalElectronicsIdCollection>   * invalidMemGains_;
00078     std::auto_ptr<EcalPnDiodeDigiCollection>     * pnDiodeDigis_;
00079         
00080 };
00081 
00082 
00083 #endif