ATLAS Offline Software
Loading...
Searching...
No Matches
CscStripPrepData.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
6// CscStripPrepData.cxx
7// Implementation file for class CscStripPrepData
9// (c) ATLAS Detector software
11// Version 1.0 03/29/2005 Ketevi A. Assamagan
13
14#include <new>
15#include <sstream>
17#include "GaudiKernel/MsgStream.h"
18
19namespace Muon
20{
21
22
25 const Amg::Vector2D& locpos,
26 const Amg::MatrixX& locErrMat,
27 const MuonGM::CscReadoutElement* detEl,
28 const std::vector<float>& sampleCharges,
30 unsigned short samplingTime
31 ):
32 PrepRawData(RDOId, locpos, locErrMat), //call base class constructor
35 m_detEl(detEl),
39 m_samplingPhase(false)
40 {
41 }
42
45 const Amg::Vector2D& locpos,
46 Amg::MatrixX&& locErrMat,
47 const MuonGM::CscReadoutElement* detEl,
48 const std::vector<float>& sampleCharges,
50 unsigned short samplingTime
51 ):
52 PrepRawData(RDOId, locpos, std::move(locErrMat)), //call base class constructor
55 m_detEl(detEl),
59 m_samplingPhase(false)
60 {
61 }
62
63
64 // Destructor:
66 = default;
67
68 // Default constructor:
79
80 //copy constructor:
91
92 //assignment operator
94 {
95 if (&RIO !=this)
96 {
97 if (m_globalPosition) m_globalPosition.release().reset();
99 m_detEl = RIO.m_detEl ;
104 PrepRawData::operator=(RIO);
105 }
106 return *this;
107 }
108
109 MsgStream& CscStripPrepData::dump( MsgStream& stream) const
110 {
111 stream << MSG::INFO << "CscStripPrepData {" <<endmsg;
112
113 std::stringstream s;
114 s << std::setiosflags(std::ios::fixed);
115 s << std::setprecision(4);
116 s << "Samples = ";
117 for( unsigned int i=0;i<m_sampleCharges.size();++i) s << m_sampleCharges[i] << " , ";
118 s << std::endl;
119 s << "Time of first sample= "<<this->timeOfFirstSample() << ", sampling Time (ns) "
120 << this->samplingTime() << ", sampling Phase " << this->samplingPhase();
121 s << "} End CscStripPrepData" << std::endl;
122 stream << s.str();
123
124 return stream;
125 }
126
127 std::ostream& CscStripPrepData::dump( std::ostream& stream) const
128 {
129 stream << "CscStripPrepData {"<<std::endl;
130
131 std::stringstream s;
132 s << std::setiosflags(std::ios::fixed);
133 s << std::setprecision(4);
134
135 s << "Samples = ";
136 for( unsigned int i=0;i<m_sampleCharges.size();++i) s << m_sampleCharges[i] << " , ";
137 s << std::endl;
138 s << "Time of first sample= "<<this->timeOfFirstSample() << ", sampling time(ns) "
139 << this->samplingTime();
140 s << "} End CscStripPrepData" << std::endl;
141 stream << s.str();
142
143 return stream;
144 }
145 //end of classdef
146
147}//end of ns
#define endmsg
This is a "hash" representation of an Identifier.
bool samplingPhase() const
return the sampling phase
double timeOfFirstSample() const
return the time of the first sample
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
The global position is calculated 'on the fly' and is not written to disk.
const MuonGM::CscReadoutElement * m_detEl
const std::vector< float > & sampleCharges() const
Return the time samples.
unsigned short m_samplingTime
virtual ~CscStripPrepData()
Destructor:
virtual const IdentifierHash collectionHash() const final
returns the IdentifierHash corresponding to the channel.
unsigned short samplingTime() const
return the sampling time in ns: the time between samplings
IdentifierHash m_collectionHash
The IdenifierHash of the collection used to store this PRD.
std::vector< float > m_sampleCharges
CscStripPrepData & operator=(const CscStripPrepData &)
virtual MsgStream & dump(MsgStream &stream) const override final
dump information about the PRD
PrepRawData()
public because of DataPool
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
STL namespace.