CMS 3D CMS Logo

PulseArray.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_PulseArray_h
2 #define L1Trigger_CSCTriggerPrimitives_PulseArray_h
3 
10 
11 class PulseArray {
12 public:
13  // constructor
14  PulseArray();
15 
16  // set the dimensions
17  void initialize(unsigned numberOfChannels);
18 
19  // clear the pulse array
20  void clear();
21 
22  unsigned& operator()(const unsigned layer, const unsigned channel);
23 
24  unsigned bitsInPulse() const;
25 
26  // make the pulse at time "bx" with length "hit_persist"
27  void extend(const unsigned layer, const unsigned channel, const unsigned bx, const unsigned hit_persist);
28 
29  // check "one shot" at this bx_time
30  bool oneShotAtBX(const unsigned layer, const unsigned channel, const unsigned bx) const;
31 
32  // check if "one shot" is high at this bx_time
33  bool isOneShotHighAtBX(const unsigned layer, const unsigned channel, const unsigned bx) const;
34 
35  // This loop is a quick check of a number of layers hit at bx_time: since
36  // most of the time it is 0, this check helps to speed-up the execution
37  // substantially.
38  unsigned numberOfLayersAtBX(const unsigned bx) const;
39 
40 private:
41  std::vector<std::vector<unsigned> > data_;
43 };
44 
45 #endif
void clear()
Definition: PulseArray.cc:14
bool isOneShotHighAtBX(const unsigned layer, const unsigned channel, const unsigned bx) const
Definition: PulseArray.cc:37
unsigned & operator()(const unsigned layer, const unsigned channel)
Definition: PulseArray.cc:23
std::vector< std::vector< unsigned > > data_
Definition: PulseArray.h:41
bool oneShotAtBX(const unsigned layer, const unsigned channel, const unsigned bx) const
Definition: PulseArray.cc:33
unsigned numberOfLayersAtBX(const unsigned bx) const
Definition: PulseArray.cc:41
void initialize(unsigned numberOfChannels)
Definition: PulseArray.cc:5
unsigned bitsInPulse() const
Definition: PulseArray.cc:25
void extend(const unsigned layer, const unsigned channel, const unsigned bx, const unsigned hit_persist)
Definition: PulseArray.cc:27
unsigned numberOfChannels_
Definition: PulseArray.h:42