CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RawEventFileWriterForBU.h
Go to the documentation of this file.
1 #ifndef EVFRAWEVENTFILEWRITERFORBU
2 #define EVFRAWEVENTFILEWRITERFORBU
3 
4 // $Id: RawEventFileWriterForBU.h,v 1.1.2.5 2013/03/28 14:56:53 aspataru Exp $
5 
8 
12 
13 #include <fstream>
14 #include <stdio.h>
15 #include <sys/types.h>
16 #include <sys/stat.h>
17 #include <fcntl.h>
18 
19 #include "boost/shared_array.hpp"
20 
21 using namespace jsoncollector;
22 
24 {
25  public:
26 
27  explicit RawEventFileWriterForBU(edm::ParameterSet const& ps);
30 
31  void doOutputEvent(FRDEventMsgView const& msg);
32  void doOutputEvent(boost::shared_array<unsigned char>& msg) {};
33  void doOutputEventFragment(unsigned char* dataPtr,
34  unsigned long dataSize);
35  void doFlushFile();
36  uint32 adler32() const { return (adlerb_ << 16) | adlera_; }
37 
38  void start() {}
39  void stop() {}
40  void initialize(std::string const& destinationDir, std::string const& name, int ls);
41  void endOfLS(int ls);
42  bool sharedMode() const {return false;}
43 
44  void handler(int s);
45  static void staticHandler(int s) { instance->handler(s); }
46 
47  private:
48 
53 
54  std::auto_ptr<std::ofstream> ost_;
55  int outfd_;
58 
61 
64 
66 
67 };
68 #endif
static PFTauRenderPlugin instance
void doOutputEvent(boost::shared_array< unsigned char > &msg)
std::auto_ptr< std::ofstream > ost_
static void staticHandler(int s)
unsigned int uint32
Definition: MsgTools.h:13
static RawEventFileWriterForBU * instance