|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/IToolSvc.h"
11 #include "GaudiKernel/ThreadLocalContext.h"
40 log << MSG::INFO <<
"Initialize" <<
endmsg;
55 NTupleFilePtr file1(
ntupleSvc(),
"/NTUPLES/FILE1");
57 {
log << MSG::ERROR <<
"Booking of NTuple failed" <<
endmsg;
58 return StatusCode::FAILURE;
60 NTuplePtr
nt(
ntupleSvc(),
"/NTUPLES/FILE1/LARDIGITS");
62 nt=
ntupleSvc()->book(
"/NTUPLES/FILE1/LARDIGITS",CLID_ColumnWiseTuple,
"LArDigits");
65 {
log << MSG::ERROR <<
"Booking of NTuple failed" <<
endmsg;
66 return StatusCode::FAILURE;
86 log << MSG::INFO <<
"======== ReadTBLArDigits initialize successfully ========" <<
endmsg;
87 return StatusCode::SUCCESS;
93 const EventContext& ctx = Gaudi::Hive::currentContext();
107 return StatusCode::FAILURE;
114 std::sort(larDigitCont->
begin(),larDigitCont->
end(),sortDigits);
120 unsigned cellCounter=0;
121 if (larDigitCont->
size()>0)
130 const std::vector<short>& vSamples=
digit->samples();
179 if (
sc!=StatusCode::SUCCESS) {
180 log << MSG::ERROR <<
"writeRecord failed" <<
endmsg;
181 return StatusCode::FAILURE;
185 log << MSG::INFO <<
"Event " <<
m_count <<
" contains " << cellCounter <<
" channels\n";
186 return StatusCode::SUCCESS;
193 log << MSG::INFO <<
"finalize ReadTBLArDigits" <<
endmsg;
194 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
NTuple::Array< long > m_layer
NTuple::Array< long > m_gain
int phi(const Identifier id) const
return phi according to :
int eta(const Identifier id) const
return eta [0,9] outer part [0,3] inner part
ReadTBLArDigits(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode finalize() override
const LArEM_ID * em_idHelper() const
access to EM idHelper
bool is_lar_fcal(Identifier id) const
const LArHEC_ID * m_hecId
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
NTuple::Array< long > m_phi
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
const std::vector< short > & samples() const
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
int module(const Identifier id) const
module [1,3]
value_type get_compact() const
Get the compact id.
const LArOnlineID * m_onlineHelper
int sampling(const Identifier id) const
return sampling according to :
NTuple::Item< long > m_Nsamples
NTuple::Item< long > m_cellIndex
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
int eta(const Identifier id) const
return eta according to :
int eta(const Identifier id) const
eta [0,63] module 1 ; [0,31] module 2 ; [0,15] module 3
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
NTuple::Matrix< long > m_samples
std::string m_containerKey
int phi(const Identifier id) const
phi [0,15]
NTuple::Array< long > m_slot
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
msgSvc
Provide convenience handles for various services.
Liquid Argon digit base class.
NTuple::Array< long > m_FT
::StatusCode StatusCode
StatusCode definition for legacy code.
const T * front() const
Access the first element in the collection as an rvalue.
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
const LArOnlineID * m_onlineHelper
bool is_lar_hec(Identifier id) const
Helper class for offline cell identifiers.
SortDigits(const LArOnlineID *onlineHelper)
NTuple::Array< long > m_eta
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
const LArFCAL_ID * m_fcalId
StatusCode initialize(bool used=true)
NTuple::Array< long > m_pos_neg
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
virtual StatusCode initialize() override
NTuple::Tuple * m_ntuplePtr
int sampling(const Identifier id) const
return sampling [0,3] (only 0 for supercells)
NTuple::Array< long > m_barrel_ec
virtual StatusCode execute() override
bool is_lar_em(Identifier id) const
size_type size() const noexcept
Returns the number of elements in the collection.
NTuple::Array< long > m_channel
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
int phi(const Identifier id) const
return phi[0,63] outer part [0,31] inner part