32 ATH_MSG_INFO (
"======== initialize DumpLArRawChanels ========" );
42 return StatusCode::FAILURE;
55 m_tree=
new TTree(
"RC",
"LArRawChannels");
56 const std::string ntupStream=
"/"+
m_ntup+
"/LArRawChanenls";
69 ATH_MSG_INFO (
"======== test-stuff initialize successfully ========" );
70 return StatusCode::SUCCESS;
79 StatusCode
sc=
evtStore()->retrieve(thisEventInfo);
80 if (
sc!=StatusCode::SUCCESS)
84 if (
m_toLog) std::cout <<
"*** Event #" << std::dec << thisEventInfo->
runNumber() <<
"/" << thisEventInfo->
eventNumber() << std::endl;
92 return StatusCode::FAILURE;
100 ATH_MSG_INFO (
"Retrieved LArRawChannelContainer from StoreGate! key=" <<
m_key );
105 typedef std::vector< const LArRawChannel* > LArRawChannelVector;
107 LArRawChannelVector channelVector;
108 LArRawChannelContainer::const_iterator it_chan_coll = channel_cont->begin();
109 LArRawChannelContainer::const_iterator it_chan_coll_end = channel_cont->end();
111 for( ; it_chan_coll!=it_chan_coll_end;++it_chan_coll) {
113 channelVector.push_back(&(*it_chan_coll));
119 std::sort(channelVector.begin(),channelVector.end(),aSort);
128 if (!cabling->isOnlineConnected(chid)) {
129 if (
m_toLog) std::cout <<
" disconnected" << std::endl;
133 const Identifier id=cabling->cnvToIdentifier(chid);
135 if(!
m_emId->is_lar_em(
id)) {
138 layer=
m_emId->sampling(
id);
139 if (
m_emId->is_em_endcap(
id)) {
140 if (
m_toLog) std::cout <<
" Endcap l/e/p= " << layer <<
"/" <<
eta <<
"/" <<
phi <<
":";
144 if (
m_toLog) std::cout <<
" Barrel l/e/p= " << layer <<
"/" <<
eta <<
"/" <<
phi <<
":";
149 if (
m_toLog) std::cout <<
" (is not EM)";
154 int Time=chan->time();
163 if (
m_toLog) std::cout <<
" E= " << chan->energy() <<
" t= " << Time <<
" Q= " << chan->quality() <<
" P=0x"
164 << std::hex << chan->provenance() << std::dec <<
" G=" << chan->gain() << std::endl;
166 if (
m_toFile)
m_outfile <<
" E= " << chan->energy() <<
" t= " << Time <<
" Q= " << chan->quality() <<
" P=0x"
167 << std::hex << chan->provenance() << std::dec <<
" G=" << chan->gain() << std::endl;
179 std::cout <<
"Event " <<
m_count <<
" contains " <<
m_chan <<
" (" <<channelVector.size() <<
") channels\n";
180 return StatusCode::SUCCESS;
186 ATH_MSG_INFO (
"======== finalize DumpLArRawChannel ========" );
187 return StatusCode::SUCCESS;
191{
return a->channelID() < b->channelID();}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
Helper class for offline cell identifiers.
const LArEM_ID * em_idHelper() const
access to EM idHelper
bool operator()(const LArRawChannel *a, const LArRawChannel *b)
ServiceHandle< ITHistSvc > m_thistSvc
DumpLArRawChannels(const std::string &name, ISvcLocator *pSvcLocator)
const LArOnlineID * m_onlineHelper
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Container for LArRawChannel (IDC using LArRawChannelCollection)
Liquid Argon ROD output object base class.
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
EventInfo_v1 EventInfo
Definition of the latest event info version.