/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DybOutputFileRoller.h
Go to the documentation of this file.
00001 
00035 #ifndef DYBOUTPUTFILEROLLER
00036 #define DYBOUTPUTFILEROLLER
00037 
00038 #include "RootIOSvc/IRootIOSvc.h"
00039 #include "Context/TimeStamp.h"
00040 #include "GaudiAlg/GaudiAlgorithm.h"
00041 
00042 #include <string>
00043 
00044 
00045 class DybOutputFileRoller : public GaudiAlgorithm
00046 {
00047 public:
00048     DybOutputFileRoller(const std::string& name, ISvcLocator* svcloc);
00049     virtual ~DybOutputFileRoller();
00050     
00051     StatusCode initialize();
00052     StatusCode execute();
00053     StatusCode finalize();
00054     
00055 private: // Properties
00056 
00067     std::string m_condition;
00068 
00082     typedef std::map<std::string,std::string> ConditionPropertyMap_t;
00083     ConditionPropertyMap_t m_condpropmap;
00084 
00085 private:
00086     int m_current_execnum;
00087     IRootIOSvc* m_rio;
00088     IRootIOSvc::FileMap m_filemap;
00089 
00090     // Parse condition and bookkeeping data
00091     struct ConditionData {
00092         ConditionData(int s, char u, int c=0, 
00093                       int e = 0, const TimeStamp& ts = TimeStamp::GetBOT())
00094             : size(s), unit(u), count(c), cycles(e), timestamp(ts) {}
00095         ConditionData()
00096             : size(0), unit(0), count(0), cycles(0), timestamp(TimeStamp::GetBOT()) {}
00097         int size;               // parsed condition size
00098         char unit;              // parsed condition unit
00099         int count;              // file count
00100         int cycles;             // cycles left before a roll for E condition
00101         TimeStamp timestamp;    // target timestamp for roll for S condition
00102                                 // M condition does not need anything here
00103     };
00104 
00105     typedef std::map<std::string,ConditionData> CDMap_t;
00106     CDMap_t m_cdmap;
00107 
00108     StatusCode roll(std::string stream, ConditionData& cd);
00109     StatusCode check_e(std::string stream, ConditionData& cd);
00110     StatusCode check_m(std::string stream, ConditionData& cd);
00111     StatusCode check_s(std::string stream, ConditionData& cd);
00112 
00113 };
00114 
00115 #endif  // DYBOUTPUTFILEROLLER
00116 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:15:57 for DybIO by doxygen 1.7.4