ATLAS Offline Software
Loading...
Searching...
No Matches
AFP_PixelHistoFiller Class Reference

#include <AFP_PixelHistoFiller.h>

Inheritance diagram for AFP_PixelHistoFiller:
Collaboration diagram for AFP_PixelHistoFiller:

Public Member Functions

 AFP_PixelHistoFiller (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~AFP_PixelHistoFiller ()=default
virtual StatusCode initialize () override
virtual StatusCode execute () override
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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 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

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 ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

int m_nPixelsX =0
int m_nPixelsY =0
std::vector< TH2F > m_pixelHits [m_nStations][m_nLayers]
std::vector< TH2F > m_pixelCluster [m_nStations][m_nLayers]
TProfile m_lb_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile m_lb_yDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_xCluster_yDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_yCluster_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_zCluster_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_zCluster_yDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_yCluster_yDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_xCluster_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_sxTrack_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_syTrack_yDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_syTrack_xDistSiTrackCluster [m_nStations][m_nLayers]
TProfile2D m_lb_sxTrack_yDistSiTrackCluster [m_nStations][m_nLayers]
Gaudi::Property< int > m_LBRangeLength {this, "LBRangeLength",5, "How many lumiblocks should be merged together to have reasonable statistics"}
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey { this, "EventInfoKey", "EventInfo", "name of EventInfo container" }
SG::ReadHandleKey< xAOD::AFPSiHitContainerm_afpHitContainerKey { this ,"AFPHitContainerKey", "AFPSiHitContainer", "name of AFPSiHitContainer" }
SG::ReadHandleKey< xAOD::AFPTrackContainerm_afpTrackContainerKey { this, "AFPTrackContainerKey", "AFPTrackContainer", "name of AFPTrackContainer" }
DataObjIDColl m_extendedExtraObjects
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

Static Private Attributes

static const int m_nStations =4
static const int m_nLayers =4

Detailed Description

Definition at line 28 of file AFP_PixelHistoFiller.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ AFP_PixelHistoFiller()

AFP_PixelHistoFiller::AFP_PixelHistoFiller ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 21 of file AFP_PixelHistoFiller.cxx.

21 :
22 AthAlgorithm(name, pSvcLocator)
23{
24}
AthAlgorithm()
Default constructor:

◆ ~AFP_PixelHistoFiller()

virtual AFP_PixelHistoFiller::~AFP_PixelHistoFiller ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::evtStore ( )
inlineinherited

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode AFP_PixelHistoFiller::execute ( )
overridevirtual

Definition at line 87 of file AFP_PixelHistoFiller.cxx.

88{
89 const EventContext& ctx = Gaudi::Hive::currentContext();
90
91 // get event info
92 SG::ReadHandle<xAOD::EventInfo> eventInfo (m_eventInfoKey, ctx);
93 if (!eventInfo.isValid())
94 {
95 ATH_MSG_WARNING("cannot get eventInfo");
96 return StatusCode::SUCCESS;
97 }
98 else ATH_MSG_DEBUG("successfully got eventInfo");
99
100 // make sure all the histograms are defined
101 int current_lb=eventInfo->lumiBlock();
102
103 if(static_cast<int>(m_pixelHits[0][0].size())-1<current_lb/m_LBRangeLength)
104 {
105 for(int st=0;st<m_nStations;++st)
106 {
107 for(int la=0;la<m_nLayers;++la)
108 {
109 for(int add=static_cast<int>(m_pixelHits[st][la].size());add<=current_lb/m_LBRangeLength;++add)
110 {
111 TH2F p_hist(Form("pixel_hits_lb_%d_%d_station_%d_layer_%d", add*m_LBRangeLength,(add+1)*m_LBRangeLength-1,st,la),
112 Form("pixel hits, lb %d-%d, station %d, layer %d", add*m_LBRangeLength,(add+1)*m_LBRangeLength-1,st,la),
114
115 m_pixelHits[st][la].push_back(p_hist);
116
117 TH2F c_hist(Form("pixel_clusters_lb_%d_%d_station_%d_layer_%d", add*m_LBRangeLength,(add+1)*m_LBRangeLength-1,st,la),
118 Form("pixel_clusters, lb %d-%d, station %d, layer %d", add*m_LBRangeLength,(add+1)*m_LBRangeLength-1,st,la),
119 400,-20, 20, 400, -20, 20);
120
121 m_pixelCluster[st][la].push_back(c_hist);
122
123
124 }
125
126 }
127 }
128 }
129
130 int lb_index=current_lb/m_LBRangeLength;
131
132 // Get containers:
133
134 SG::ReadHandle<xAOD::AFPSiHitContainer> afpHitContainer (m_afpHitContainerKey, ctx);
135 if (!afpHitContainer.isValid())
136 {
137 ATH_MSG_WARNING("cannot get AFPSiHitContainer");
138 return StatusCode::SUCCESS;
139 }
140 else ATH_MSG_DEBUG("successfully got AFPSiHitContainer");
141
142 SG::ReadHandle<xAOD::AFPTrackContainer> afpTrackContainer (m_afpTrackContainerKey, ctx);
143 if(!afpTrackContainer.isValid()){
144 ATH_MSG_WARNING("cannot get AFPTrackContainer");
145 return StatusCode::SUCCESS;
146 }else{
147 ATH_MSG_DEBUG("successfully got AFPTrackContainer");
148 }
149
150
151// Fill histograms:
152// Pixel hit histograms:
153
154 for (const xAOD::AFPSiHit* hit : *afpHitContainer)
155 {
156 int st=hit->stationID();
157 int la=hit->pixelLayerID();
158
159 if(st<0 || m_nStations<=st)
160 {
161 ATH_MSG_INFO("stationID = " <<st<<", but expected values are from 0 to "<<m_nStations-1 );
162 continue;
163 }
164 if(la<0 || m_nLayers<=la)
165 {
166 ATH_MSG_INFO("pixelLayerID = " <<la<<", but expected values are from 0 to "<<m_nLayers-1 );
167 continue;
168 }
169
170 m_pixelHits[st][la].at(lb_index).Fill(hit->pixelRowIDChip(),hit->pixelColIDChip());
171 }
172
173// Histograms for local alignment:
174
175 // determining numbers for good track selection
176
177 int nTrks[m_nStations]={0};
178 int nClusterHits[m_nStations]={0};
179 int nClusterHistPerPlane[m_nStations][m_nLayers]={{0}};
180
181 for(const xAOD::AFPTrack* track: *afpTrackContainer){
182 nTrks[track->stationID()]++;
183 for(const auto& cluster : track->clusters()){
184 nClusterHits[(*cluster)->stationID()]++;
185 nClusterHistPerPlane[(*cluster)->stationID()][(*cluster)->pixelLayerID()]++;
186 }
187 }
188
189 // looping over tracks
190
191 for(const xAOD::AFPTrack* track: *afpTrackContainer){
192
193 if(nTrks[track->stationID()] != 1) continue; //exactly 1 track per station
194
195 for (const auto& cluster : track->clusters())
196 {
197 int st=(*cluster)->stationID();
198 int la=(*cluster)->pixelLayerID();
199
200
201
202 if(st<0 || m_nStations<=st)
203 {
204 ATH_MSG_INFO("stationID = " <<st<<", but expected values are from 0 to "<<m_nStations-1 );
205 continue;
206 }
207
208 if(la<0 || m_nLayers<=la)
209 {
210 ATH_MSG_INFO("pixelLayerID = " <<la<<", but expected values are from 0 to "<<m_nLayers-1 );
211 continue;
212 }
213
214 if(nClusterHits[st]<3 || nClusterHits[st]>4) continue; // 3 or 4 cluster hits per track
215 if(nClusterHistPerPlane[st][la]>1) continue; // 1 cluster hit per plane
216
217 m_pixelCluster[st][la].at(lb_index).Fill((*cluster)->xLocal(),(*cluster)->yLocal());
218
219 double dx = 1e3*(track->xLocal() + (*cluster)->zLocal()*track->xSlope() - (*cluster)->xLocal());
220 double dy = 1e3*(track->yLocal() + (*cluster)->zLocal()*track->ySlope() - (*cluster)->yLocal());
221
222 m_lb_yCluster_yDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->yLocal(), dy);
223 m_lb_xCluster_xDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->xLocal(), dx);
224 m_lb_sxTrack_xDistSiTrackCluster[st][la].Fill(current_lb, track->xSlope(), dx);
225 m_lb_syTrack_yDistSiTrackCluster[st][la].Fill(current_lb, track->ySlope(), dy);
226 m_lb_syTrack_xDistSiTrackCluster[st][la].Fill(current_lb, track->ySlope(), dx);
227 m_lb_sxTrack_yDistSiTrackCluster[st][la].Fill(current_lb, track->xSlope(), dy);
228
229 m_lb_xDistSiTrackCluster[st][la].Fill(current_lb, dx);
230 m_lb_yDistSiTrackCluster[st][la].Fill(current_lb, dy);
231
232 m_lb_xCluster_yDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->xLocal(), dy);
233 m_lb_yCluster_xDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->yLocal(), dx);
234 m_lb_zCluster_xDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->zLocal(), dx);
235 m_lb_zCluster_yDistSiTrackCluster[st][la].Fill(current_lb, (*cluster)->zLocal(), dy);
236
237 }
238
239 }
240
241 return StatusCode::SUCCESS;
242}
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Gaudi::Property< int > m_LBRangeLength
TProfile2D m_lb_zCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_sxTrack_xDistSiTrackCluster[m_nStations][m_nLayers]
SG::ReadHandleKey< xAOD::AFPTrackContainer > m_afpTrackContainerKey
std::vector< TH2F > m_pixelCluster[m_nStations][m_nLayers]
TProfile2D m_lb_yCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_xCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
static const int m_nStations
TProfile2D m_lb_yCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
SG::ReadHandleKey< xAOD::AFPSiHitContainer > m_afpHitContainerKey
TProfile m_lb_xDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_xCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_sxTrack_yDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_syTrack_xDistSiTrackCluster[m_nStations][m_nLayers]
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
TProfile2D m_lb_zCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
TProfile2D m_lb_syTrack_yDistSiTrackCluster[m_nStations][m_nLayers]
TProfile m_lb_yDistSiTrackCluster[m_nStations][m_nLayers]
std::vector< TH2F > m_pixelHits[m_nStations][m_nLayers]
bool add(const std::string &hname, TKey *tobj)
Definition fastadd.cxx:55
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
AFPSiHit_v2 AFPSiHit
Definition AFPSiHit.h:12
AFPTrack_v2 AFPTrack
Definition AFPTrack.h:12

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode AFP_PixelHistoFiller::finalize ( )
overridevirtual

