CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions

CaloGeometryDBWriter Class Reference

#include <CaloGeometryDBWriter.h>

List of all members.

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.

{}
virtual CaloGeometryDBWriter::~CaloGeometryDBWriter ( ) [inline, virtual]

Definition at line 87 of file CaloGeometryDBWriter.h.

{}

Member Function Documentation

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

Definition at line 20 of file CaloGeometryDBWriter.h.

References edm::Service< T >::isAvailable(), and GlobalPosition_Frontier_DevDB_cff::tag.

      {
         const IVec dins;
         PCaloGeometry* peg = new PCaloGeometry( tvec, dvec, ivec, dins );  
  
         edm::Service<cond::service::PoolDBOutputService> mydbservice;
         if( !mydbservice.isAvailable() )
         {
            edm::LogError("PCaloDBGeometryBuilder")<<"PoolDBOutputService unavailable";
         }
         else
         {
            if ( mydbservice->isNewTagRequest( tag ) ) 
            {
               mydbservice->createNewIOV<PCaloGeometry>( 
                  peg,
                  mydbservice->beginOfTime(),
                  mydbservice->endOfTime(),
                  tag ) ;
            }
            else 
            {
               mydbservice->appendSinceTime<PCaloGeometry>(
                  peg,
                  mydbservice->currentTime(),
                  tag ) ;
            }
         }
      }
static bool CaloGeometryDBWriter::writeFlag ( ) [inline, static]

Definition at line 18 of file CaloGeometryDBWriter.h.

References funct::true.

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

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

Definition at line 53 of file CaloGeometryDBWriter.h.

References edm::Service< T >::isAvailable(), and GlobalPosition_Frontier_DevDB_cff::tag.

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

      {
         PCaloGeometry* peg = new PCaloGeometry( tvec, dvec, ivec, dins );  
  
         edm::Service<cond::service::PoolDBOutputService> mydbservice;
         if( !mydbservice.isAvailable() )
         {
            edm::LogError("PCaloDBGeometryBuilder")<<"PoolDBOutputService unavailable";
         }
         else
         {
            if ( mydbservice->isNewTagRequest( tag ) ) 
            {
               mydbservice->createNewIOV<PCaloGeometry>( 
                  peg,
                  mydbservice->beginOfTime(),
                  mydbservice->endOfTime(),
                  tag ) ;
            }
            else 
            {
               mydbservice->appendSinceTime<PCaloGeometry>(
                  peg,
                  mydbservice->currentTime(),
                  tag ) ;
            }
         }
      }