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

Algorithm to dump out calibration constants from the TileInfoSvc. More...

#include <TileInfoDump.h>

Inheritance diagram for TileInfoDump:
Collaboration diagram for TileInfoDump:

Public Member Functions

 TileInfoDump (const std::string &name, ISvcLocator *pSvcLocator)
 ~TileInfoDump ()
StatusCode initialize ()
StatusCode execute ()
StatusCode finalize ()
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

void printEmscale ()
void printEmscaleOnl ()
void printLaser ()
void printIntegrator ()
void printPedestals ()
void printTimingCorrections ()
void printPulseShapes ()
void printBadChannels ()
void printBadCells ()
void printOfcs ()
void printMuID ()
void print1gNoise ()
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

bool m_isOnline
bool m_printEmscale
bool m_printEmscaleOnl
bool m_printLaser
bool m_printIntegrator
bool m_printPedestals
bool m_printTimingCorrections
bool m_printPulseShapes
float m_printPulseShapesStep
bool m_printBadChannels
bool m_printBadCells
bool m_printOfcsCool
bool m_printMuID
bool m_print1gNoise
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey
ToolHandle< ITileBadChanToolm_tileBadChanTool
ToolHandle< TileCondToolEmscalem_tileToolEmscale
ToolHandle< TileCondToolIntegratorm_tileToolIntegrator
ToolHandle< TileCondToolTimingm_tileToolTiming
ToolHandle< TileCondToolPulseShapem_tileToolPulseShape
ToolHandle< TileCondToolNoiseSamplem_tileToolNoiseSample
ToolHandle< TileCondToolAutoCrm_tileToolAutoCr
ToolHandle< TileCondToolNoiseRawChnm_tileToolNoiseRawChn
ToolHandle< TileCondToolOfcCoolm_tileToolOfcCool
ToolHandle< TileCondToolMuIDm_tileToolMuID
ServiceHandle< ITHistSvc > m_thistSvc
const TileHWIDm_tileHWID
const TileIDm_tileID
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey
TH2F * m_h_badCellA
TH2F * m_h_badCellBC
TH2F * m_h_badCellD
TH2F * m_h_badCellGap
TH2F * m_h_badCell
unsigned int m_printOfcRos
unsigned int m_printOfcDrawer
unsigned int m_printOfcChannel
std::string m_infoName
const TileInfom_tileInfo
int m_i_ADCmax = 0
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

Detailed Description

Algorithm to dump out calibration constants from the TileInfoSvc.

Definition at line 48 of file TileInfoDump.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

◆ TileInfoDump()

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

Definition at line 32 of file TileInfoDump.cxx.

33 : AthAlgorithm(name, pSvcLocator)
34 , m_thistSvc("THistSvc", name)
35 , m_tileHWID(nullptr)
36 , m_tileID(nullptr)
37 , m_h_badCellA(nullptr)
38 , m_h_badCellBC(nullptr)
39 , m_h_badCellD(nullptr)
40 , m_h_badCellGap(nullptr)
41 , m_h_badCell(nullptr)
42 , m_tileInfo(nullptr)
43
44{
45 declareProperty("AthenaIsOnline", m_isOnline = false, "Availability of COOL folders depends on Athena mode");
46 declareProperty("PrintEmscale", m_printEmscale = false, "Switch on calibration chain printout");
47 declareProperty("PrintEmscaleOnl", m_printEmscaleOnl = false, "Switch on online calibration chain printout");
48 declareProperty("PrintLaser", m_printLaser = false, "Switch on all laser constants printout");
49 declareProperty("PrintIntegrator", m_printIntegrator = false, "Switch on integrator printout");
50 declareProperty("PrintPedestals", m_printPedestals = false, "Switch on Pedstals print out");
51 declareProperty("PrintTimingCorrections", m_printTimingCorrections = false, "Switch on Timing Corrections print out");
52 declareProperty("PrintPulseShapes", m_printPulseShapes = false, "Switch on Pulse Shape print out");
53 declareProperty("PrintOfcsCool", m_printOfcsCool = false, "Switch on OFC print out");
54 declareProperty("PrintPulseShapesStep", m_printPulseShapesStep = 0.5, "Time step (ns) of PulseShapes print out");
55 declareProperty("PrintBadChannels", m_printBadChannels = false, "Switch on Bad Channels print out");
56 declareProperty("PrintBadCells", m_printBadCells = false, "Switch on Bad Cells print out");
57 declareProperty("PrintMuID", m_printMuID = false, "Switch on MuID threshold print out");
58 declareProperty("Print1gNoise", m_print1gNoise = false, "Switch on 1g noise print out");
59 declareProperty("PrintOfcRos", m_printOfcRos = 0, "Print OFC for this ros (0 by default)");
60 declareProperty("PrintOfcDrawer", m_printOfcDrawer = 0, "Print OFC for this drawer (0 by default)");
61 declareProperty("PrintOfcChannel", m_printOfcChannel = 0, "Print OFC for this channel (0 by default)");
62 declareProperty("TileInfoName", m_infoName = "TileInfo");
63}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::string m_infoName
bool m_printTimingCorrections
bool m_printIntegrator
bool m_printEmscaleOnl
float m_printPulseShapesStep
bool m_printEmscale
ServiceHandle< ITHistSvc > m_thistSvc
const TileHWID * m_tileHWID
unsigned int m_printOfcRos
TH2F * m_h_badCellD
bool m_printPulseShapes
unsigned int m_printOfcChannel
TH2F * m_h_badCellGap
unsigned int m_printOfcDrawer
TH2F * m_h_badCellA
bool m_printPedestals
TH2F * m_h_badCellBC
const TileID * m_tileID
const TileInfo * m_tileInfo
bool m_printBadCells
bool m_printBadChannels
bool m_printOfcsCool
bool m_print1gNoise
TH2F * m_h_badCell

◆ ~TileInfoDump()

TileInfoDump::~TileInfoDump ( )

Definition at line 67 of file TileInfoDump.cxx.

67 {
68}

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 }

◆ 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 TileInfoDump::execute ( )

Definition at line 144 of file TileInfoDump.cxx.

144 {
145
146 ATH_MSG_DEBUG( " in execute()" );
147
148 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey);
149 ATH_CHECK( eventInfo.isValid() );
150
151 ATH_MSG_DEBUG( "Event: ["
152 << eventInfo->runNumber() << ", "
153 << eventInfo->eventNumber() << ", "
154 << eventInfo->lumiBlock() << ": "
155 << eventInfo->timeStamp() << "]" );
156
157
158
159
160 m_h_badCell->Fill(1., 1.5, 1.);
161
162 //=== Print out stuff
171 if (m_printMuID) printMuID();
173
174 //=== Print Bad Channels
177
178 return StatusCode::SUCCESS;
179}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
void printTimingCorrections()
void printPedestals()
void printIntegrator()
void printPulseShapes()
void printEmscaleOnl()
void printBadChannels()

