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 93 of file RootDataConnection.cpp.

93  {
95  m_incidentSvc = 0;
96  deletePtr(m_msgSvc);
97 }
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 88 of file RootDataConnection.cpp.

88  : refCount(1), m_msgSvc(0), m_incidentSvc(0)
89 {
90 }
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 132 of file RootDataConnection.cpp.

132  {
133  ++refCount;
134 }
int refCount
Object refrfence count.
int RootConnectionSetup::compression ( )
static

Access to global compression level.

Global compression level.

Definition at line 127 of file RootDataConnection.cpp.

127  {
128  return s_compressionLevel;
129 }
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 137 of file RootDataConnection.cpp.

137  {
138  int tmp = --refCount;
139  if ( tmp <= 0 ) {
140  delete this;
141  }
142 }
int refCount
Object refrfence count.
long RootConnectionSetup::setCompression ( const std::string &  compression)
static

Set the global compression level.

Definition at line 100 of file RootDataConnection.cpp.

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

Set incident service reference.

Definition at line 152 of file RootDataConnection.cpp.

152  {
154  m_incidentSvc = s;
156  if ( tmp ) tmp->release();
157 }
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 145 of file RootDataConnection.cpp.

145  {
146  MsgStream* tmp = m_msgSvc;
147  m_msgSvc = m;
148  deletePtr(tmp);
149 }
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: