Gaudi::RootConnectionSetup Class Reference

#include </scratch/z5/marcocle/GaudiDocs/lhcb-release/996/GAUDI/GAUDI_v26r4/InstallArea/x86_64-slc6-gcc48-opt/include/RootCnv/RootDataConnection.h>

Collaboration diagram for Gaudi::RootConnectionSetup:

Public Types

typedef std::vector< std::string > StringVec
 Type definition for string maps. More...
 
typedef std::vector< std::string > StringVec
 Type definition for string maps. More...
 

Public Member Functions

 RootConnectionSetup ()=default
 Standard constructor. More...
 
void addRef ()
 Increase reference count. More...
 
void release ()
 Decrease reference count. More...
 
void setMessageSvc (MsgStream *m)
 Set message service reference. More...
 
MsgStreammsgSvc () const
 Retrieve message service. More...
 
void setIncidentSvc (IIncidentSvc *m)
 Set incident service reference. More...
 
IIncidentSvcincidentSvc () const
 Retrieve incident service. More...
 
 RootConnectionSetup ()=default
 Standard constructor. More...
 
void addRef ()
 Increase reference count. More...
 
void release ()
 Decrease reference count. More...
 
void setMessageSvc (MsgStream *m)
 Set message service reference. More...
 
MsgStreammsgSvc () const
 Retrieve message service. More...
 
void setIncidentSvc (IIncidentSvc *m)
 Set incident service reference. More...
 
IIncidentSvcincidentSvc () const
 Retrieve incident service. More...
 

Static Public Member Functions

static long setCompression (const std::string &compression)
 Set the global compression level. More...
 
static int compression ()
 Access to global compression level. More...
 
static long setCompression (const std::string &compression)
 Set the global compression level. More...
 
static int compression ()
 Access to global compression level. More...
 

Public Attributes

StringVec cacheBranches
 Vector of strings with branches to be cached for input files. More...
 
StringVec vetoBranches
 Vector of strings with branches to NOT be cached for input files. More...
 
std::string loadSection
 RootCnvSvc Property: Root data cache size. More...
 
int cacheSize
 RootCnvSvc Property: Root data cache size. More...
 
int learnEntries
 RootCnvSvc Property: ROOT cache learn entries. More...
 

Protected Member Functions

virtual ~RootConnectionSetup ()=default
 Standard destructor. More...
 
virtual ~RootConnectionSetup ()=default
 Standard destructor. More...
 

Protected Attributes

int refCount = 1
 Object reference count. More...
 
std::unique_ptr< MsgStreamm_msgSvc
 Reference to message service. More...
 
SmartIF< IIncidentSvcm_incidentSvc = nullptr
 Reference to incident service. More...
 

Detailed Description

Definition at line 43 of file RootDataConnection.h.

Member Typedef Documentation

typedef std::vector<std::string> Gaudi::RootConnectionSetup::StringVec

Type definition for string maps.

Definition at line 46 of file RootDataConnection.h.

typedef std::vector<std::string> Gaudi::RootConnectionSetup::StringVec

Type definition for string maps.

Definition at line 46 of file RootDataConnection.h.

Constructor & Destructor Documentation

virtual Gaudi::RootConnectionSetup::~RootConnectionSetup ( )
protectedvirtualdefault

Standard destructor.

Gaudi::RootConnectionSetup::RootConnectionSetup ( )
default

Standard constructor.

virtual Gaudi::RootConnectionSetup::~RootConnectionSetup ( )
protectedvirtualdefault

Standard destructor.

Gaudi::RootConnectionSetup::RootConnectionSetup ( )
default

Standard constructor.

Member Function Documentation

void RootConnectionSetup::addRef ( )

Increase reference count.

Definition at line 129 of file RootDataConnection.cpp.

129  {
130  ++refCount;
131 }
int refCount
Object reference count.
void Gaudi::RootConnectionSetup::addRef ( )

Increase reference count.

int RootConnectionSetup::compression ( )
static

Access to global compression level.

Global compression level.

Definition at line 124 of file RootDataConnection.cpp.

124  {
125  return s_compressionLevel;
126 }
static int Gaudi::RootConnectionSetup::compression ( )
static

Access to global compression level.

IIncidentSvc* Gaudi::RootConnectionSetup::incidentSvc ( ) const
inline

Retrieve incident service.

Definition at line 89 of file RootDataConnection.h.

89 { return m_incidentSvc.get(); }
SmartIF< IIncidentSvc > m_incidentSvc
Reference to incident service.
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
IIncidentSvc* Gaudi::RootConnectionSetup::incidentSvc ( ) const
inline

Retrieve incident service.

Definition at line 89 of file RootDataConnection.h.

89 { return m_incidentSvc.get(); }
SmartIF< IIncidentSvc > m_incidentSvc
Reference to incident service.
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
MsgStream& Gaudi::RootConnectionSetup::msgSvc ( ) const
inline

