ATLAS Offline Software
Loading...
Searching...
No Matches
TConverterStreamer.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id: TConverterStreamer.h,v 1.3 2008-11-04 12:42:10 ssnyder Exp $
27
28
29#ifndef ROOTCONVERSIONS_TCONVERTERSTREAMER_H
30#define ROOTCONVERSIONS_TCONVERTERSTREAMER_H
31
32#include <map>
33#include "TClassStreamer.h"
34#include "TVirtualConverter.h"
35
36class TClass;
37class TBuffer;
38class TFile;
39
45 : public TClassStreamer
46{
47public:
48 using Payload = std::pair<TVirtualConverter*, bool>;
49 using CheckSumMap = std::map<UInt_t, Payload>;
50
56 TConverterStreamer (const CheckSumMap& convmap, TClass* cls);
57
63 virtual void operator() (TBuffer& b, void* obj);
64
65
66private:
76 void FindVersion(TBuffer& buf,
77 UInt_t& startpos,
78 UInt_t& bcnt,
79 Version_t& version);
80
88 Version_t R__FindStreamerInfoVersion(const TClass* cl, UInt_t checksum);
89
92
94 TClass* fClass;
95
98
100 TFile* fLastFile;
101};
102
103
104#endif // not ROOTCONVERSIONS_TCONVERTERSTREAMER_H
105
Base class for Root converters.
const CheckSumMap & fConvmap
The checksum -> converter map passed to the constructor.
UInt_t fStreamerChecksum
Cached checksum for the last object read.
void FindVersion(TBuffer &buf, UInt_t &startpos, UInt_t &bcnt, Version_t &version)
Read the initial byte count/version from an object.
std::pair< TVirtualConverter *, bool > Payload
virtual void operator()(TBuffer &b, void *obj)
Standard Root streamer interface.
TFile * fLastFile
Cached file for the last object read.
Version_t R__FindStreamerInfoVersion(const TClass *cl, UInt_t checksum)
Translate a Root checksum to a class version number.
std::map< UInt_t, Payload > CheckSumMap
TConverterStreamer(const CheckSumMap &convmap, TClass *cls)
Constructor.
TClass * fClass
The transient class we're reading.