CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions
CaloGeometryDBWriter Class Reference

#include <CaloGeometryDBWriter.h>

Public Types

typedef CaloSubdetectorGeometry::DimVec DimVec
 
typedef CaloSubdetectorGeometry::IVec IVec
 
typedef CaloSubdetectorGeometry::TrVec TrVec
 

Public Member Functions

 CaloGeometryDBWriter ()
 
virtual ~CaloGeometryDBWriter ()
 

Static Public Member Functions

static void write (const TrVec &tvec, const DimVec &dvec, const IVec &ivec, const std::string &tag)
 
static constexpr bool writeFlag ()
 
static void writeIndexed (const TrVec &tvec, const DimVec &dvec, const IVec &ivec, const IVec &dins, const std::string &tag)
 

Detailed Description

Definition at line 10 of file CaloGeometryDBWriter.h.

Member Typedef Documentation

◆ DimVec

Definition at line 13 of file CaloGeometryDBWriter.h.

◆ IVec

Definition at line 14 of file CaloGeometryDBWriter.h.

◆ TrVec

Definition at line 12 of file CaloGeometryDBWriter.h.

Constructor & Destructor Documentation

◆ CaloGeometryDBWriter()

CaloGeometryDBWriter::CaloGeometryDBWriter ( )
inline

Definition at line 50 of file CaloGeometryDBWriter.h.

50 {}

◆ ~CaloGeometryDBWriter()

virtual CaloGeometryDBWriter::~CaloGeometryDBWriter ( )
inlinevirtual

Definition at line 51 of file CaloGeometryDBWriter.h.

51 {}

Member Function Documentation

◆ write()

static void CaloGeometryDBWriter::write ( const TrVec tvec,
const DimVec dvec,
const IVec ivec,
const std::string &  tag 
)
inlinestatic

Definition at line 18 of file CaloGeometryDBWriter.h.

18  {
19  const IVec dins;
20  PCaloGeometry* peg = new PCaloGeometry(tvec, dvec, ivec, dins);
21 
23  if (!mydbservice.isAvailable()) {
24  edm::LogError("PCaloDBGeometryBuilder") << "PoolDBOutputService unavailable";
25  } else {
26  if (mydbservice->isNewTagRequest(tag)) {
27  mydbservice->createNewIOV<PCaloGeometry>(peg, mydbservice->beginOfTime(), mydbservice->endOfTime(), tag);
28  } else {
29  mydbservice->appendSinceTime<PCaloGeometry>(peg, mydbservice->currentTime(), tag);
30  }
31  }
32  }

References cond::service::PoolDBOutputService::appendSinceTime(), cond::service::PoolDBOutputService::beginOfTime(), cond::service::PoolDBOutputService::createNewIOV(), cond::service::PoolDBOutputService::currentTime(), cond::service::PoolDBOutputService::endOfTime(), edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), and GlobalPosition_Frontier_DevDB_cff::tag.

◆ writeFlag()

static constexpr bool CaloGeometryDBWriter::writeFlag ( )
inlinestaticconstexpr

Definition at line 16 of file CaloGeometryDBWriter.h.

16 { return true; }

◆ writeIndexed()

static void CaloGeometryDBWriter::writeIndexed ( const TrVec tvec,
const DimVec dvec,
const IVec ivec,
const IVec dins,
const std::string &  tag 
)
inlinestatic

Definition at line 34 of file CaloGeometryDBWriter.h.

35  {
36  PCaloGeometry* peg = new PCaloGeometry(tvec, dvec, ivec, dins);
37 
39  if (!mydbservice.isAvailable()) {
40  edm::LogError("PCaloDBGeometryBuilder") << "PoolDBOutputService unavailable";
41  } else {
42  if (mydbservice->isNewTagRequest(tag)) {
43  mydbservice->createNewIOV<PCaloGeometry>(peg, mydbservice->beginOfTime(), mydbservice->endOfTime(), tag);
44  } else {
45  mydbservice->appendSinceTime<PCaloGeometry>(peg, mydbservice->currentTime(), tag);
46  }
47  }
48  }

References cond::service::PoolDBOutputService::appendSinceTime(), cond::service::PoolDBOutputService::beginOfTime(), cond::service::PoolDBOutputService::createNewIOV(), cond::service::PoolDBOutputService::currentTime(), cond::service::PoolDBOutputService::endOfTime(), edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by CaloGeometryDBEP< T, U >::produceAligned().

cond::service::PoolDBOutputService::beginOfTime
cond::Time_t beginOfTime() const
Definition: PoolDBOutputService.cc:215
cond::service::PoolDBOutputService::appendSinceTime
void appendSinceTime(const T *payloadObj, cond::Time_t sinceTime, const std::string &recordName)
Definition: PoolDBOutputService.h:141
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
PCaloGeometry
Definition: PCaloGeometry.h:9
cond::service::PoolDBOutputService::createNewIOV
void createNewIOV(const T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t, const std::string &recordName)
Definition: PoolDBOutputService.h:116
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
edm::Service< cond::service::PoolDBOutputService >
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
cond::service::PoolDBOutputService::endOfTime
cond::Time_t endOfTime() const
Definition: PoolDBOutputService.cc:213
cond::service::PoolDBOutputService::isNewTagRequest
bool isNewTagRequest(const std::string &recordName)
Definition: PoolDBOutputService.cc:128
CaloGeometryDBWriter::IVec
CaloSubdetectorGeometry::IVec IVec
Definition: CaloGeometryDBWriter.h:14
cond::service::PoolDBOutputService::currentTime
cond::Time_t currentTime() const
Definition: PoolDBOutputService.cc:217