Retrieve message service.

Definition at line 84 of file RootDataConnection.h.

84 { return *m_msgSvc; }
std::unique_ptr< MsgStream > m_msgSvc
Reference to message service.
MsgStream& Gaudi::RootConnectionSetup::msgSvc ( ) const
inline

Retrieve message service.

Definition at line 84 of file RootDataConnection.h.

84 { return *m_msgSvc; }
std::unique_ptr< MsgStream > m_msgSvc
Reference to message service.
void RootConnectionSetup::release ( )

Decrease reference count.

Definition at line 134 of file RootDataConnection.cpp.

134  {
135  int tmp = --refCount;
136  if ( tmp <= 0 ) {
137  delete this;
138  }
139 }
int refCount
Object reference count.
void Gaudi::RootConnectionSetup::release ( )

Decrease reference count.

static long Gaudi::RootConnectionSetup::setCompression ( const std::string &  compression)
static

Set the global compression level.

long RootConnectionSetup::setCompression ( const std::string &  compression)
static

Set the global compression level.

Definition at line 92 of file RootDataConnection.cpp.

92  {
93 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,33,0)
94  int res = 0, level = ROOT::CompressionSettings(ROOT::kLZMA,6);
95  auto idx = compression.find(':');
96  if ( idx != string::npos ) {
97  string alg = compression.substr(0,idx);
98  ROOT::ECompressionAlgorithm alg_code = ROOT::kUseGlobalSetting;
99  if ( strcasecmp(alg.c_str(),"ZLIB") == 0 )
100  alg_code = ROOT::kZLIB;
101  else if ( strcasecmp(alg.c_str(),"LZMA") == 0 )
102  alg_code = ROOT::kLZMA;
103  else
104  throw runtime_error("ERROR: request to set unknown ROOT compression algorithm:"+alg);
105  res = ::sscanf(compression.c_str()+idx+1,"%d",&level);
106  if ( res == 1 ) {
107  s_compressionLevel = ROOT::CompressionSettings(alg_code,level);
108  return StatusCode::SUCCESS;
109  }
110  throw runtime_error("ERROR: request to set unknown ROOT compression level:"+compression.substr(idx+1));
111  }
112  else if ( 1==::sscanf(compression.c_str(),"%d",&level) ) {
113  s_compressionLevel = level;
114  return StatusCode::SUCCESS;
115  }
116  throw runtime_error("ERROR: request to set unknown ROOT compression mechanism:"+compression);
117 #else
118  if ( !compression.empty() ) {}
119  return StatusCode::SUCCESS;
120 #endif
121 }
static int compression()
Access to global compression level.
void Gaudi::RootConnectionSetup::setIncidentSvc ( IIncidentSvc m)

Set incident service reference.

void RootConnectionSetup::setIncidentSvc ( IIncidentSvc m)

Set incident service reference.

Definition at line 147 of file RootDataConnection.cpp.

147  {
149 }
SmartIF< IIncidentSvc > m_incidentSvc
Reference to incident service.
string s
Definition: gaudirun.py:246
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:88
void RootConnectionSetup::setMessageSvc ( MsgStream m)

Set message service reference.

Definition at line 142 of file RootDataConnection.cpp.

142  {
143  m_msgSvc.reset(m);
144 }
std::unique_ptr< MsgStream > m_msgSvc
Reference to message service.
void Gaudi::RootConnectionSetup::setMessageSvc ( MsgStream m)

Set message service reference.

Member Data Documentation

StringVec Gaudi::RootConnectionSetup::cacheBranches

Vector of strings with branches to be cached for input files.

Definition at line 59 of file RootDataConnection.h.

int Gaudi::RootConnectionSetup::cacheSize

RootCnvSvc Property: Root data cache size.

Definition at line 65 of file RootDataConnection.h.

int Gaudi::RootConnectionSetup::learnEntries

RootCnvSvc Property: ROOT cache learn entries.

Definition at line 67 of file RootDataConnection.h.

std::string Gaudi::RootConnectionSetup::loadSection

RootCnvSvc Property: Root data cache size.

Definition at line 63 of file RootDataConnection.h.

SmartIF< IIncidentSvc > Gaudi::RootConnectionSetup::m_incidentSvc = nullptr
protected

Reference to incident service.

Definition at line 55 of file RootDataConnection.h.

std::unique_ptr< MsgStream > Gaudi::RootConnectionSetup::m_msgSvc
protected

Reference to message service.

Definition at line 53 of file RootDataConnection.h.

int Gaudi::RootConnectionSetup::refCount = 1
protected

Object reference count.

Definition at line 51 of file RootDataConnection.h.

StringVec Gaudi::RootConnectionSetup::vetoBranches

Vector of strings with branches to NOT be cached for input files.

Definition at line 61 of file RootDataConnection.h.


The documentation for this class was generated from the following files: