ATLAS Offline Software
Loading...
Searching...
No Matches
TGCHitPattern.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TGCHitPattern_hh
6#define TGCHitPattern_hh
7#include <fstream>
8
9namespace LVL1TGCTrigger {
10
12 public:
14 TGCHitPattern(int len);
16
17 TGCHitPattern(const TGCHitPattern& right);
19
20 void setLength(int length);
21 int getLength() const;
22
23 void onChannel(int iChannel);
24 void offChannel(int iChannel);
25 void setChannel(int iChannel, bool pattern);
26 void setChannel(char* pat);
27 void clear();
28 void print(int unit) const; // print bit pattern separated by underscore.
29 void print() const;
30 bool getChannel(int iChannel) const;
31
32 // new method for hit visualization (KH 19/01/01)
33 void visual(int Cycle, int Width, int Tag) const;
34
35 // new method to set hit patterns (KH 08/05/01)
36 void setPattern(bool* newpattern);
37
38 void printb() const;
39 void printb(std::ofstream* ofs) const;
40 void dec2bin(int dec);
41 void push_back(TGCHitPattern* hp);
42
43 private:
44 bool* m_pattern; // this array is created when the length is specified
46};
47
48inline
50{
51 return m_length;
52}
53
54inline
55void TGCHitPattern::onChannel(int iChannel)
56{
57 m_pattern[iChannel] = true;
58}
59
60inline
61void TGCHitPattern::offChannel(int iChannel)
62{
63 m_pattern[iChannel] = false;
64}
65
66
67
68} //end of namespace bracket
69
70#endif // TGCHitPattern_hh
71
72
73
74
75
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
double length(const pvec &v)
TGCHitPattern & operator=(const TGCHitPattern &right)
bool getChannel(int iChannel) const
void push_back(TGCHitPattern *hp)
void setChannel(int iChannel, bool pattern)
void setPattern(bool *newpattern)
void onChannel(int iChannel)
void offChannel(int iChannel)
void visual(int Cycle, int Width, int Tag) const