Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef TOWERBLOCKFORMATTER_H
0002 #define TOWERBLOCKFORMATTER_H
0003 
0004 #include <iostream>
0005 #include <vector>
0006 #include <map>
0007 
0008 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0009 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0010 #include "DataFormats/FEDRawData/interface/FEDRawData.h"
0011 #include "EventFilter/EcalDigiToRaw/interface/BlockFormatter.h"
0012 
0013 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
0014 
0015 //
0016 // The crystals corresponding to a given FE in a given FED
0017 //
0018 
0019 class TowerBlockFormatter : public BlockFormatter {
0020 public:
0021   TowerBlockFormatter(BlockFormatter::Config const&, BlockFormatter::Params const&);
0022 
0023   static const int kCardsPerTower = 5;  // Number of VFE cards per trigger tower
0024   void DigiToRaw(const EBDataFrame& dataframe, FEDRawData& rawdata, const EcalElectronicsMapping* TheMapping);
0025   void DigiToRaw(const EEDataFrame& dataframe, FEDRawData& rawdata, const EcalElectronicsMapping* TheMapping);
0026   void EndEvent(FEDRawDataCollection* productRawData);
0027 
0028   std::map<int, std::map<int, int> >& GetFEDorder() { return FEDorder; }
0029 
0030 private:
0031   std::map<int, std::map<int, int> > FEDmap;
0032   std::map<int, std::map<int, int> > FEDorder;
0033 };
0034 
0035 #endif