Definition at line 245 of file AFP_PixelHistoFiller.cxx.

246{
247 std::unique_ptr<TFile> output_file(new TFile("AFP_PixelHistoFiller.root","recreate"));
248
249 TH1I lb("LBRangeLength","LBRangeLength",2,0,2);
250 lb.Fill(0.5);
251 lb.Fill(1.5,m_LBRangeLength);
252 lb.Write();
253
254 for(int st=0;st<m_nStations;++st)
255 {
256 for(int la=0;la<m_nLayers;++la)
257 {
258 m_lb_xDistSiTrackCluster[st][la].Write();
259 m_lb_yDistSiTrackCluster[st][la].Write();
270
271 for(TH2F& p_hist: m_pixelHits[st][la])
272 {
273 p_hist.Write();
274 }
275 for(TH2F& c_hist: m_pixelCluster[st][la]){
276 c_hist.Write();
277 }
278
279 }
280 }
281
282 output_file->Close();
283
284 return StatusCode::SUCCESS;
285}
int lb
Definition globals.cxx:23

◆ initialize()

StatusCode AFP_PixelHistoFiller::initialize ( )
overridevirtual

Definition at line 27 of file AFP_PixelHistoFiller.cxx.

28{
29 ATH_CHECK( m_eventInfoKey.initialize() );
30 ATH_CHECK( m_afpHitContainerKey.initialize() );
31 ATH_CHECK( m_afpTrackContainerKey.initialize() );
32
35
36 for(int st=0;st<m_nStations;++st)
37 {
38 for(int la=0;la<m_nLayers;++la)
39 {
40 m_pixelHits[st][la].clear();
41 m_pixelCluster[st][la].clear();
42
43
44 TProfile lb_dx(Form("lb_dx_station_%d_layer_%d", st,la), Form("lb_dx, station %d, layer %d", st,la), 100, 0, 1000);
45 m_lb_xDistSiTrackCluster[st][la] = lb_dx;
46
47 TProfile lb_dy(Form("lb_dy_station_%d_layer_%d", st,la), Form("lb_dy, station %d, layer %d", st,la), 100, 0, 1000);
48 m_lb_yDistSiTrackCluster[st][la] = lb_dy;
49
50 TProfile2D lb_yc_dy(Form("lb_yCluster_dy_station_%d_layer_%d", st,la), Form("lb_yCluster_dy, station %d, layer %d", st,la), 100, 0, 1000, 40, -20., 20.);
52
53 TProfile2D lb_xc_dx(Form("lb_xCluster_dx_station_%d_layer_%d", st,la), Form("lb_xCluster_dx, station %d, layer %d", st,la), 100, 0, 1000, 40, -20., 20.);
55
56 TProfile2D lb_xC_dy(Form("lb_xCluster_dy_station_%d_layer_%d", st, la), Form("lb_xCluster_dy, station %d, layer %d", st, la), 100, 0, 1000, 40, -20, 20);
58
59 TProfile2D lb_yC_dx(Form("lb_yCluster_dx_station_%d_layer_%d", st, la), Form("lb_yCluster_dx, station %d, layer %d", st, la), 100, 0, 1000, 40, -20, 20);
61
62 TProfile2D lb_zC_dx(Form("lb_zCluster_dx_station_%d_layer_%d", st, la), Form("lb_zCluster_dx, station %d, layer %d", st, la), 100, 0, 1000, 100, 9*la - 3, 9*(la+1));
64
65 TProfile2D lb_zC_dy(Form("lb_zCluster_dy_station_%d_layer_%d", st, la), Form("lb_zCluster_dy, station %d, layer %d", st, la), 100, 0, 1000, 100, 9*la - 3, 9*(la+1));
67
68 TProfile2D lb_sx_dx(Form("lb_xSlopeTrack_dx_station_%d_layer_%d",st,la), Form("xSlopeTrack_dx, station %d, layer %d", st,la), 100, 0, 1000, 100, -1., 1.);
70
71 TProfile2D lb_sy_dy(Form("lb_ySlopeTrack_dy_station_%d_layer_%d", st,la), Form("lb_ySlopeTrack_dy, station %d, layer %d", st,la), 100, 0, 1000, 100, -1., 1.);
73
74 TProfile2D lb_sy_dx(Form("lb_ySlopeTrack_dx_station_%d_layer_%d", st,la), Form("lb_ySlopeTrack_dx, station %d, layer %d", st,la), 100, 0, 1000, 100, -1., 1.);
76
77 TProfile2D lb_sx_dy(Form("lb_xSlopeTrack_dy_station_%d_layer_%d", st,la), Form("lb_xSlopeTrack_dy, station %d, layer %d", st,la), 100, 0, 1000, 100, -1., 1.);
78 m_lb_sxTrack_yDistSiTrackCluster[st][la] = lb_sx_dy;
79
80 }
81 }
82
83 return StatusCode::SUCCESS;
84}
#define ATH_CHECK
Evaluate an expression and check for errors.
static constexpr double SiT_Pixel_amount_y
static constexpr double SiT_Pixel_amount_x

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::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.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Algorithm >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
#define ATH_MSG_ERROR(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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_afpHitContainerKey

