The Gaudi Framework  master (01b473db)
RFileCnv.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 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 #pragma once
12 
13 // Include files
14 #include "RDirectoryCnv.h"
16 #include <GaudiKernel/NTuple.h>
17 
18 class TFile;
19 
20 namespace RootHistCnv {
21 
32  class RFileCnv : public RDirectoryCnv {
33 
34  public:
36  StatusCode initialize() override;
37 
38  public:
40  StatusCode createObj( IOpaqueAddress* pAddress, DataObject*& refpObject ) override;
42  StatusCode createRep( DataObject* pObject, IOpaqueAddress*& refpAddress ) override;
44  StatusCode updateRep( IOpaqueAddress* pAddress, DataObject* pObject ) override;
45 
46  public:
48  static const CLID& classID() { return CLID_NTupleFile; }
49 
51  RFileCnv( ISvcLocator* svc );
52 
53  protected:
54  TFile* rfile{ nullptr };
55  std::string m_compLevel;
57  };
58 } // namespace RootHistCnv
RootHistCnv::RFileCnv::classID
static const CLID & classID()
Inquire class type.
Definition: RFileCnv.h:48
RootHistCnv::RFileCnv::updateRep
StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject) override
Convert the transient object to the requested representation.
Definition: RFileCnv.cpp:163
RootHistCnv::RFileCnv::rfile
TFile * rfile
Pointer to ROOT file.
Definition: RFileCnv.h:54
RootHistCnv::RFileCnv::initialize
StatusCode initialize() override
Initialise.
Definition: RFileCnv.cpp:40
IOpaqueAddress
Definition: IOpaqueAddress.h:28
ISvcLocator
Definition: ISvcLocator.h:42
RootHistCnv::RDirectoryCnv
Definition: RDirectoryCnv.h:25
RootHistCnv::RFileCnv::RFileCnv
RFileCnv(ISvcLocator *svc)
Standard constructor.
Definition: RFileCnv.cpp:37
IIncidentSvc.h
RootHistCnv::RFileCnv::m_incSvc
SmartIF< IIncidentSvc > m_incSvc
Definition: RFileCnv.h:56
RootHistCnv::RFileCnv::createRep
StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override
Convert the transient object to the requested representation.
Definition: RFileCnv.cpp:155
RootHistCnv
Definition: DirectoryCnv.h:26
RootHistCnv::RFileCnv
Definition: RFileCnv.h:32
StatusCode
Definition: StatusCode.h:64
RDirectoryCnv.h
RootHistCnv::RFileCnv::createObj
StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject) override
Create the transient representation of an object.
Definition: RFileCnv.cpp:60
NTuple.h
SmartIF< IIncidentSvc >
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:16
RootHistCnv::RFileCnv::m_compLevel
std::string m_compLevel
Compression setting, property RFileCnv.GlobalCompression.
Definition: RFileCnv.h:55
DataObject
Definition: DataObject.h:37