ATLAS Offline Software
TrigMonEvent.icc
Go to the documentation of this file.
1 // -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TRIGMON_EVENT_ICC
8 #define TRIGMON_EVENT_ICC
9 
10 // Hide template code from ROOTCINT and GCCXML
11 #ifndef __CINT__
12 #ifndef __GCCXML__
13 
14 //
15 // Template specilizations only, there are no default implementations.
16 //
17 
18 // C/C++
19 #include <algorithm>
20 #include <iostream>
21 
22 
23 // template specialization for Beg() and End() functions
24 template<> inline std::vector<TrigMonROB>::const_iterator TrigMonEvent::begin<TrigMonROB>() const {
25  return m_rob.begin();
26 }
27 template<> inline std::vector<TrigMonROB>::const_iterator TrigMonEvent::end<TrigMonROB>() const {
28  return m_rob.end();
29 }
30 
31 template<> inline std::vector<TrigMonRoi>::const_iterator TrigMonEvent::begin<TrigMonRoi>() const {
32  return m_roi.begin();
33 }
34 template<> inline std::vector<TrigMonRoi>::const_iterator TrigMonEvent::end<TrigMonRoi>() const {
35  return m_roi.end();
36 }
37 
38 template<> inline std::vector<TrigMonSeq>::const_iterator TrigMonEvent::begin<TrigMonSeq>() const {
39  return m_seq.begin();
40 }
41 template<> inline std::vector<TrigMonSeq>::const_iterator TrigMonEvent::end<TrigMonSeq>() const {
42  return m_seq.end();
43 }
44 
45 template<> inline std::vector<TrigMonTE>::const_iterator TrigMonEvent::begin<TrigMonTE>() const {
46  return m_te.begin();
47 }
48 template<> inline std::vector<TrigMonTE>::const_iterator TrigMonEvent::end<TrigMonTE>() const {
49  return m_te.end();
50 }
51 
52 // template specialization for Size() function
53 template<> inline unsigned int TrigMonEvent::size<TrigMonROB>() const { return m_rob.size(); }
54 template<> inline unsigned int TrigMonEvent::size<TrigMonRoi>() const { return m_roi.size(); }
55 template<> inline unsigned int TrigMonEvent::size<TrigMonSeq>() const { return m_seq.size(); }
56 template<> inline unsigned int TrigMonEvent::size<TrigMonTE>() const { return m_te.size(); }
57 
58 // template specialization for at() function
59 template<> inline const TrigMonROB& TrigMonEvent::at<TrigMonROB>(unsigned int i) const { return m_rob[i]; }
60 template<> inline const TrigMonRoi& TrigMonEvent::at<TrigMonRoi>(unsigned int i) const { return m_roi[i]; }
61 template<> inline const TrigMonSeq& TrigMonEvent::at<TrigMonSeq>(unsigned int i) const { return m_seq[i]; }
62 template<> inline const TrigMonTE& TrigMonEvent::at<TrigMonTE> (unsigned int i) const { return m_te[i]; }
63 
64 // template specialization for GetVec() function
65 template<> inline std::vector<TrigMonROB>& TrigMonEvent::getVec<TrigMonROB>() { return m_rob; }
66 template<> inline std::vector<TrigMonRoi>& TrigMonEvent::getVec<TrigMonRoi>() { return m_roi; }
67 template<> inline std::vector<TrigMonSeq>& TrigMonEvent::getVec<TrigMonSeq>() { return m_seq; }
68 template<> inline std::vector<TrigMonTE>& TrigMonEvent::getVec<TrigMonTE>() { return m_te; }
69 
70 template<> inline const std::vector<TrigMonROB>& TrigMonEvent::getVec<TrigMonROB>() const { return m_rob; }
71 template<> inline const std::vector<TrigMonRoi>& TrigMonEvent::getVec<TrigMonRoi>() const { return m_roi; }
72 template<> inline const std::vector<TrigMonSeq>& TrigMonEvent::getVec<TrigMonSeq>() const { return m_seq; }
73 template<> inline const std::vector<TrigMonTE>& TrigMonEvent::getVec<TrigMonTE>() const { return m_te; }
74 
75 // template specialization for add() function
76 template<> inline bool TrigMonEvent::add<TrigMonChain>(const TrigMonChain &obj) {
77  m_hlt.push_back(obj.getEncoded());
78  return true;
79 }
80 template<> inline bool TrigMonEvent::add<TrigMonL1Item>(const TrigMonL1Item &obj) {
81  m_l1.push_back(obj.getEncoded());
82  return true;
83 }
84 template<> inline bool TrigMonEvent::add<TrigMonROB>(const TrigMonROB &obj) {
85  m_rob.push_back(obj);
86  return true;
87 }
88 template<> inline bool TrigMonEvent::add<TrigMonRoi>(const TrigMonRoi &obj) {
89  m_roi.push_back(obj);
90  return true;
91 }
92 template<> inline bool TrigMonEvent::add<TrigMonSeq>(const TrigMonSeq &obj) {
93  m_seq.push_back(obj);
94  return true;
95 }
96 template<> inline bool TrigMonEvent::add<TrigMonTE>(const TrigMonTE &obj) {
97  m_te.push_back(obj);
98  return true;
99 }
100 
101 #endif
102 #endif
103 #endif