◆ 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 TileInfoDump::finalize ( )

Definition at line 929 of file TileInfoDump.cxx.

929 {
930
931 ATH_MSG_DEBUG( "in finalize()" );
932
933 return StatusCode::SUCCESS;
934}

◆ initialize()

StatusCode TileInfoDump::initialize ( )

Definition at line 71 of file TileInfoDump.cxx.

71 {
72
73 ATH_MSG_DEBUG( "in initialize()" );
74
75 //=== EventInfo key
76 ATH_CHECK( m_eventInfoKey.initialize() );
77
78 //=== Get TileHWID
79 CHECK( detStore()->retrieve(m_tileHWID, "TileHWID") );
80
81 //=== CaloDetDescrManager
82 ATH_CHECK(m_caloMgrKey.initialize());
83
84 //=== Get TileBadChanTool
85 CHECK( m_tileBadChanTool.retrieve() );
86
87 //=== Get TileCondToolEmscale
88 CHECK( m_tileToolEmscale.retrieve() );
89
90 //=== Get TileCondToolIntegrator
91 CHECK( m_tileToolIntegrator.retrieve() );
92
93 //=== Get TileCondToolTiming
94 CHECK( m_tileToolTiming.retrieve() );
95
96 //=== Get TileCondToolPulseShape
97 CHECK( m_tileToolPulseShape.retrieve() );
98
99 //=== Get TileCondToolOfcCool
100 CHECK( m_tileToolOfcCool.retrieve() );
101
102 //=== Get TileCondToolNoiseSample
103 CHECK( m_tileToolNoiseSample.retrieve() );
104
105 //=== Get TileCondToolAutoCr
106 CHECK( m_tileToolAutoCr.retrieve() );
107
108 //=== Get TileCondToolMuID
109 CHECK( m_tileToolMuID.retrieve() );
110
111 //=== Get TileCondToolNoiseRawChn
113 CHECK( m_tileToolNoiseRawChn.retrieve() );
114 }
115
116 //=== Retrieve TileID helpers from det store
117 CHECK( detStore()->retrieve(m_tileID, "TileID") );
118
119 //--- Get a handle on the NTuple and histogramming service
120 CHECK( m_thistSvc.retrieve() );
121
122 //=== Get TileInfo and set max ADC counts
124 m_i_ADCmax = m_tileInfo->ADCmax();
125
126 //--- Histogram initialization
127 m_h_badCellA = new TH2F("m_h_badCellA", "Etaphi_maskedCell A", 34, -1.7, 1.7, 64, -3.2, 3.2);
128 m_h_badCellBC = new TH2F("m_h_badCellBC", "Etaphi_maskedCell BC", 34, -1.7, 1.7, 64, -3.2, 3.2);
129 m_h_badCellD = new TH2F("m_h_badCellD", "Etaphi_maskedCell D", 34, -1.7, 1.7, 64, -3.2, 3.2);
130 m_h_badCellGap = new TH2F("m_h_badCellGap", "Etaphi_maskedCell Gap", 34, -1.7, 1.7, 64, -3.2, 3.2);
131 m_h_badCell = new TH2F("m_h_badCell", "Etaphi_maskedCell All", 34, -1.7, 1.7, 64, -3.2, 3.2);
132
133 CHECK( m_thistSvc->regHist("/AANT/m_h_badCellA", m_h_badCellA) );
134 CHECK( m_thistSvc->regHist("/AANT/m_h_badCellBC", m_h_badCellBC) );
135 CHECK( m_thistSvc->regHist("/AANT/m_h_badCellD", m_h_badCellD) );
136 CHECK( m_thistSvc->regHist("/AANT/m_h_badCellGap", m_h_badCellGap) );
137 CHECK( m_thistSvc->regHist("/AANT/m_h_badCell", m_h_badCell) );
138
139 return StatusCode::SUCCESS;
140
141}
#define CHECK(...)
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
ToolHandle< TileCondToolPulseShape > m_tileToolPulseShape
ToolHandle< TileCondToolAutoCr > m_tileToolAutoCr
ToolHandle< TileCondToolMuID > m_tileToolMuID
ToolHandle< TileCondToolOfcCool > m_tileToolOfcCool
ToolHandle< ITileBadChanTool > m_tileBadChanTool
ToolHandle< TileCondToolNoiseRawChn > m_tileToolNoiseRawChn
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
ToolHandle< TileCondToolTiming > m_tileToolTiming
ToolHandle< TileCondToolNoiseSample > m_tileToolNoiseSample
ToolHandle< TileCondToolIntegrator > m_tileToolIntegrator
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)

◆ 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.

◆ print1gNoise()

void TileInfoDump::print1gNoise ( )
private

Definition at line 392 of file TileInfoDump.cxx.

392 {
393
394 const EventContext &ctx = Gaudi::Hive::currentContext();
395
396 std::vector<float> vecAutoCr;
397
398 for (unsigned int ros = 0; ros < TileCalibUtils::MAX_ROS; ++ros) {
399 unsigned int drawerMax = TileCalibUtils::getMaxDrawer(ros);
400 for (unsigned int drawer = 0; drawer < drawerMax; ++drawer) {
401 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
402 for (unsigned int channel = 0; channel < TileCalibUtils::MAX_CHAN; ++channel) {
403 for (unsigned int adc = 0; adc < TileCalibUtils::MAX_GAIN; ++adc) {
404
405 //=== Output from the tool
406 ATH_MSG_INFO( "1g Noise (ros/dr/ch/gain) "
407 << ros << "/"
408 << drawer << "/"
409 << channel << "/"
410 << adc << " : "
411 << "Electronic (ADC counts) " << m_tileToolNoiseRawChn->getElectronicNoise(drawerIdx, channel, adc, TileRawChannelUnit::ADCcounts, ctx) << "\t"
412 << "PileUp (MeV) " << m_tileToolNoiseRawChn->getPileUpNoise(drawerIdx, channel, adc, ctx) );
413
414 } //end adc
415 } //end channel
416 } //end drawer
417 } //end ros
418
419}
#define ATH_MSG_INFO(x)
static const unsigned int MAX_ROS
Number of ROSs.
static const unsigned int MAX_GAIN
Number of gains per channel.
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
static unsigned int getMaxDrawer(unsigned int ros)
Returns the maximal channel number for a given drawer.
static const unsigned int MAX_CHAN
Number of channels in drawer.

◆ printBadCells()

void TileInfoDump::printBadCells ( )
private

Definition at line 640 of file TileInfoDump.cxx.