SG::ReadHandleKey<xAOD::AFPSiHitContainer> AFP_PixelHistoFiller::m_afpHitContainerKey { this ,"AFPHitContainerKey", "AFPSiHitContainer", "name of AFPSiHitContainer" }
private

Definition at line 63 of file AFP_PixelHistoFiller.h.

63{ this ,"AFPHitContainerKey", "AFPSiHitContainer", "name of AFPSiHitContainer" };

◆ m_afpTrackContainerKey

SG::ReadHandleKey<xAOD::AFPTrackContainer> AFP_PixelHistoFiller::m_afpTrackContainerKey { this, "AFPTrackContainerKey", "AFPTrackContainer", "name of AFPTrackContainer" }
private

Definition at line 64 of file AFP_PixelHistoFiller.h.

64{ this, "AFPTrackContainerKey", "AFPTrackContainer", "name of AFPTrackContainer" };

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> AFP_PixelHistoFiller::m_eventInfoKey { this, "EventInfoKey", "EventInfo", "name of EventInfo container" }
private

Definition at line 62 of file AFP_PixelHistoFiller.h.

62{ this, "EventInfoKey", "EventInfo", "name of EventInfo container" };

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_lb_sxTrack_xDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_sxTrack_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 55 of file AFP_PixelHistoFiller.h.

