CMS 3D CMS Logo

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  void initLayerDisksandISeedDisp(unsigned int& layerdisk1,
35  unsigned int& layerdisk2,
36  unsigned int& layerdisk3,
37  unsigned int& iSeed);
38 
39  unsigned int getISeed(const std::string& name);
40 
41  protected:
43 
46  };
47 }; // namespace trklet
48 #endif
std::string name_
Definition: ProcessBase.h:42
virtual ~ProcessBase()=default
void initLayerDisksandISeed(unsigned int &layerdisk1, unsigned int &layerdisk2, unsigned int &iSeed)
Definition: ProcessBase.cc:63
Settings const & settings_
Definition: ProcessBase.h:44
void initLayerDisksandISeedDisp(unsigned int &layerdisk1, unsigned int &layerdisk2, unsigned int &layerdisk3, unsigned int &iSeed)
Definition: ProcessBase.cc:119
Globals * globals_
Definition: ProcessBase.h:45
virtual void addOutput(MemoryBase *memory, std::string output)=0
ProcessBase(std::string name, Settings const &settings, Globals *global)
Definition: ProcessBase.cc:14
static std::string const input
Definition: EdmProvDump.cc:50
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
constexpr unsigned int power(unsigned int base, unsigned int exponent)
unsigned int getISeed(const std::string &name)
Definition: ProcessBase.cc:156
Definition: output.py:1
std::string const & getName() const
Definition: ProcessBase.h:22