640 {
641
642 ATH_MSG_DEBUG( "in printBadCells()" );
643
644 Identifier cell_id;
645 IdContext cell_context = m_tileID->cell_context();
646 int ncells = m_tileID->cell_hash_max();
647
648 const TileCablingService* cabling = TileCablingService::getInstance();
649 bool run2 = cabling->isRun2PlusCabling();
650
651 std::ostringstream sSum;
652 std::ostringstream sDet;
653
654 sDet << std::endl;
655 sDet << ">>>>>>>>>>>>>>> Detailed list of BAD Cells <<<<<<<<<<<<<<<<" << std::endl;
656 sDet << "tower 0-15: numbered by pseudorapidity from 0 with 0.1 increment in eta" << std::endl;
657
658 int badcell_N = (run2) ? 0 : 4;
659 int badcell_EBA = 0;
660 int badcell_EBC = 0;
661 int badcell_LBA = 0;
662 int badcell_LBC = 0;
663 int badcell_GapA = 0;
664 int badcell_GapC = (run2) ? 0 : 4;
665
666 HWIdentifier ch1_id, ch2_id;
667 TileBchStatus ch1_status, ch2_status;
668
669 const EventContext &ctx = Gaudi::Hive::currentContext();
670 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey,ctx};
671 const CaloDetDescrManager* caloMgr = *caloMgrHandle;
672
673 for (int i = 0; i < ncells; ++i) {
674 m_tileID->get_id((IdentifierHash) i, cell_id, &cell_context);
675
676 //=== get calo detector description to obtain cell coordinates
677 const CaloDetDescrElement* elem = caloMgr->get_element(cell_id);
678 if (!elem) {
679 //=== this should never happen
680 ATH_MSG_ERROR( "CaloMgr returns NULL CaloDetDescrElement" );
681 std::abort();
682 }
683
684 ch1_id = cabling->s2h_channel_id(m_tileID->pmt_id(cell_id, 0));
685 ch1_status = m_tileBadChanTool->getChannelStatus(ch1_id);
686
687 if (m_tileID->is_tile_gapscin(cell_id)) ch2_id = ch1_id;
688 else ch2_id = cabling->s2h_channel_id(m_tileID->pmt_id(cell_id, 1));
689
690 ch2_status = m_tileBadChanTool->getChannelStatus(ch2_id);
691
692 //--- get channel
693 int ich1 = m_tileHWID->channel(ch1_id);
694 int ich2 = m_tileHWID->channel(ch2_id);
695
696 if (ch1_status.isBad() && ch2_status.isBad()) {
697 badcell_N++;
698 if (m_tileID->section(cell_id) == 1) {
699 if (m_tileID->is_positive(cell_id) || m_tileID->is_twosides(cell_id)) {
700 badcell_LBA++;
701 sDet << "LBA";
702 }
703
704 if (m_tileID->is_negative(cell_id)) {
705 badcell_LBC++;
706 sDet << "LBC";
707 }
708 }
709 if (m_tileID->section(cell_id) == 2) {
710 if (m_tileID->is_positive(cell_id)) {
711 badcell_EBA++;
712 sDet << "EBA";
713 }
714
715 if (m_tileID->is_negative(cell_id)) {
716 badcell_EBC++;
717 sDet << "EBC";
718 }
719 }
720 if (m_tileID->section(cell_id) == 3) {
721 if (m_tileID->is_positive(cell_id)) {
722 badcell_GapA++;
723 sDet << "GapA";
724 }
725
726 if (m_tileID->is_negative(cell_id)) {
727 badcell_GapC++;
728 sDet << "GapC";
729 }
730 }
731
732 if (m_tileID->module(cell_id) < 9)
733 sDet << "0" << m_tileID->module(cell_id) + 1;
734 else
735 sDet << m_tileID->module(cell_id) + 1;
736
737 sDet << ", tower " << m_tileID->tower(cell_id) << ", ";
738
739 switch (m_tileID->sample(cell_id)) {
740 case 0: {
741 sDet << "sampling A";
742 FillCell(m_h_badCellA, elem);
743 };
744 break;
745 case 1: {
746 if (m_tileID->section(cell_id) == 1)
747 sDet << "sampling BC";
748 else
749 sDet << "sampling B";
750 FillCell(m_h_badCellBC, elem);
751 };
752 break;
753 case 2: {
754 sDet << "sampling D";
755 FillCell(m_h_badCellD, elem);
756 };
757 break;
758 case 3: {
759 sDet << "gap and crack scintillators";
761 };
762 break;
763 default:
764 sDet << "individual tiles, used for Cesium calibration";
765 break;
766 }
767
768 FillCell(m_h_badCell, elem);
769
770 sDet << ", eta x phi = " << elem->eta()
771 << " x " << elem->phi()
772 << ", channels: " << ich1 << ", " << ich2 << std::endl;
773
774 } // bad cell
775
776 } // i, ncells
777
778 if (!run2)
779 sDet << "!!! Four cells in GapC are also bad but not listed above: EBC04 ch 1, EBC35 ch 0, EBC54 ch 1, and EBC61 ch 1 " << std::endl;
780
781 ATH_MSG_INFO( sDet.str() );
782
783 //=== bad cells summary
784 float fncells = static_cast<float>(ncells);
785 if (run2)
786 fncells += 16 - 2; // adding 16 MBTS connected to PMT5 of special C10 and removing D4 in EBA15/EBC18
787 else
788 fncells = fncells - 2; // removing D4 in EBA15/EBC18
789
790 sSum << std::endl;
791
792 sSum << ">>>>>>>>>>>>>>> Tilecal BAD Cells Summary <<<<<<<<<<<<<<<<" << std::endl;
793 sSum << "Total number of cells including MBTS: " << fncells << std::endl;
794 sSum << "Total number of bad cells: " << badcell_N
795 << " (" << std::setprecision(4) << 100 * static_cast<float>(badcell_N) / fncells << " %)" << std::endl;
796
797 sSum << "Bad cells in LBA(+cell D0): " << badcell_LBA
798 << " (" << std::setprecision(4) << 100 * static_cast<float>(badcell_LBA) / fncells << " %)" << std::endl;
799
800 sSum << "Bad cells in LBC: " << badcell_LBC
801 << " (" << std::setprecision(4) << 100 * static_cast<float>(badcell_LBC) / fncells << " %)" << std::endl;
802
803 sSum << "Bad cells in EBA: " << badcell_EBA
804 << " (" << std::setprecision(4) << 100 * static_cast<float>(badcell_EBA) / fncells << " %)" << std::endl;
805
806 sSum << "Bad cells in EBC: " << badcell_EBC
807 << " (" << std::setprecision(4) << 100 * static_cast<float>(badcell_EBC) / fncells << " %)" << std::endl;
808
809 sSum << "Bad cells in Gap A(ITC+E1-4): " << badcell_GapA
810 << " (" << std::setprecision(4) << 100 * static_cast<float>(badcell_GapA) / fncells << " %)" << std::endl;
811
812 sSum << "Bad cells in Gap C(ITC+E1-4): " << badcell_GapC
813 << " (" << std::setprecision(4) << 100 * static_cast<float>(badcell_GapC) / fncells << " %)" << std::endl;
814
815 ATH_MSG_INFO( sSum.str() );
816
817 //--- Output file: dump first the summary, then the details
818 std::ofstream fcout("tileBadCells.txt");
819 fcout << sSum.str() << std::endl;
820 fcout << sDet.str() << std::endl;
821 fcout.close();
822
823}
#define ATH_MSG_ERROR(x)
void FillCell(TH2F *hist, const CaloDetDescrElement *elem)
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
bool isBad() const
static const TileCablingService * getInstance()
get pointer to service instance

