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

#include <ALFA_Raw2Digit.h>

Inheritance diagram for ALFA_Raw2Digit:
Collaboration diagram for ALFA_Raw2Digit:

Public Member Functions

 ALFA_Raw2Digit (const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize ()
StatusCode execute (const EventContext &ctx)
 Execute method.
StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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< StoreGateSvc > StoreGateSvc_t

Private Member Functions

StatusCode recordCollection ()
StatusCode recordODCollection ()
StatusCode mapping ()
StatusCode ChanPlot (uint32_t pot_n, uint32_t iLayer, uint32_t MarChan, uint32_t &chan_i, uint32_t &chan_j)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< std::string > m_ALFA_RawDataCollectionKey {this, "ALFA_RawDataCollectionKey", "ALFA_RawData"}
int m_nEvents {}
int m_mbID {}
int m_pmfID {}
int m_fibID {}
int m_MAPMTChan {}
int m_MapChan {}
int m_pot {}
int m_plate {}
int m_fiber {}
int m_ODpot {}
int m_ODside {}
int m_ODplate {}
int m_ODfiber {}
int m_maroc2fiber [8][20][64] {}
int m_maroc2mapmt [8][20][64] {}
int m_mapmt2maroc [8][20][64] {}
int m_pmf2layer [8][23] {}
int m_OD_pmf2layer [8][4] {}
int m_OD_pmf_maroc2fiber [8][4][64] {}
int m_OD_pmf_maroc2side [8][4][64] {}
int m_mb2det [8] {}
uint32_t m_lumi_block {}
uint16_t m_charge_1 [8] {}
uint16_t m_charge_2 [8] {}
std::vector< bool > m_trigger_pattern
bool m_pot_b [8] {}
bool m_layer_b [8][20] {}
bool m_fiber_b [8][20][64] {}
bool m_trigger_pattern_b [8][16] {}
Int_t m_n_hits_lay [8][20] {}
Int_t m_event_no {}
TString m_rootOutputFileName {}
Int_t m_pmf_chan_hit_counter [8][23][64] {}
Int_t m_hit_counter [8] {}
ALFA_DigitCollection * m_digitCollection {}
ALFA_ODDigitCollection * m_ODdigitCollection {}
std::string m_key_DigitCollection {"ALFA_DigitCollection"}
std::string m_key_ODDigitCollection {"ALFA_ODDigitCollection"}
std::ifstream m_inChan
std::ifstream m_inPMF
std::ifstream m_inOD
std::ifstream m_inDet
std::string m_mapname
std::stringstream m_s
std::string m_h_name1
std::string m_h_name2
std::string m_h_name3
std::string m_h_loc1
std::string m_h_loc2
std::string m_h_loc3
std::string m_CanName
int m_WordId_count {}
uint32_t m_chan_i {}
uint32_t m_chan_j {}
Gaudi::Property< std::string > m_strMeasuredDataType {this, "MeasuredDataType", "tunnel"}
std::ofstream m_toFile
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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

Definition at line 40 of file ALFA_Raw2Digit.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ALFA_Raw2Digit()

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

Definition at line 12 of file ALFA_Raw2Digit.cxx.

13 : AthAlgorithm(name, pSvcLocator)
14{
15}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.

Member Function Documentation

◆ ChanPlot()

StatusCode ALFA_Raw2Digit::ChanPlot ( uint32_t pot_n,
uint32_t iLayer,
uint32_t MarChan,
uint32_t & chan_i,
uint32_t & chan_j )
private

Definition at line 697 of file ALFA_Raw2Digit.cxx.

698{
699 // returs values in range 1-8; input is 0-63!
700// if (int(fmod(double(m_maroc2mapmt[pot_n][MarChan]+1),double(8)))>0)
701 if (int(fmod(double(m_maroc2mapmt[pot_n][iLayer][MarChan]+1),double(8)))>0)
702 {
703// chan_i=int((m_maroc2mapmt[pot_n][MarChan]+1)/8)+1;
704// chan_j=9-int(fmod(double(m_maroc2mapmt[pot_n][MarChan]+1),double(8)));
705 chan_i=int((m_maroc2mapmt[pot_n][iLayer][MarChan]+1)/8)+1;
706 chan_j=9-int(fmod(double(m_maroc2mapmt[pot_n][iLayer][MarChan]+1),double(8)));
707 }
708 else
709 {
710// chan_i=int((m_maroc2mapmt[pot_n][MarChan]+1)/8);
711 chan_i=int((m_maroc2mapmt[pot_n][iLayer][MarChan]+1)/8);
712 chan_j=1;
713 }
714
715// msg(MSG::FATAL) << "in funct: m_fibID = " << MarChan << ", chan_i " << chan_i << ", chan_j = " << chan_j << endmsg;
716 return StatusCode::SUCCESS;
717}
int m_maroc2mapmt[8][20][64]

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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 ALFA_Raw2Digit::execute ( const EventContext & ctx)
virtual

Execute method.

Implements AthAlgorithm.

Definition at line 130 of file ALFA_Raw2Digit.cxx.

131{
132 ATH_MSG_DEBUG ("ALFA_Raw2Digit: BEGINING of execute");
133
134 m_nEvents++;
135 msg(MSG::DEBUG) << "event # "<< m_nEvents << endmsg;
136// m_toFile << "Event " << m_nEvents << std::endl;
137
138 // retrieve the RawData RDO container from the TDS
139 const ALFA_RawDataContainer* container = nullptr;
140 StatusCode sc_read = evtStore()->retrieve(container, m_ALFA_RawDataCollectionKey.value());
141
142 if ( sc_read != StatusCode::SUCCESS ) {
143 msg(MSG::ERROR) << "ALFA_Raw2Digit: Could not find container" << endmsg;
144 return StatusCode::SUCCESS;
145 }
146
147 else if ( sc_read == StatusCode::SUCCESS ) {
148 msg(MSG::DEBUG) << "ALFA_Raw2Digit: Raw data container retrieved" << endmsg;
149 }
150
151 msg(MSG::DEBUG) << "MD record_collection()" << endmsg;
152
154 if (sc.isFailure()) {
155 msg(MSG::WARNING) << "ALFA_Raw2Digit: recordCollection failed" << endmsg;
156 return StatusCode::SUCCESS;
157 }
158
159 msg(MSG::DEBUG) << "OD record_collection()" << endmsg;
160
162 if (sc.isFailure()) {
163 msg(MSG::WARNING) << "ALFA_Raw2Digit, recordODCollection failed" << endmsg;
164 return StatusCode::SUCCESS;
165 }
166
167
168 for (unsigned int i=0;i<8;i++) {
169 m_pot_b[i] = false;
170 for (unsigned int j=0;j<20;j++) {
171 m_layer_b[i][j] = false;
172 for (unsigned int k=0;k<64;k++) {
173 m_fiber_b[i][j][k] = false;
174 }
175 }
176 for (unsigned int k=0;k<16;k++) {
177 m_trigger_pattern_b[i][k] = false;
178 }
179 }
180
181
183
184
185 m_lumi_block = container->GetLumiBlock();
186// std::cout << "m_lumi_block = " << m_lumi_block << std::endl;
187
188 // loop over container start
189 ALFA_RawDataContainer::const_iterator RawData_Collection_Beg = container->begin();
190 ALFA_RawDataContainer::const_iterator RawData_Collection_End = container->end();
191
192 //loop over collection (container) with hits (i.e. over 1 event)
193 for(;RawData_Collection_Beg!=RawData_Collection_End; ++RawData_Collection_Beg)
194 {
195 m_mbID = ((*RawData_Collection_Beg)->GetMBId_POT());
196 msg(MSG::DEBUG) << "ALFA_Raw2Digit: MBId POT= " << m_mbID << endmsg;
197
198// std::cout << "******* Time stamp = " << (*RawData_Collection_Beg)->GetTimeStamp_POT() << std::endl;
199// time_t rawtime = (*RawData_Collection_Beg)->GetTimeStamp_POT();
200// struct tm * timeinfo;
203// timeinfo = gmtime ( &rawtime );
204// printf ( "The date/time is: %m_s", asctime (timeinfo) );
205
206 m_pot_b[m_mbID-1] = true;
207 // m_event_no = ((*RawData_Collection_Beg)->GetEventCount_POT());
208
209 m_charge_1[m_mbID-1] = ((*RawData_Collection_Beg)->Get_ADC1_POT());
210 m_charge_2[m_mbID-1] = ((*RawData_Collection_Beg)->Get_ADC2_POT());
211 for (unsigned int i=0;i<16;i++) {
212 m_trigger_pattern_b[m_mbID-1][i] = ((*RawData_Collection_Beg)->Get_pattern_POT())[i];
213// msg(MSG::ERROR) << " pattern: bit " << i << ", value = "<< m_trigger_pattern_b[m_mbID-1][i] << " in MB = " << m_mbID-1 << endmsg;
214 }
215
216// loop over collection start
217 ALFA_RawDataCollection::const_iterator p_RawData_Beg=(*RawData_Collection_Beg)->begin();//pointer to RawData data vector
218 ALFA_RawDataCollection::const_iterator p_RawData_End=(*RawData_Collection_Beg)->end();
219
220 for(;p_RawData_Beg!=p_RawData_End; ++p_RawData_Beg)
221 {
222// msg(MSG::DEBUG) << " all, pmfId = " << (*p_RawData_Beg)->GetPMFId_PMF() << ", MBId = " << (*p_RawData_Beg)->GetMBId_PMF() << endmsg;
223
224 if ((*p_RawData_Beg)->GetPMFId_PMF()>0 && ((*p_RawData_Beg)->GetWordId_PMF())<24)
225 {
226 m_pmfID= (*p_RawData_Beg)->GetPMFId_PMF();
227
228 if (((*p_RawData_Beg)->GetWordId_PMF())==0) m_WordId_count=1;
229 else m_WordId_count=0;
230
231 if (m_WordId_count==1){
232 msg(MSG::DEBUG) << " pmfId = " << (*p_RawData_Beg)->GetPMFId_PMF() << ", MBId = " << (*p_RawData_Beg)->GetMBId_PMF() <<endmsg;
233 }
234
235// msg(MSG::DEBUG) << " m_WordId_count " << m_WordId_count << endmsg;
236
237 for (unsigned int i=0;i<16;i++)
238 {
239 if ((*p_RawData_Beg)->Get_Chan(i)!=100)
240 {
241 msg(MSG::DEBUG) <<"ALFA_Raw2Digit, maroc chanel # = " << (*p_RawData_Beg)->Get_Chan(i)<< endmsg;
242
243 m_fibID = (*p_RawData_Beg)->Get_Chan(i);
244
245 // in Sara Diglio Byte Stream Converter PMF are counted from 1, then OD detectors have values of PMF in the range 2-4; fibers start at 0
246 if ((m_pmfID == 1) || (m_pmfID > 4))
247 {
248 m_pot = m_mb2det[m_mbID-1];
249// m_pot = m_mbID-1;
251 // changed by Petr - 19.12.2012 -----------------------------
252// m_fiber = 63-m_maroc2fiber[m_pot][m_fibID];
254
255 m_layer_b[m_mbID-1][m_plate] = true;
256 m_fiber_b[m_mbID-1][m_plate][m_fiber] = true;
257// msg(MSG::ERROR) << " bim ho, lumi = " << m_lumi_block << ", pot = "<< m_mbID-1 << ", plate " << m_plate << endmsg;
259// msg(MSG::ERROR) << " number of hits " << m_n_hits_lay[m_mbID-1][m_plate] << endmsg;
260
261// m_digitCollection->push_back(new ALFA_Digit(m_pot,m_plate,m_fiber));
262 m_digitCollection->push_back(new ALFA_Digit(m_mbID-1,m_plate,m_fiber));
263
264 // changed by Petr - 19.12.2012 -----------------------------
265// m_MapChan = m_maroc2mapmt[m_pot][m_fibID];
267 msg(MSG::DEBUG) << "pot = " << m_pot << ", pmf = " << m_pmfID-1 << ", maroc = " << m_fibID << ", mapmt = " << m_MapChan << endmsg;
268
269// PMFvsMAPMT[m_pot]->Fill(m_MapChan,m_pmfID-1);
270// PMFvsMAROC[m_pot]->Fill(m_fibID,m_pmfID-1);
271 // changed by Petr - 19.12.2012 -----------------------------
272// ChanPlot(m_pot,m_fibID,m_chan_i,m_chan_j);
273// ChanPlot(m_pot,m_plate,m_fibID,m_chan_i,m_chan_j);
274// MapmtHit[m_pot][m_pmfID-1]->Fill(m_chan_i,m_chan_j);
275 msg(MSG::DEBUG) << "fibID = " << m_fibID << ", chan_i " << m_chan_i << ", chan_j = " << m_chan_j << endmsg;
276
279
280 msg(MSG::DEBUG) << "ALFA_Raw2Digit: new digit (softsim numbering-starting from 0) in the collection, pot = " << m_pot << ", plate = " << m_plate << ", fiber = " << m_fiber << endmsg;
281 }
282 else
283 {
285// m_ODpot = m_mbID-1;
289
290 // changed by Petr - 19.12.2012 ----------------------------- commented, is it needed by ODs? TODO: to correct m_MapChan for OD case
291// m_MapChan = m_maroc2mapmt[m_ODpot][m_fibID];
292// msg(MSG::DEBUG) << " pot = " << m_ODpot << ", pmf = " << m_pmfID-1 << ", maroc = " << m_fibID << ", mapmt = " << m_MapChan << endmsg;
293
294 if (m_ODfiber!=98)
295 {
296// m_ODfiber = (m_ODside==0)? m_ODfiber : 29-m_ODfiber;
297
298// m_ODdigitCollection->push_back(new ALFA_ODDigit(m_ODpot,m_ODside,m_ODplate,m_ODfiber));
299 m_ODdigitCollection->push_back(new ALFA_ODDigit(m_mbID-1,m_ODside,m_ODplate,m_ODfiber));
300
301// msg(MSG::DEBUG) << "pot, side, plate, fiber = " << m_ODpot << ", " << m_ODside << ", " << m_ODplate << ", " << m_ODfiber << endmsg;
302
303 }
304
305
306// PMFvsMAPMT[m_ODpot]->Fill(m_MapChan,m_pmfID-1);
307// PMFvsMAROC[m_ODpot]->Fill(m_fibID,m_pmfID-1);
308
309 // changed by Petr - 19.12.2012 ----------------------------- commented, is it needed by ODs? TODO: to correct ChanPlot for OD case
310// ChanPlot(m_ODpot,m_fibID,m_chan_i,m_chan_j);
311// MapmtHit[m_ODpot][m_pmfID-1]->Fill(m_chan_i,m_chan_j);
312 msg(MSG::DEBUG) << "fibID = " << m_fibID << ", chan_i " << m_chan_i << ", chan_j = " << m_chan_j << endmsg;
313
316
317 msg(MSG::DEBUG) << "ALFA_Raw2Digit: new OD digit (softsim numbering-starting from 0) in the collection, pot = " << m_ODpot << ", side = " << m_ODside << ", plate = " << m_ODplate << ", fiber = " << m_ODfiber << endmsg;
318 }
319 }
320 // */
321 }
322 } //if (PFM!=0)
323 else
324 {
325 msg(MSG::DEBUG) << "ALFA_Raw2Digit: More than n Raw Data " <<endmsg;
326 break;
327 }
328 } // loop raw data
329
330 msg(MSG::DEBUG) << "ALFA_Raw2Digit: finish loop over raw data " << endmsg;
331 } // loop collection
332
333 msg(MSG::DEBUG) << "ALFA_Raw2Digit: finish loop over collection " << endmsg;
334
335// m_tree->Fill();
336
337 return StatusCode::SUCCESS;
338}
#define endmsg
#define ATH_MSG_DEBUG(x,...)
static Double_t sc
bool m_fiber_b[8][20][64]
int m_pmf2layer[8][23]
StatusCode recordODCollection()
int m_OD_pmf_maroc2fiber[8][4][64]
uint16_t m_charge_2[8]
bool m_trigger_pattern_b[8][16]
ALFA_DigitCollection * m_digitCollection
StatusCode recordCollection()
ALFA_ODDigitCollection * m_ODdigitCollection
Int_t m_hit_counter[8]
uint16_t m_charge_1[8]
uint32_t m_lumi_block
int m_OD_pmf_maroc2side[8][4][64]
Int_t m_pmf_chan_hit_counter[8][23][64]
int m_maroc2fiber[8][20][64]
Int_t m_n_hits_lay[8][20]
int m_OD_pmf2layer[8][4]
Gaudi::Property< std::string > m_ALFA_RawDataCollectionKey
bool m_layer_b[8][20]
ServiceHandle< StoreGateSvc > & evtStore()
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:861
::StatusCode StatusCode
StatusCode definition for legacy code.
const SG::AuxVectorData * container() const
Return the container holding this element.
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode ALFA_Raw2Digit::finalize ( )

Definition at line 340 of file ALFA_Raw2Digit.cxx.

341{
342 ATH_MSG_DEBUG ("ALFA_Raw2Digit:finalize()");
343
344// m_toFile.close();
345// m_tree->Write();
346
347/*
348 TCanvas *canvas = new TCanvas("MAPMT_activity", "MAPMT_activity");
349// TCanvas *tcDistance = new TCanvas("tcDistance", "tcDistance");
350
351 gStyle->SetPalette(1);
352
353 for (int j=0;j<8;j++){
354 for (int k=0;k<23;k++){
355 for (int m=1;m<9;m++){
356 for (int n=1;n<9;n++){
357 MAPMT_activity_h[j][k]->SetBinContent(m,n,double(MapmtHit[j][k]->GetBinContent(m,n))/double(m_hit_counter[j]));
358 }
359 }
360 for (int i=0;i<64;i++){
361 MAPMT_activity[j]->SetPoint(k*64+i,k*64+i,double(m_pmf_chan_hit_counter[j][k][i])/double(m_hit_counter[j]));
362 }
363 }
364
365 m_s.str("");
366 m_s << j+1;
367
368 m_h_name1 = "MAPMT_activity_p_";
369 m_h_name1 += m_s.str();
370
371 canvas->Clear();
372 canvas->cd();
373
374 MAPMT_activity[j]->SetTitle(m_h_name1.c_str());
375 MAPMT_activity[j]->SetMarkerStyle(6);
376 MAPMT_activity[j]->Draw("AP");
377 MAPMT_activity[j]->SetName(m_h_name1.c_str());
378
379 canvas->cd()->Update();
380
381 m_h_name1 += ".eps";
382 canvas->Print(m_h_name1.c_str());
383 }
384
385 delete canvas;
386
387 for (int j=0;j<8;j++){
388 TCanvas *POT_View = new TCanvas("POT_View","POT_View");
389 POT_View->Divide(5,5);
390
391 gStyle->SetPalette(1);
392
393 for (unsigned int i=0;i<4;i++)
394 {
395 POT_View->cd(i+1);
396 // MapmtEff[i]->GetZaxis()->SetRangeUser(0,max_trig_eff_old[0]);
397 MAPMT_activity_h[j][i]->Draw("COLZ,A");
398 MAPMT_activity_h[j][i]->SetStats(0);
399 }
400
401 for (unsigned int i=4;i<11;i++)
402 {
403 POT_View->cd(i+2);
404 // MapmtEff[i]->GetZaxis()->SetRangeUser(0,max_trig_eff_old[0]);
405 MAPMT_activity_h[j][i]->Draw("COLZ,A");
406 MAPMT_activity_h[j][i]->SetStats(0);
407 }
408
409 for (unsigned int i=11;i<23;i++)
410 {
411 POT_View->cd(i+3);
412 // MapmtEff[i]->GetZaxis()->SetRangeUser(0,max_trig_eff_old[0]);
413 MAPMT_activity_h[j][i]->Draw("COLZ,A");
414 MAPMT_activity_h[j][i]->SetStats(0);
415 }
416
417 POT_View->cd();
418
419 m_s.str("");
420 m_s << j+1;
421 m_CanName = "h_MAPMT_activity_p_";
422 m_CanName += m_s.str();
423 m_CanName+=".eps";
424
425 POT_View->Print(m_CanName.c_str());
426 POT_View->Close();
427 }
428
429*/
430
431// m_rootOutput->Write();
432// m_rootOutput->Close();
433
434 return StatusCode::SUCCESS;
435}

◆ initialize()

StatusCode ALFA_Raw2Digit::initialize ( )

Definition at line 17 of file ALFA_Raw2Digit.cxx.

18{
19 ATH_MSG_DEBUG ("ALFA_Raw2Digit:initialize()");
20
21 if (m_strMeasuredDataType=="tunnel")
22 {
23 m_mb2det[0] = 1; m_mb2det[1] = 0; m_mb2det[2] = 7; m_mb2det[3] = 2;
24 m_mb2det[4] = 4; m_mb2det[5] = 5; m_mb2det[6] = 6; m_mb2det[7] = 3;
25 }
26 else if (m_strMeasuredDataType=="testbeam")
27 {
28 m_mb2det[0] = 0; m_mb2det[1] = 1; m_mb2det[2] = 2; m_mb2det[3] = 3;
29 m_mb2det[4] = 4; m_mb2det[5] = 5; m_mb2det[6] = 6; m_mb2det[7] = 7;
30 }
31
32 m_nEvents = 0;
33 m_MAPMTChan = -1;
34
35 for (int m=0;m<8;m++)
36 {
37 m_hit_counter[m] = 0;
38 for (int k=0;k<23;k++)
39 {
40 for (int i=0;i<64;i++)
41 {
43 }
44 }
45 }
46
48
49 if (sc.isFailure()) { msg (MSG::FATAL) << " Could not open mapping " << endmsg; return sc; }
50 else msg (MSG::DEBUG) << " mapping is fine " << endmsg;
51
52// sc = service("THistSvc", m_histSvc);
53
54 // retrieve ThistSvc ...
55// if(sc.isFailure())
56// {
57// msg(MSG::FATAL) << "Unable to retrieve pointer to THistSvc" << endmsg;
58// return sc;
59// }
60
61/*
62 m_rootOutputFileName = "ALFA_toy_tree_tom.root";
63 m_rootOutput = new TFile(m_rootOutputFileName,"RECREATE");
64 m_tree = new TTree("MyTree", "ALFA_toy_tree");
65
66 TBranch *branch;
67 branch = m_tree->Branch("m_event_no", &m_event_no,"m_event_no/I"); branch->SetAutoDelete(kFALSE);
68 branch = m_tree->Branch("m_lumi_block", &m_lumi_block, "m_lumi_block/I"); branch->SetAutoDelete(kFALSE);
69 branch = m_tree->Branch("pot_b", m_pot_b, "pot_b[8]/O"); branch->SetAutoDelete(kFALSE);
70 branch = m_tree->Branch("layer_b", m_layer_b, "layer_b[8][20]/O"); branch->SetAutoDelete(kFALSE);
71 branch = m_tree->Branch("fiber_b", m_fiber_b, "fiber_b[8][20][64]/O"); branch->SetAutoDelete(kFALSE);
72 branch = m_tree->Branch("trigger_pattern_b", m_trigger_pattern_b, "trigger_pattern[8][16]/O"); branch->SetAutoDelete(kFALSE);
73 branch = m_tree->Branch("charge_1", &m_charge_1, "charge_1[8]/s"); branch->SetAutoDelete(kFALSE);
74 branch = m_tree->Branch("charge_2", &m_charge_2, "charge_2[8]/s"); branch->SetAutoDelete(kFALSE);
75*/
76
77// for (unsigned int j=0; j<8; j++)
78// {
79// m_h_name1 = "MAPMT_activity_p_";
80// m_h_name2 = "PMFvsMAPMT_p_";
81// m_h_name3 = "PMFvsMAROC_p_";
82
83// m_h_loc1 = "/AANT/MAPMT_activity_p_";
84// m_h_loc2 = "/AANT/PMFvsMAPMT_p_";
85// m_h_loc3 = "/AANT/PMFvsMAROC_p_";
86
87// m_s.str("");
88// m_s << j+1;
89
90// m_h_name1 += m_s.str();
91// m_h_name2 += m_s.str();
92// m_h_name3 += m_s.str();
93
94// m_h_loc1 += m_s.str();
95// m_h_loc2 += m_s.str();
96// m_h_loc3 += m_s.str();
97
98/*
99 m_rootOutputFileName = "ALFA_toy_tree_tom.root";
100 m_rootOutput = new TFile(m_rootOutputFileName,"RECREATE");
101 m_tree = new TTree("MyTree", "ALFA_toy_tree");
102
103 MAPMT_activity[j] = new TGraph(1472);
104// MAPMT_activity[j]->SetTitle("Trigger efficiency for Upper pot;MAROC Channel; Trigger efficiency");
105 MAPMT_activity[j]->SetTitle(m_h_name1.c_str());
106 MAPMT_activity[j]->SetMarkerStyle(6);
107 MAPMT_activity[j]->Draw("AP");
108 MAPMT_activity[j]->SetName(m_h_name1.c_str());
109
110// sc = m_histSvc->regHist(m_h_loc1.c_str(),MAPMT_activity[j]);
111
112 PMFvsMAPMT[j] = new TH2I(m_h_name2.c_str(),m_h_name2.c_str(),64,-0.5,63.5,23,-0.5,22.5);
113 sc = m_histSvc->regHist(m_h_loc2.c_str(),PMFvsMAPMT[j]);
114
115 PMFvsMAROC[j] = new TH2I(m_h_name3.c_str(),m_h_name3.c_str(),64,-0.5,63.5,23,-0.5,22.5);
116 sc = m_histSvc->regHist(m_h_loc3.c_str(),PMFvsMAROC[j]);
117
118 for (unsigned int i=0; i<23; i++)
119 {
120 MapmtHit[j][i] = new TH2I(m_h_name1.c_str(),m_h_name1.c_str(),8,0.5,8.5,8,0.5,8.5);
121 MAPMT_activity_h[j][i] = new TH2D("","",8,0.5,8.5,8,0.5,8.5);
122 sc = m_histSvc->regHist(m_h_loc1.c_str(),MAPMT_activity_h[j][i]);
123 }
124*/
125// }
126
127 return StatusCode::SUCCESS;
128}
StatusCode mapping()
Gaudi::Property< std::string > m_strMeasuredDataType

◆ inputHandles()

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

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ mapping()

StatusCode ALFA_Raw2Digit::mapping ( )
private

Definition at line 464 of file ALFA_Raw2Digit.cxx.

465{
466 int MarChan = 0;
467 int MapChan = 0;
468 int FibChan = 0;
469 int iLayer = 0;
470 int PMFNum = 0;
471 int LAYNum = 0;
472 int OD_PMFNum = 0;
473 int OD_Dieter = 0;
474 int OD_LAYNum = 0;
475 int OD_Side = 0;
476 int OD_MarChan = 0;
477 int OD_FibChan = 0;
478 int OD_MaPmtChan = 0;
479
480// int MBnum, DETnum;
481
482
483// m_mapname = "./mapping/motheboard2detector.dat";
484// m_inDet.open(m_mapname.c_str());
485// msg(MSG::DEBUG) << "file name " << m_mapname.c_str() << endmsg;
486// for (unsigned int i=0;i<64;i++) {
487// m_inDet >> MBnum >> DETnum;
488// m_mb2det[MBnum] = DETnum;
489// }
490
491 std::fill_n(&m_maroc2fiber[0][0][0], sizeof(m_maroc2fiber)/sizeof(int), -9999.0);
492 std::fill_n(&m_maroc2mapmt[0][0][0], sizeof(m_maroc2mapmt)/sizeof(int), -9999.0);
493 std::fill_n(&m_mapmt2maroc[0][0][0], sizeof(m_mapmt2maroc)/sizeof(int), -9999.0);
494
495
496 for (unsigned int j=0; j<8; j++)
497 {
498 m_s.str("");
499
500// m_mapname = "mapping/MAROC_MAPMT_FIBER_MD";
501
502 // changed by Petr - 19.12.2012 -------------------------------------------------
503// m_mapname = "MAROC_MAPMT_FIBER_MD";
504 m_mapname = "ALFA_Raw2Digit/MAROC_MAPMT_FIBER_NEW_MD_";
505 m_s << j+1;
506 m_mapname += m_s.str();
507 m_mapname += ".dat";
508
509 msg(MSG::DEBUG) << "file name " << m_mapname.c_str() << endmsg;
510
511 // ************
513 if(filePath.length() == 0)
514 {
515 msg(MSG::FATAL) << " the mapping file MD maroc-mapmt \"" << m_mapname.c_str() << "\" not found in Datapath." << endmsg;
516 throw std::runtime_error("FATAL: mapping MD maroc-mapmt not found in Datapath.");
517 }
518 else
519 {
520 msg(MSG::DEBUG) << "DEBUG: the mapping file MD maroc-mapmt \"" << m_mapname.c_str() << "\" found in Datapath." << endmsg;
521 msg(MSG::DEBUG) << "DEBUG: filePath = " << filePath.c_str() << endmsg;
522 }
523 // **************
524
525// m_inChan.open(m_mapname.c_str());
526 m_inChan.open(filePath.c_str());
527 if (m_inChan.is_open())
528 {
529 // changed by Petr - 19.12.2012 ---------------------------------------------
530// for (unsigned int i=0;i<64;i++){
531 for (unsigned int i=0;i<1280;i++){
532// m_inChan >> MarChan >> MapChan >> FibChan;
533 m_inChan >> iLayer >> MarChan >> MapChan >> FibChan;
534// msg(MSG::DEBUG) << i << " maroc_mapmt_fiber, maroc = " << MarChan << ", map = "<< MapChan << ", fib = " << FibChan << endmsg;
535 msg(MSG::DEBUG) << i << " maroc_mapmt_fiber, layer = " << iLayer << ", maroc = " << MarChan << ", map = "<< MapChan << ", fib = " << FibChan << endmsg;
536
537 if ((MarChan < 0) || (MarChan > 63))
538 {
539 std::string s1("MarChan out of range; file corrupted");
540 throw std::runtime_error(s1);
541 }
542
543 if ((MapChan < 0) || (MapChan > 63))
544 {
545 std::string s2("MapChan out of range; file corrupted");
546 throw std::runtime_error(s2);
547 }
548
549 if ((iLayer < 0) || (iLayer > 19))
550 {
551 std::string s2("Layer out of range; file corrupted");
552 throw std::runtime_error(s2);
553 }
554
555// m_maroc2fiber[j][MarChan] = FibChan;
556// m_maroc2mapmt[j][MarChan] = MapChan;
557// m_mapmt2maroc[j][MapChan] = MarChan;
558 m_maroc2fiber[j][iLayer][MarChan] = FibChan;
559 m_maroc2mapmt[j][iLayer][MarChan] = MapChan;
560 m_mapmt2maroc[j][iLayer][MapChan] = MarChan;
561 }
562 m_inChan.close();
563 }
564 else
565 {
566 msg(MSG::ERROR) << "the file " << m_mapname.c_str() << " was not open" << endmsg;
567 return StatusCode::FAILURE;
568 }
569
570// m_mapname = "mapping/PMF_LAYER_MD";
571 m_mapname = "ALFA_Raw2Digit/PMF_LAYER_MD";
572 m_mapname += m_s.str();
573 m_mapname += ".dat";
574 msg(MSG::DEBUG) << "file name " << m_mapname.c_str() << endmsg;
575
576 // ************
578 if(filePath.length() == 0)
579 {
580 msg(MSG::FATAL) << " the mapping file PMF_LAYER_MD \"" << m_mapname.c_str() << "\" not found in Datapath." << endmsg;
581 throw std::runtime_error("FATAL: mapping PMF_LAYER_MD not found in Datapath.");
582 }
583 else
584 {
585 msg(MSG::DEBUG) << "DEBUG: the mapping file PMF_LAYER_MD \"" << m_mapname.c_str() << "\" found in Datapath." << endmsg;
586 msg(MSG::DEBUG) << "DEBUG: filePath = " << filePath.c_str() << endmsg;
587 }
588 // **************
589
590 m_inPMF.open(filePath.c_str());
591 if (m_inPMF.is_open())
592 {
593 for (unsigned int i=0;i<20;i++)
594 {
595 m_inPMF >> PMFNum >> LAYNum;
596 msg(MSG::DEBUG) << i << " pmf2layer, pmf = " << PMFNum << ", layer = "<< LAYNum << endmsg;
597
598 if ((PMFNum < 0) || ( PMFNum > 22))
599 {
600 std::string s3("PMFNum out of range; file corrupted");
601 throw std::runtime_error(s3);
602 }
603
604
605 m_pmf2layer[j][PMFNum] = LAYNum;
606 // // layer2pmf[j][LAYNum] = PMFNum;
607 }
608 m_inPMF.close();
609 }
610 else
611 {
612 msg(MSG::WARNING) << "the file " << m_mapname.c_str() << " was not open" << endmsg;
613 return StatusCode::FAILURE;
614 }
615
616// m_mapname="mapping/OD_MAP";
617 m_mapname="ALFA_Raw2Digit/OD_MAP";
618 m_mapname += m_s.str();
619 m_mapname+=".dat";
620 msg(MSG::DEBUG) << "file name " << m_mapname.c_str() << endmsg;
621
622 // ************
624 if(filePath.length() == 0)
625 {
626 msg(MSG::FATAL) << " the mapping file OD_MAP \"" << m_mapname.c_str() << "\" not found in Datapath." << endmsg;
627 throw std::runtime_error("FATAL: mapping OD_MAP not found in Datapath.");
628 }
629 else
630 {
631 msg(MSG::DEBUG) << "DEBUG: the mapping file OD_MAP \"" << m_mapname.c_str() << "\" found in Datapath." << endmsg;
632 msg(MSG::DEBUG) << "DEBUG: filePath = " << filePath.c_str() << endmsg;
633 }
634 // **************
635
636 m_inOD.open(filePath.c_str());
637 if (m_inOD.is_open())
638 {
639 for(unsigned int jlay=0; jlay<3; jlay++)
640 {
641 for(unsigned int jside=0; jside<2; jside++)
642 {
643 for(unsigned int jch=0; jch<32; jch++)
644 {
645 m_inOD >> OD_PMFNum >> OD_Dieter >> OD_LAYNum >> OD_Side >> OD_MaPmtChan >> OD_FibChan; // warning!!! MaPmt, not Maroc!
646 msg(MSG::DEBUG) << " pmf2layer, OD_PMFNum = " << OD_PMFNum << ", OD_Dieter = "<< OD_Dieter << ", OD_LAYNum = " << OD_LAYNum << ", OD_Side = " << OD_Side << ", OD_MaPmtChan = " << OD_MaPmtChan << ", OD_FibChan = " << OD_FibChan << endmsg;
647
648 if ((OD_PMFNum < 2) || ( OD_PMFNum > 4))
649 {
650 std::string s4("OD_PMFNum out of range; file corrupted");
651 throw std::runtime_error(s4);
652 }
653
654 if ((OD_MaPmtChan < 1) || ( OD_MaPmtChan > 64))
655 {
656 std::string s5("OD_MaPmtChan out of range; file corrupted");
657 throw std::runtime_error(s5);
658 }
659
660
661// m_OD_pmf2layer[j][OD_PMFNum-1] = OD_LAYNum-1;
662 // OD_layer2pmf[j][OD_LAYNum-1] = OD_PMFNum-1;
663 // changed by Petr - 19.12.2012 ---------------------------------
664// OD_MarChan = m_mapmt2maroc[j][OD_MaPmtChan-1];
665// OD_MarChan = m_mapmt2maroc[j][OD_LAYNum-1][OD_MaPmtChan-1];
666 //added to solve ATLAS coverity 13339 (only three OD layers are allowed)
667 if ((OD_LAYNum > 0) && ( OD_LAYNum < 4))
668 {
669 m_OD_pmf2layer[j][OD_PMFNum-1] = OD_LAYNum-1;
670 OD_MarChan = m_mapmt2maroc[j][OD_LAYNum-1][OD_MaPmtChan-1];
671 }
672 else
673 {
674 msg(MSG::DEBUG) << "OD_LAYNum out of bounds" << endmsg;
675 }
676
677 m_OD_pmf_maroc2fiber[j][OD_PMFNum-1][OD_MarChan] = OD_FibChan-1;
678 m_OD_pmf_maroc2side[j][OD_PMFNum-1][OD_MarChan] = OD_Side;
679 }
680 }
681 }
682
683 m_inOD.close();
684 }
685 else
686 {
687 msg(MSG::WARNING) << "the file " << m_mapname.c_str() << " was not open" << endmsg;
688 return StatusCode::FAILURE;
689 }
690 }
691
692 return StatusCode::SUCCESS;
693}
std::string PathResolverFindDataFile(const std::string &logical_file_name)
int m_mapmt2maroc[8][20][64]
std::string m_mapname
std::ifstream m_inPMF
std::ifstream m_inChan
std::stringstream m_s
std::ifstream m_inOD
str filePath
Definition hancool.py:27

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::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< Gaudi::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.

◆ recordCollection()

StatusCode ALFA_Raw2Digit::recordCollection ( )
private

Definition at line 438 of file ALFA_Raw2Digit.cxx.

439{
440 msg(MSG::DEBUG) << " ALFA_Digitization::recordCollection " << endmsg;
441
442 m_digitCollection = new ALFA_DigitCollection();
443
445 if (sc.isFailure()) { msg (MSG::FATAL) << " MD - Could not record the empty digit collection in StoreGate " << endmsg; return sc; }
446 else msg (MSG::DEBUG) << " MD - Digit collection is recorded in StoreGate " << endmsg;
447
448 return sc;
449}
std::string m_key_DigitCollection

◆ recordODCollection()

StatusCode ALFA_Raw2Digit::recordODCollection ( )
private

Definition at line 451 of file ALFA_Raw2Digit.cxx.

452{
453 msg(MSG::DEBUG) << " ALFA_Digitization::recordODCollection " << endmsg;
454
455 m_ODdigitCollection = new ALFA_ODDigitCollection();
456
458 if (sc.isFailure()) { msg (MSG::FATAL) << " OD - Could not record the empty digit collection in StoreGate " << endmsg; return sc; }
459 else msg (MSG::DEBUG) << " OD - Digit collection is recorded in StoreGate " << endmsg;
460
461 return sc;
462}
std::string m_key_ODDigitCollection

◆ 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< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

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

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_ALFA_RawDataCollectionKey

Gaudi::Property<std::string> ALFA_Raw2Digit::m_ALFA_RawDataCollectionKey {this, "ALFA_RawDataCollectionKey", "ALFA_RawData"}
private

Definition at line 56 of file ALFA_Raw2Digit.h.

56{this, "ALFA_RawDataCollectionKey", "ALFA_RawData"};

◆ m_CanName

std::string ALFA_Raw2Digit::m_CanName
private

Definition at line 118 of file ALFA_Raw2Digit.h.

◆ m_chan_i

uint32_t ALFA_Raw2Digit::m_chan_i {}
private

Definition at line 121 of file ALFA_Raw2Digit.h.

121{}, m_chan_j{};

◆ m_chan_j

uint32_t ALFA_Raw2Digit::m_chan_j {}
private

Definition at line 121 of file ALFA_Raw2Digit.h.

121{}, m_chan_j{};

◆ m_charge_1

uint16_t ALFA_Raw2Digit::m_charge_1[8] {}
private

Definition at line 91 of file ALFA_Raw2Digit.h.

91{}, m_charge_2[8]{};

◆ m_charge_2

uint16_t ALFA_Raw2Digit::m_charge_2[8] {}
private

Definition at line 91 of file ALFA_Raw2Digit.h.

91{}, m_charge_2[8]{};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_digitCollection

ALFA_DigitCollection* ALFA_Raw2Digit::m_digitCollection {}
private

Definition at line 103 of file ALFA_Raw2Digit.h.

103{};

◆ m_event_no

Int_t ALFA_Raw2Digit::m_event_no {}
private

Definition at line 95 of file ALFA_Raw2Digit.h.

95{};

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_fiber

int ALFA_Raw2Digit::m_fiber {}
private

Definition at line 69 of file ALFA_Raw2Digit.h.

69{};

◆ m_fiber_b

bool ALFA_Raw2Digit::m_fiber_b[8][20][64] {}
private

Definition at line 93 of file ALFA_Raw2Digit.h.

93{}, m_layer_b[8][20]{}, m_fiber_b[8][20][64]{}, m_trigger_pattern_b[8][16]{};

◆ m_fibID

int ALFA_Raw2Digit::m_fibID {}
private

Definition at line 62 of file ALFA_Raw2Digit.h.

62{};

◆ m_h_loc1

std::string ALFA_Raw2Digit::m_h_loc1
private

Definition at line 117 of file ALFA_Raw2Digit.h.

◆ m_h_loc2

std::string ALFA_Raw2Digit::m_h_loc2
private

Definition at line 117 of file ALFA_Raw2Digit.h.

◆ m_h_loc3

std::string ALFA_Raw2Digit::m_h_loc3
private

Definition at line 117 of file ALFA_Raw2Digit.h.

◆ m_h_name1

std::string ALFA_Raw2Digit::m_h_name1
private

Definition at line 116 of file ALFA_Raw2Digit.h.

◆ m_h_name2

std::string ALFA_Raw2Digit::m_h_name2
private

Definition at line 116 of file ALFA_Raw2Digit.h.

◆ m_h_name3

std::string ALFA_Raw2Digit::m_h_name3
private

Definition at line 116 of file ALFA_Raw2Digit.h.

◆ m_hit_counter

Int_t ALFA_Raw2Digit::m_hit_counter[8] {}
private

Definition at line 100 of file ALFA_Raw2Digit.h.

100{};

◆ m_inChan

std::ifstream ALFA_Raw2Digit::m_inChan
private

Definition at line 109 of file ALFA_Raw2Digit.h.

◆ m_inDet

std::ifstream ALFA_Raw2Digit::m_inDet
private

Definition at line 112 of file ALFA_Raw2Digit.h.

◆ m_inOD

std::ifstream ALFA_Raw2Digit::m_inOD
private

Definition at line 111 of file ALFA_Raw2Digit.h.

◆ m_inPMF

std::ifstream ALFA_Raw2Digit::m_inPMF
private

Definition at line 110 of file ALFA_Raw2Digit.h.

◆ m_key_DigitCollection

std::string ALFA_Raw2Digit::m_key_DigitCollection {"ALFA_DigitCollection"}
private

Definition at line 106 of file ALFA_Raw2Digit.h.

106{"ALFA_DigitCollection"};

◆ m_key_ODDigitCollection

std::string ALFA_Raw2Digit::m_key_ODDigitCollection {"ALFA_ODDigitCollection"}
private

Definition at line 107 of file ALFA_Raw2Digit.h.

107{"ALFA_ODDigitCollection"};

◆ m_layer_b

bool ALFA_Raw2Digit::m_layer_b[8][20] {}
private

Definition at line 93 of file ALFA_Raw2Digit.h.

93{}, m_layer_b[8][20]{}, m_fiber_b[8][20][64]{}, m_trigger_pattern_b[8][16]{};

◆ m_lumi_block

uint32_t ALFA_Raw2Digit::m_lumi_block {}
private

Definition at line 90 of file ALFA_Raw2Digit.h.

90{};

◆ m_MapChan

int ALFA_Raw2Digit::m_MapChan {}
private

Definition at line 65 of file ALFA_Raw2Digit.h.

65{};

◆ m_mapmt2maroc

int ALFA_Raw2Digit::m_mapmt2maroc[8][20][64] {}
private

Definition at line 79 of file ALFA_Raw2Digit.h.

79{};

◆ m_MAPMTChan

int ALFA_Raw2Digit::m_MAPMTChan {}
private

Definition at line 64 of file ALFA_Raw2Digit.h.

64{};

◆ m_mapname

std::string ALFA_Raw2Digit::m_mapname
private

Definition at line 114 of file ALFA_Raw2Digit.h.

◆ m_maroc2fiber

int ALFA_Raw2Digit::m_maroc2fiber[8][20][64] {}
private

Definition at line 77 of file ALFA_Raw2Digit.h.

77{};

◆ m_maroc2mapmt

int ALFA_Raw2Digit::m_maroc2mapmt[8][20][64] {}
private

Definition at line 78 of file ALFA_Raw2Digit.h.

78{};

◆ m_mb2det

int ALFA_Raw2Digit::m_mb2det[8] {}
private

Definition at line 87 of file ALFA_Raw2Digit.h.

87{};

◆ m_mbID

int ALFA_Raw2Digit::m_mbID {}
private

Definition at line 60 of file ALFA_Raw2Digit.h.

60{};

◆ m_n_hits_lay

Int_t ALFA_Raw2Digit::m_n_hits_lay[8][20] {}
private

Definition at line 94 of file ALFA_Raw2Digit.h.

94{};

◆ m_nEvents

int ALFA_Raw2Digit::m_nEvents {}
private

Definition at line 58 of file ALFA_Raw2Digit.h.

58{};

◆ m_OD_pmf2layer

int ALFA_Raw2Digit::m_OD_pmf2layer[8][4] {}
private

Definition at line 83 of file ALFA_Raw2Digit.h.

83{};

◆ m_OD_pmf_maroc2fiber

int ALFA_Raw2Digit::m_OD_pmf_maroc2fiber[8][4][64] {}
private

Definition at line 84 of file ALFA_Raw2Digit.h.

84{};

◆ m_OD_pmf_maroc2side

int ALFA_Raw2Digit::m_OD_pmf_maroc2side[8][4][64] {}
private

Definition at line 85 of file ALFA_Raw2Digit.h.

85{};

◆ m_ODdigitCollection

ALFA_ODDigitCollection* ALFA_Raw2Digit::m_ODdigitCollection {}
private

Definition at line 104 of file ALFA_Raw2Digit.h.

104{};

◆ m_ODfiber

int ALFA_Raw2Digit::m_ODfiber {}
private

Definition at line 74 of file ALFA_Raw2Digit.h.

74{};

◆ m_ODplate

int ALFA_Raw2Digit::m_ODplate {}
private

Definition at line 73 of file ALFA_Raw2Digit.h.

73{};

◆ m_ODpot

int ALFA_Raw2Digit::m_ODpot {}
private

Definition at line 71 of file ALFA_Raw2Digit.h.

71{};

◆ m_ODside

int ALFA_Raw2Digit::m_ODside {}
private

Definition at line 72 of file ALFA_Raw2Digit.h.

72{};

◆ m_plate

int ALFA_Raw2Digit::m_plate {}
private

Definition at line 68 of file ALFA_Raw2Digit.h.

68{};

◆ m_pmf2layer

int ALFA_Raw2Digit::m_pmf2layer[8][23] {}
private

Definition at line 81 of file ALFA_Raw2Digit.h.

81{};

◆ m_pmf_chan_hit_counter

Int_t ALFA_Raw2Digit::m_pmf_chan_hit_counter[8][23][64] {}
private

Definition at line 99 of file ALFA_Raw2Digit.h.

99{};

◆ m_pmfID

int ALFA_Raw2Digit::m_pmfID {}
private

Definition at line 61 of file ALFA_Raw2Digit.h.

61{};

◆ m_pot

int ALFA_Raw2Digit::m_pot {}
private

Definition at line 67 of file ALFA_Raw2Digit.h.

67{};

◆ m_pot_b

bool ALFA_Raw2Digit::m_pot_b[8] {}
private

Definition at line 93 of file ALFA_Raw2Digit.h.

93{}, m_layer_b[8][20]{}, m_fiber_b[8][20][64]{}, m_trigger_pattern_b[8][16]{};

◆ m_rootOutputFileName

TString ALFA_Raw2Digit::m_rootOutputFileName {}
private

Definition at line 96 of file ALFA_Raw2Digit.h.

96{};

◆ m_s

std::stringstream ALFA_Raw2Digit::m_s
private

Definition at line 115 of file ALFA_Raw2Digit.h.

◆ m_strMeasuredDataType

Gaudi::Property<std::string> ALFA_Raw2Digit::m_strMeasuredDataType {this, "MeasuredDataType", "tunnel"}
private

Definition at line 126 of file ALFA_Raw2Digit.h.

126{this, "MeasuredDataType", "tunnel"};

◆ m_toFile

std::ofstream ALFA_Raw2Digit::m_toFile
private

Definition at line 129 of file ALFA_Raw2Digit.h.

◆ m_trigger_pattern

std::vector<bool> ALFA_Raw2Digit::m_trigger_pattern
private

Definition at line 92 of file ALFA_Raw2Digit.h.

◆ m_trigger_pattern_b

bool ALFA_Raw2Digit::m_trigger_pattern_b[8][16] {}
private

Definition at line 93 of file ALFA_Raw2Digit.h.

93{}, m_layer_b[8][20]{}, m_fiber_b[8][20][64]{}, m_trigger_pattern_b[8][16]{};

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.

◆ m_WordId_count

int ALFA_Raw2Digit::m_WordId_count {}
private

Definition at line 120 of file ALFA_Raw2Digit.h.

120{};

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