CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ProcessBase.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_ProcessBase_h
2 #define L1Trigger_TrackFindingTracklet_interface_ProcessBase_h
3 
4 #include <string>
5 
6 namespace trklet {
7 
8  class MemoryBase;
9  class Settings;
10  class Globals;
11 
12  class ProcessBase {
13  public:
14  ProcessBase(std::string name, Settings const& settings, Globals* global);
15 
16  virtual ~ProcessBase() = default;
17 
18  // Add wire from pin "output" or "input" this proc module to memory instance "memory".
19  virtual void addOutput(MemoryBase* memory, std::string output) = 0;
20  virtual void addInput(MemoryBase* memory, std::string input) = 0;
21 
22  std::string const& getName() const { return name_; }
23 
24  unsigned int nbits(unsigned int power);
25 
26  //method sets the layer and disk based on the name. pos is the position in the memory name where the layer or disk is specified
27  void initLayerDisk(unsigned int pos, int& layer, int& disk);
28  void initLayerDisk(unsigned int pos, int& layer, int& disk, int& layerdisk);
29 
30  unsigned int initLayerDisk(unsigned int pos);
31 
32  //This function processes the name of a TE module to determine the layerdisks and iseed
33  void initLayerDisksandISeed(unsigned int& layerdisk1, unsigned int& layerdisk2, unsigned int& iSeed);
34 
35  unsigned int getISeed(const std::string& name);
36 
37  protected:
39 
42  };
43 }; // namespace trklet
44 #endif
std::string name_
Definition: ProcessBase.h:38
virtual ~ProcessBase()=default
void initLayerDisksandISeed(unsigned int &layerdisk1, unsigned int &layerdisk2, unsigned int &iSeed)
Definition: ProcessBase.cc:63
Settings const & settings_
Definition: ProcessBase.h:40
Globals * globals_
Definition: ProcessBase.h:41
virtual void addOutput(MemoryBase *memory, std::string output)=0
ProcessBase(std::string name, Settings const &settings, Globals *global)
Definition: ProcessBase.cc:14
constexpr std::array< uint8_t, layerIndexSize > layer
static std::string const input
Definition: EdmProvDump.cc:47
std::string const & getName() const
Definition: ProcessBase.h:22
unsigned int nbits(unsigned int power)
Definition: ProcessBase.cc:17
virtual void addInput(MemoryBase *memory, std::string input)=0
void initLayerDisk(unsigned int pos, int &layer, int &disk)
Definition: ProcessBase.cc:33
unsigned int getISeed(const std::string &name)
Definition: ProcessBase.cc:119