ATLAS Offline Software
Loading...
Searching...
No Matches
ReadTBLArDigits.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2026 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(const EventContext& ctx) override;
35 virtual StatusCode finalize() override;
36
37 private:
38 int m_count{0};
40 {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
41 const LArEM_ID* m_emId{nullptr};
42 const LArFCAL_ID* m_fcalId{nullptr};
43 const LArHEC_ID* m_hecId{nullptr};
44 const LArOnlineID* m_onlineHelper{nullptr};
45 std::ofstream m_outfile;
46 Gaudi::Property<std::string> m_containerKey{this, "ContainerKey", "", "SG key of the TBLArDigitContainer (empty: retrieve default)"};
47 Gaudi::Property<std::string> m_dumpFile{this, "DumpFile", "", "Name of the text dump file (empty: no dump)"};
48 Gaudi::Property<bool> m_printCellLoc{this, "PrintCellLocation", false, "Print cell layer/eta/phi in the dump file"};
49 Gaudi::Property<bool> m_printFebChan{this, "PrintFebChan", true, "Print FEB ID and channel in the dump file"};
50 //std::string m_NTupleLoc;
51
52 NTuple::Tuple* m_ntuplePtr{nullptr};
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
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();
76 if (m_onlineHelper->feb_Id(chid_a).get_compact() == m_onlineHelper->feb_Id(chid_b).get_compact())
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
static Double_t a
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Liquid Argon digit base class.
Definition LArDigit.h:25
Helper class for LArEM offline identifiers.
Definition LArEM_ID.h:111
Helper class for LArFCAL offline identifiers.
Definition LArFCAL_ID.h:49
Helper class for LArHEC offline identifiers.
Definition LArHEC_ID.h:76
const LArOnlineID * m_onlineHelper
SortDigits(const LArOnlineID *onlineHelper)
bool operator()(LArDigit *a, LArDigit *b)
NTuple::Array< long > m_phi
Gaudi::Property< std::string > m_dumpFile
std::ofstream m_outfile
const LArFCAL_ID * m_fcalId
const LArEM_ID * m_emId
virtual StatusCode initialize() override
virtual StatusCode finalize() override
NTuple::Array< long > m_slot
NTuple::Array< long > m_pos_neg
const LArHEC_ID * m_hecId
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
NTuple::Array< long > m_eta
Gaudi::Property< bool > m_printFebChan
NTuple::Item< long > m_cellIndex
NTuple::Item< long > m_Nsamples
Gaudi::Property< bool > m_printCellLoc
NTuple::Array< long > m_barrel_ec
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
NTuple::Array< long > m_layer
NTuple::Array< long > m_gain
const LArOnlineID * m_onlineHelper
ReadTBLArDigits(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_containerKey
NTuple::Tuple * m_ntuplePtr
NTuple::Matrix< long > m_samples
NTuple::Array< long > m_FT
NTuple::Array< long > m_channel