CondFormats
Common
interface
FileBlob.h
Go to the documentation of this file.
1
#ifndef CondFormats_FileBlob_h
2
#define CondFormats_FileBlob_h
3
4
#include "
CondFormats/Serialization/interface/Serializable.h
"
5
6
#include <vector>
7
#include <string>
8
#include <iostream>
9
10
class
FileBlob
{
11
public
:
12
FileBlob
(){};
14
FileBlob
(
const
std::string
&
fname
,
bool
zip
);
16
FileBlob
(std::istream &is,
bool
zip
);
17
18
~FileBlob
(){};
19
21
void
read
(
const
std::string
&);
23
void
write
(
const
std::string
&)
const
;
24
26
void
read
(std::istream &);
28
void
write
(std::ostream &)
const
;
29
30
bool
isCompressed
()
const
{
return
compressed
; };
31
32
int
size
()
const
{
return
isize
; };
34
#if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
35
std::unique_ptr<std::vector<unsigned char> >
getUncompressedBlob
()
const
;
36
#endif
37
void
getUncompressedBlob
(std::vector<unsigned char> &myblobcopy)
const
;
38
39
private
:
40
static
unsigned
int
computeFileSize
(
const
std::string
&);
41
static
unsigned
int
computeStreamSize
(std::istream &);
42
43
std::vector<unsigned char>
blob
;
44
bool
compressed
;
45
unsigned
int
isize
;
46
47
COND_SERIALIZABLE
;
48
};
49
50
#endif
FileBlob::isize
unsigned int isize
Definition:
FileBlob.h:45
FileBlob::isCompressed
bool isCompressed() const
Definition:
FileBlob.h:30
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition:
Serializable.h:39
FileBlob::computeFileSize
static unsigned int computeFileSize(const std::string &)
Definition:
FileBlob.cc:117
FileBlob::getUncompressedBlob
std::unique_ptr< std::vector< unsigned char > > getUncompressedBlob() const
i didn't want to do two copies ... hope this works.
Definition:
FileBlob.cc:73
FileBlob::FileBlob
FileBlob()
Definition:
FileBlob.h:12
FileBlob::blob
std::vector< unsigned char > blob
Definition:
FileBlob.h:43
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
FileBlob::~FileBlob
~FileBlob()
Definition:
FileBlob.h:18
FileBlob::read
void read(const std::string &)
read from real file
Definition:
FileBlob.cc:102
Serializable.h
ComparisonHelper::zip
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
Definition:
L1TStage2CaloLayer1.h:38
alignmentValidation.fname
string fname
main script
Definition:
alignmentValidation.py:959
FileBlob::computeStreamSize
static unsigned int computeStreamSize(std::istream &)
Definition:
FileBlob.cc:128
FileBlob::size
int size() const
Definition:
FileBlob.h:32
FileBlob::write
void write(const std::string &) const
write to real file
Definition:
FileBlob.cc:111
FileBlob::compressed
bool compressed
Definition:
FileBlob.h:44
FileBlob
Definition:
FileBlob.h:10
Generated for CMSSW Reference Manual by
1.8.16