ATLAS Offline Software
Loading...
Searching...
No Matches
LArRTMParamExtractor.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5*/
6
7
8/*
9 * LArRTMParamExtractor
10 *
11 * This algorithm reads LArCaliWaveContainers and extract from each of the
12 * LArCaliWaves the LArCaliPulseParams and LArDetCellParams parameters
13 * according to the corresponding RTM algorithms.
14 *
15 * Author: Marco.Delmastro@cen.ch
16 *
17 */
18
19#ifndef LArRTMPARAMEXTRACTOR_H
20#define LArRTMPARAMEXTRACTOR_H
21
22#include <string>
23#include <vector>
24#include <atomic>
25
27#include "GaudiKernel/ToolHandle.h"
29#include "tbb/blocked_range.h"
30#include "tbb/global_control.h"
34#include <memory>
35
37
38
39class LArWFParamTool;
40
42 //Acutally this algo can do internal multi-threading at finalize
43 //but not the way regular athenaMT works, so the thread-safety checker complains
44
45 public:
46
47 LArRTMParamExtractor(const std::string & name, ISvcLocator * pSvcLocator);
48
50
51 StatusCode initialize();
52 StatusCode execute() {return StatusCode::SUCCESS;}
53 StatusCode stop();
54 StatusCode finalize(){return StatusCode::SUCCESS;}
55
56 private:
57
58 SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
59 SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKeySC{this,"ScCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"};
60
61 ToolHandle<LArWFParamTool> m_larWFParamTool{this,"LArWFParamTool","LArWFParamTool"};
62
63 std::vector<std::string> m_keylist;
64 bool m_isSC;
67
69 std::vector<int> m_DAC;
70
73
75
78
81
82 // Grouping type
83 std::string m_groupingType;
84
85 // FT selection
86 std::vector<int> m_FT;
88 // Slot selection
89 std::vector<int> m_Slot;
90 // Calib line selection
93
94
95 //Elements for TBB
96
98 mutable std::atomic<unsigned> m_counter{0};
99
101 public:
102 helperParams(const LArCaliWave* cw, const HWIdentifier id, const unsigned g) :
103 caliWave(cw), chid(id),gain(g) {};
104
105 const LArCaliWave* caliWave; //Input object
106 std::optional<LArCaliWave> omegaScan; //optional output object
107 std::optional<LArCaliWave> resOscill0; //optional output object
108 std::optional<LArCaliWave> resOscill1; //optional output object
109 LArWFParams wfParams; //Outut object
111 unsigned gain;
112 bool success=true;
113 };
114
116 //The way this class gets used is actually thread-safe
117 public:
118 //Looper() = delete;
119 Looper(std::vector<helperParams>* p, const LArOnOffIdMapping* cabling, const LArWFParamTool* t,
120 MsgStream& ms,std::atomic<unsigned>& cnt ) :
121 m_tbbparams(p), m_cabling(cabling), m_tool(t),
122 m_msg(ms), m_counter(cnt) {};
123
124 void operator() (const tbb::blocked_range<size_t>& r) const;
125
126 private:
127 std::vector<helperParams>* m_tbbparams;
130 MsgStream& m_msg;
131 std::atomic<unsigned>& m_counter;
132 };
133
134
135
136};
137
138#endif
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
const LArOnOffIdMapping * m_cabling
Looper(std::vector< helperParams > *p, const LArOnOffIdMapping *cabling, const LArWFParamTool *t, MsgStream &ms, std::atomic< unsigned > &cnt)
std::atomic< unsigned > & m_counter
std::vector< helperParams > * m_tbbparams
std::optional< LArCaliWave > resOscill1
std::optional< LArCaliWave > omegaScan
std::optional< LArCaliWave > resOscill0
helperParams(const LArCaliWave *cw, const HWIdentifier id, const unsigned g)
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
ToolHandle< LArWFParamTool > m_larWFParamTool
std::vector< int > m_DAC
std::vector< std::string > m_keylist
LArRTMParamExtractor(const std::string &name, ISvcLocator *pSvcLocator)
std::atomic< unsigned > m_counter
std::vector< int > m_Slot
std::string m_suffixExtractedCaliPulse
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKeySC
std::vector< int > m_FT
std::string m_suffixRetrievedCaliPulse
int r
Definition globals.cxx:22
void initialize()