DemoDaqOutputModule Class Reference

#include <DemoDaqOutputModule.h>

List of all members.

Public Member Functions

 DemoDaqOutputModule ()
virtual ~DemoDaqOutputModule ()
std::ostream & Print (std::ostream &ms) const
void BeginJob ()
void EndJob ()
bool BeginFile (std::string fullfilepathname, Per::EAccessMode=Per::kNew)
void EndFile ()
Int_t Put (const MomNavigator *mom)

Private Attributes

PerOutputStreamManager fOutputStreamManager

Detailed Description

Definition at line 26 of file DemoDaqOutputModule.h.


Constructor & Destructor Documentation

DemoDaqOutputModule::DemoDaqOutputModule (  )  [inline]

Definition at line 31 of file DemoDaqOutputModule.h.

00031 {}

virtual DemoDaqOutputModule::~DemoDaqOutputModule (  )  [inline, virtual]

Definition at line 32 of file DemoDaqOutputModule.h.

00032 {}


Member Function Documentation

bool DemoDaqOutputModule::BeginFile ( std::string  fullfilepathname,
Per::EAccessMode  = Per::kNew 
)

Referenced by main().

void DemoDaqOutputModule::BeginJob ( void   ) 

Definition at line 55 of file DemoDaqOutputModule.cc.

References fOutputStreamManager, Per::kRecSplit, and PerOutputStreamManager::OpenStream().

Referenced by main().

00055                                    {
00056   //
00057   // Purpose: Perform initialization of streams required at Daq startup.
00058   //
00059   // Arguments: none.
00060   //
00061   // Return: none.
00062   //
00063   // Contact:  S. Kasahara
00064   //
00065 
00066   PerOutputStream* outstream;
00067   // Open stream w/name "DaqSnarl" to fill tree "DaqSnarl" (but note
00068   // that streamname need not be the same as treename) with objects
00069   // of class "RawRecord" (for now).  One main branch is created with
00070   // splitlevel = Per::kRecSplit. 
00071   outstream = fOutputStreamManager.OpenStream("DaqSnarl","DaqSnarl",
00072                                            "RawRecord","","",Per::kRecSplit);
00073   if ( outstream ) {
00074     // Set the AutoSave event interval of this stream.  This will automatically
00075     // configure the BasketSave event interval of each branch attached to 
00076     // stream to dump baskets just before the tree save.
00077     outstream -> SetAutoSave(100,10);
00078   }
00079   outstream = fOutputStreamManager.OpenStream("DaqMonitor","DaqMonitor",
00080                                            "RawRecord","","",Per::kRecSplit);
00081   if ( outstream ) {
00082     // Set the AutoSave event interval of this stream.  This will automatically
00083     // configure the BasketSave event interval of each branch attached to 
00084     // stream to dump baskets just before the tree save.
00085     outstream -> SetAutoSave(100,10);
00086   }
00087 
00088 }

void DemoDaqOutputModule::EndFile (  ) 

Definition at line 90 of file DemoDaqOutputModule.cc.

References PerStreamManager::CloseFile(), fOutputStreamManager, and PerOutputStreamManager::Write().

Referenced by main().

00090                                   {
00091   //
00092   //  Purpose:  Close current file for all streams managed by output stream
00093   //            manager.
00094   //
00095   //  Argument: none.
00096   //
00097   //  Return:  none.
00098   //
00099   //  Contact:   S. Kasahara
00100   //
00101 
00102   fOutputStreamManager.Write(); // write the trees on all streams to file
00103   fOutputStreamManager.CloseFile(); // close files on all streams
00104 
00105 }

void DemoDaqOutputModule::EndJob (  ) 

Definition at line 107 of file DemoDaqOutputModule.cc.

References PerStreamManager::CloseStream(), and fOutputStreamManager.

Referenced by main().

00107                                  {
00108   // 
00109   // Purpose: Close all streams at Daq finish.
00110   //
00111   // Arguments: none.
00112   //
00113   // Return: none.
00114   //
00115   // Contact:  S. Kasahara
00116   //
00117 
00118   fOutputStreamManager.CloseStream();
00119 
00120 }

std::ostream& DemoDaqOutputModule::Print ( std::ostream &  ms  )  const

Referenced by operator<<().

Int_t DemoDaqOutputModule::Put ( const MomNavigator mom  ) 

Definition at line 140 of file DemoDaqOutputModule.cc.

References fOutputStreamManager, and PerOutputStreamManager::Put().

Referenced by main().

00140                                                       {
00141   //  Purpose:  Store new entry with use of output stream manager.
00142   //
00143   //  Argument: mom  pointer to MomNavigator
00144   //
00145   //  Return:  number of objects actually persisted.
00146   //
00147   //  Contact:   S. Kasahara
00148   //
00149 
00150   // Persist the records from Mom into the appropriate stream(s).
00151   Int_t nobject = fOutputStreamManager.Put(mom);
00152   return nobject;
00153 
00154 }


Member Data Documentation

Definition at line 47 of file DemoDaqOutputModule.h.

Referenced by BeginJob(), EndFile(), EndJob(), and Put().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1