◆ m_lb_sxTrack_yDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_sxTrack_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 58 of file AFP_PixelHistoFiller.h.

◆ m_lb_syTrack_xDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_syTrack_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 57 of file AFP_PixelHistoFiller.h.

◆ m_lb_syTrack_yDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_syTrack_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 56 of file AFP_PixelHistoFiller.h.

◆ m_lb_xCluster_xDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_xCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 54 of file AFP_PixelHistoFiller.h.

◆ m_lb_xCluster_yDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_xCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 48 of file AFP_PixelHistoFiller.h.

◆ m_lb_xDistSiTrackCluster

TProfile AFP_PixelHistoFiller::m_lb_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 46 of file AFP_PixelHistoFiller.h.

◆ m_lb_yCluster_xDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_yCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 49 of file AFP_PixelHistoFiller.h.

◆ m_lb_yCluster_yDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_yCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 53 of file AFP_PixelHistoFiller.h.

◆ m_lb_yDistSiTrackCluster

TProfile AFP_PixelHistoFiller::m_lb_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 47 of file AFP_PixelHistoFiller.h.

◆ m_lb_zCluster_xDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_zCluster_xDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 50 of file AFP_PixelHistoFiller.h.

◆ m_lb_zCluster_yDistSiTrackCluster

TProfile2D AFP_PixelHistoFiller::m_lb_zCluster_yDistSiTrackCluster[m_nStations][m_nLayers]
private

