ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
CscRawDataStreamer_p0 Class Reference

#include <CscRawDataStreamer_p0.h>

Inheritance diagram for CscRawDataStreamer_p0:
Collaboration diagram for CscRawDataStreamer_p0:

Public Member Functions

 CscRawDataStreamer_p0 ()
 
void CopyOldToNew (const CscRawData_p0 &old_obj, CscRawData &new_obj)
 The converter function which copies the content of the object from its old shape to the new shape To be implemented by the user in the derived class Default implementation simply does a cast
More...
 
virtual void Convert (const void *old_obj, void *new_obj)
 General (typeless) invocation of the convertion function it calls the actual user implemenation with concrete argument types. More...
 
virtual void * InstantiateOld ()
 Create an instance of the old object. More...
 
virtual const std::type_info & TypeIDOld ()
 Get typeinfo of the old object type. More...
 
void SetClassNameAndChecksum (const std::string &classname, unsigned checksum)
 Set the name of the class for which this converter is implemented and the particualar ROOT streamerInfo checksum of the class shape version. More...
 
const std::string & ClassName ()
 
unsigned StreamerChecksum ()
 

Protected Attributes

std::string m_className
 
unsigned m_streamerChecksum
 

Detailed Description

Definition at line 14 of file CscRawDataStreamer_p0.h.

Constructor & Destructor Documentation

◆ CscRawDataStreamer_p0()

CscRawDataStreamer_p0::CscRawDataStreamer_p0 ( )
inline

Definition at line 18 of file CscRawDataStreamer_p0.h.

18  {
19  SetClassNameAndChecksum("CscRawData", 3995976199U);
20  }

Member Function Documentation

◆ ClassName()

const std::string& T_AthenaRootConverterBase::ClassName ( )
inlineinherited

Definition at line 27 of file T_AthenaRootConverter.h.

27 { return m_className; }

◆ Convert()

virtual void T_AthenaRootConverter< CscRawData , CscRawData_p0 >::Convert ( const void *  old_obj,
void *  new_obj 
)
inlinevirtualinherited

General (typeless) invocation of the convertion function it calls the actual user implemenation with concrete argument types.

Implements T_AthenaRootConverterBase.

Definition at line 84 of file T_AthenaRootConverter.h.

84  {
85  CopyOldToNew( *(const OLD*)old_obj, *(NEW*)new_obj);
86  }

◆ CopyOldToNew()

void CscRawDataStreamer_p0::CopyOldToNew ( const CscRawData_p0 old_obj,
CscRawData new_obj 
)
inlinevirtual

The converter function which copies the content of the object from its old shape to the new shape To be implemented by the user in the derived class Default implementation simply does a cast

Reimplemented from T_AthenaRootConverter< CscRawData, CscRawData_p0 >.

Definition at line 22 of file CscRawDataStreamer_p0.h.

23  {
24  // somewhat inefficient data filling, can be sped up using some tricks
25  if( old_obj.getSamples().size() == 0 ) {
26  //old data in ROOT3
27  const uint16_t *ampls = old_obj.getAmplitudes();
28  std::vector<uint16_t> amplitudes;
29  for( int i=0; i<4; i++ ) {
30  amplitudes.push_back( *ampls++ );
31  }
32  CscRawData obj(amplitudes,
33  old_obj.getAddress(),
34  old_obj.identify(),
35  old_obj.dpuID());
36  new_obj = obj;
37  //std::cout << "CscRawDataStreamer_p0 ROOT3 " << obj;
38  } else {
39  CscRawData obj(old_obj.getSamples(),
40  old_obj.getAddress(),
41  old_obj.identify(),
42  old_obj.dpuID());
43  new_obj = obj;
44  //std::cout << "CscRawDataStreamer_p0 ROOT4 " << obj;
45  }
46  }

◆ InstantiateOld()

virtual void* T_AthenaRootConverter< CscRawData , CscRawData_p0 >::InstantiateOld
inlinevirtualinherited

Create an instance of the old object.

Implements T_AthenaRootConverterBase.

Definition at line 89 of file T_AthenaRootConverter.h.

89 { return new OLD(); }

◆ SetClassNameAndChecksum()

void T_AthenaRootConverterBase::SetClassNameAndChecksum ( const std::string &  classname,
unsigned  checksum 
)
inlineinherited

Set the name of the class for which this converter is implemented and the particualar ROOT streamerInfo checksum of the class shape version.

Definition at line 55 of file T_AthenaRootConverter.h.

56 {
57  m_className = classname;
58  m_streamerChecksum = checksum;
59 }

◆ StreamerChecksum()

unsigned T_AthenaRootConverterBase::StreamerChecksum ( )
inlineinherited

Definition at line 28 of file T_AthenaRootConverter.h.

28 { return m_streamerChecksum; }

◆ TypeIDOld()

virtual const std::type_info& T_AthenaRootConverter< CscRawData , CscRawData_p0 >::TypeIDOld
inlinevirtualinherited

Get typeinfo of the old object type.

Implements T_AthenaRootConverterBase.

Definition at line 91 of file T_AthenaRootConverter.h.

91 { return typeid(OLD); }

Member Data Documentation

◆ m_className

std::string T_AthenaRootConverterBase::m_className
protectedinherited

Definition at line 40 of file T_AthenaRootConverter.h.

◆ m_streamerChecksum

unsigned T_AthenaRootConverterBase::m_streamerChecksum
protectedinherited

Definition at line 41 of file T_AthenaRootConverter.h.


The documentation for this class was generated from the following file:
CscRawData_p0::getAddress
uint32_t getAddress() const
Definition: CscRawData_p0.h:29
T_AthenaRootConverterBase::m_streamerChecksum
unsigned m_streamerChecksum
Definition: T_AthenaRootConverter.h:41
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
lumiFormat.i
int i
Definition: lumiFormat.py:92
CscRawData_p0::dpuID
uint16_t dpuID() const
Definition: CscRawData_p0.h:26
CscRawData_p0::getSamples
const std::vector< uint16_t > getSamples() const
Definition: CscRawData_p0.h:28
CscRawData_p0::identify
uint16_t identify() const
Definition: CscRawData_p0.h:27
T_AthenaRootConverterBase::m_className
std::string m_className
Definition: T_AthenaRootConverter.h:40
CscRawData
Class to hold the electronic output for a single CSC readout channel: n sampling ADC data + the addre...
Definition: CscRawData.h:21
T_AthenaRootConverterBase::SetClassNameAndChecksum
void SetClassNameAndChecksum(const std::string &classname, unsigned checksum)
Set the name of the class for which this converter is implemented and the particualar ROOT streamerIn...
Definition: T_AthenaRootConverter.h:55
T_AthenaRootConverter< CscRawData, CscRawData_p0 >::CopyOldToNew
virtual void CopyOldToNew(const CscRawData_p0 &old_obj, CscRawData &new_obj)
The converter function which copies the content of the object from its old shape to the new shape To ...
Definition: T_AthenaRootConverter.h:78
python.PyAthena.obj
obj
Definition: PyAthena.py:135
CscRawData_p0::getAmplitudes
const uint16_t * getAmplitudes() const
Definition: CscRawData_p0.h:32