ATLAS Offline Software
Loading...
Searching...
No Matches
TileCalibDrawerCmt.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8//
9//_____________________________________________________________
12 const std::string& author,
13 const std::string& comment,
14 uint64_t timeStamp)
15{
16 TileCalibDrawerCmt* calibDrawer = new TileCalibDrawerCmt(blob);
17 calibDrawer->init(author,comment,timeStamp);
18 return calibDrawer;
19}
20
21//
22//_____________________________________________________________
24TileCalibDrawerCmt::getInstance(const coral::Blob& blob)
25{
26 //=== const Blob needs to be correctly formated
27 if(blob.size()<static_cast<long>(m_hdrSize32)){
28 throw TileCalib::InvalidBlob("TileCalibDrawerCmt::getInstance");
29 }
30 return (new TileCalibDrawerCmt(blob));
31}
32
33//
34//__________________________________________________________________
36
38{
39 //=== no type check here
40}
41
42//
43//__________________________________________________________________
45
47{
48 //=== no type check here
49}
50
51//
52//__________________________________________________________________
53void
54TileCalibDrawerCmt::init(const std::string& author,
55 const std::string& comment,
56 uint64_t timeStamp)
57{
58 createBlob(TileCalibType::CMT,0,0,0,0,0,author,comment,timeStamp);
59}
60
uint32_t createBlob(uint16_t objType, uint16_t objVersion, uint32_t objSizeUint32, uint32_t nObjs, uint16_t nChans, uint16_t nGains, const std::string &author="", const std::string &comment="", uint64_t timeStamp=0)
(re-)creation of the referenced BLOB object.
TileCalibDrawerBase(const TileCalibDrawerBase &other)
Copy Ctor.
static const unsigned int m_hdrSize32
The header size in units of uint32_t.
Class to store comments in BLOB without any data.
TileCalibDrawerCmt(const coral::Blob &blob)
Ctor used when interpreting an already existing BLOB.
static const TileCalibDrawerCmt * getInstance(const coral::Blob &blob)
Returns a pointer to a const TileCalibDrawerCmt.
void init(const std::string &author, const std::string &comment="", uint64_t timeStamp=0)
Initializing a TileCalibDrawerCmt.
@ CMT
Enum for TileCalibDrawerCmt class.
Thrown if coral::Blob does not conform with expected structure.