33
44#include < numeric>
55
6- using namespace std ;
7- using namespace edm ;
8- using namespace tt ;
9-
106TTDTC::TTDTC (int numRegions, int numOverlappingRegions, int numDTCsPerRegion)
117 : numRegions_(numRegions),
128 numOverlappingRegions_(numOverlappingRegions),
@@ -15,13 +11,13 @@ TTDTC::TTDTC(int numRegions, int numOverlappingRegions, int numDTCsPerRegion)
1511 regions_(numRegions_),
1612 channels_(numDTCsPerTFP_),
1713 streams_(numRegions_ * numDTCsPerTFP_) {
18- iota (regions_.begin (), regions_.end (), 0 );
19- iota (channels_.begin (), channels_.end (), 0 );
14+ std:: iota (regions_.begin (), regions_.end (), 0 );
15+ std:: iota (channels_.begin (), channels_.end (), 0 );
2016}
2117
2218// write one specific stream of TTStubRefs using DTC identifier (region[0-8], board[0-23], channel[0-1])
2319// dtcRegions aka detector regions are defined by tk layout
24- void TTDTC::setStream (int dtcRegion, int dtcBoard, int dtcChannel, const StreamStub& stream) {
20+ void TTDTC::setStream (int dtcRegion, int dtcBoard, int dtcChannel, const tt:: StreamStub& stream) {
2521 // check arguments
2622 const bool oorRegion = dtcRegion >= numRegions_ || dtcRegion < 0 ;
2723 const bool oorBoard = dtcBoard >= numDTCsPerRegion_ || dtcBoard < 0 ;
@@ -45,7 +41,7 @@ void TTDTC::setStream(int dtcRegion, int dtcBoard, int dtcChannel, const StreamS
4541
4642// read one specific stream of TTStubRefs using TFP identifier (region[0-8], channel[0-47])
4743// tfpRegions aka processing regions are rotated by -0.5 region width w.r.t detector regions
48- const StreamStub& TTDTC::stream (int tfpRegion, int tfpChannel) const {
44+ const tt:: StreamStub& TTDTC::stream (int tfpRegion, int tfpChannel) const {
4945 // check arguments
5046 const bool oorRegion = tfpRegion >= numRegions_ || tfpRegion < 0 ;
5147 const bool oorChannel = tfpChannel >= numDTCsPerTFP_ || tfpChannel < 0 ;
@@ -65,25 +61,25 @@ const StreamStub& TTDTC::stream(int tfpRegion, int tfpChannel) const {
6561
6662// total number of frames
6763int TTDTC::size () const {
68- auto all = [](int sum, const StreamStub& stream) { return sum + stream.size (); };
69- return accumulate (streams_.begin (), streams_.end (), 0 , all);
64+ auto all = [](int sum, const tt:: StreamStub& stream) { return sum + stream.size (); };
65+ return std:: accumulate (streams_.begin (), streams_.end (), 0 , all);
7066}
7167
7268// total number of stubs
7369int TTDTC::nStubs () const {
74- auto stubs = [](int sum, const FrameStub& frame) { return sum + frame.first .isNonnull (); };
70+ auto stubs = [](int sum, const tt:: FrameStub& frame) { return sum + frame.first .isNonnull (); };
7571 int n (0 );
76- for (const StreamStub& stream : streams_)
77- n += accumulate (stream.begin (), stream.end (), 0 , stubs);
72+ for (const tt:: StreamStub& stream : streams_)
73+ n += std:: accumulate (stream.begin (), stream.end (), 0 , stubs);
7874 return n;
7975}
8076
8177// total number of gaps
8278int TTDTC::nGaps () const {
83- auto gaps = [](int sum, const FrameStub& frame) { return sum + frame.first .isNull (); };
79+ auto gaps = [](int sum, const tt:: FrameStub& frame) { return sum + frame.first .isNull (); };
8480 int n (0 );
85- for (const StreamStub& stream : streams_)
86- n += accumulate (stream.begin (), stream.end (), 0 , gaps);
81+ for (const tt:: StreamStub& stream : streams_)
82+ n += std:: accumulate (stream.begin (), stream.end (), 0 , gaps);
8783 return n;
8884}
8985
0 commit comments