The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
DirectoryCnv.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11// Include files
12#include "DirectoryCnv.h"
13//------------------------------------------------------------------------------
14//
15// Implementation of class : RootHistCnv::DirectoryCnv
16//
17// Author : Charles Leggett
18//
19//------------------------------------------------------------------------------
21//------------------------------------------------------------------------------
23 refpObject = new DataObject();
25}
26
27//------------------------------------------------------------------------------
29 if ( changeDirectory( pObj ) ) {
30 const char* d_nam = pObj->name().c_str() + 1;
31 if ( !gDirectory->GetKey( d_nam ) ) { gDirectory->mkdir( d_nam ); }
32 gDirectory->cd( d_nam );
33 return createAddress( pObj, gDirectory, nullptr, refpAddr );
34 }
35 refpAddr = nullptr;
37}
#define DECLARE_CONVERTER(x)
Definition Converter.h:142
A DataObject is the base class of any identifiable object on any data store.
Definition DataObject.h:37
const std::string & name() const
Retreive DataObject name. It is the name when registered in the store.
Opaque address interface definition.
DirectoryCnv(ISvcLocator *svc)
Standard constructor.
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj) override
Create the transient representation of an object.
StatusCode createRep(DataObject *pObj, IOpaqueAddress *&refpAddr) override
Convert the transient object to the requested representation.
TDirectory * changeDirectory(DataObject *pObject)
Switch to object directory (=Parent directory)
StatusCode createAddress(DataObject *pObject, TDirectory *pDir, TObject *pTObject, IOpaqueAddress *&refpAddr)
Create address of the transient object according to the requested representation.
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
constexpr static const auto SUCCESS
Definition StatusCode.h:99
constexpr static const auto FAILURE
Definition StatusCode.h:100