Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHmd5Value Class Reference

#include <online_distribution/blob/master/newbasic/PHmd5Value.h>

Public Member Functions

 PHmd5Value ()
 construct an "empty" object
 
 PHmd5Value (const PHmd5Value &)
 the copy constructor
 
 PHmd5Value (FILE *fp)
 give an open file pointer to gte the checksum of that file
 
 PHmd5Value (const char *filename)
 give a filename to get the MD5 sum of that file
 
 ~PHmd5Value ()
 
int Status () const
 The Status() is 0 if the md5 could be computed alright.
 
int operator== (const PHmd5Value &) const
 overload the == operator to tell if two MD5 sums are equal
 
int getMD5 (unsigned char *digest) const
 copy the digest to the "digest" parameter
 
int setMD5 (const unsigned char *digest)
 set a new digest value from the argument
 
int setFileMD5 (const char *filename)
 if we change the file, this allows to update the MD5 sum
 
int FileSize () const
 as well remember its size to get back at it later.
 

Protected Attributes

unsigned char theDigest [PHMD5DIGESTLENGTH]
 
int isNotValid
 
int filesize
 

Friends

OSTREAMoperator<< (OSTREAM &, const PHmd5Value &)
 define the ostream >> operator
 

Detailed Description

Definition at line 32 of file PHmd5Value.h.

View newest version in sPHENIX GitHub at line 32 of file PHmd5Value.h

Constructor & Destructor Documentation

PHmd5Value::PHmd5Value ( )

construct an "empty" object

Definition at line 6 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 6 of file PHmd5Value.cc

References i, isNotValid, PHMD5DIGESTLENGTH, and theDigest.

PHmd5Value::PHmd5Value ( const PHmd5Value other)

the copy constructor

Definition at line 15 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 15 of file PHmd5Value.cc

References getMD5(), isNotValid, and theDigest.

+ Here is the call graph for this function:

PHmd5Value::PHmd5Value ( FILE *  fp)

give an open file pointer to gte the checksum of that file

Definition at line 21 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 21 of file PHmd5Value.cc

References filesize, isNotValid, PHmd5Stream(), and theDigest.

+ Here is the call graph for this function:

PHmd5Value::PHmd5Value ( const char *  filename)

give a filename to get the MD5 sum of that file

Definition at line 27 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 27 of file PHmd5Value.cc

References filesize, isNotValid, PHmd5File(), and theDigest.

+ Here is the call graph for this function:

PHmd5Value::~PHmd5Value ( )

Definition at line 33 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 33 of file PHmd5Value.cc

Member Function Documentation

int PHmd5Value::FileSize ( ) const

as well remember its size to get back at it later.

this is for convenience – once we digest the file, we might

Definition at line 41 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 41 of file PHmd5Value.cc

References filesize.

int PHmd5Value::getMD5 ( unsigned char *  digest) const

copy the digest to the "digest" parameter

Definition at line 61 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 61 of file PHmd5Value.cc

References i, isNotValid, PHMD5DIGESTLENGTH, and theDigest.

Referenced by operator==(), and PHmd5Value().

+ Here is the caller graph for this function:

int PHmd5Value::operator== ( const PHmd5Value other) const

overload the == operator to tell if two MD5 sums are equal

Definition at line 47 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 47 of file PHmd5Value.cc

References getMD5(), i, isNotValid, PHMD5DIGESTLENGTH, Status(), and theDigest.

+ Here is the call graph for this function:

int PHmd5Value::setFileMD5 ( const char *  filename)

if we change the file, this allows to update the MD5 sum

Definition at line 88 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 88 of file PHmd5Value.cc

References filesize, isNotValid, PHmd5File(), and theDigest.

+ Here is the call graph for this function:

int PHmd5Value::setMD5 ( const unsigned char *  digest)

set a new digest value from the argument

Definition at line 76 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 76 of file PHmd5Value.cc

References i, isNotValid, PHMD5DIGESTLENGTH, and theDigest.

int PHmd5Value::Status ( ) const

The Status() is 0 if the md5 could be computed alright.

Definition at line 36 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 36 of file PHmd5Value.cc

References isNotValid.

Referenced by operator<<(), and operator==().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

OSTREAM& operator<< ( OSTREAM os,
const PHmd5Value md 
)
friend

define the ostream >> operator

Definition at line 95 of file PHmd5Value.cc.

View newest version in sPHENIX GitHub at line 95 of file PHmd5Value.cc

Member Data Documentation

int PHmd5Value::filesize
protected

Definition at line 77 of file PHmd5Value.h.

View newest version in sPHENIX GitHub at line 77 of file PHmd5Value.h

Referenced by FileSize(), PHmd5Value(), and setFileMD5().

int PHmd5Value::isNotValid
protected

Definition at line 76 of file PHmd5Value.h.

View newest version in sPHENIX GitHub at line 76 of file PHmd5Value.h

Referenced by getMD5(), operator==(), PHmd5Value(), setFileMD5(), setMD5(), and Status().

unsigned char PHmd5Value::theDigest[PHMD5DIGESTLENGTH]
protected

Definition at line 75 of file PHmd5Value.h.

View newest version in sPHENIX GitHub at line 75 of file PHmd5Value.h

Referenced by getMD5(), operator<<(), operator==(), PHmd5Value(), setFileMD5(), and setMD5().


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