All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Gaudi::RootConnectionSetup Class Reference

#include <RootCnv/RootDataConnection.h>

Collaboration diagram for Gaudi::RootConnectionSetup:

Public Types

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

Public Member Functions

 RootConnectionSetup ()
 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...
 

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 ()
 Standard destructor. More...
 

Protected Attributes

int refCount
 Object refrfence count. More...
 
MsgStreamm_msgSvc
 Reference to message service. More...
 
IIncidentSvcm_incidentSvc
 Reference to incident service. More...
 

Detailed Description

Definition at line 42 of file RootDataConnection.h.

Member Typedef Documentation

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

Type definition for string maps.

Definition at line 45 of file RootDataConnection.h.

Constructor & Destructor Documentation

RootConnectionSetup::~RootConnectionSetup ( )
protectedvirtual

Standard destructor.

Definition at line 96 of file RootDataConnection.cpp.

96  {
98  m_incidentSvc = 0;
99  deletePtr(m_msgSvc);
100 }
IIncidentSvc * m_incidentSvc
Reference to incident service.
virtual unsigned long release()=0
Release Interface instance.
MsgStream * m_msgSvc
Reference to message service.
RootConnectionSetup::RootConnectionSetup ( )

Standard constructor.

Definition at line 91 of file RootDataConnection.cpp.

91  : refCount(1), m_msgSvc(0), m_incidentSvc(0)
92 {
93 }
int refCount
Object refrfence count.
IIncidentSvc * m_incidentSvc
Reference to incident service.
MsgStream * m_msgSvc
Reference to message service.

Member Function Documentation

void RootConnectionSetup::addRef ( )

Increase reference count.

Definition at line 140 of file RootDataConnection.cpp.

140  {
141  ++refCount;
142 }
int refCount
Object refrfence count.
int RootConnectionSetup::compression ( )
static

Access to global compression level.

Global compression level.

Definition at line 135 of file RootDataConnection.cpp.

135  {
136  return s_compressionLevel;
137 }
IIncidentSvc* Gaudi::RootConnectionSetup::incidentSvc ( ) const
inline

Retrieve incident service.

Definition at line 88 of file RootDataConnection.h.

88 { return m_incidentSvc; }
IIncidentSvc * m_incidentSvc
Reference to incident service.
MsgStream& Gaudi::RootConnectionSetup::msgSvc ( ) const
inline

Retrieve message service.

Definition at line 83 of file RootDataConnection.h.

83 { return *m_msgSvc; }
MsgStream * m_msgSvc
Reference to message service.
void RootConnectionSetup::release ( )

Decrease reference count.

Definition at line 145 of file RootDataConnection.cpp.

145  {
146  int tmp = --refCount;
147  if ( tmp <= 0 ) {
148  delete this;
149  }
150 }
int refCount
Object refrfence count.
long RootConnectionSetup::setCompression ( const std::string &  compression)
static

Set the global compression level.

Definition at line 103 of file RootDataConnection.cpp.

103  {
104 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,33,0)
105  int res = 0, level = ROOT::CompressionSettings(ROOT::kLZMA,6);
106  size_t idx = compression.find(':');
107  if ( idx != string::npos ) {
108  string alg = compression.substr(0,idx);
109  ROOT::ECompressionAlgorithm alg_code = ROOT::kUseGlobalSetting;
110  if ( strcasecmp(alg.c_str(),"ZLIB") == 0 )
111  alg_code = ROOT::kZLIB;
112  else if ( strcasecmp(alg.c_str(),"LZMA") == 0 )
113  alg_code = ROOT::kLZMA;
114  else
115  throw runtime_error("ERROR: request to set unknown ROOT compression algorithm:"+alg);
116  res = ::sscanf(compression.c_str()+idx+1,"%d",&level);
117  if ( res == 1 ) {
118  s_compressionLevel = ROOT::CompressionSettings(alg_code,level);
119  return StatusCode::SUCCESS;
120  }
121  throw runtime_error("ERROR: request to set unknown ROOT compression level:"+compression.substr(idx+1));
122  }
123  else if ( 1==::sscanf(compression.c_str(),"%d",&level) ) {
124  s_compressionLevel = level;
125  return StatusCode::SUCCESS;
126  }
127  throw runtime_error("ERROR: request to set unknown ROOT compression mechanism:"+compression);
128 #else
129  if ( !compression.empty() ) {}
130  return StatusCode::SUCCESS;
131 #endif
132 }
static int compression()
Access to global compression level.
void RootConnectionSetup::setIncidentSvc ( IIncidentSvc m)

Set incident service reference.

Definition at line 160 of file RootDataConnection.cpp.

160  {
162  m_incidentSvc = s;
164  if ( tmp ) tmp->release();
165 }
IIncidentSvc * m_incidentSvc
Reference to incident service.
virtual unsigned long release()=0
Release Interface instance.
string s
Definition: gaudirun.py:210
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:22
void RootConnectionSetup::setMessageSvc ( MsgStream m)

Set message service reference.

Definition at line 153 of file RootDataConnection.cpp.

153  {
154  MsgStream* tmp = m_msgSvc;
155  m_msgSvc = m;
156  deletePtr(tmp);
157 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream * m_msgSvc
Reference to message service.

Member Data Documentation

StringVec Gaudi::RootConnectionSetup::cacheBranches

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

Definition at line 58 of file RootDataConnection.h.

int Gaudi::RootConnectionSetup::cacheSize

RootCnvSvc Property: Root data cache size.

Definition at line 64 of file RootDataConnection.h.

int Gaudi::RootConnectionSetup::learnEntries

RootCnvSvc Property: ROOT cache learn entries.

Definition at line 66 of file RootDataConnection.h.

std::string Gaudi::RootConnectionSetup::loadSection

RootCnvSvc Property: Root data cache size.

Definition at line 62 of file RootDataConnection.h.

IIncidentSvc* Gaudi::RootConnectionSetup::m_incidentSvc
protected

Reference to incident service.

Definition at line 54 of file RootDataConnection.h.

MsgStream* Gaudi::RootConnectionSetup::m_msgSvc
protected

Reference to message service.

Definition at line 52 of file RootDataConnection.h.

int Gaudi::RootConnectionSetup::refCount
protected

Object refrfence count.

Definition at line 50 of file RootDataConnection.h.

StringVec Gaudi::RootConnectionSetup::vetoBranches

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

Definition at line 60 of file RootDataConnection.h.


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