The Gaudi Framework  master (37c0b60a)
RFileCnv.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 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 #ifndef ROOTHISTCNV_RFILECNV_H
12 #define ROOTHISTCNV_RFILECNV_H 1
13 
14 // Include files
15 #include "RDirectoryCnv.h"
17 #include <GaudiKernel/NTuple.h>
18 
19 class TFile;
20 
21 namespace RootHistCnv {
22 
33  class RFileCnv : public RDirectoryCnv {
34 
35  public:
37  StatusCode initialize() override;
38 
39  public:
41  StatusCode createObj( IOpaqueAddress* pAddress, DataObject*& refpObject ) override;
43  StatusCode createRep( DataObject* pObject, IOpaqueAddress*& refpAddress ) override;
45  StatusCode updateRep( IOpaqueAddress* pAddress, DataObject* pObject ) override;
46 
47  public:
49  static const CLID& classID() { return CLID_NTupleFile; }
50 
52  RFileCnv( ISvcLocator* svc );
53 
54  protected:
55  TFile* rfile{ nullptr };
58  };
59 } // namespace RootHistCnv
60 #endif // RootHistCnv_RFileCNV_H
RootHistCnv::RFileCnv::classID
static const CLID & classID()
Inquire class type.
Definition: RFileCnv.h:49
RootHistCnv::RFileCnv::updateRep
StatusCode updateRep(IOpaqueAddress *pAddress, DataObject *pObject) override
Convert the transient object to the requested representation.
Definition: RFileCnv.cpp:163
std::string
STL class.
RootHistCnv::RFileCnv::rfile
TFile * rfile
Pointer to ROOT file.
Definition: RFileCnv.h:55
RootHistCnv::RFileCnv::initialize
StatusCode initialize() override
Initialise.
Definition: RFileCnv.cpp:40
IOpaqueAddress
Definition: IOpaqueAddress.h:33
ISvcLocator
Definition: ISvcLocator.h:46
RootHistCnv::RDirectoryCnv
Definition: RDirectoryCnv.h:26
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:57
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:27
RootHistCnv::RFileCnv
Definition: RFileCnv.h:33
StatusCode
Definition: StatusCode.h:65
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:18
RootHistCnv::RFileCnv::m_compLevel
std::string m_compLevel
Compression setting, property RFileCnv.GlobalCompression.
Definition: RFileCnv.h:56
DataObject
Definition: DataObject.h:36