Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:43

0001 #ifndef L1Trigger_TrackerTFP_GeometricProcessor_h
0002 #define L1Trigger_TrackerTFP_GeometricProcessor_h
0003 
0004 #include "L1Trigger/TrackTrigger/interface/Setup.h"
0005 #include "L1Trigger/TrackerTFP/interface/DataFormats.h"
0006 #include "DataFormats/L1TrackTrigger/interface/TTDTC.h"
0007 
0008 #include <vector>
0009 #include <deque>
0010 
0011 namespace trackerTFP {
0012 
0013   // Class to route Stubs of one region to one stream per sector
0014   class GeometricProcessor {
0015   public:
0016     GeometricProcessor(const edm::ParameterSet& iConfig,
0017                        const tt::Setup* setup_,
0018                        const DataFormats* dataFormats,
0019                        int region);
0020     ~GeometricProcessor() {}
0021 
0022     // read in and organize input product (fill vector input_)
0023     void consume(const TTDTC& ttDTC);
0024     // fill output products
0025     void produce(tt::StreamsStub& accepted, tt::StreamsStub& lost);
0026 
0027   private:
0028     // remove and return first element of deque, returns nullptr if empty
0029     template <class T>
0030     T* pop_front(std::deque<T*>& ts) const;
0031 
0032     // true if truncation is enbaled
0033     bool enableTruncation_;
0034     // provides run-time constants
0035     const tt::Setup* setup_;
0036     // provides dataformats
0037     const DataFormats* dataFormats_;
0038     // processing region (0 - 8)
0039     const int region_;
0040     // storage of input stubs
0041     std::vector<StubPP> stubsPP_;
0042     // storage of output stubs
0043     std::vector<StubGP> stubsGP_;
0044     // h/w liked organized pointer to input stubs
0045     std::vector<std::vector<std::deque<StubPP*>>> input_;
0046   };
0047 
0048 }  // namespace trackerTFP
0049 
0050 #endif