ATLAS Offline Software
CscRawDataCollectionCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #include "GaudiKernel/MsgStream.h"
7 #include "GaudiKernel/GaudiException.h"
9 #include <sstream>
10 
11 void
13 {
14  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " *** Reading CscRawDataCollection" << endmsg;
15 
16  transColl->setSamplingRate ( persColl->m_rate);
17  transColl->setNumSamples ( persColl->m_numSamples );
18  transColl->setLatency ( persColl->m_latency );
19  transColl->setNumDPU ( persColl->m_numDPU);
20 
21  transColl->setOnlineId ( persColl->m_id);
22  transColl->setSubDetectorId( persColl->m_subDetectorId);
23  uint16_t offlineID = persColl->m_rodId;
24  uint16_t rodId = 0x0;
25  switch ( offlineID ) {
26  case 0x0 :
27  rodId = 0x0005;
28  break;
29  case 0x1 :
30  rodId = 0x0007;
31  break;
32  case 0x2 :
33  rodId = 0x0009;
34  break;
35  case 0x3 :
36  rodId = 0x0011;
37  break;
38  case 0x4 :
39  rodId = 0x0015; // slot 13 reserved
40  break;
41  case 0x5 :
42  rodId = 0x0017;
43  break;
44  case 0x6 :
45  rodId = 0x0019;
46  break;
47  case 0x7 :
48  rodId = 0x0021;
49  break;
50  default :
51  rodId = 0xFFFF;
52  }
53  transColl->setRodId( rodId );
54 
55  // Invoke vector converter from the base template
57 
58 }
59 
60 
61 
62 void
63 CscRawDataCollectionCnv_p1::transToPers(const CscRawDataCollection* /*transColl*/, CscRawDataCollection_p1* /*persColl*/, MsgStream &/*log*/)
64 {
65  throw GaudiException("Writing to CscRawDataCollection_p1 is not supported ", "CscRawDataCollectionCnv_p1::transToPers(...)", StatusCode::FAILURE);
66 }
67 
68 
69 
70 
71 
72 
CscRawDataCollection_p1::m_latency
uint16_t m_latency
Definition: CscRawDataCollection_p1.h:76
CscRawDataCollection::setSubDetectorId
void setSubDetectorId(uint16_t subDetectorId)
Definition: CscRawDataCollection.h:149
TPCnvVector::persToTrans
virtual void persToTrans(const PERS *persVect, TRANS *transVect, MsgStream &log)
Converts vector of PERS::value_type objects to vector of TRANS::value_type objects,...
CscRawDataCollection::setOnlineId
void setOnlineId(uint16_t id)
Definition: CscRawDataCollection.h:150
CscRawDataCollectionCnv_p1::transToPers
virtual void transToPers(const CscRawDataCollection *transColl, CscRawDataCollection_p1 *persColl, MsgStream &log)
Definition: CscRawDataCollectionCnv_p1.cxx:63
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
CscRawDataCollection_p1::m_numDPU
uint16_t m_numDPU
Definition: CscRawDataCollection_p1.h:79
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CscRawDataCollection::setRodId
void setRodId(uint16_t rodId)
set methods - the name should be self-descriptive
Definition: CscRawDataCollection.h:148
CscRawDataCollection_p1::m_id
uint32_t m_id
Definition: CscRawDataCollection_p1.h:66
CscRawDataCollection
Collection of CSC Raw Hits, arranged according to CSC Detector Elements Author: Ketevi A.
Definition: CscRawDataCollection.h:24
CscRawDataCollection_p1
Definition: CscRawDataCollection_p1.h:21
CscRawDataCollection_p1::m_subDetectorId
uint16_t m_subDetectorId
Definition: CscRawDataCollection_p1.h:70
CscRawDataCollectionCnv_p1::persToTrans
virtual void persToTrans(const CscRawDataCollection_p1 *persColl, CscRawDataCollection *transColl, MsgStream &log)
Definition: CscRawDataCollectionCnv_p1.cxx:12
CscRawDataCollection::setNumSamples
void setNumSamples(const uint16_t n)
insert the number of samples into the detector event type word
Definition: CscRawDataCollection.cxx:67
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CscRawDataCollection::setSamplingRate
void setSamplingRate(const uint16_t rate)
insert the rate into the detector event type word - the rate can 20 or 40 MHz
Definition: CscRawDataCollection.cxx:59
CscRawDataCollection_p1::m_rate
uint16_t m_rate
Definition: CscRawDataCollection_p1.h:82
CscRawDataCollection_p1::m_rodId
uint16_t m_rodId
Definition: CscRawDataCollection_p1.h:69
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
CscRawDataCollection::setLatency
void setLatency(const uint16_t latency)
insert the latency into the detector event type word
Definition: CscRawDataCollection.cxx:73
CscRawDataCollection_p1::m_numSamples
uint16_t m_numSamples
Definition: CscRawDataCollection_p1.h:73
CscRawDataCollection::setNumDPU
void setNumDPU(const uint16_t numDPU)
obsolete - just backward compatibility with old data
Definition: CscRawDataCollection.cxx:110
CscRawDataCollectionCnv_p1.h