Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:59:38

0001 #ifndef DCCTCCBLOCK_HH
0002 #define DCCTCCBLOCK_HH
0003 
0004 /*
0005  *\ Class DCCTCCBlock
0006  *
0007  * Class responsible for the trigger primitives unpacking.
0008  *
0009  * \file DCCTCCBlock.h
0010  *
0011  *
0012  * \author N. Almeida
0013  * 
0014  *
0015 */
0016 
0017 #include <iostream>
0018 #include <string>
0019 #include <vector>
0020 #include <map>
0021 #include <utility>
0022 
0023 #include <DataFormats/EcalDigi/interface/EcalDigiCollections.h>
0024 #include <DataFormats/EcalDigi/interface/EcalTriggerPrimitiveDigi.h>
0025 #include <DataFormats/EcalDigi/interface/EcalPseudoStripInputDigi.h>
0026 #include <DataFormats/EcalDigi/interface/EcalTriggerPrimitiveSample.h>
0027 #include <DataFormats/EcalDetId/interface/EcalTrigTowerDetId.h>
0028 
0029 #include "DCCDataBlockPrototype.h"
0030 
0031 class DCCDataUnpacker;
0032 
0033 class DCCTCCBlock : public DCCDataBlockPrototype {
0034 public:
0035   /**
0036       Class constructor
0037     */
0038   DCCTCCBlock(DCCDataUnpacker* u, EcalElectronicsMapper* m, DCCEventBlock* e, bool unpack);
0039 
0040   virtual void addTriggerPrimitivesToCollection(){};
0041 
0042   /**
0043       Unpacks TCC data 
0044      */
0045   using DCCDataBlockPrototype::unpack;
0046   int unpack(const uint64_t** data, unsigned int* dwToEnd, short tccChId = 0);
0047 
0048   void display(std::ostream& o) override;
0049 
0050 protected:
0051   virtual bool checkTccIdAndNumbTTs() { return true; };
0052 
0053   unsigned int tccId_;
0054   unsigned int bx_;
0055   unsigned int l1_;
0056   unsigned int nTTs_;
0057   unsigned int nTSamples_;
0058   unsigned int expNumbTTs_;
0059   unsigned int expTccId_;
0060   unsigned int ps_;
0061 
0062   EcalTriggerPrimitiveDigi* pTP_;
0063   EcalPseudoStripInputDigi* pPS_;
0064   std::unique_ptr<EcalTrigPrimDigiCollection>* tps_;
0065   std::unique_ptr<EcalPSInputDigiCollection>* pss_;
0066 };
0067 
0068 #endif