◆ printBadChannels()

void TileInfoDump::printBadChannels ( )
private

Definition at line 514 of file TileInfoDump.cxx.

514 {
515
516 ATH_MSG_DEBUG( "in printBadChannels()" );
517
518 std::vector<std::string> vmod;
519
520 std::ostringstream sSum;
521 std::ostringstream sDet;
522
523 //=== Tile partitions counters
524 const unsigned int npar = 4;
525 unsigned int bchn[npar];
526 unsigned int badc[npar];
527 for (unsigned int ros = 0; ros < npar; ++ros) {
528 bchn[ros] = 0;
529 badc[ros] = 0;
530 }
531
532 sDet << std::endl;
533 sDet << ">>>>>>>>>>>>>>> Detailed list of BAD Channels/ADCs <<<<<<<<<<<<<<<<" << std::endl;
534 for (unsigned int ros = 0; ros < TileCalibUtils::MAX_ROS; ++ros) {
535 unsigned int drawerMax = TileCalibUtils::getMaxDrawer(ros);
536 for (unsigned int drawer = 0; drawer < drawerMax; ++drawer) {
537 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
538
539 unsigned int badadc = 0; //... counter of bad ADCs per drawer
540 unsigned int badchn = 0; //... counter of bad channels per drawer
541
542 for (unsigned int channel = 0; channel < TileCalibUtils::MAX_CHAN; ++channel) {
543
544 //=== check channel status
545 TileBchStatus status = m_tileBadChanTool->getChannelStatus(drawerIdx, channel);
546 if (status.isAffected()) {
547 if (status.isBad()) {
548 sDet << TileCalibUtils::getDrawerString(ros, drawer)
549 << "/ch" << channel << " :B: "
550 << "has at least one problem: " << status.getString() << std::endl;
551
552 if (ros > 0) {
553 badchn++;
554 bchn[ros - 1]++;
555 }
556 } else
557 sDet << TileCalibUtils::getDrawerString(ros, drawer)
558 << "/ch" << channel << " :-: "
559 << "has at least one problem: " << status.getString() << std::endl;
560
561 //==== check connected adc status
562 for (unsigned int adc = 0; adc < TileCalibUtils::MAX_GAIN; ++adc) {
563 status = m_tileBadChanTool->getAdcStatus(drawerIdx, channel, adc);
564 if (status.isBad()) {
565 sDet << "-B-> " << TileCalibUtils::getDrawerString(ros, drawer)
566 << "/ch" << channel << "/" << adc << " : " << status.getString() << std::endl;
567
568 if (ros > 0) {
569 badadc++;
570 badc[ros - 1]++;
571 }
572 } else
573 sDet << "---> " << TileCalibUtils::getDrawerString(ros, drawer)
574 << "/ch" << channel << "/" << adc << " : " << status.getString() << std::endl;
575
576 } //end adc
577 } //end status!=0
578
579 } //end channel
580
581 if (badadc) {
582 std::ostringstream myStream;
583 myStream << TileCalibUtils::getDrawerString(ros, drawer) << ": " << badchn << "/" << badadc;
584 vmod.push_back(myStream.str());
585 }
586
587 } //end drawer
588 } //end ros
589
590 ATH_MSG_INFO( sDet.str() );
591
592 //=== Print summary
593 sSum << std::endl;
594 sSum << ">>> Summary of BAD channels/ADCs per drawer (in LBA, LBC, EBA, EBC) <<<<" << std::endl;
595 if (vmod.empty())
596 sSum << "There are no bad ADCs in LBA, LBC, EBA and EBC" << std::endl;
597 else {
598 unsigned int totchn = 0;
599 unsigned int totadc = 0;
600
601 for (unsigned int ros = 0; ros < npar; ++ros) {
602 totchn += bchn[ros];
603 totadc += badc[ros];
604 }
605
606 sSum << "Total number of bad channels/ADC: " << totchn << "/" << totadc << std::endl;
607 sSum << "Bad channels/ADC in LBA : " << bchn[0] << "/" << badc[0] << std::endl;
608 sSum << "Bad channels/ADC in LBC : " << bchn[1] << "/" << badc[1] << std::endl;
609 sSum << "Bad channels/ADC in EBA : " << bchn[2] << "/" << badc[2] << std::endl;
610 sSum << "Bad channels/ADC in EBC : " << bchn[3] << "/" << badc[3] << std::endl;
611 sSum << std::endl;
612
613 for (const std::string& s : vmod)
614 sSum << s << std::endl;
615 }
616
617 ATH_MSG_INFO( sSum.str() );
618
619 //--- Output file: dump first the summary, then the details
620 std::ofstream fcout("tileBadChannelsAdcs.txt");
621 fcout << sSum.str() << std::endl;
622 fcout << sDet.str() << std::endl;
623 fcout.close();
624
625}
static std::string getDrawerString(unsigned int ros, unsigned int drawer)
Return the drawer name, e.g.
status
Definition merge.py:16

◆ printEmscale()

void TileInfoDump::printEmscale ( )
private

Definition at line 183 of file TileInfoDump.cxx.

