test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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, std::string tag)
 
static bool writeFlag ()
 
static void writeIndexed (const TrVec &tvec, const DimVec &dvec, const IVec &ivec, const IVec &dins, std::string tag)
 

Detailed Description

Definition at line 10 of file CaloGeometryDBWriter.h.

Member Typedef Documentation

Definition at line 15 of file CaloGeometryDBWriter.h.

Definition at line 16 of file CaloGeometryDBWriter.h.

Definition at line 14 of file CaloGeometryDBWriter.h.

Constructor & Destructor Documentation

CaloGeometryDBWriter::CaloGeometryDBWriter ( )
inline

Definition at line 86 of file CaloGeometryDBWriter.h.

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

Definition at line 87 of file CaloGeometryDBWriter.h.

87 {}

Member Function Documentation

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

Definition at line 20 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.

24  {
25  const IVec dins;
26  PCaloGeometry* peg = new PCaloGeometry( tvec, dvec, ivec, dins );
27 
29  if( !mydbservice.isAvailable() )
30  {
31  edm::LogError("PCaloDBGeometryBuilder")<<"PoolDBOutputService unavailable";
32  }
33  else
34  {
35  if ( mydbservice->isNewTagRequest( tag ) )
36  {
37  mydbservice->createNewIOV<PCaloGeometry>(
38  peg,
39  mydbservice->beginOfTime(),
40  mydbservice->endOfTime(),
41  tag ) ;
42  }
43  else
44  {
45  mydbservice->appendSinceTime<PCaloGeometry>(
46  peg,
47  mydbservice->currentTime(),
48  tag ) ;
49  }
50  }
51  }
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:46
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 18 of file CaloGeometryDBWriter.h.

References funct::true.

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

18 { return true ; }
static void CaloGeometryDBWriter::writeIndexed ( const TrVec tvec,
const DimVec dvec,
const IVec ivec,
const IVec dins,
std::string  tag 
)
inlinestatic

Definition at line 53 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().

58  {
59  PCaloGeometry* peg = new PCaloGeometry( tvec, dvec, ivec, dins );
60 
62  if( !mydbservice.isAvailable() )
63  {
64  edm::LogError("PCaloDBGeometryBuilder")<<"PoolDBOutputService unavailable";
65  }
66  else
67  {
68  if ( mydbservice->isNewTagRequest( tag ) )
69  {
70  mydbservice->createNewIOV<PCaloGeometry>(
71  peg,
72  mydbservice->beginOfTime(),
73  mydbservice->endOfTime(),
74  tag ) ;
75  }
76  else
77  {
78  mydbservice->appendSinceTime<PCaloGeometry>(
79  peg,
80  mydbservice->currentTime(),
81  tag ) ;
82  }
83  }
84  }
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:46
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)