CMS 3D CMS Logo

ProgressMarker.cc

Go to the documentation of this file.
00001 // Created by Markus Klute on 2007 Jan 09.
00002 // $Id: ProgressMarker.cc,v 1.1 2007/02/05 11:19:57 klute Exp $
00003 
00004 #include <EventFilter/StorageManager/interface/ProgressMarker.h>
00005 
00006 using stor::ProgressMarker;
00007 using std::string;
00008 
00009 ProgressMarker *inst = 0;
00010 
00011 ProgressMarker::ProgressMarker()
00012 {
00013   reading_     = false;
00014   writing_     = false;
00015   processing_  = false;
00016 }
00017 
00018 
00019 ProgressMarker *ProgressMarker::instance()
00020 { // not thread save
00021   if (inst == 0) inst = new ProgressMarker();
00022   return inst;
00023 }
00024 
00025 
00026 void ProgressMarker::instance(ProgressMarker *anInstance)
00027 { // not thread save
00028   delete inst;
00029   inst = anInstance;
00030 }
00031 
00032 
00033 string ProgressMarker::status()
00034 {
00035   if (processing_) return "Process";
00036   if (reading_)    return "Input";
00037   if (writing_)    return "Output";
00038   return "Idle";
00039 }

Generated on Tue Jun 9 17:34:57 2009 for CMSSW by  doxygen 1.5.4