ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::L1CPHitsTools Class Reference

This is a tool to reconstruct the L1 CPM and CMM-CP hits from RoIs. More...

#include <L1CPHitsTools.h>

Inheritance diagram for LVL1::L1CPHitsTools:
Collaboration diagram for LVL1::L1CPHitsTools:

Public Member Functions

 L1CPHitsTools (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor.
virtual ~L1CPHitsTools ()
 default destructor
virtual StatusCode initialize ()
 standard Athena-Algorithm method
virtual StatusCode finalize ()
 standard Athena-Algorithm method
virtual void formCPMRoI (const DataVector< EmTauROI > *emTauRoiVec, DataVector< CPMRoI > *cpmRoiVec) const
 EmTauROI to CPMRoI conversion.
virtual void formCPMHits (const DataVector< CPMRoI > *cpmRoiVec, DataVector< CPMHits > *cpmHitsVec) const
 form CPM hits from RoIs - single slice
virtual void formCPMHits (const std::vector< const DataVector< CPMRoI > * > &cpmRoiColls, DataVector< CPMHits > *cpmHitsVec, int peak) const
 form CPM hits from RoIs - multiple slices
virtual void formCMMCPHits (const DataVector< CPMHits > *cpmHitsVec, DataVector< CMMCPHits > *cmmHitsVec) const
 form complete CMM-CP hits from CPM hits
virtual void formCMMCPHitsModule (const DataVector< CPMHits > *cpmHitsVec, DataVector< CMMCPHits > *cmmHitsMod) const
 form partial CMM-CP hits (module) from CPM hits
virtual void formCMMCPHitsCrate (const DataVector< CMMCPHits > *cmmHitsMod, DataVector< CMMCPHits > *cmmHitsCrate) const
 form partial CMM-CP hits (crate) from module CMM-CP hits
virtual void formCMMCPHitsSystem (const DataVector< CMMCPHits > *cmmHitsCrate, DataVector< CMMCPHits > *cmmHitsSys) const
 form partial CMM-CP hits (system) from crate CMM-CP hits
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef std::vector< unsigned int > HitsVector
typedef std::vector< int > ErrorVector
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

void addCMMCPHits (HitsVector &vec1, const HitsVector &vec2) const
 Add hits from second vector to first.
unsigned int addHits (unsigned int hitMult, unsigned int hitVec, int multBits, int vecBits) const
 Increment CPM/CMM hit word.
void mergeCMMCPHits (DataVector< CMMCPHits > *cmmHitsVec1, DataVector< CMMCPHits > *cmmHitsVec2) const
 Merge CMM-CP hits vectors.
void saveCMMCPHits (DataVector< CMMCPHits > *cmmHitsVec, const HitsVector &hits0, const HitsVector &hits1, int crate, int dataId, int peak) const
 Save non-zero CMM-CP hits.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

bool m_debug = false
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

This is a tool to reconstruct the L1 CPM and CMM-CP hits from RoIs.

Used for offline monitoring and trigger reconstruction.

Useage: L1CPHitsTools->formCPMRoI() // convert to CPMRoI from other RoI classes L1CPHitsTools->formCPMHits() // form CPM hits from RoIs L1CPHitsTools->formCMMCPHits() // form CMM-CP hits from CPM hits

Author
Alan Watson / Peter Faulkner

Definition at line 45 of file L1CPHitsTools.h.

Member Typedef Documentation

◆ ErrorVector

typedef std::vector<int> LVL1::L1CPHitsTools::ErrorVector
private

Definition at line 86 of file L1CPHitsTools.h.

◆ HitsVector

typedef std::vector<unsigned int> LVL1::L1CPHitsTools::HitsVector
private

Definition at line 85 of file L1CPHitsTools.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ L1CPHitsTools()

LVL1::L1CPHitsTools::L1CPHitsTools ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructor.

Definition at line 25 of file L1CPHitsTools.cxx.

28 :
29 AthAlgTool(type, name, parent)
30{
31 declareInterface<IL1CPHitsTools>(this);
32}
AthAlgTool()
Default constructor:

◆ ~L1CPHitsTools()

LVL1::L1CPHitsTools::~L1CPHitsTools ( )
virtual

default destructor

Destructor.

Definition at line 36 of file L1CPHitsTools.cxx.

37{
38}

Member Function Documentation

◆ addCMMCPHits()

void LVL1::L1CPHitsTools::addCMMCPHits ( HitsVector & vec1,
const HitsVector & vec2 ) const
private

Add hits from second vector to first.

Definition at line 275 of file L1CPHitsTools.cxx.

276{
277 int size1 = vec1.size();
278 int size2 = vec2.size();
279 if (size1 < size2) vec1.resize(size2);
280 HitsVector::iterator pos1 = vec1.begin();
281 HitsVector::iterator pose1 = vec1.end();
282 HitsVector::const_iterator pos2 = vec2.begin();
283 HitsVector::const_iterator pose2 = vec2.end();
284 for (; pos1 != pose1 && pos2 != pose2; ++pos1, ++pos2) {
285 *pos1 = addHits(*pos1, *pos2, 24, 24);
286 }
287}
unsigned int addHits(unsigned int hitMult, unsigned int hitVec, int multBits, int vecBits) const
Increment CPM/CMM hit word.
std::vector< D3PDTest::MyVec2 > vec2

◆ addHits()

unsigned int LVL1::L1CPHitsTools::addHits ( unsigned int hitMult,
unsigned int hitVec,
int multBits,
int vecBits ) const
private

Increment CPM/CMM hit word.

Definition at line 291 of file L1CPHitsTools.cxx.

294{
295 ATH_MSG_DEBUG("addHits: Original hitMult = " << std::hex << hitMult
296 << ". Add hitWord = " << hitVec << std::dec);
297
298 // Results transmitted in 2 words, each reporting half of the CP thresholds
299 int nthresh = TrigT1CaloDefs::numOfCPThresholds/2;
300
301 int nbitsOut = multBits/nthresh;
302 int nbitsIn = vecBits/nthresh;
303
304 ATH_MSG_DEBUG(" Bits per threshold = " << nbitsOut);
305
306 int max = (1<<nbitsOut) - 1;
307 unsigned int multMask = max;
308 unsigned int hitMask = (1<<nbitsIn) - 1;
309 unsigned int shift = 0;
310
311 unsigned int hits = 0;
312
313 for (int i = 0; i < nthresh; i++) {
314 int mult = (hitMult&multMask) + (hitVec&hitMask);
315 mult = ( (mult<=max) ? mult : max);
316 hits += (mult<<shift);
317
318 hitMult >>= nbitsOut;
319 hitVec >>= nbitsIn;
320 shift += nbitsOut;
321 }
322
323 ATH_MSG_DEBUG("addHits returning hitMult = "
324 << std::hex << hits << std::dec );
325
326 return hits;
327}
#define ATH_MSG_DEBUG(x)
#define max(a, b)
Definition cfImp.cxx:41
static const unsigned int numOfCPThresholds

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode LVL1::L1CPHitsTools::finalize ( )
virtual

standard Athena-Algorithm method

Finalisation.

Definition at line 54 of file L1CPHitsTools.cxx.

55{
56 return StatusCode::SUCCESS;
57}

◆ formCMMCPHits()

void LVL1::L1CPHitsTools::formCMMCPHits ( const DataVector< CPMHits > * cpmHitsVec,
DataVector< CMMCPHits > * cmmHitsVec ) const
virtual

form complete CMM-CP hits from CPM hits

Implements LVL1::IL1CPHitsTools.

Definition at line 152 of file L1CPHitsTools.cxx.

154{
155 DataVector<CMMCPHits>* cmmHitsCrate = new DataVector<CMMCPHits>;
156 DataVector<CMMCPHits>* cmmHitsSys = new DataVector<CMMCPHits>;
157 formCMMCPHitsModule(cpmHitsVec, cmmHitsVec);
158 formCMMCPHitsCrate(cmmHitsVec, cmmHitsCrate);
159 formCMMCPHitsSystem(cmmHitsCrate, cmmHitsSys);
160 mergeCMMCPHits(cmmHitsVec, cmmHitsCrate);
161 mergeCMMCPHits(cmmHitsVec, cmmHitsSys);
162 delete cmmHitsCrate;
163 delete cmmHitsSys;
164}
virtual void formCMMCPHitsSystem(const DataVector< CMMCPHits > *cmmHitsCrate, DataVector< CMMCPHits > *cmmHitsSys) const
form partial CMM-CP hits (system) from crate CMM-CP hits
virtual void formCMMCPHitsModule(const DataVector< CPMHits > *cpmHitsVec, DataVector< CMMCPHits > *cmmHitsMod) const
form partial CMM-CP hits (module) from CPM hits
virtual void formCMMCPHitsCrate(const DataVector< CMMCPHits > *cmmHitsMod, DataVector< CMMCPHits > *cmmHitsCrate) const
form partial CMM-CP hits (crate) from module CMM-CP hits
void mergeCMMCPHits(DataVector< CMMCPHits > *cmmHitsVec1, DataVector< CMMCPHits > *cmmHitsVec2) const
Merge CMM-CP hits vectors.

◆ formCMMCPHitsCrate()

void LVL1::L1CPHitsTools::formCMMCPHitsCrate ( const DataVector< CMMCPHits > * cmmHitsMod,
DataVector< CMMCPHits > * cmmHitsCrate ) const
virtual

form partial CMM-CP hits (crate) from module CMM-CP hits

Implements LVL1::IL1CPHitsTools.

Definition at line 189 of file L1CPHitsTools.cxx.

191{
192 int peakm = 0;
193 HitsVector crate0Hit0(1);
194 HitsVector crate0Hit1(1);
195 HitsVector crate1Hit0(1);
196 HitsVector crate1Hit1(1);
197 HitsVector crate2Hit0(1);
198 HitsVector crate2Hit1(1);
199 HitsVector crate3Hit0(1);
200 HitsVector crate3Hit1(1);
202 DataVector<CMMCPHits>::const_iterator pose = cmmHitsMod->end();
203 for (; pos != pose; ++pos) {
204 const CMMCPHits* hits = *pos;
205 int dataId = hits->dataID();
206 if (dataId > 14) continue;
207 int crate = hits->crate();
208 int peak = hits->peak();
209 if (peak > peakm) peakm = peak;
210 HitsVector hits0(hits->HitsVec0());
211 HitsVector hits1(hits->HitsVec1());
212 if (crate == 0) {
213 addCMMCPHits(crate0Hit0, hits0);
214 addCMMCPHits(crate0Hit1, hits1);
215 } else if (crate == 1) {
216 addCMMCPHits(crate1Hit0, hits0);
217 addCMMCPHits(crate1Hit1, hits1);
218 } else if (crate == 2) {
219 addCMMCPHits(crate2Hit0, hits0);
220 addCMMCPHits(crate2Hit1, hits1);
221 } else if (crate == 3) {
222 addCMMCPHits(crate3Hit0, hits0);
223 addCMMCPHits(crate3Hit1, hits1);
224 }
225 }
226 // Save non-zero crate totals
227 saveCMMCPHits(cmmHitsCrate, crate0Hit0, crate0Hit1, 0, CMMCPHits::LOCAL,
228 peakm);
229 saveCMMCPHits(cmmHitsCrate, crate1Hit0, crate1Hit1, 1, CMMCPHits::LOCAL,
230 peakm);
231 saveCMMCPHits(cmmHitsCrate, crate2Hit0, crate2Hit1, 2, CMMCPHits::LOCAL,
232 peakm);
233 saveCMMCPHits(cmmHitsCrate, crate3Hit0, crate3Hit1, 3, CMMCPHits::LOCAL,
234 peakm);
235 saveCMMCPHits(cmmHitsCrate, crate0Hit0, crate0Hit1, 3, CMMCPHits::REMOTE_0,
236 peakm);
237 saveCMMCPHits(cmmHitsCrate, crate1Hit0, crate1Hit1, 3, CMMCPHits::REMOTE_1,
238 peakm);
239 saveCMMCPHits(cmmHitsCrate, crate2Hit0, crate2Hit1, 3, CMMCPHits::REMOTE_2,
240 peakm);
241}
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
std::vector< unsigned int > HitsVector
void saveCMMCPHits(DataVector< CMMCPHits > *cmmHitsVec, const HitsVector &hits0, const HitsVector &hits1, int crate, int dataId, int peak) const
Save non-zero CMM-CP hits.
void addCMMCPHits(HitsVector &vec1, const HitsVector &vec2) const
Add hits from second vector to first.
CMMCPHits_v1 CMMCPHits
Define the latest version of the CMMCPHits class.

◆ formCMMCPHitsModule()

void LVL1::L1CPHitsTools::formCMMCPHitsModule ( const DataVector< CPMHits > * cpmHitsVec,
DataVector< CMMCPHits > * cmmHitsMod ) const
virtual

form partial CMM-CP hits (module) from CPM hits

Implements LVL1::IL1CPHitsTools.

Definition at line 168 of file L1CPHitsTools.cxx.

170{
172 DataVector<CPMHits>::const_iterator pose = cpmHitsVec->end();
173 for (; pos != pose; ++pos) {
174 const CPMHits* hits = *pos;
175 int crate = hits->crate();
176 int cpm = hits->module();
177 int peak = hits->peak();
178 HitsVector hits0(hits->HitsVec0());
179 HitsVector hits1(hits->HitsVec1());
180 ErrorVector err0(hits0.size());
181 ErrorVector err1(hits1.size());
182 cmmHitsMod->push_back(new CMMCPHits(crate, cpm, hits0, hits1,
183 err0, err1, peak));
184 }
185}
value_type push_back(value_type pElem)
Add an element to the end of the collection.
std::vector< int > ErrorVector
CPMHits_v1 CPMHits
Define the latest version of the CPMHits class.

◆ formCMMCPHitsSystem()

void LVL1::L1CPHitsTools::formCMMCPHitsSystem ( const DataVector< CMMCPHits > * cmmHitsCrate,
DataVector< CMMCPHits > * cmmHitsSys ) const
virtual

form partial CMM-CP hits (system) from crate CMM-CP hits

Implements LVL1::IL1CPHitsTools.

Definition at line 245 of file L1CPHitsTools.cxx.

248{
249 int peakm = 0;
250 HitsVector systemHit0(1);
251 HitsVector systemHit1(1);
253 DataVector<CMMCPHits>::const_iterator pose = cmmHitsCrate->end();
254 for (; pos != pose; ++pos) {
255 const CMMCPHits* hits = *pos;
256 if (hits->crate() != 3) continue;
257 int dataId = hits->dataID();
258 if (dataId != CMMCPHits::LOCAL &&
259 dataId != CMMCPHits::REMOTE_0 &&
260 dataId != CMMCPHits::REMOTE_1 &&
261 dataId != CMMCPHits::REMOTE_2) continue;
262 int peak = hits->peak();
263 if (peak > peakm) peakm = peak;
264 HitsVector hits0(hits->HitsVec0());
265 HitsVector hits1(hits->HitsVec1());
266 addCMMCPHits(systemHit0, hits0);
267 addCMMCPHits(systemHit1, hits1);
268 }
269 // Save non-zero system totals
270 saveCMMCPHits(cmmHitsSys, systemHit0, systemHit1, 3, CMMCPHits::TOTAL, peakm);
271}

◆ formCPMHits() [1/2]

void LVL1::L1CPHitsTools::formCPMHits ( const DataVector< CPMRoI > * cpmRoiVec,
DataVector< CPMHits > * cpmHitsVec ) const
virtual

form CPM hits from RoIs - single slice

Implements LVL1::IL1CPHitsTools.

Definition at line 74 of file L1CPHitsTools.cxx.

76{
77 std::vector<const DataVector<CPMRoI>*> cpmRoiColls(1, cpmRoiVec);
78 formCPMHits(cpmRoiColls, cpmHitsVec, 0);
79}
virtual void formCPMHits(const DataVector< CPMRoI > *cpmRoiVec, DataVector< CPMHits > *cpmHitsVec) const
form CPM hits from RoIs - single slice

◆ formCPMHits() [2/2]

void LVL1::L1CPHitsTools::formCPMHits ( const std::vector< const DataVector< CPMRoI > * > & cpmRoiColls,
DataVector< CPMHits > * cpmHitsVec,
int peak ) const
virtual

form CPM hits from RoIs - multiple slices

Implements LVL1::IL1CPHitsTools.

Definition at line 83 of file L1CPHitsTools.cxx.

86{
87 ClusterProcessorModuleKey testKey;
88 std::map<unsigned int, CPMHits*> cpmHitsMap;
90 int timeslices = cpmRoiColls.size();
91
92 for (int slice = 0; slice < timeslices; ++slice) {
93 const DataVector<CPMRoI>* cpmRoiVec = cpmRoiColls[slice];
94
95 for (it=cpmRoiVec->begin(); it!=cpmRoiVec->end(); ++it){
96 const CPMRoI* roi = *it;
97 unsigned int crate = roi->crate();
98 unsigned int module = roi->cpm();
99 unsigned int key = testKey.cpmKey(crate, module);
100 if (m_debug) {
101 CPRoIDecoder decoder;
102 CoordinateRange coord = decoder.coordinate(roi->roiWord());
103 if (timeslices > 1) ATH_MSG_DEBUG( "Slice " << slice << ", ");
104 ATH_MSG_DEBUG( "Found RoI with (eta, phi) = ("
105 << coord.eta() << ", " << coord.phi() << ") " << ", RoIWord = "
106 << std::hex << roi->roiWord() << std::dec );
107 ATH_MSG_DEBUG( "Crate = " << crate << ", Module = " << module
108 << ", CPM key = " << key );
109 }
110 CPMHits* cpmHits=0;
111 // find whether corresponding CPMHits already exists
112 std::map<unsigned int, CPMHits*>::iterator test=cpmHitsMap.find(key);
113 // if not, create it
114 if ( test==cpmHitsMap.end()){
115 ATH_MSG_DEBUG( "New key. CPM has crate = "
116 << crate << ", Module = " << module );
117 ATH_MSG_DEBUG( "Create new CPMHits" );
118 cpmHits = new CPMHits(crate, module);
119 if (timeslices > 1) {
120 HitsVector hitVec(timeslices);
121 cpmHits->addHits(hitVec, hitVec);
122 cpmHits->setPeak(peak);
123 }
124
125 ATH_MSG_DEBUG( "and insert into map" );
126 cpmHitsMap.insert(
127 std::map<unsigned int,CPMHits*>::value_type(key,cpmHits));
128 cpmHitsVec->push_back(cpmHits);
129 }
130 else {
131 ATH_MSG_DEBUG( "Existing CPMHits" );
132 cpmHits = test->second; // Already exists, so set pointer
133 }
134 // increment hit multiplicity.
135 ATH_MSG_DEBUG( "Update CPM hits" );
136 HitsVector hitvec0(cpmHits->HitsVec0());
137 HitsVector hitvec1(cpmHits->HitsVec1());
138 unsigned int hits0 = hitvec0[slice];
139 unsigned int hits1 = hitvec1[slice];
140 hits0 = addHits(hits0, roi->roiWord()&0xFF, 24, 8);
141 hits1 = addHits(hits1,(roi->roiWord()&0xFF00)>>8, 24, 8);
142 hitvec0[slice] = hits0;
143 hitvec1[slice] = hits1;
144 cpmHits->addHits(hitvec0, hitvec1);
145 ATH_MSG_DEBUG( "All done for this one" );
146 }
147 }
148}
double coord
Type of coordination system.
CPMRoI_v1 CPMRoI
Define the latest version of the CPMRoI class.

◆ formCPMRoI()

void LVL1::L1CPHitsTools::formCPMRoI ( const DataVector< EmTauROI > * emTauRoiVec,
DataVector< CPMRoI > * cpmRoiVec ) const
virtual

EmTauROI to CPMRoI conversion.

Implements LVL1::IL1CPHitsTools.

Definition at line 61 of file L1CPHitsTools.cxx.

63{
65 DataVector<EmTauROI>::const_iterator pose = emTauRoiVec->end();
66 for (; pos != pose; ++pos) {
67 CPMRoI* roi = new CPMRoI((*pos)->roiWord());
68 cpmRoiVec->push_back(roi);
69 }
70}

◆ initialize()

StatusCode LVL1::L1CPHitsTools::initialize ( )
virtual

standard Athena-Algorithm method

Initialisation.

Definition at line 43 of file L1CPHitsTools.cxx.

44{
45 m_debug = msgLvl(MSG::DEBUG);
46
47 ATH_MSG_INFO( "Initialization completed" );
48
49 return StatusCode::SUCCESS;
50}
#define ATH_MSG_INFO(x)
bool msgLvl(const MSG::Level lvl) const

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & LVL1::IL1CPHitsTools::interfaceID ( )
inlinestaticinherited

Definition at line 48 of file IL1CPHitsTools.h.

49 {
50 return IID_IL1CPHitsTools;
51 }
static const InterfaceID IID_IL1CPHitsTools("LVL1::IL1CPHitsTools", 1, 0)
Interface definition for L1CPHitsTools.

◆ mergeCMMCPHits()

void LVL1::L1CPHitsTools::mergeCMMCPHits ( DataVector< CMMCPHits > * cmmHitsVec1,
DataVector< CMMCPHits > * cmmHitsVec2 ) const
private

Merge CMM-CP hits vectors.

Definition at line 331 of file L1CPHitsTools.cxx.

333{
334 int size = cmmHitsVec2->size();
335 for (int index = 0; index < size; ++index) {
336 CMMCPHits* hitsIn = 0;
337 CMMCPHits* hitsOut = 0;
338 cmmHitsVec2->swapElement(index, hitsIn, hitsOut);
339 cmmHitsVec1->push_back(hitsOut);
340 }
341 cmmHitsVec2->clear();
342}
void swapElement(size_type index, value_type newElem, reference oldElem)
Swap one element out of the container.
size_type size() const noexcept
Returns the number of elements in the collection.
void clear()
Erase all the elements in the collection.
str index
Definition DeMoScan.py:362

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ saveCMMCPHits()

void LVL1::L1CPHitsTools::saveCMMCPHits ( DataVector< CMMCPHits > * cmmHitsVec,
const HitsVector & hits0,
const HitsVector & hits1,
int crate,
int dataId,
int peak ) const
private

Save non-zero CMM-CP hits.

Definition at line 346 of file L1CPHitsTools.cxx.

350{
351 if (std::accumulate(hits0.begin(), hits0.end(), 0) ||
352 std::accumulate(hits1.begin(), hits1.end(), 0)) {
353 ErrorVector err0(hits0.size());
354 ErrorVector err1(hits1.size());
355 cmmHitsVec->push_back(new CMMCPHits(crate, dataId, hits0, hits1,
356 err0, err1, peak));
357 }
358}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_debug

bool LVL1::L1CPHitsTools::m_debug = false
private

Definition at line 101 of file L1CPHitsTools.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: