ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCOOLConditions
LArCOOLConditions
LArShapeBlob.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//Dear emacs, this is -*-c++-*-
6
#ifndef LARCOOLCONDITIONS_LARSHAPEBLOB_H
7
#define LARCOOLCONDITIONS_LARSHAPEBLOB_H
8
9
#include "
LArElecCalib/ILArShape.h
"
10
//#include "LArCOOLConditions/LArCondBlobBase.h"
11
#include "
Identifier/IdentifierHash.h
"
12
//#include "LArIdentifier/LArOnlineID.h"
13
#include "
LArElecCalib/LArCalibErrorCode.h
"
14
#include <vector>
15
16
class
CondAttrListCollection
;
17
18
class
LArShapeBlob
{
19
20
public
:
21
//typedef ILArShape::ShapeRef_t ShapeRef_t;
22
enum
{
ERRORCODE
=
LArElecCalib::ERRORCODE
};
23
24
LArShapeBlob
();
25
~LArShapeBlob
( );
26
27
28
void
readBlob
(
const
CondAttrListCollection
* attrList, MsgStream&
msg
);
29
30
ILArShape::ShapeRef_t
ShapeByHash
(
const
IdentifierHash
& hs,
int
gain)
const
{
31
const
float
* pStart=
m_pShape
[gain]+(hs*
m_nSamples
);
32
if
(*pStart==
static_cast<
float
>
(
ERRORCODE
))
33
return
ILArShape::ShapeRef_t
(NULL,NULL);
34
else
35
return
ILArShape::ShapeRef_t
(pStart,pStart+
m_nSamples
);
36
}
37
38
ILArShape::ShapeRef_t
ShapeDerByHash
(
const
IdentifierHash
& hs,
int
gain)
const
{
39
const
float
* pStart=
m_pShapeDer
[gain]+(hs*
m_nSamples
);
40
if
(*pStart==
static_cast<
float
>
(
ERRORCODE
))
41
return
ILArShape::ShapeRef_t
(NULL,NULL);
42
else
43
return
ILArShape::ShapeRef_t
(pStart,pStart+
m_nSamples
);
44
}
45
46
47
protected
:
48
std::vector<const float*>
m_pShape
;
49
std::vector<const float*>
m_pShapeDer
;
50
std::vector<const float*>
m_pTimeOffset
;
51
52
unsigned
m_nChannels
;
53
unsigned
m_nSamples
;
54
};
55
56
57
#endif
ILArShape.h
IdentifierHash.h
LArCalibErrorCode.h
Defines a common ERRORCODE enum for LAr-Calibration objects.
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number.
Definition
CondAttrListCollection.h:51
ILArShape::ShapeRef_t
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
Definition
ILArShape.h:26
IdentifierHash
This is a "hash" representation of an Identifier.
Definition
IdentifierHash.h:25
LArShapeBlob::m_pTimeOffset
std::vector< const float * > m_pTimeOffset
Definition
LArShapeBlob.h:50
LArShapeBlob::ShapeByHash
ILArShape::ShapeRef_t ShapeByHash(const IdentifierHash &hs, int gain) const
Definition
LArShapeBlob.h:30
LArShapeBlob::m_pShape
std::vector< const float * > m_pShape
Definition
LArShapeBlob.h:48
LArShapeBlob::readBlob
void readBlob(const CondAttrListCollection *attrList, MsgStream &msg)
Definition
LArShapeBlob.cxx:17
LArShapeBlob::m_pShapeDer
std::vector< const float * > m_pShapeDer
Definition
LArShapeBlob.h:49
LArShapeBlob::ERRORCODE
@ ERRORCODE
Definition
LArShapeBlob.h:22
LArShapeBlob::LArShapeBlob
LArShapeBlob()
Definition
LArShapeBlob.cxx:9
LArShapeBlob::m_nSamples
unsigned m_nSamples
Definition
LArShapeBlob.h:53
LArShapeBlob::~LArShapeBlob
~LArShapeBlob()
Definition
LArShapeBlob.cxx:14
LArShapeBlob::ShapeDerByHash
ILArShape::ShapeRef_t ShapeDerByHash(const IdentifierHash &hs, int gain) const
Definition
LArShapeBlob.h:38
LArShapeBlob::m_nChannels
unsigned m_nChannels
Definition
LArShapeBlob.h:52
LArElecCalib::ERRORCODE
@ ERRORCODE
Definition
LArCalibErrorCode.h:17
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0