ATLAS Offline Software
Loading...
Searching...
No Matches
LArTT_Selector.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 LARRAWUTILS_LARTT_SELECTOR_H
6#define LARRAWUTILS_LARTT_SELECTOR_H
7
8#include "Identifier/Identifier.h"
10
11class LArRoIMap;
12
13template <class CONTAINER >
15{
16
17 public:
22
23
26
27// typedef LArRawChannelContainer CONTAINER;
28// typedef LArRawChannelCollection COLLECTION;
29// typedef LArRawChannel OBJECT;
30
31 typedef typename CONTAINER::IDENTIFIABLE COLLECTION;
32 typedef typename CONTAINER::const_iterator COLL_IT;
33 typedef typename COLLECTION::const_iterator OBJ_IT;
34 typedef typename COLLECTION::OBJECT OBJECT;
35 typedef typename COLLECTION::ID COLL_ID;
36 typedef typename std::vector<COLL_ID>::const_iterator COLL_ID_IT;
37// typedef std::vector<COLL_ID>::const_iterator COLL_ID_IT;
38
39 // a vector of ROI_ID
40 // typedef LArRoI_ID ROI_ID;
42 typedef std::vector<TT_ID> VEC_TT_ID;
43 typedef VEC_TT_ID::const_iterator TT_ID_IT;
44
45 typedef unsigned int TT_SAM_ID;
46 typedef std::vector<TT_SAM_ID> VEC_TT_SAM_ID;
47 typedef VEC_TT_SAM_ID::const_iterator TT_SAM_ID_IT;
48
49 typedef std::pair<OBJ_IT,OBJ_IT> ITPAIR;
50 typedef std::vector<ITPAIR> VEC_ITPAIR;
51 typedef typename VEC_ITPAIR::const_iterator ITPAIR_IT;
52
53 // a map of Collection ID and vector
54 // a Collection is associated with a list of TT_ID
55 typedef std::map<const COLLECTION*, VEC_TT_ID> MAP_COLL_ROI ;
56 typedef typename MAP_COLL_ROI::const_iterator MAP_IT ;
57
59 {
60 friend class LArTT_Selector<CONTAINER> ;
61 public:
63
65
67
68 const OBJECT* operator * () ;
69
70 bool operator != ( const const_iterator& it ) const ;
71
72 bool operator == ( const const_iterator& it ) const ;
73
74
75 private:
77 const_iterator( const VEC_ITPAIR* v, const ITPAIR_IT& it ) ;
78
83
84 };
85
86 friend class const_iterator;
87
89 const CONTAINER* c=NULL );
90
91 virtual ~LArTT_Selector () {} ;
92
93 void setMap(const LArRoIMap* map) ;
94 void setContainer(const CONTAINER* c) ;
95
96 // set RoI according TT, + a sam number.
97// void setRoIs( const VEC_TT_ID& ids, int sam ) ;
98 void setRoIs ( const VEC_TT_ID& ids ) ;
99
100 // set RoI according to combined TT_Sampling ID (unsigned int).
101// void setRoIs( const VEC_TT_SAM_ID& ids ) ;
102
105
106 private:
107 void initialize();
108
110 const CONTAINER* m_container;
111
113
114};
115
117
118#endif
This is a "hash" representation of an Identifier.
Mapping between calorimeter trigger id to offline/online Identifier.
Definition LArRoIMap.h:31
const_iterator & operator++()
const VEC_ITPAIR * m_vec_itpair
const_iterator(const VEC_ITPAIR *v, const ITPAIR_IT &it)
const_iterator(const VEC_ITPAIR *v)
bool operator==(const const_iterator &it) const
bool operator!=(const const_iterator &it) const
const_iterator begin() const
IdentifierHash TT_ID
void setRoIs(const VEC_TT_ID &ids)
COLLECTION::OBJECT OBJECT
unsigned int TT_SAM_ID
void setMap(const LArRoIMap *map)
std::map< const COLLECTION *, VEC_TT_ID > MAP_COLL_ROI
const_iterator end() const
const CONTAINER * m_container
CONTAINER::const_iterator COLL_IT
const LArRoIMap * m_roiMap
VEC_ITPAIR::const_iterator ITPAIR_IT
COLLECTION::ID COLL_ID
std::vector< ITPAIR > VEC_ITPAIR
VEC_TT_SAM_ID::const_iterator TT_SAM_ID_IT
std::vector< TT_ID > VEC_TT_ID
LArTT_Selector(const LArRoIMap *map=0, const CONTAINER *c=NULL)
std::vector< TT_SAM_ID > VEC_TT_SAM_ID
MAP_COLL_ROI::const_iterator MAP_IT
VEC_TT_ID::const_iterator TT_ID_IT
std::vector< COLL_ID >::const_iterator COLL_ID_IT
CONTAINER::IDENTIFIABLE COLLECTION
Constructors.
COLLECTION::const_iterator OBJ_IT
virtual ~LArTT_Selector()
std::pair< OBJ_IT, OBJ_IT > ITPAIR
VEC_ITPAIR m_vecItPair
void setContainer(const CONTAINER *c)
STL class.