Definition at line 51 of file AFP_PixelHistoFiller.h.

◆ m_LBRangeLength

Gaudi::Property<int> AFP_PixelHistoFiller::m_LBRangeLength {this, "LBRangeLength",5, "How many lumiblocks should be merged together to have reasonable statistics"}
private

Definition at line 60 of file AFP_PixelHistoFiller.h.

60{this, "LBRangeLength",5, "How many lumiblocks should be merged together to have reasonable statistics"};

◆ m_nLayers

const int AFP_PixelHistoFiller::m_nLayers =4
staticprivate

Definition at line 39 of file AFP_PixelHistoFiller.h.

◆ m_nPixelsX

int AFP_PixelHistoFiller::m_nPixelsX =0
private

Definition at line 40 of file AFP_PixelHistoFiller.h.

◆ m_nPixelsY

int AFP_PixelHistoFiller::m_nPixelsY =0
private

Definition at line 41 of file AFP_PixelHistoFiller.h.

◆ m_nStations

const int AFP_PixelHistoFiller::m_nStations =4
staticprivate

Definition at line 38 of file AFP_PixelHistoFiller.h.

◆ m_pixelCluster

std::vector<TH2F> AFP_PixelHistoFiller::m_pixelCluster[m_nStations][m_nLayers]
private

Definition at line 44 of file AFP_PixelHistoFiller.h.

◆ m_pixelHits

std::vector<TH2F> AFP_PixelHistoFiller::m_pixelHits[m_nStations][m_nLayers]
private

Definition at line 43 of file AFP_PixelHistoFiller.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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