CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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.

References cond::service::PoolDBOutputService::appendOneIOV(), cond::service::PoolDBOutputService::beginOfTime(), cond::service::PoolDBOutputService::createOneIOV(), cond::service::PoolDBOutputService::currentTime(), edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), and makeGlobalPositionRcd_cfg::tag.

18  {
19  const IVec dins;
20  const PCaloGeometry peg(tvec, dvec, ivec, dins);
21 
23  if (!mydbservice.isAvailable()) {
24  edm::LogError("PCaloDBGeometryBuilder") << "PoolDBOutputService unavailable";
25  } else {
26  if (mydbservice->isNewTagRequest(tag)) {
27  mydbservice->createOneIOV<PCaloGeometry>(peg, mydbservice->beginOfTime(), tag);
28  } else {
29  mydbservice->appendOneIOV<PCaloGeometry>(peg, mydbservice->currentTime(), tag);
30  }
31  }
32  }
Log< level::Error, false > LogError
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
CaloSubdetectorGeometry::IVec IVec
bool isAvailable() const
Definition: Service.h:40

◆ writeFlag()

static constexpr bool CaloGeometryDBWriter::writeFlag ( )
inlinestatic

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.

References cond::service::PoolDBOutputService::appendOneIOV(), cond::service::PoolDBOutputService::beginOfTime(), cond::service::PoolDBOutputService::createOneIOV(), cond::service::PoolDBOutputService::currentTime(), edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), and makeGlobalPositionRcd_cfg::tag.

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

35  {
36  const PCaloGeometry peg(tvec, dvec, ivec, dins);
37 
39  if (!mydbservice.isAvailable()) {
40  edm::LogError("PCaloDBGeometryBuilder") << "PoolDBOutputService unavailable";
41  } else {
42  if (mydbservice->isNewTagRequest(tag)) {
43  mydbservice->createOneIOV<PCaloGeometry>(peg, mydbservice->beginOfTime(), tag);
44  } else {
45  mydbservice->appendOneIOV<PCaloGeometry>(peg, mydbservice->currentTime(), tag);
46  }
47  }
48  }
Log< level::Error, false > LogError
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:40