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 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

Definition at line 13 of file CaloGeometryDBWriter.h.

Definition at line 14 of file CaloGeometryDBWriter.h.

Definition at line 12 of file CaloGeometryDBWriter.h.

Constructor & Destructor Documentation

CaloGeometryDBWriter::CaloGeometryDBWriter ( )
inline

Definition at line 50 of file CaloGeometryDBWriter.h.

50 {}
virtual CaloGeometryDBWriter::~CaloGeometryDBWriter ( )
inlinevirtual

Definition at line 51 of file CaloGeometryDBWriter.h.

51 {}

Member Function Documentation

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::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.

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  }
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:40
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
CaloSubdetectorGeometry::IVec IVec
static bool CaloGeometryDBWriter::writeFlag ( )
inlinestatic

Definition at line 16 of file CaloGeometryDBWriter.h.

16 { return true; }
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::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().

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  }
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:40
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)