ATLAS Offline Software
ReadTBLArDigits.h
Go to the documentation of this file.
1 //Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 
8 #ifndef READLARDIGITS_H
9 #define READLARDIGITS_H
11 #include "GaudiKernel/MsgStream.h"
17 #include "GaudiKernel/INTupleSvc.h"
18 #include "GaudiKernel/NTuple.h"
19 #include "GaudiKernel/SmartDataPtr.h"
20 //#include "LArDetDescr/LArDetDescrManager.h"
21 #include <fstream>
24 
26 {
27  public:
28  ReadTBLArDigits(const std::string & name, ISvcLocator * pSvcLocator);
29 
31 
32  //standart algorithm methods
33  virtual StatusCode initialize() override;
34  virtual StatusCode execute() override;
35  virtual StatusCode finalize() override;
36 
37  private:
38  int m_count;
40  {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
41  const LArEM_ID* m_emId;
45  std::ofstream m_outfile;
46  std::string m_containerKey;
47  std::string m_dumpFile;
50  //std::string m_NTupleLoc;
51 
52  NTuple::Tuple* m_ntuplePtr;
53  //NTuple::Item<long> m_cellIndex;
54  NTuple::Item<long> m_cellIndex;
55  NTuple::Array<long> m_layer, m_eta, m_phi, m_gain;
56  NTuple::Array<long> m_barrel_ec, m_pos_neg, m_FT, m_slot, m_channel;
57  NTuple::Matrix<long> m_samples;
58  NTuple::Item<long> m_Nsamples;
59  //NTuple::Array<long>* m_samples;
60  //int m_NSamples;
61 
62  class SortDigits
63  {
64  public:
65  SortDigits(const LArOnlineID* onlineHelper);
66  inline bool operator()(LArDigit* a, LArDigit* b);
67  private:
69  };
70 };
71 
72 
74 {const HWIdentifier chid_a=a->channelID();
75  const HWIdentifier chid_b=b->channelID();
77  return (m_onlineHelper->channel(chid_a) < m_onlineHelper->channel(chid_b));
78  else
79  return (m_onlineHelper->feb_Id(chid_a).get_compact() < m_onlineHelper->feb_Id(chid_b).get_compact());
80 }
81 
82 
83 #endif
ReadTBLArDigits::m_layer
NTuple::Array< long > m_layer
Definition: ReadTBLArDigits.h:55
ReadTBLArDigits::m_gain
NTuple::Array< long > m_gain
Definition: ReadTBLArDigits.h:55
LArEM_ID.h
ReadTBLArDigits::ReadTBLArDigits
ReadTBLArDigits(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ReadTBLArDigits.cxx:18
ReadTBLArDigits::finalize
virtual StatusCode finalize() override
Definition: ReadTBLArDigits.cxx:189
ReadTBLArDigits::m_dumpFile
std::string m_dumpFile
Definition: ReadTBLArDigits.h:47
ReadTBLArDigits::m_hecId
const LArHEC_ID * m_hecId
Definition: ReadTBLArDigits.h:43
ReadTBLArDigits::m_phi
NTuple::Array< long > m_phi
Definition: ReadTBLArDigits.h:55
ReadTBLArDigits::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: ReadTBLArDigits.h:40
ReadTBLArDigits::m_outfile
std::ofstream m_outfile
Definition: ReadTBLArDigits.h:45
ReadTBLArDigits::SortDigits::operator()
bool operator()(LArDigit *a, LArDigit *b)
Definition: ReadTBLArDigits.h:73
Identifier::get_compact
value_type get_compact() const
Get the compact id.
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition: LArHEC_ID.h:85
ReadTBLArDigits::SortDigits::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: ReadTBLArDigits.h:68
ReadTBLArDigits::m_Nsamples
NTuple::Item< long > m_Nsamples
Definition: ReadTBLArDigits.h:58
ReadTBLArDigits::m_cellIndex
NTuple::Item< long > m_cellIndex
Definition: ReadTBLArDigits.h:54
LArHEC_ID.h
HWIdentifier
Definition: HWIdentifier.h:13
ReadTBLArDigits::m_emId
const LArEM_ID * m_emId
Definition: ReadTBLArDigits.h:41
TBLArDigitContainer.h
ReadTBLArDigits::m_count
int m_count
Definition: ReadTBLArDigits.h:38
AthAlgorithm.h
ReadTBLArDigits::m_samples
NTuple::Matrix< long > m_samples
Definition: ReadTBLArDigits.h:57
ReadTBLArDigits::m_containerKey
std::string m_containerKey
Definition: ReadTBLArDigits.h:46
ReadTBLArDigits::m_slot
NTuple::Array< long > m_slot
Definition: ReadTBLArDigits.h:56
LArOnlineID_Base::channel
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
Definition: LArOnlineID_Base.cxx:1963
LArOnOffIdMapping.h
ReadTBLArDigits
Definition: ReadTBLArDigits.h:26
LArDigit
Liquid Argon digit base class.
Definition: LArDigit.h:25
ReadTBLArDigits::m_FT
NTuple::Array< long > m_FT
Definition: ReadTBLArDigits.h:56
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadTBLArDigits::~ReadTBLArDigits
~ReadTBLArDigits()
Definition: ReadTBLArDigits.cxx:34
ReadTBLArDigits::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: ReadTBLArDigits.h:44
ReadTBLArDigits::SortDigits
Definition: ReadTBLArDigits.h:63
ReadTBLArDigits::SortDigits::SortDigits
SortDigits(const LArOnlineID *onlineHelper)
Definition: ReadTBLArDigits.cxx:13
ReadTBLArDigits::m_eta
NTuple::Array< long > m_eta
Definition: ReadTBLArDigits.h:55
AthAlgorithm
Definition: AthAlgorithm.h:47
LArOnlineID_Base::feb_Id
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
Definition: LArOnlineID_Base.cxx:1479
ReadCondHandleKey.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
ReadTBLArDigits::m_fcalId
const LArFCAL_ID * m_fcalId
Definition: ReadTBLArDigits.h:42
LArOnlineID
Definition: LArOnlineID.h:20
ReadTBLArDigits::m_pos_neg
NTuple::Array< long > m_pos_neg
Definition: ReadTBLArDigits.h:56
ReadTBLArDigits::m_printFebChan
bool m_printFebChan
Definition: ReadTBLArDigits.h:49
SG::ReadCondHandleKey< LArOnOffIdMapping >
LArFCAL_ID.h
a
TList * a
Definition: liststreamerinfos.cxx:10
ReadTBLArDigits::initialize
virtual StatusCode initialize() override
Definition: ReadTBLArDigits.cxx:38
ReadTBLArDigits::m_ntuplePtr
NTuple::Tuple * m_ntuplePtr
Definition: ReadTBLArDigits.h:52
ReadTBLArDigits::m_printCellLoc
bool m_printCellLoc
Definition: ReadTBLArDigits.h:48
ReadTBLArDigits::m_barrel_ec
NTuple::Array< long > m_barrel_ec
Definition: ReadTBLArDigits.h:56
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition: LArFCAL_ID.h:60
ReadTBLArDigits::execute
virtual StatusCode execute() override
Definition: ReadTBLArDigits.cxx:91
ReadTBLArDigits::m_channel
NTuple::Array< long > m_channel
Definition: ReadTBLArDigits.h:56
LArOnlineID.h