CMS 3D CMS Logo

GzInputStream Struct Reference

List of all members.

Public Types

typedef voidp gzFile

Public Member Functions

 GzInputStream (const char *file)
 operator void * ()
void readLine ()
 ~GzInputStream ()

Public Attributes

char buffer [256]
bool eof
gzFile gzf
std::istringstream iss


Detailed Description

Definition at line 15 of file EcalTrigPrimESProducer.cc.


Member Typedef Documentation

typedef voidp GzInputStream::gzFile

Definition at line 17 of file EcalTrigPrimESProducer.cc.


Constructor & Destructor Documentation

GzInputStream::GzInputStream ( const char *  file  )  [inline]

Definition at line 22 of file EcalTrigPrimESProducer.cc.

References eof, gzf, readLine(), and true.

00023    : eof(false)
00024    {
00025     gzf = gzopen(file,"rb") ;
00026     if (gzf==Z_NULL)
00027      {
00028       eof = true ;
00029       edm::LogWarning("EcalTPG") <<"Database file "<<file<<" not found!!!";
00030      }
00031     else readLine() ;
00032    }

GzInputStream::~GzInputStream (  )  [inline]

Definition at line 43 of file EcalTrigPrimESProducer.cc.

References gzf.

00044    { gzclose(gzf) ; }


Member Function Documentation

GzInputStream::operator void * (  )  [inline]

Definition at line 45 of file EcalTrigPrimESProducer.cc.

References eof, and iss.

00046    { return ((eof==true)?((void*)0):iss) ; }

void GzInputStream::readLine (  )  [inline]

Definition at line 33 of file EcalTrigPrimESProducer.cc.

References buffer, eof, gzf, iss, and res.

Referenced by GzInputStream(), and operator>>().

00034    {
00035     char * res = gzgets(gzf,buffer,256) ;
00036     eof = (res==Z_NULL) ;
00037     if (!eof)
00038      {
00039       iss.clear() ;
00040       iss.str(buffer) ;
00041      }
00042    }


Member Data Documentation

char GzInputStream::buffer[256]

Definition at line 19 of file EcalTrigPrimESProducer.cc.

Referenced by readLine().

bool GzInputStream::eof

Definition at line 21 of file EcalTrigPrimESProducer.cc.

Referenced by GzInputStream(), operator void *(), and readLine().

gzFile GzInputStream::gzf

Definition at line 18 of file EcalTrigPrimESProducer.cc.

Referenced by GzInputStream(), readLine(), and ~GzInputStream().

std::istringstream GzInputStream::iss

Definition at line 20 of file EcalTrigPrimESProducer.cc.

Referenced by operator void *(), operator>>(), and readLine().


The documentation for this struct was generated from the following file:
Generated on Tue Jun 9 18:23:24 2009 for CMSSW by  doxygen 1.5.4