ATLAS Offline Software
Loading...
Searching...
No Matches
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
11void
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
56 CscRawDataCollection_Cnvp1_base_t::persToTrans( persColl, transColl, log );
57
58}
59
60
61
62void
63CscRawDataCollectionCnv_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
#define endmsg
virtual void persToTrans(const CscRawDataCollection_p1 *persColl, CscRawDataCollection *transColl, MsgStream &log)
Converts vector of PERS::value_type objects to vector of TRANS::value_type objects,...
virtual void transToPers(const CscRawDataCollection *transColl, CscRawDataCollection_p1 *persColl, MsgStream &log)
Converts vector of TRANS::value_type objects to vector of PERS::value_type objects,...
Collection of CSC Raw Hits, arranged according to CSC Detector Elements Author: Ketevi A.
void setRodId(uint16_t rodId)
set methods - the name should be self-descriptive
void setLatency(const uint16_t latency)
insert the latency into the detector event type word
void setNumSamples(const uint16_t n)
insert the number of samples into the detector event type word
void setNumDPU(const uint16_t numDPU)
obsolete - just backward compatibility with old data
void setSamplingRate(const uint16_t rate)
insert the rate into the detector event type word - the rate can 20 or 40 MHz
void setOnlineId(uint16_t id)
void setSubDetectorId(uint16_t subDetectorId)
virtual void persToTrans(const PERS *persVect, TRANS *transVect, MsgStream &log)
Converts vector of PERS::value_type objects to vector of TRANS::value_type objects,...