forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathProcessBase.h
48 lines (34 loc) · 1.62 KB
/
ProcessBase.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef L1Trigger_TrackFindingTracklet_interface_ProcessBase_h
#define L1Trigger_TrackFindingTracklet_interface_ProcessBase_h
#include <string>
namespace trklet {
class MemoryBase;
class Settings;
class Globals;
class ProcessBase {
public:
ProcessBase(std::string name, Settings const& settings, Globals* global);
virtual ~ProcessBase() = default;
// Add wire from pin "output" or "input" this proc module to memory instance "memory".
virtual void addOutput(MemoryBase* memory, std::string output) = 0;
virtual void addInput(MemoryBase* memory, std::string input) = 0;
std::string const& getName() const { return name_; }
unsigned int nbits(unsigned int power);
//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
void initLayerDisk(unsigned int pos, int& layer, int& disk);
void initLayerDisk(unsigned int pos, int& layer, int& disk, int& layerdisk);
unsigned int initLayerDisk(unsigned int pos);
//This function processes the name of a TE module to determine the layerdisks and iseed
void initLayerDisksandISeed(unsigned int& layerdisk1, unsigned int& layerdisk2, unsigned int& iSeed);
void initLayerDisksandISeedDisp(unsigned int& layerdisk1,
unsigned int& layerdisk2,
unsigned int& layerdisk3,
unsigned int& iSeed);
unsigned int getISeed(const std::string& name);
protected:
std::string name_;
Settings const& settings_;
Globals* globals_;
};
}; // namespace trklet
#endif