CMS 3D CMS Logo

SerializeTxt.cc

Go to the documentation of this file.
00001 // Author : Samvel Khalatian (samvel at fnal dot gov)
00002 // Created: 07/15/07
00003 // License: GPL
00004 
00005 #include <istream>
00006 #include <ostream>
00007 
00008 #include <boost/archive/binary_iarchive.hpp>
00009 #include <boost/archive/binary_oarchive.hpp>
00010 
00011 #include <boost/archive/text_iarchive.hpp>
00012 #include <boost/archive/text_oarchive.hpp>
00013 
00014 #include "CalibTracker/SiStripRunSummary/interface/FlagTxt.h"
00015 #include "CalibTracker/SiStripRunSummary/interface/RegisterFlagTxt.h"
00016 
00017 #include "CalibTracker/SiStripRunSummary/interface/SerializeTxt.h"
00018 
00019 // --[ TEXT ARCHIVE MANAGER ]--------------------------------------------------
00020 //                                                  --[ PUBLIC ]--
00021 
00022 //                                                  --[ PRIVATE ]--
00023 void SerializeTxt::writeFlag( std::ostream  &roOut, 
00024                               const FlagTxt &roFLAGTXT) const
00025 {
00026   boost::archive::text_oarchive oAOut( roOut);
00027 
00028   oAOut << roFLAGTXT;
00029 }
00030 
00031 void SerializeTxt::readFlag( FlagTxt *poFlagTxt, std::istream &roIn) {
00032   boost::archive::text_iarchive oAIn( roIn);
00033 
00034   oAIn >> ( *poFlagTxt);
00035 }
00036 
00037 // --[ BINARY ARCHIVE MANAGER ]------------------------------------------------
00038 //                                                  --[ PUBLIC ]--
00039 
00040 //                                                  --[ PRIVATE ]--
00041 void SerializeBin::writeFlag( std::ostream  &roOut, 
00042                               const FlagTxt &roFLAGTXT) const
00043 {
00044   boost::archive::binary_oarchive oAOut( roOut);
00045 
00046   oAOut << roFLAGTXT;
00047 }
00048 
00049 void SerializeBin::readFlag( FlagTxt *poFlagTxt, std::istream &roIn) {
00050   boost::archive::binary_iarchive oAIn( roIn);
00051 
00052   oAIn >> ( *poFlagTxt);
00053 }

Generated on Tue Jun 9 17:25:53 2009 for CMSSW by  doxygen 1.5.4