Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:44

0001 /****************************************************************************
0002  *
0003  * This is a part of HGCAL offline software.
0004  * Authors:
0005  *   Pedro Silva, CERN
0006  *   Laurent Forthomme, CERN
0007  *
0008  ****************************************************************************/
0009 
0010 #ifndef EventFilter_HGCalRawToDigi_HGCalModuleTreeReader_h
0011 #define EventFilter_HGCalRawToDigi_HGCalModuleTreeReader_h
0012 
0013 #include "EventFilter/HGCalRawToDigi/interface/HGCalECONDEmulator.h"
0014 
0015 namespace hgcal::econd {
0016   /// Read out a the relevant raw data produced by a module to memory and returns ECON-D frames on request
0017   /// \note The format is as agreed with system tests convenors so that it can be used in integration/beam tests
0018   class HGCalModuleTreeReader : public Emulator {
0019   public:
0020     /// \param[in] tree_name Name of the TB events tree
0021     /// \param[in] filenames List of filenames to loop on
0022     /// \param[in] num_channels Channels multiplicity
0023     explicit HGCalModuleTreeReader(const EmulatorParameters&,
0024                                    const std::string& tree_name,
0025                                    const std::vector<std::string>& filenames);
0026 
0027     /// Input tree collections
0028     struct HGCModuleTreeEvent {
0029       unsigned int event, chip;
0030       int half, bxcounter, eventcounter, orbitcounter, trigtime, trigwidth;
0031       std::vector<unsigned int>* daqdata{nullptr};
0032     };
0033     ECONDInput next() override;
0034 
0035   private:
0036     ECONDInputColl data_;
0037     ECONDInputColl::const_iterator it_data_;
0038   };
0039 
0040 }  // namespace hgcal::econd
0041 
0042 #endif