ATLAS Offline Software
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"
12 //#include "LArIdentifier/LArOnlineID.h"
14 #include <vector>
15 
17 
18 class LArShapeBlob {
19 
20  public:
21  //typedef ILArShape::ShapeRef_t ShapeRef_t;
23 
24  LArShapeBlob();
25  ~LArShapeBlob( );
26 
27 
28  void readBlob(const CondAttrListCollection* attrList, MsgStream& msg);
29 
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 
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
LArShapeBlob::ERRORCODE
@ ERRORCODE
Definition: LArShapeBlob.h:22
LArShapeBlob::LArShapeBlob
LArShapeBlob()
Definition: LArShapeBlob.cxx:9
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
LArShapeBlob::readBlob
void readBlob(const CondAttrListCollection *attrList, MsgStream &msg)
Definition: LArShapeBlob.cxx:17
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
LArCalibErrorCode.h
Defines a common ERRORCODE enum for LAr-Calibration objects.
CreatePhysValWebPage.hs
hs
Definition: CreatePhysValWebPage.py:107
LArShapeBlob
Definition: LArShapeBlob.h:18
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
ILArShape.h
LArShapeBlob::m_nSamples
unsigned m_nSamples
Definition: LArShapeBlob.h:53
LArShapeBlob::ShapeDerByHash
ILArShape::ShapeRef_t ShapeDerByHash(const IdentifierHash &hs, int gain) const
Definition: LArShapeBlob.h:38
IdentifierHash.h
LArShapeBlob::m_pShapeDer
std::vector< const float * > m_pShapeDer
Definition: LArShapeBlob.h:49
LArShapeBlob::~LArShapeBlob
~LArShapeBlob()
Definition: LArShapeBlob.cxx:14
LArElecCalib::ERRORCODE
@ ERRORCODE
Definition: LArCalibErrorCode.h:17
LArShapeBlob::m_pTimeOffset
std::vector< const float * > m_pTimeOffset
Definition: LArShapeBlob.h:50
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
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
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
LArShapeBlob::m_nChannels
unsigned m_nChannels
Definition: LArShapeBlob.h:52
LArVectorProxy
Proxy for accessing a range of float values like a vector.
Definition: LArVectorProxy.h:38