183 {
184 ATH_MSG_DEBUG( "In printEmscale()" );
185
186 for (unsigned int ros = 0; ros < TileCalibUtils::MAX_ROS; ++ros) {
187 unsigned int drawerMax = TileCalibUtils::getMaxDrawer(ros);
188 for (unsigned int drawer = 0; drawer < drawerMax; ++drawer) {
189 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
190 for (unsigned int channel = 0; channel < TileCalibUtils::MAX_CHAN; ++channel) {
191 for (unsigned int adc = 0; adc < TileCalibUtils::MAX_GAIN; ++adc) {
192
193 msg(MSG::INFO) << ros << "/" << std::setw(2)
194 << drawer << "/" << std::setw(2)
195 << channel << "/"
196 << adc << " : " << std::fixed << std::right << std::setw(9) << std::setprecision(5)
197 << m_tileToolEmscale->doCalibCis(drawerIdx, channel, adc, 1.) << " (CIS) | "
198 << std::fixed << std::right << std::setw(9) << std::setprecision(5)
199 << m_tileToolEmscale->doCalibLas(drawerIdx, channel, 1.) << " (LAS) | "
200 << std::fixed << std::right << std::setw(9) << std::setprecision(5)
201 << m_tileToolEmscale->doCalibCes(drawerIdx, channel, 1.) << " (CES) | "
202 << std::fixed << std::right << std::setw(9) << std::setprecision(5)
203 << m_tileToolEmscale->doCalibEms(drawerIdx, channel, 1.) << " (EMS) | ";
204
205 float chanCalMeV = m_tileToolEmscale->channelCalib(drawerIdx, channel, adc, 1.
207
208 msg(MSG::INFO) << std::fixed << std::right << std::setw(9) << std::setprecision(5)
209 << chanCalMeV << " (total)";
210
211 //=== "undo" online calibration only if this functionality is available
212 if (m_tileToolEmscale->getOnlCacheUnit() != TileRawChannelUnit::Invalid) {
213 msg(MSG::INFO) << std::fixed << std::right << std::setw(9) << std::setprecision(5)
214 << m_tileToolEmscale->channelCalib(drawerIdx, channel, adc, chanCalMeV
216 << " (onlMev->oflADC)";
217 }
218
219 msg(MSG::INFO) << endmsg;
220
221 } //end adc
222 } //end channel
223 } //end drawer
224 } //end ros
225
226 //===================================================================
227 //=== Perform a CIS energy scan to test CIS LUT
228 //===================================================================
229 ATH_MSG_INFO( "Performing an energy scan to test CIS LUT" );
230
231 unsigned int ros = 1;
232 unsigned int drawer = 0;
233 unsigned int channel = 0;
234 for (unsigned int adc = 0; adc < TileCalibUtils::MAX_GAIN; ++adc) {
235 for (int adcCounts = 0; adcCounts <= m_i_ADCmax; ++adcCounts) {
236 double energy = static_cast<float>(adcCounts);
237 ATH_MSG_INFO( ros << "/" << drawer << "/" << channel << "/" << adc << " : "
238 << "ADC counts = " << adcCounts
239 << "\t---> " << m_tileToolEmscale->doCalibCis(20, 0, adc, energy) );
240
241 } //end adcCounts
242 } //end adc
243
244}
#define endmsg
MsgStream & msg() const

◆ printEmscaleOnl()

void TileInfoDump::printEmscaleOnl ( )
private

Definition at line 248 of file TileInfoDump.cxx.

248 {
249
250 ATH_MSG_DEBUG( "In printEmscaleOnl()" );
251
252 for (unsigned int ros = 0; ros < TileCalibUtils::MAX_ROS; ++ros) {
253 unsigned int drawerMax = TileCalibUtils::getMaxDrawer(ros);
254 for (unsigned int drawer = 0; drawer < drawerMax; ++drawer) {
255 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
256 for (unsigned int channel = 0; channel < TileCalibUtils::MAX_CHAN; ++channel) {
257 for (unsigned int adc = 0; adc < TileCalibUtils::MAX_GAIN; ++adc) {
258
259 msg(MSG::INFO) << ros << "/" << std::setw(2) << drawer << "/" << std::setw(2) << channel << "/" << adc << " : "
260 << std::fixed << std::right << std::setw(9) << std::setprecision(5)
261 << m_tileToolEmscale->doCalibCisOnl(drawerIdx, channel, adc, 1.) << " (ONL_CIS) | "
262 << std::fixed << std::right << std::setw(9) << std::setprecision(5)
263 << m_tileToolEmscale->doCalibLasOnl(drawerIdx, channel, 1.) << " (ONL_LAS) | "
264 << std::fixed << std::right << std::setw(9) << std::setprecision(5)
265 << m_tileToolEmscale->doCalibCesOnl(drawerIdx, channel, 1.) << " (ONL_CES) | "
266 << std::fixed << std::right << std::setw(9) << std::setprecision(5)
267 << m_tileToolEmscale->doCalibEmsOnl(drawerIdx, channel, 1.) << " (ONL_EMS) | ";
268
269 float chanCalMeV = m_tileToolEmscale->channelCalibOnl(drawerIdx, channel, adc, 1., TileRawChannelUnit::OnlineMegaElectronVolts);
270
271 msg(MSG::INFO) << std::fixed << std::right << std::setw(9) << std::setprecision(5)
272 << chanCalMeV << " (total)";
273
274 msg(MSG::INFO) << endmsg;
275
276 } //end adc
277 } //end channel
278 } //end drawer
279 } //end ros
280
281}

◆ printIntegrator()

void TileInfoDump::printIntegrator ( )
private

Definition at line 319 of file TileInfoDump.cxx.

319 {
320
321 for (unsigned int ros = 0; ros < TileCalibUtils::MAX_ROS; ++ros) {
322 unsigned int drawerMax = TileCalibUtils::getMaxDrawer(ros);
323 for (unsigned int drawer = 0; drawer < drawerMax; ++drawer) {
324 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
325 for (unsigned int channel = 0; channel < TileCalibUtils::MAX_CHAN; ++channel) {
326 for (unsigned int adc = 0; adc < 6; ++adc) {
327
328 //=== Output from the tool
329 ATH_MSG_INFO( ros << "/"
330 << drawer << "/"
331 << channel<< "/"
332 << adc << " : "
333 << "Gain=" << m_tileToolIntegrator->getGain(drawerIdx, channel, adc) << "\t"
334 << m_tileToolIntegrator->getGainError(drawerIdx, channel, adc) << "\t"
335 << m_tileToolIntegrator->getChi2(drawerIdx, channel, adc) << "\t"
336 << "Ped=" << m_tileToolIntegrator->getPedestal(drawerIdx, channel, adc) << "\t"
337 << m_tileToolIntegrator->getDACForPed(drawerIdx, channel, adc) << "\t"
338 << m_tileToolIntegrator->getSigmaOfPed(drawerIdx, channel, adc) << "\t"
339 << m_tileToolIntegrator->getRMSOfPed(drawerIdx, channel, adc) << "\t"
340 << m_tileToolIntegrator->getSigmaOfRMS(drawerIdx, channel, adc) << "\t" );
341
342 } //end adc
343 } //end channel
344 } //end drawer
345 } //end ros
346
347}

◆ printLaser()

void TileInfoDump::printLaser ( )
private

Definition at line 285 of file TileInfoDump.cxx.

285 {
286 ATH_MSG_DEBUG( "In printLaser()" );
287
288 for (unsigned int ros = 0; ros < TileCalibUtils::MAX_ROS; ++ros) {
289 unsigned int drawerMax = TileCalibUtils::getMaxDrawer(ros);
290 for (unsigned int drawer = 0; drawer < drawerMax; ++drawer) {
291 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
292 for (unsigned int channel = 0; channel < TileCalibUtils::MAX_CHAN; ++channel) {
293 for (unsigned int adc = 0; adc < TileCalibUtils::MAX_GAIN; ++adc) {
294
295 msg(MSG::INFO) << ros << "/" << std::setw(2)
296 << drawer << "/" << std::setw(2)
297 << channel << "/"
298 << adc << " : "
299 << std::fixed << std::right << std::setw(9) << std::setprecision(5)
300 << m_tileToolEmscale->getCesRefLas(drawerIdx, channel, adc) << " (absolute) | "
301 << std::fixed << std::right << std::setw(9) << std::setprecision(5)
302 << m_tileToolEmscale->doCalibLas(drawerIdx, channel, 1.) << " (channel) | "
303 << std::fixed << std::right << std::setw(9) << std::setprecision(5)
304 << m_tileToolEmscale->getLasFiber(drawerIdx, channel) << " (fiber) | "
305 << std::fixed << std::right << std::setw(9) << std::setprecision(5)
306 << m_tileToolEmscale->getLasPartition(drawerIdx) << " (partition)";
307
308 msg(MSG::INFO) << endmsg;
309
310 } //end adc
311 } //end channel
312 } //end drawer
313 } //end ros
314
315}

◆ printMuID()

void TileInfoDump::printMuID ( )
private

Definition at line 827 of file TileInfoDump.cxx.

827 {
828
829 float thr_low_value = -999.;
830 float thr_high_value = -999.;
831 Identifier id;
832 // loop over all TileCal cells
833 IdContext cell_context = m_tileID->cell_context();
834 int ncells = m_tileID->cell_hash_max();
835
836 ATH_MSG_INFO( " printMuID: ncells " << ncells );
837 ATH_MSG_INFO( " Cell_ID, Threshold detector(TileCal=5)/section/side/module/tower/sampling" );
838
839 for (int i = 0; i < ncells; ++i) {
840 {
841 m_tileID->get_id((IdentifierHash) i, id, &cell_context);
842
843 thr_low_value = m_tileToolMuID->getLowThresholdValue(id);
844 thr_high_value = m_tileToolMuID->getHighThresholdValue(id);
845
846 //=== Output from the tool
847 ATH_MSG_INFO( " Cell_ID " << id
848 << " Threshold low/high " << thr_low_value << " " << thr_high_value
849 << ", " << m_tileID->to_string(id, -2) );
850 }
851 }
852}

◆ printOfcs()

void TileInfoDump::printOfcs ( )
private

Definition at line 856 of file TileInfoDump.cxx.

856 {
857 MsgStream log(msgSvc(), name());
858
859 ATH_MSG_INFO("OFC will be printed for ros " << m_printOfcRos << ", drawer " << m_printOfcDrawer << ", channel " << m_printOfcChannel);
860
861 //=== dump default channel only
862 unsigned int gain = 0;
864 int NPhases;
865 int NFields;
866 int Phamin;
867 int Phamax;
868 int NSamples;
869
870 const EventContext &ctx = Gaudi::Hive::currentContext();
871 m_tileToolOfcCool->getOfcParams(drawerIdx, NPhases, NFields, Phamin, Phamax, NSamples, ctx);
872
873 int phase_step = round(static_cast<double>(Phamax - Phamin) / (std::abs(NPhases) - 1));
874
875 ATH_MSG_INFO( "-------- OFC parameters ----->"
876 << " nPhases " << NPhases
877 << " nFields " << NFields
878 << " minimum phase " << Phamin * PHASE_PRECISION << " ns "
879 << " maximum phase " << Phamax * PHASE_PRECISION << " ns "
880 << " nSamples " << NSamples
881 << " phase step " << phase_step * PHASE_PRECISION << " ns");
882
883
884
885 for (gain = 0; gain < 2; gain++) {
886 ATH_MSG_INFO( "----------------- Gain " << gain << "-----------------" );
887
888 for (int phase = Phamin; phase <= Phamax; phase += phase_step ) {
889 float real_phase = float(phase) * PHASE_PRECISION;
890 TileOfcWeightsStruct weights;
891 m_tileToolOfcCool->getOfcWeights(drawerIdx, m_printOfcChannel, gain, real_phase, true, weights, ctx).ignore();
892
893 ATH_MSG_INFO( "OFC phase " << real_phase << " ns");
894
895 msg(MSG::INFO) << "OFC A";
896 for (int i = 0; i < weights.n_samples; i++)
897 msg(MSG::INFO) << " " << weights.w_a[i];
898 msg(MSG::INFO) << endmsg;
899
900 msg(MSG::INFO) << "OFC B";
901 for (int i = 0; i < weights.n_samples; i++)
902 msg(MSG::INFO) << " " << weights.w_b[i];
903 msg(MSG::INFO) << endmsg;
904
905 msg(MSG::INFO) << "OFC C";
906 for (int i = 0; i < weights.n_samples; i++)
907 msg(MSG::INFO) << " " << weights.w_c[i];
908 msg(MSG::INFO) << endmsg;
909
910 msg(MSG::INFO) << "OFC G";
911 for (int i = 0; i < weights.n_samples; i++)
912 msg(MSG::INFO) << " " << weights.g[i];
913 msg(MSG::INFO) << endmsg;
914
915 if (NFields >= 5) {
916 msg(MSG::INFO) << "OFC DG";
917 for (int i = 0; i < weights.n_samples; i++)
918 msg(MSG::INFO) << " " << weights.dg[i];
919 msg(MSG::INFO) << endmsg;
920 }
921
922 }
923 }
924
925}
#define PHASE_PRECISION
Class for storing Optimal Filtering Coefficients (OFCs) in a coral::Blob.
float round(const float toRound, const unsigned int decimals)
Definition Mdt.cxx:27
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ printPedestals()

void TileInfoDump::printPedestals ( )
private

Definition at line 351 of file TileInfoDump.cxx.

351 {
352
353 const EventContext &ctx = Gaudi::Hive::currentContext();
354
355 std::vector<float> vecAutoCr;
356
357 for (unsigned int ros = 0; ros < TileCalibUtils::MAX_ROS; ++ros) {
358 unsigned int drawerMax = TileCalibUtils::getMaxDrawer(ros);
359 for (unsigned int drawer = 0; drawer < drawerMax; ++drawer) {
360 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
361 for (unsigned int channel = 0; channel < TileCalibUtils::MAX_CHAN; ++channel) {
362 for (unsigned int adc = 0; adc < TileCalibUtils::MAX_GAIN; ++adc) {
363
364 //=== Retrieve autocorrelations
365 m_tileToolAutoCr->getAutoCorr(drawerIdx, channel, adc, vecAutoCr);
366
367 //=== Output from the tool
368 msg(MSG::INFO) << ros << "/"
369 << drawer << "/"
370 << channel << "/"
371 << adc << " : "
372 << "Pedestal level=" << m_tileToolNoiseSample->getPed(drawerIdx, channel, adc, TileRawChannelUnit::ADCcounts, ctx) << "\t"
373 << "HFN=" << m_tileToolNoiseSample->getHfn(drawerIdx, channel, adc, TileRawChannelUnit::ADCcounts, ctx) << "\t"
374 << "LFN=" << m_tileToolNoiseSample->getLfn(drawerIdx, channel, adc, TileRawChannelUnit::ADCcounts, ctx) << "\t"
375 << "OF=" << m_tileToolNoiseRawChn->getNoise(drawerIdx, channel, adc, TileRawChannelUnit::ADCcounts, ctx) << "\t"
376 << "ACR = ";
377 for (unsigned int i = 0; i < vecAutoCr.size(); ++i) {
378 msg(MSG::INFO) << vecAutoCr[i] << " ";
379 }
380
381 msg(MSG::INFO) << endmsg;
382
383 } //end adc
384 } //end channel
385 } //end drawer
386 } //end ros
387
388}

◆ printPulseShapes()

void TileInfoDump::printPulseShapes ( )
private

Definition at line 472 of file TileInfoDump.cxx.

472 {
473
474 //=== dump default channel only
475 unsigned int ros = 0;
476 unsigned int drawer = 0;
477 unsigned int channel = 0;
478 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
479
480 float y = 0;
481 float dy = 0;
482 float time = 0;
483
484 float startpoint = -100.0;
485 float endpoint = 150.0;
486
487 const EventContext &ctx = Gaudi::Hive::currentContext();
488
489 //=== force m_printPulseShapesStep to have positive value
491 unsigned int npoint = static_cast<unsigned int>((endpoint - startpoint) / m_printPulseShapesStep);
492
493 for (unsigned int adc = 0; adc < TileCalibUtils::MAX_GAIN; ++adc) {
494 for (unsigned int point = 0; point < npoint; ++point) {
495 time = startpoint + point * m_printPulseShapesStep;
496 //if(m_tileToolPulseShape->getPulseShapeYDY(drawerIdx,channel,adc,time,y,dy)) {
497 m_tileToolPulseShape->getPulseShapeYDY(drawerIdx, channel, adc, time, y, dy, ctx);
498 ATH_MSG_INFO( ros << "/" << std::setw(2)
499 << drawer << "/" << std::setw(2)
500 << channel << "/"
501 << adc << " : "
502 << "Time, Y, DY: " << std::fixed << std::right << std::setw(9) << std::setprecision(6) << time
503 << " " << std::fixed << std::right << std::setw(11) << std::setprecision(8) << y
504 << " " << std::fixed << std::right << std::setw(11) << std::setprecision(8) << dy );
505
506 //}
507 } // end point
508 } //end adc
509
510}
#define y
time(flags, cells_name, *args, **kw)

◆ printTimingCorrections()

void TileInfoDump::printTimingCorrections ( )
private

Definition at line 423 of file TileInfoDump.cxx.

423 {
424
425 //=== In Athena online mode only channel offset is available
426 //=== In offline mode everything is available
427 if (m_isOnline) {
428 ATH_MSG_INFO( "Athena Online mode detected: only channel offset available." );
429 for (unsigned int ros = 0; ros < TileCalibUtils::MAX_ROS; ++ros) {
430 unsigned int drawerMax = TileCalibUtils::getMaxDrawer(ros);
431 for (unsigned int drawer = 0; drawer < drawerMax; ++drawer) {
432 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
433 for (unsigned int channel = 0; channel < TileCalibUtils::MAX_CHAN; ++channel) {
434 for (unsigned int adc = 0; adc < TileCalibUtils::MAX_GAIN; ++adc) {
435
436 ATH_MSG_INFO( ros << "/"
437 << drawer << "/"
438 << channel << "/"
439 << adc << " : "
440 << "Time correction: " << m_tileToolTiming->getSignalPhase(drawerIdx, channel, adc)
441 << "\tchannel: " << m_tileToolTiming->getChannelOffset(drawerIdx, channel, adc) );
442
443 } //end adc
444 } //end channel
445 } //end drawer
446 } //end ros
447 } else { // offline mode
448 for (unsigned int ros = 0; ros < TileCalibUtils::MAX_ROS; ++ros) {
449 unsigned int drawerMax = TileCalibUtils::getMaxDrawer(ros);
450 for (unsigned int drawer = 0; drawer < drawerMax; ++drawer) {
451 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
452 for (unsigned int channel = 0; channel < TileCalibUtils::MAX_CHAN; ++channel) {
453 for (unsigned int adc = 0; adc < TileCalibUtils::MAX_GAIN; ++adc) {
454
455 //.. GL 130429: remove references to obsolete condDB folders.
456 ATH_MSG_INFO( ros << "/"
457 << drawer << "/"
458 << channel << "/"
459 << adc << " : "
460 << "Time correction: " << m_tileToolTiming->getSignalPhase(drawerIdx, channel, adc)
461 << "\tchannel: " << m_tileToolTiming->getChannelOffset(drawerIdx, channel, adc) );
462
463 } //end adc
464 } //end channel
465 } //end drawer
466 } //end ros
467 } //offline mode
468}

◆ 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_WARNING(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_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> TileInfoDump::m_caloMgrKey
private
Initial value:
{this,
"CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" }

Definition at line 127 of file TileInfoDump.h.

127 {this,
128 "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" };

◆ 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> TileInfoDump::m_eventInfoKey
private
Initial value:
{this,
"EventInfo", "EventInfo", "EventInfo key"}

Definition at line 97 of file TileInfoDump.h.

97 {this,
98 "EventInfo", "EventInfo", "EventInfo key"};

◆ 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_h_badCell

TH2F* TileInfoDump::m_h_badCell
private

Definition at line 134 of file TileInfoDump.h.

◆ m_h_badCellA

TH2F* TileInfoDump::m_h_badCellA
private

Definition at line 130 of file TileInfoDump.h.

◆ m_h_badCellBC

TH2F* TileInfoDump::m_h_badCellBC
private

Definition at line 131 of file TileInfoDump.h.

◆ m_h_badCellD

TH2F* TileInfoDump::m_h_badCellD
private

Definition at line 132 of file TileInfoDump.h.

◆ m_h_badCellGap

TH2F* TileInfoDump::m_h_badCellGap
private

Definition at line 133 of file TileInfoDump.h.

◆ m_i_ADCmax

int TileInfoDump::m_i_ADCmax = 0
private

Definition at line 143 of file TileInfoDump.h.

◆ m_infoName

std::string TileInfoDump::m_infoName
private

Definition at line 141 of file TileInfoDump.h.

◆ m_isOnline

bool TileInfoDump::m_isOnline
private

Definition at line 58 of file TileInfoDump.h.

◆ m_print1gNoise

bool TileInfoDump::m_print1gNoise
private

Definition at line 95 of file TileInfoDump.h.

◆ m_printBadCells

bool TileInfoDump::m_printBadCells
private

Definition at line 86 of file TileInfoDump.h.

◆ m_printBadChannels

bool TileInfoDump::m_printBadChannels
private

Definition at line 83 of file TileInfoDump.h.

◆ m_printEmscale

bool TileInfoDump::m_printEmscale
private

Definition at line 61 of file TileInfoDump.h.

◆ m_printEmscaleOnl

bool TileInfoDump::m_printEmscaleOnl
private

Definition at line 64 of file TileInfoDump.h.

◆ m_printIntegrator

bool TileInfoDump::m_printIntegrator
private

Definition at line 70 of file TileInfoDump.h.

◆ m_printLaser

bool TileInfoDump::m_printLaser
private

Definition at line 67 of file TileInfoDump.h.

◆ m_printMuID

bool TileInfoDump::m_printMuID
private

Definition at line 92 of file TileInfoDump.h.

◆ m_printOfcChannel

unsigned int TileInfoDump::m_printOfcChannel
private

Definition at line 138 of file TileInfoDump.h.

◆ m_printOfcDrawer

unsigned int TileInfoDump::m_printOfcDrawer
private

Definition at line 137 of file TileInfoDump.h.

◆ m_printOfcRos

unsigned int TileInfoDump::m_printOfcRos
private

Definition at line 136 of file TileInfoDump.h.

◆ m_printOfcsCool

bool TileInfoDump::m_printOfcsCool
private

Definition at line 89 of file TileInfoDump.h.

◆ m_printPedestals

bool TileInfoDump::m_printPedestals
private

Definition at line 73 of file TileInfoDump.h.

◆ m_printPulseShapes

bool TileInfoDump::m_printPulseShapes
private

Definition at line 79 of file TileInfoDump.h.

◆ m_printPulseShapesStep

float TileInfoDump::m_printPulseShapesStep
private

Definition at line 80 of file TileInfoDump.h.

◆ m_printTimingCorrections

bool TileInfoDump::m_printTimingCorrections
private

Definition at line 76 of file TileInfoDump.h.

◆ m_thistSvc

ServiceHandle<ITHistSvc> TileInfoDump::m_thistSvc
private

Definition at line 123 of file TileInfoDump.h.

◆ m_tileBadChanTool

ToolHandle<ITileBadChanTool> TileInfoDump::m_tileBadChanTool
private
Initial value:
{this,
"TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"}

Definition at line 101 of file TileInfoDump.h.

101 {this,
102 "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"};

◆ m_tileHWID

const TileHWID* TileInfoDump::m_tileHWID
private

Definition at line 125 of file TileInfoDump.h.

◆ m_tileID

const TileID* TileInfoDump::m_tileID
private

Definition at line 126 of file TileInfoDump.h.

◆ m_tileInfo

const TileInfo* TileInfoDump::m_tileInfo
private

Definition at line 142 of file TileInfoDump.h.

◆ m_tileToolAutoCr

ToolHandle<TileCondToolAutoCr> TileInfoDump::m_tileToolAutoCr
private
Initial value:
{this,
"TileCondToolAutoCr", "TileCondToolAutoCr", "Tile auto cr tool"}

Definition at line 113 of file TileInfoDump.h.

113 {this,
114 "TileCondToolAutoCr", "TileCondToolAutoCr", "Tile auto cr tool"};

◆ m_tileToolEmscale

ToolHandle<TileCondToolEmscale> TileInfoDump::m_tileToolEmscale
private
Initial value:
{this,
"TileCondToolEmscale", "TileCondToolEmscale", "Tile em scale tool"}

Definition at line 103 of file TileInfoDump.h.

103 {this,
104 "TileCondToolEmscale", "TileCondToolEmscale", "Tile em scale tool"};

◆ m_tileToolIntegrator

ToolHandle<TileCondToolIntegrator> TileInfoDump::m_tileToolIntegrator
private
Initial value:
{this,
"TileCondToolIntegrator", "TileCondToolIntegrator", "Tile integrator tool"}

Definition at line 105 of file TileInfoDump.h.

105 {this,
106 "TileCondToolIntegrator", "TileCondToolIntegrator", "Tile integrator tool"};

◆ m_tileToolMuID

ToolHandle<TileCondToolMuID> TileInfoDump::m_tileToolMuID
private
Initial value:
{this,
"TileCondToolMuID", "TileCondToolMuID", "Tile MuID tool"}

Definition at line 119 of file TileInfoDump.h.

119 {this,
120 "TileCondToolMuID", "TileCondToolMuID", "Tile MuID tool"};

◆ m_tileToolNoiseRawChn

ToolHandle<TileCondToolNoiseRawChn> TileInfoDump::m_tileToolNoiseRawChn
private
Initial value:
{this,
"TileCondToolNoiseRawChn", "TileCondToolNoiseRawChn", "Tile raw channel noise tool"}

Definition at line 115 of file TileInfoDump.h.

115 {this,
116 "TileCondToolNoiseRawChn", "TileCondToolNoiseRawChn", "Tile raw channel noise tool"};

◆ m_tileToolNoiseSample

ToolHandle<TileCondToolNoiseSample> TileInfoDump::m_tileToolNoiseSample
private
Initial value:
{this,
"TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile noise sample tool"}

Definition at line 111 of file TileInfoDump.h.

111 {this,
112 "TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile noise sample tool"};

◆ m_tileToolOfcCool

ToolHandle<TileCondToolOfcCool> TileInfoDump::m_tileToolOfcCool
private
Initial value:
{this,
"TileCondToolOfcCool", "TileCondToolOfcCool", "Tile OfcCool tool"}

Definition at line 117 of file TileInfoDump.h.

117 {this,
118 "TileCondToolOfcCool", "TileCondToolOfcCool", "Tile OfcCool tool"};

◆ m_tileToolPulseShape

ToolHandle<TileCondToolPulseShape> TileInfoDump::m_tileToolPulseShape
private
Initial value:
{this,
"TileCondToolPulseShape", "TileCondToolPulseShape", "Tile pulse shape tool"}

Definition at line 109 of file TileInfoDump.h.

109 {this,
110 "TileCondToolPulseShape", "TileCondToolPulseShape", "Tile pulse shape tool"};

◆ m_tileToolTiming

ToolHandle<TileCondToolTiming> TileInfoDump::m_tileToolTiming
private
Initial value:
{this,
"TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"}

Definition at line 107 of file TileInfoDump.h.

107 {this,
108 "TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"};

◆ 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: